ImageProcess.cpp
上传用户:pass2008
上传日期:2021-07-05
资源大小:3299k
文件大小:2k
源码类别:
Internet/IE编程
开发平台:
Visual C++
- // ImageProcess.cpp : DLL 导出的实现。
- #include "stdafx.h"
- #include "resource.h"
- #include "ImageProcess.h"
- class CImageProcessModule : public CAtlDllModuleT< CImageProcessModule >
- {
- public :
- DECLARE_LIBID(LIBID_ImageProcessLib)
- DECLARE_REGISTRY_APPID_RESOURCEID(IDR_IMAGEPROCESS, "{34889EB9-E5BC-4F51-ADAD-4ED8D09EEA77}")
- };
- CImageProcessModule _AtlModule;
- class CImageProcessApp : public CWinApp
- {
- public:
- // 重写
- virtual BOOL InitInstance();
- virtual int ExitInstance();
- DECLARE_MESSAGE_MAP()
- };
- BEGIN_MESSAGE_MAP(CImageProcessApp, CWinApp)
- END_MESSAGE_MAP()
- CImageProcessApp theApp;
- BOOL CImageProcessApp::InitInstance()
- {
- return CWinApp::InitInstance();
- }
- int CImageProcessApp::ExitInstance()
- {
- return CWinApp::ExitInstance();
- }
- // 用于确定 DLL 是否可由 OLE 卸载
- STDAPI DllCanUnloadNow(void)
- {
- AFX_MANAGE_STATE(AfxGetStaticModuleState());
- return (AfxDllCanUnloadNow()==S_OK && _AtlModule.GetLockCount()==0) ? S_OK : S_FALSE;
- }
- // 返回一个类工厂以创建所请求类型的对象
- STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
- {
- return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
- }
- // DllRegisterServer - 将项添加到系统注册表
- STDAPI DllRegisterServer(void)
- {
- // 注册对象、类型库和类型库中的所有接口
- HRESULT hr = _AtlModule.DllRegisterServer();
- return hr;
- }
- // DllUnregisterServer - 将项从系统注册表中移除
- STDAPI DllUnregisterServer(void)
- {
- HRESULT hr = _AtlModule.DllUnregisterServer();
- return hr;
- }