📄 orderentry.cpp
字号:
// OrderEntry.cpp : Implementation of DLL Exports.
//
// Note: COM+ 1.0 Information:
// Please remember to run Microsoft Transaction Explorer to install the component(s).
// Registration is not done by default.
#include "stdafx.h"
#include "resource.h"
#include "OrderEntry.h"
#include "dlldatax.h"
class COrderEntryModule : public CAtlDllModuleT< COrderEntryModule >
{
public :
DECLARE_LIBID(LIBID_OrderEntryLib)
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_ORDERENTRY, "{3916CAA8-D54C-41B7-BD5D-33B6E022C36E}")
};
COrderEntryModule _AtlModule;
class COrderEntryApp : public CWinApp
{
public:
// Overrides
virtual BOOL InitInstance();
virtual int ExitInstance();
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(COrderEntryApp, CWinApp)
END_MESSAGE_MAP()
COrderEntryApp theApp;
BOOL COrderEntryApp::InitInstance()
{
#ifdef _MERGE_PROXYSTUB
if (!PrxDllMain(m_hInstance, DLL_PROCESS_ATTACH, NULL))
return FALSE;
#endif
return CWinApp::InitInstance();
}
int COrderEntryApp::ExitInstance()
{
return CWinApp::ExitInstance();
}
// Used to determine whether the DLL can be unloaded by OLE
STDAPI DllCanUnloadNow(void)
{
#ifdef _MERGE_PROXYSTUB
HRESULT hr = PrxDllCanUnloadNow();
if (FAILED(hr))
return hr;
#endif
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return (AfxDllCanUnloadNow()==S_OK && _AtlModule.GetLockCount()==0) ? S_OK : S_FALSE;
}
// Returns a class factory to create an object of the requested type
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
#ifdef _MERGE_PROXYSTUB
if (PrxDllGetClassObject(rclsid, riid, ppv) == S_OK)
return S_OK;
#endif
return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
}
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
// registers object, typelib and all interfaces in typelib
HRESULT hr = _AtlModule.DllRegisterServer();
#ifdef _MERGE_PROXYSTUB
if (FAILED(hr))
return hr;
hr = PrxDllRegisterServer();
#endif
return hr;
}
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
HRESULT hr = _AtlModule.DllUnregisterServer();
#ifdef _MERGE_PROXYSTUB
if (FAILED(hr))
return hr;
hr = PrxDllRegisterServer();
if (FAILED(hr))
return hr;
hr = PrxDllUnregisterServer();
#endif
return hr;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -