I'm trying to make a thread to handle ZIP archiving:
HANDLE hThread = CreateThread(
NULL,
0,
ZipProcess,
(LPVOID) cmdline.c_str(),
0,
NULL);
I'm passing the command line argument as a string in the lpParameter
.
I keep getting this error:
...argument of type 'void (MyClass::)(std::string) {aka void (MyClass::)(std::basic_string)}' does not match 'LPTHREAD_START_ROUTINE {aka long unsigned int ()(void)}'|
I've tried several things - passing by reference, writing to a buffer, a reinterpret_cast
, and others, but the error persists. How to fix this?