本文整理汇总了C++中CComModule::Term方法的典型用法代码示例。如果您正苦于以下问题:C++ CComModule::Term方法的具体用法?C++ CComModule::Term怎么用?C++ CComModule::Term使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CComModule
的用法示例。
在下文中一共展示了CComModule::Term方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
LPTSTR szInputFile = NULL;
LPTSTR szOutputFile = NULL;
LPTSTR szQueryString = NULL;
LPTSTR szFormInput = NULL;
LPTSTR szErrorLog = NULL;
LPTSTR szContentType = NULL;
LPTSTR szVerb = NULL;
BOOL bNoLogo = FALSE;
HINSTANCE hInstResource=LoadLocResDll(szClStencilUIDll,TRUE);
_AtlBaseModule.AddResourceInstance(hInstResource);
if (argc < 3)
{
CStringA str;
Emit(str, IDS_INVALID_ARGS);
PrintUsage(str);
return 1;
}
CoInitialize(NULL);
if (!GetParameters(argc, argv, &szInputFile, &szOutputFile, &szQueryString, &szFormInput, &szErrorLog, &szContentType, &szVerb, &bNoLogo))
{
return 1;
}
CStringA strHeader;
if (bNoLogo == FALSE)
{
Emit(strHeader, IDS_HEADER);
printf((LPCSTR) strHeader);
}
_Module.Init(NULL, GetModuleHandle(NULL));
CSProcExtension extension;
if (!extension.Initialize())
{
CStringA str;
Emit(str, IDS_INIT_FAILED);
printf((LPCSTR) str);
_Module.Term();
return 1;
}
if (!extension.DispatchStencilCall(szInputFile, szOutputFile, szQueryString, szErrorLog, szFormInput, szContentType, szVerb))
printf("%s\n", (LPCSTR) extension.m_strErr);
extension.Uninitialize();
_Module.Term();
CoUninitialize();
return 0;
}
示例2: DllMain
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
lpReserved;
#ifdef _MERGE_PROXYSTUB
if (!PrxDllMain(hInstance, dwReason, lpReserved))
{
return FALSE;
}
#endif
if (dwReason == DLL_PROCESS_ATTACH)
{
#ifdef DEBUG_HEAPS
// turn on leak detection on process exit
_CrtSetDbgFlag( _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF );
#endif // DEBUG_HEAPS
_Module.Init(ObjectMap, hInstance);
DisableThreadLibraryCalls(hInstance);
MSPLOGREGISTER(_T("sampleterm"));
}
else if (dwReason == DLL_PROCESS_DETACH)
{
MSPLOGDEREGISTER();
_Module.Term();
}
return TRUE; // ok
}
示例3: if
extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /* lpReserved */)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
::hInstance = hInstance;
RegisterLineToolTip();
InitCommonControls();
RegisterCMHotKey( hInstance );
#ifdef _ACTIVEX
CMRegisterControl( CM_VERSION );
_Module.Init(ObjectMap, hInstance);
DisableThreadLibraryCalls(hInstance);
#endif
}
else if (dwReason == DLL_PROCESS_DETACH)
{
UnregisterLineToolTip();
UnregisterCMHotKey( hInstance );
#ifdef _ACTIVEX
_Module.Term();
CMUnregisterControl();
#endif
}
return 1; // ok
}
示例4: ExitInstance
int CTrayApp::ExitInstance()
{
//Terminate ATL
_Module.Term();
return CWinApp::ExitInstance();
}
示例5: ExitInstance
//------------------------------------------------------------------*
int
CCSC_OnlineApp::ExitInstance()
{
_Module.Term();
TrcTerminate();
return CWinApp::ExitInstance();
}
示例6: CDynLinkLibrary
//
// for MFC initialization
//
extern "C" int APIENTRY
DllMain(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;
}
示例7: WinMain
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
lpCmdLine = GetCommandLine(); //this line necessary for _ATL_MIN_CRT
HRESULT hRes = CoInitialize(NULL);
_ASSERTE(SUCCEEDED(hRes));
_Module.Init(0, hInstance, &LIBID_ATLLib);
CMainDlg mainDlg;
g_pMainWin = &mainDlg;
mainDlg.Create(NULL);
mainDlg.ShowWindow(SW_SHOW);
MSG msg;
while (GetMessage(&msg, 0, 0, 0))
{
if (!IsDialogMessage(mainDlg, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
_Module.Term();
CoUninitialize();
return msg.wParam;
}
示例8: DllMain
BOOL APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
#if _MSC_VER <= 1200
_Module.Init(ObjectMap, hInstance);
DisableThreadLibraryCalls(hInstance);
#endif
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
#if _MSC_VER <= 1200
_Module.Term();
#endif
break;
}
return TRUE;
}
示例9: ExitInstance
int CERadQueueCallApp::ExitInstance()
{
_Module.Term();
return CWinApp::ExitInstance();
}
示例10: DllMain
BOOL WINAPI DllMain (HINSTANCE hInstance,
DWORD dwReason,
LPVOID /*lpReserved*/)
{
TraceMsg( L"-->DllMain.\n");
if (dwReason == DLL_PROCESS_ATTACH) {
TraceMsg( L" Reason: Attach.\n");
_Module.Init(ObjectMap, hInstance);
DisableThreadLibraryCalls(hInstance);
}
else if (dwReason == DLL_PROCESS_DETACH) {
TraceMsg( L" Reason: Detach.\n");
_Module.Term();
}
TraceMsg( L"<--DllMain.\n");
return TRUE;
}
示例11: DllMain
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
#endif
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
_Module.Init(ObjectMap, (HINSTANCE)hInstance, &LIBID_NCSECWLib);
#if !defined(_WIN32_WCE) || !(_WIN32_WCE <= 211)
DisableThreadLibraryCalls((HINSTANCE)hInstance);
#endif
//NCSecwInitInternal();
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
// We do the iDWT detach in the main process shutdown.
// If you add anything here, you may need to remove
// the call to DisableThreadLibraryCalls() above.
break;
case DLL_PROCESS_DETACH:
_Module.Term();
//For windows CE, must call NCSEcwShutdown from program before it is closes
#if !defined(_WIN32_WCE)
// if (pNCSEcwInfo) {
// pNCSEcwInfo->bShutdown = TRUE;
// NCSecwShutdownInternal();
// }
#endif
break;
}
return TRUE;
}
示例12: wWinMain
extern "C" int WINAPI wWinMain(HINSTANCE hInstance,
HINSTANCE /*hPrevInstance*/, __in LPWSTR lpCmdLine, int /*nShowCmd*/)
{
lpCmdLine = GetCommandLine(); //this line necessary for _ATL_MIN_CRT
CoInitialize(0);
_Module.Init( ObjectMap, hInstance, &LIBID_ATLLib );
::InitCommonControls();
RECT rcPos = { CW_USEDEFAULT, 0, 0, 0 };
HMENU hMenu = LoadMenu(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MENU1));
HICON hIcon = LoadIcon(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_ICON1));
CWMPHost frame;
frame.GetWndClassInfo().m_wc.hIcon = hIcon;
frame.Create(GetDesktopWindow(), rcPos, L"WMP Host Container", 0, 0, (UINT)hMenu);
frame.ShowWindow(SW_SHOWNORMAL);
MSG msg;
while (GetMessage(&msg, 0, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
_Module.Term();
CoUninitialize();
return 0;
}
示例13: ExitInstance
/////////////////////////////////////////////////////////////////////////////
//++
//
// CClipBookServerApp::ExitInstance
//
// Description:
// Deinitialize this instance of the application.
//
// Arguments:
// None.
//
// Return Value:
// Any return codes from CWinApp::ExitInstance().
//
//--
/////////////////////////////////////////////////////////////////////////////
int
CClipBookServerApp::ExitInstance( void )
{
_Module.Term();
return CWinApp::ExitInstance();
} //*** CClipBookServerApp::ExitInstance
示例14: ExitInstance
int CAddinApp::ExitInstance()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
_Module.Term();
return CWinApp::ExitInstance();
}
示例15: ExitInstance
BOOL ExitInstance()
{
::CoUninitialize();
_Module.Term();
return TRUE;
}