本文整理汇总了C++中DllEntryPoint函数的典型用法代码示例。如果您正苦于以下问题:C++ DllEntryPoint函数的具体用法?C++ DllEntryPoint怎么用?C++ DllEntryPoint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DllEntryPoint函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DllMain
BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, LPVOID lpvReserved)
{
g_xvid_hInst = hInst;
/* Call directshow [email protected] */
return DllEntryPoint(hInst, fdwReason, lpvReserved);
}
示例2: DllMain
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
{
if (reason == DLL_PROCESS_ATTACH)
{
ac3filter_instance = hinst;
// Init NLS
// Search NLS DLL at the filter's folder
size_t path_size = MAX_PATH;
char path[MAX_PATH];
path_size = GetModuleFileName(hinst, path, (DWORD)path_size);
if (path_size)
if (cut_last_name(path, path_size))
init_nls(path);
// Init logging
init_logging();
}
if (reason == DLL_PROCESS_DETACH)
{
uninit_logging();
}
return DllEntryPoint(hinst, reason, reserved);
}
示例3: __declspec
__declspec(noinline) WINBOOL
__DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
WINBOOL retcode = TRUE;
__native_dllmain_reason = dwReason;
if (dwReason == DLL_PROCESS_DETACH && __proc_attached == 0)
{
retcode = FALSE;
goto i__leave;
}
if (dwReason == DLL_PROCESS_ATTACH || dwReason == DLL_THREAD_ATTACH)
{
retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved);
if (retcode)
retcode = _CRT_INIT (hDllHandle, dwReason, lpreserved);
if (! retcode)
goto i__leave;
}
_pei386_runtime_relocator ();
if (retcode && dwReason == DLL_PROCESS_ATTACH)
__main ();
retcode = DllMain(hDllHandle,dwReason,lpreserved);
if ((dwReason == DLL_PROCESS_ATTACH) && ! retcode)
{
DllMain (hDllHandle, DLL_PROCESS_DETACH, lpreserved);
_CRT_INIT (hDllHandle, DLL_PROCESS_DETACH, lpreserved);
DllEntryPoint (hDllHandle, DLL_PROCESS_DETACH, lpreserved);
}
if (dwReason == DLL_PROCESS_DETACH || dwReason == DLL_THREAD_DETACH)
{
if (_CRT_INIT (hDllHandle, dwReason, lpreserved) == FALSE)
{
retcode = FALSE;
}
if (retcode)
{
retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved);
}
}
i__leave:
__native_dllmain_reason = UINT_MAX;
return retcode ;
}
示例4: ___lscrtl_startup
int __stdcall ___lscrtl_startup(HINSTANCE hInst, DWORD fdwReason, LPVOID lpvReserved)
{
int flags;
int rv;
unsigned exceptBlock[2];
char quote;
char *cmd;
asm mov [flags],edx;
quote = 0;
___lsdllinit(flags, _dorundown, exceptBlock);
if (!(flags & DLL) || fdwReason == DLL_PROCESS_ATTACH)
{
if (flags & DLL)
{
if (!dllexists)
dllexists++;
else
{
MessageBox(0,"NonShared data segment required","Error",0);
return 1;
}
}
}
__srproc(INITSTART, INITEND);
if (flags & DLL)
{
rv = DllEntryPoint(hInst, fdwReason, lpvReserved) + 1;
}
else if (flags & GUI)
{
cmd = _oscmd;
while ((!quote || *cmd != ' ') && *cmd)
{
if (*cmd == '"')
quote ^= *cmd;
cmd++;
}
while (*cmd && *cmd == ' ') cmd++;
rv = WinMain(hInst, 0, cmd, 10) + 1;
}
else
{
rv = main(_argc, _argv, _environ) + 1;
}
if ((flags & DLL) && fdwReason == DLL_PROCESS_DETACH)
{
__srproc(EXITSTART, EXITEND);
}
rv--;
if (!(flags & DLL))
{
_exit(rv);
ExitProcess(rv); // needed to satisfy the debugger
}
return rv;
}
示例5: SetRegistryKey
BOOL CFilterApp::InitInstance()
{
if(!__super::InitInstance())
return FALSE;
SetRegistryKey(_T("SPlayer"));
DllEntryPoint(AfxGetInstanceHandle(), DLL_PROCESS_ATTACH, 0);
return TRUE;
}
示例6: DllMain
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD dwReason,
LPVOID lpReserved)
{
DbgSetModuleLevel(LOG_ERROR,5);
DbgSetModuleLevel(LOG_TRACE,5); // comment this to remove trace
//DbgSetModuleLevel(LOG_MEMORY,2);
DbgSetModuleLevel(LOG_LOCKING,2);
//DbgSetModuleLevel(LOG_TIMING,5);
return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
}
示例7: WorkAroundMathLibraryBug
BOOL CFilterApp::InitInstance()
{
if (!__super::InitInstance()) {
return FALSE;
}
WorkAroundMathLibraryBug();
SetRegistryKey(_T("Gabest"));
DllEntryPoint(AfxGetInstanceHandle(), DLL_PROCESS_ATTACH, 0);
return TRUE;
}
示例8: DllMain
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD dwReason,
LPVOID lpReserved
)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
}
示例9: DllMain
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
try {
if (ul_reason_for_call==DLL_PROCESS_ATTACH)
CoInitializeEx(NULL, COINIT_MULTITHREADED);
if (ul_reason_for_call==DLL_PROCESS_DETACH)
CoUninitialize();
return DllEntryPoint((HINSTANCE)(hModule), ul_reason_for_call, lpReserved);
}
catch( ... ) {
return FALSE; // exception catched
}
}
示例10: SetRegistryKey
BOOL CVSFilterApp::InitInstance()
{
if(!CWinApp::InitInstance())
return FALSE;
SetRegistryKey(_T("Gabest"));
DllEntryPoint(AfxGetInstanceHandle(), DLL_PROCESS_ATTACH, 0); // "DllMain" of the dshow baseclasses
STARTUPINFO si;
GetStartupInfo(&si);
m_AppName = CString(si.lpTitle);
m_AppName.Replace('\\', '/');
m_AppName = m_AppName.Mid(m_AppName.ReverseFind('/')+1);
m_AppName.MakeLower();
return TRUE;
}
示例11: DllMain
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD dwReason,
LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_DETACH)
{
xnLogClose();
}
BOOL bRes = DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
// init log from local file (if it exists)
if (dwReason == DLL_PROCESS_ATTACH)
{
xnLogInitFromXmlFile("OpenNIConfig.xml");
}
return bRes;
}
示例12: DllMain
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD dwReason,
LPVOID lpReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
{
//DbgSetModuleLevel(LOG_TRACE|LOG_MEMORY , 5);
FUNCTION_BLOCK_INIT();
}
break;
case DLL_PROCESS_DETACH:
{
FUNCTION_BLOCK_UNINIT();
}
break;
}
return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
}
示例13: FilterDllMain
BOOL APIENTRY FilterDllMain(HMODULE hModule,
DWORD dwReason,
LPVOID lpReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
g_hModule = hModule;
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
g_hModule = 0;
break;
}
_DllMainCRTStartup((HINSTANCE)hModule, dwReason, lpReserved);
return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
}
示例14: DllMain
BOOL WINAPI DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpReserved)
{
return DllEntryPoint(reinterpret_cast<HINSTANCE>(hDllHandle), dwReason, lpReserved);
}
示例15: DllMain
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD dwReason,
LPVOID lpReserved)
{
return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
}