stackoverflower i got a problem so i made a application in windows form but now i want to make it show becouse i inject it its a dynamic library not a executeable iknow that you use this for winapi
BOOL APIENTRY DllMain(HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hModule);
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&showform, NULL, 0, 0);
break;
case DLL_THREAD_ATTACH: break;
case DLL_THREAD_DETACH: break;
case DLL_PROCESS_DETACH: break;
}
return TRUE;
}
and i tried this for windows form
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
hProcessCenter = ::FindWindow(NULL, _T("WINDOW"));
}
return 1;
}
i am gettings these errors for windows form:
Error 1 error C3641: 'DllMain' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe
Error 2 error C2065: 'hProcessCenter' : undeclared identifier
Error 3 error C3861: '_T': identifier not found
i hope that somebody can help me out