ebdlib1.cpp
资源名称:ebd_src.zip [点击查看]
上传用户:kelijie
上传日期:2007-01-01
资源大小:123k
文件大小:1k
源码类别:
图形图象
开发平台:
Visual C++
- // ebdlib1.cpp : Defines the initialization routines for the DLL.
- //
- #include "stdafx.h"
- #include "ebdlib1.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- static AFX_EXTENSION_MODULE EBDLID1DLL = { NULL, NULL };
- extern "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("EBDLIB1.DLL Initializing!n");
- // Extension DLL one-time initialization
- if (!AfxInitExtensionModule(EBDLID1DLL, hInstance))
- return 0;
- }
- else if (dwReason == DLL_PROCESS_DETACH)
- {
- TRACE0("EBDLIB1.DLL Terminating!n");
- // Terminate the library before destructors are called
- AfxTermExtensionModule(EBDLID1DLL);
- }
- return 1; // ok
- }
- _declspec(dllexport) int InitTemplate(CDocTemplate** pDocTemplate)
- {
- new CDynLinkLibrary(EBDLID1DLL);
- *pDocTemplate = new CSingleDocTemplate(ID_ROUND,
- RUNTIME_CLASS(CRoundDoc),
- RUNTIME_CLASS(CRoundFrame),
- RUNTIME_CLASS(CRoundView));
- if(*pDocTemplate == NULL)
- return 0;
- return 1;
- }
- _declspec(dllexport) int GetModuleData(int *iID, CString* nickname)
- {
- new CDynLinkLibrary(EBDLID1DLL);
- *iID = ID_ROUND;
- *nickname = "Image";
- return 1;
- }
English
