本文整理匯總了C++中DisableThreadLibraryCalls函數的典型用法代碼示例。如果您正苦於以下問題:C++ DisableThreadLibraryCalls函數的具體用法?C++ DisableThreadLibraryCalls怎麽用?C++ DisableThreadLibraryCalls使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DisableThreadLibraryCalls函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: DllMain
BOOL WINAPI
DllMain(HINSTANCE hinstDll,
DWORD dwReason,
LPVOID reserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDll);
RegInitialize();
break;
case DLL_PROCESS_DETACH:
RegCleanup();
UnloadNtMarta();
break;
}
return TRUE;
}
示例2: DllMain
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
{
DisableThreadLibraryCalls(hinstDLL);
WTSAPI32_hModule = hinstDLL;
break;
}
case DLL_PROCESS_DETACH:
{
break;
}
}
return TRUE;
}
示例3: DllMain
BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID pvReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
g_hInst = (HINSTANCE)hInstance;
DisableThreadLibraryCalls((HINSTANCE)hInstance);
#ifdef SELF_NO_HOST
jitOnDllProcessAttach();
g_fClrCallbacksInit = TRUE;
#endif
}
else if (dwReason == DLL_PROCESS_DETACH)
{
if (g_fClrCallbacksInit)
jitOnDllProcessDetach();
}
return TRUE;
}
示例4: DllMain
extern "C" bool __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
{
DisableThreadLibraryCalls(hinstDLL);
return Initialize();
}
break;
case DLL_PROCESS_DETACH:
{
DeInitialize();
}
break;
}
return true;
}
示例5: DllMain
/******************************************************************
* DllMain
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
msi_hInstance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
IsWow64Process( GetCurrentProcess(), &is_wow64 );
break;
case DLL_PROCESS_DETACH:
if (lpvReserved) break;
msi_dialog_unregister_class();
msi_free_handle_table();
msi_free( gszLogFile );
release_typelib();
break;
}
return TRUE;
}
示例6: DllMain
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
break;
case DLL_PROCESS_DETACH:
break;
default:
break;
}
return TRUE;
}
示例7: DllMain
BOOL WINAPI DllMain( HINSTANCE hInstance,
DWORD reason,
LPVOID pReserved )
{
IFXRESULT result = IFX_OK;
if ( reason == DLL_PROCESS_ATTACH )
{
DisableThreadLibraryCalls( hInstance );
result = IFXRenderingStartup();
}
else if ( reason == DLL_PROCESS_DETACH )
{
result = IFXRenderingShutdown();
}
return ( IFXSUCCESS( result ) ? TRUE : FALSE );
}
示例8: DllMain
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
BOOL bRet = FALSE;
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hModule);
bRet = (CStackStorage::GetInstance()->InitSharedFileMapping(0)
&& CStackStorage::GetInstance()->Open());
if (TRUE == bRet)
{
bRet = DetoursorHelper::AddAllFunctionsToDetoursor(CDetoursor::GetInstance());
if (TRUE == bRet)
{
bRet = CDetoursor::GetInstance()->DoHook();
}
}
break;
case DLL_PROCESS_DETACH:
bRet = CDetoursor::GetInstance()->UndoHook();
if (TRUE == bRet)
{
WCHAR wcsExeFilePathName[_MAX_PATH];
ZeroMemory(wcsExeFilePathName, sizeof(_MAX_PATH));
GetModuleFileNameW(NULL, wcsExeFilePathName, _countof(wcsExeFilePathName));
CDetoursor::GetInstance()->ClearFunctionTable();
CStackStorage::GetInstance()->SetModInfoData(CCallStack::GetModInfoVector());
CStackStorage::GetInstance()->SetHeaderData(wcsExeFilePathName);
CStackStorage::GetInstance()->Close();
}
break;
}
return bRet;
}
示例9: DllMain
/******************************************************************
* DllMain ([email protected])
*/
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv);
switch(fdwReason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
vbscript_hinstance = hInstDLL;
break;
case DLL_PROCESS_DETACH:
release_typelib();
release_regexp_typelib();
}
return TRUE;
}
示例10: DllMain
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
#ifdef HAVE_OPENAL
load_libopenal();
#endif /*HAVE_OPENAL*/
break;
case DLL_PROCESS_DETACH:
MMDevEnum_Free();
break;
}
return TRUE;
}
示例11: DllMain
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
MSCOREE_hInstance = hinstDLL;
switch (fdwReason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
break;
case DLL_PROCESS_DETACH:
expect_no_runtimes();
break;
}
return TRUE;
}
示例12: DllMain
BOOL APIENTRY DllMain( HANDLE hInst,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls((HINSTANCE)hInst);
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
示例13: DllMain
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
DisableThreadLibraryCalls((HMODULE)hModule);
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
DLL.Start();
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
DLL.Stop();
break;
}
return TRUE;
}
示例14: DllMain
extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
g_hModule = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
Com_Printf("\n[CoD XTREME] Injected successfully. Visit www.modszombies.com\n");
crackFunctions();
crackGSCFunctions();
//connectMySql();
break;
case DLL_PROCESS_DETACH:
case DLL_THREAD_DETACH:
FreeLibraryAndExitThread(g_hModule, 0);
break;
}
return TRUE;
}
示例15: DllMain
//===========================================================================
extern "C" BOOL WINAPI DllMain (HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
// The DLL is being loaded for the first time by a given process.
// Perform per-process initialization here. If the initialization
// is successful, return TRUE; if unsuccessful, return FALSE.
// TODO: DisableThreadLibraryCalls screws with msvcrt
// TODO: RegisterWindowMessage is not safe to called from the dllmain, it can lead to deadlocks.
// we should put it into some initializer instead.
hInstance = hDLLInst;
DisableThreadLibraryCalls(hDLLInst);
bbSkinMsg = RegisterWindowMessage(BBLEANSKIN_MSG);
//dbg_printf("Attached to %x HHOOKs: CW %x GM %x", hDLLInst, hCallWndHook, hGetMsgHook);
break;
case DLL_PROCESS_DETACH:
// The DLL is being unloaded by a given process. Do any
// per-process clean up here, such as undoing what was done in
// DLL_PROCESS_ATTACH. The return value is ignored.
//dbg_printf("unloaded.");
break;
case DLL_THREAD_ATTACH:
// A thread is being created in a process that has already loaded
// this DLL. Perform any per-thread initialization here. The
// return value is ignored.
//dbg_printf("new thread");
break;
case DLL_THREAD_DETACH:
// A thread is exiting cleanly in a process that has already
// loaded this DLL. Perform any per-thread clean up here. The
// return value is ignored.
//dbg_printf("end thread");
break;
}
return TRUE;
}