I'm having issues using CreateThread:
this is the code:
DWORD WINAPI DualP(LPVOID vImg)
const char* lpKey = (const char*)"mykey123";
FILE * iFile;
char * buffer;
iFile = fopen("a.txt", "rb");
fseek(iFile, 0, SEEK_END);
lSize = ftell(iFile);
buffer = (char*) malloc (sizeof(char)*lSize);
result = EnDeCrypt((const char*)buffer, lSize, lpKey);
DWORD threadId = 0;
HANDLE hThread = CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)DualP, (LPVOID)result, 0, &threadId);
if(hThread == NULL)
as you can see I'm trying to decrypt some data and send the result of that decrypted data into the function DualP, but it's not even accessing DualP. The thread is created successfully, but I never see "inside" or the contents of vImg being displayed, which is what should happen when I'm inside DualP.
Again, the thread is being created, but it's not entering it.
Anyone see where I'm going wrong?