当前位置: 首页>>代码示例>>C++>>正文


C++ CComModule::Term方法代码示例

本文整理汇总了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;
}
开发者ID:Fluffiest,项目名称:splayer,代码行数:56,代码来源:clstencil.cpp

示例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
}
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:31,代码来源:pluggable.cpp

示例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
}
开发者ID:obeoneji,项目名称:light_field_personal,代码行数:26,代码来源:exports.cpp

示例4: ExitInstance

int CTrayApp::ExitInstance()
{
  //Terminate ATL
  _Module.Term();

  return CWinApp::ExitInstance();
}
开发者ID:lcfGitHubCode,项目名称:TaiyiCode,代码行数:7,代码来源:TrayTest.cpp

示例5: ExitInstance

//------------------------------------------------------------------*
int
    CCSC_OnlineApp::ExitInstance()
{
	_Module.Term();
    TrcTerminate();
	return CWinApp::ExitInstance();
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:8,代码来源:CSC_Online.cpp

示例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;
}
开发者ID:kevinzhwl,项目名称:ObjectARXMod,代码行数:28,代码来源:DesignCtrSample.cpp

示例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;
}
开发者ID:harrysun2006,项目名称:07_UltraSpy,代码行数:32,代码来源:UltraSpy.cpp

示例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;
}
开发者ID:pvginkel,项目名称:wave-notify,代码行数:26,代码来源:DllMain.cpp

示例9: ExitInstance

int CERadQueueCallApp::ExitInstance()
{
	_Module.Term();

	return CWinApp::ExitInstance();

}
开发者ID:albertzeng,项目名称:eRadQueue,代码行数:7,代码来源:eRadQueueCall.cpp

示例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;
}
开发者ID:0xhack,项目名称:Windows-driver-samples,代码行数:25,代码来源:dllmain.cpp

示例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;
}
开发者ID:makinacorpus,项目名称:libecw,代码行数:32,代码来源:NCSEcw.cpp

示例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;
}
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:29,代码来源:wmphost.cpp

示例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
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:24,代码来源:ClipBook+ServerEx.cpp

示例14: ExitInstance

int CAddinApp::ExitInstance() 
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	_Module.Term();

	return CWinApp::ExitInstance();
}
开发者ID:ingfa,项目名称:ShapeSheetWatch,代码行数:8,代码来源:AddIn.cpp

示例15: ExitInstance

BOOL ExitInstance()
{
	::CoUninitialize();

	_Module.Term();

	return TRUE;
}
开发者ID:kippler,项目名称:Samples,代码行数:8,代码来源:main.cpp


注:本文中的CComModule::Term方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。