这篇教程C++ AfxInitExtensionModule函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AfxInitExtensionModule函数的典型用法代码示例。如果您正苦于以下问题:C++ AfxInitExtensionModule函数的具体用法?C++ AfxInitExtensionModule怎么用?C++ AfxInitExtensionModule使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AfxInitExtensionModule函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DllMainextern "C" int APIENTRYDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved){ switch (dwReason) { case DLL_PROCESS_ATTACH: g_instance = hInstance; // Extension DLL one-time initialization. if (!AfxInitExtensionModule(extensionDLL, hInstance)) return 0; WNEW CDynLinkLibrary(extensionDLL); break; case DLL_PROCESS_DETACH: // Extension DLL per-process termination AfxTermExtensionModule(extensionDLL); break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; } return 1;}
开发者ID:Luomu,项目名称:workspacewhiz,代码行数:27,
示例2: DllMainextern "C" int APIENTRYDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved){ if (dwReason == DLL_PROCESS_ATTACH) { TRACE0("VALVELIB.AWX Initializing!/n"); // Extension DLL one-time initialization AfxInitExtensionModule(ValvelibDLL, hInstance); // Insert this DLL into the resource chain new CDynLinkLibrary(ValvelibDLL); // Register this custom AppWizard with MFCAPWZ.DLL SetCustomAppWizClass(&Valvelibaw); } else if (dwReason == DLL_PROCESS_DETACH) { TRACE0("VALVELIB.AWX Terminating!/n"); // Terminate the library before destructors are called AfxTermExtensionModule(ValvelibDLL); } return 1; // ok}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:25,
示例3: DllMainextern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved){ // Remove this if you use lpReserved UNREFERENCED_PARAMETER(lpReserved); if (dwReason == DLL_PROCESS_ATTACH) { TRACE0("StateMachineEditor.DLL Initializing!/n"); // Extension DLL one-time initialization if (!AfxInitExtensionModule(StateMachineEditorDLL, hInstance)) return 0; // Insert this DLL into the resource chain // NOTE: If this Extension DLL is being implicitly linked to by // an MFC Regular DLL (such as an ActiveX Control) // instead of an MFC application, then you will want to // remove this line from DllMain and put it in a separate // function exported from this Extension DLL. The Regular DLL // that uses this Extension DLL should then explicitly call that // function to initialize this Extension DLL. Otherwise, // the CDynLinkLibrary object will not be attached to the // Regular DLL's resource chain, and serious problems will // result. new CDynLinkLibrary(StateMachineEditorDLL); } else if (dwReason == DLL_PROCESS_DETACH) { TRACE0("StateMachineEditor.DLL Terminating!/n"); // Terminate the library before destructors are called AfxTermExtensionModule(StateMachineEditorDLL); } return 1; // ok}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:35,
示例4: DllMain//DLL 导出主函数extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved){ UNREFERENCED_PARAMETER(lpReserved); if (dwReason==DLL_PROCESS_ATTACH) { if (!AfxInitExtensionModule(KernelEngineDLL,hInstance)) return 0; new CDynLinkLibrary(KernelEngineDLL); //初始化 COM CoInitialize(NULL); //初始化 SOCKET WSADATA WSAData; WORD wVersionRequested=MAKEWORD(2,2); int iErrorCode=WSAStartup(wVersionRequested,&WSAData); if (iErrorCode!=0) return 0; } else if (dwReason==DLL_PROCESS_DETACH) { CoUninitialize(); AfxTermExtensionModule(KernelEngineDLL); } return 1;}
开发者ID:lonyzone,项目名称:six_beauty,代码行数:26,
示例5: DllMainextern "C" int APIENTRYDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved){ if (dwReason == DLL_PROCESS_ATTACH) { TRACE1("FLWLIB.DLL Initializing %08x!/n", hInstance); // Extension DLL one-time initialization if (!AfxInitExtensionModule(FlwLibDLL, hInstance)) return 0; // Insert this DLL into the resource chain new CDynLinkLibrary(FlwLibDLL); if (!MakeVersionOK("FLWLIB.DLL", _MAKENAME, SCD_VERINFO_V0, SCD_VERINFO_V1, SCD_VERINFO_V2, SCD_VERINFO_V3)) return 0;#if WithOEP SetOEPOptions(False); // OEP should load after this and reset if neccessary#endif#if WithQAL SetQALOptions(False); // QAL should load after this and reset if neccessary#endif#if WithMG SetMGOptions(False); // MG should load after this and reset if neccessary#endif } else if (dwReason == DLL_PROCESS_DETACH) { TRACE0("FLWLIB.DLL Terminating!/n"); AfxTermExtensionModule(FlwLibDLL); } return 1; // ok}
开发者ID:abcweizhuo,项目名称:Test3,代码行数:35,
示例6: DllMainextern "C" int APIENTRYDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved){ UNREFERENCED_PARAMETER(lpReserved); if (dwReason == DLL_PROCESS_ATTACH) { TRACE0("V7UI.DLL Initializing!/n"); if (!AfxInitExtensionModule(V7uiDLL, hInstance)) return 0; context_obj::CContextBase::InitAllContextClasses(); Init1CGlobal(hInstance);// INITCOMMONCONTROLSEX InitCtrlEx;// InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);// InitCtrlEx.dwICC = ICC_PROGRESS_CLASS|ICC_LISTVIEW_CLASSES|ICC_BAR_CLASSES|// ICC_COOL_CLASSES|ICC_TAB_CLASSES;// InitCommonControlsEx(&InitCtrlEx); new CDynLinkLibrary(V7uiDLL); } else if (dwReason == DLL_PROCESS_DETACH) { TRACE0("V7UI.DLL Terminating!/n"); context_obj::CContextBase::DoneAllContextClasses(); AfxTermExtensionModule(V7uiDLL); } return 1;}
开发者ID:ste6an,项目名称:v7ui,代码行数:30,
示例7: DllMain//// for MFC initialization//extern "C" int APIENTRYDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved){ switch(dwReason) { case DLL_PROCESS_ATTACH: _hdllInstance = hInstance; if(!AfxInitExtensionModule(DesignCtrSampleDll, hInstance)) return 0; new CDynLinkLibrary(DesignCtrSampleDll); _Module.Init(ObjectMap, hInstance); // registerAppInfo(hInstance); DllRegisterServer(); break; case DLL_PROCESS_DETACH: AfxTermExtensionModule(DesignCtrSampleDll); _Module.Term(); break; } return 1;}
开发者ID:kevinzhwl,项目名称:ObjectARXMod,代码行数:28,
示例8: DllMainextern "C" int APIENTRYDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved){ if (dwReason == DLL_PROCESS_ATTACH) { TRACE1("AlcoaSpMdl.DLL Initializing %08x!/n", hInstance); // Extension DLL one-time initialization if (!AfxInitExtensionModule(AlcoaSpMdlDLL, hInstance)) return 0; // Insert this DLL into the resource chain new CDynLinkLibrary(AlcoaSpMdlDLL); if (!MakeVersionOK("AlcoaSpMdl.DLL", _MAKENAME, SCD_VERINFO_V0, SCD_VERINFO_V1, SCD_VERINFO_V2, SCD_VERINFO_V3)) return 0; // ForceLoadModelLibrary(); } else if (dwReason == DLL_PROCESS_DETACH) { TRACE0("AlcoaSpMdl.DLL Terminating!/n"); AfxTermExtensionModule(AlcoaSpMdlDLL); } return 1; // ok}
开发者ID:abcweizhuo,项目名称:Test3,代码行数:27,
示例9: DllMainextern "C" int APIENTRYDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved){ // Remove this if you use lpReserved UNREFERENCED_PARAMETER(lpReserved); if (dwReason == DLL_PROCESS_ATTACH) { TRACE0("NodeSimEx.DLL Initializing!/n"); // Extension DLL one-time initialization if (!AfxInitExtensionModule(NodeSimExDLL, hInstance)) { return 0; } // Insert this DLL into the resource chain // NOTE: If this Extension DLL is being implicitly linked to by // an MFC Regular DLL (such as an ActiveX Control) // instead of an MFC application, then you will want to // remove this line from DllMain and put it in a separate // function exported from this Extension DLL. The Regular DLL // that uses this Extension DLL should then explicitly call that // function to initialize this Extension DLL. Otherwise, // the CDynLinkLibrary object will not be attached to the // Regular DLL's resource chain, and serious problems will // result. sg_pomDynLinkLib = new CDynLinkLibrary(NodeSimExDLL); } else if (dwReason == DLL_PROCESS_DETACH) { if (sg_pouNS_CAN != NULL) { sg_pouNS_CAN->ExitInstance(); delete sg_pouNS_CAN; sg_pouNS_CAN = NULL; } if (sg_pouNS_J1939 != NULL) { sg_pouNS_J1939->ExitInstance(); delete sg_pouNS_J1939; sg_pouNS_J1939 = NULL; } if (NULL != sg_pomDynLinkLib) { delete sg_pomDynLinkLib; sg_pomDynLinkLib = NULL; } // Terminate the library before destructors are called AfxTermExtensionModule(NodeSimExDLL); } //CGlobalObj::m_pEditorDocTemplate = NULL; return 1; // ok}
开发者ID:Ferrere,项目名称:busmaster,代码行数:58,
示例10: DllMain//------------------------------------------------------------------------------// //------------------------------------------------------------------------------extern "C" int APIENTRY DllMain ( HINSTANCE hInstance, DWORD dwReason, LPVOID ){ if ( dwReason == DLL_PROCESS_ATTACH ) { g_hInstanceCommon = hInstance; if ( !AfxInitExtensionModule ( COMMONDLL, hInstance ) ) { return 0; } new CDynLinkLibrary ( COMMONDLL ); if ( g_hCommonLocRes && AfxInitExtensionModule(COMMONDLLRes, g_hCommonLocRes) ) new CDynLinkLibrary(COMMONDLLRes); g_hLockBitmap = (HBITMAP)::LoadImage(hInstance, MAKEINTRESOURCE(IDB_COMMON_LOCK_BITMAP), IMAGE_BITMAP, 0, 0, LR_SHARED); g_hLockBitmapMask = (HBITMAP)::LoadImage(hInstance, MAKEINTRESOURCE(IDB_COMMON_LOCK_BITMAP_MASK), IMAGE_BITMAP, 0, 0, LR_SHARED); BITMAP bm = {0}; ::GetObject(g_hLockBitmap, sizeof(BITMAP), &bm); g_LockBitmapSize.cx = bm.bmWidth; g_LockBitmapSize.cy = bm.bmHeight; } else if ( dwReason == DLL_PROCESS_DETACH ) { AfxTermExtensionModule ( COMMONDLL ); AfxTermExtensionModule ( COMMONDLLRes ); if (g_hCommonLocRes) { FreeLibrary(g_hCommonLocRes); g_hCommonLocRes = NULL; } } return 1;}
开发者ID:hackshields,项目名称:antivirus,代码行数:47,
示例11: DllMainextern "C" int APIENTRYDllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved ){ // Remove this if you use lpReserved UNREFERENCED_PARAMETER( lpReserved ); if ( dwReason == DLL_PROCESS_ATTACH ) { // TRACE0( "ZDCTL.DLL Initializing!/n" ); g_hInstanceDLL = hInstance; // Extension DLL one-time initialization - do not allocate memory here, // use the TRACE or ASSERT macros or call MessageBox if ( AfxInitExtensionModule( extensionDLL, hInstance ) == 0 ) return( 0 ); // Other initialization could be done here, as long as // it doesn't result in direct or indirect calls to AfxGetApp. // This extension DLL doesn't need to access the app object // but to be consistent with ZDrApp.dll, this DLL requires // explicit initialization as well (see below). // This allows for greater flexibility later in development. /////////////////////////////////////////////////////////////////////// // // We are calling this DLL from regular DLL's, so we have moved // the call to CDynLinkLibrary . // // Insert this DLL into the resource chain // NOTE: If this Extension DLL is being implicitly linked to by // an MFC Regular DLL (such as an ActiveX Control) instead of an // MFC application, then you will want to remove this line from // DllMain and put it in a separate function exported from this // Extension DLL. The Regular DLL that uses this Extension DLL // should then explicitly call that function to initialize this // Extension DLL. Otherwise, the CDynLinkLibrary object will not // be attached to the Regular DLL's resource chain, and serious // problems will result. // /////////////////////////////////////////////////////////////////////// // new CDynLinkLibrary( extensionDLL ); } else if ( dwReason == DLL_PROCESS_DETACH ) { // TRACE0( "ZDCTL.DLL Terminating!/n" ); AfxTermExtensionModule( extensionDLL ); } return( 1 ); // ok}
开发者ID:DeegC,项目名称:ZeidonTools,代码行数:53,
|