當前位置: 首頁>>代碼示例>>C++>>正文


C++ DllEntryPoint函數代碼示例

本文整理匯總了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);
}
開發者ID:BOTCrusher,項目名稱:sagetv,代碼行數:7,代碼來源:Configure.cpp

示例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);
}
開發者ID:9060,項目名稱:ac3filter.ac3filter,代碼行數:25,代碼來源:dll_main.cpp

示例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 ;
}
開發者ID:gssajith87,項目名稱:mingw-w64,代碼行數:44,代碼來源:crtdll.c

示例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;
}
開發者ID:NoSuchProcess,項目名稱:OrangeC,代碼行數:56,代碼來源:c0lsstartup.c

示例5: SetRegistryKey

BOOL CFilterApp::InitInstance()
{
	if(!__super::InitInstance()) 
		return FALSE;
	
	SetRegistryKey(_T("SPlayer"));
	
	DllEntryPoint(AfxGetInstanceHandle(), DLL_PROCESS_ATTACH, 0);
	
	return TRUE;
}
開發者ID:Strongc,項目名稱:playasa,代碼行數:11,代碼來源:FilterApp.cpp

示例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);
}
開發者ID:Matroska-Org,項目名稱:arcorrect,代碼行數:12,代碼來源:ARCorrect.cpp

示例7: WorkAroundMathLibraryBug

BOOL CFilterApp::InitInstance()
{
    if (!__super::InitInstance()) {
        return FALSE;
    }

    WorkAroundMathLibraryBug();

    SetRegistryKey(_T("Gabest"));

    DllEntryPoint(AfxGetInstanceHandle(), DLL_PROCESS_ATTACH, 0);

    return TRUE;
}
開發者ID:Murder66,項目名稱:mpc-hc-master,代碼行數:14,代碼來源:FilterApp.cpp

示例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);
}
開發者ID:huluwa,項目名稱:fishjam-template-library,代碼行數:15,代碼來源:dllmain.cpp

示例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
	}
}
開發者ID:blueskycoco,項目名稱:dm3730-spi,代碼行數:16,代碼來源:FilterDll.cpp

示例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;
}
開發者ID:anguoyang,項目名稱:MediaPoint,代碼行數:18,代碼來源:VSFilter.cpp

示例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;
}
開發者ID:ABMNYZ,項目名稱:OpenNI,代碼行數:19,代碼來源:Setup.cpp

示例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);
}
開發者ID:moon-sky,項目名稱:fishjam-template-library,代碼行數:20,代碼來源:dllmain.cpp

示例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);
}
開發者ID:shooting12,項目名稱:imtop,代碼行數:20,代碼來源:MyScaleRenderDxFilterApp.cpp

示例14: DllMain

BOOL WINAPI DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpReserved)
{
    return DllEntryPoint(reinterpret_cast<HINSTANCE>(hDllHandle), dwReason, lpReserved);
}
開發者ID:VtsBlack,項目名稱:gdcl-mpeg-4-mux,代碼行數:4,代碼來源:mp4mux.cpp

示例15: DllMain

BOOL APIENTRY DllMain(HANDLE hModule, 
                      DWORD  dwReason, 
                      LPVOID lpReserved)
{
	return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
}
開發者ID:AbdoSalem95,項目名稱:WindowsSDK7-Samples,代碼行數:6,代碼來源:asyncflt.cpp


注:本文中的DllEntryPoint函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。