资源预览内容
第1页 / 共16页
第2页 / 共16页
第3页 / 共16页
第4页 / 共16页
第5页 / 共16页
第6页 / 共16页
第7页 / 共16页
第8页 / 共16页
第9页 / 共16页
第10页 / 共16页
亲,该文档总共16页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
/CallBack/Proxy/CallBack/Proxy/CallBackServer.idl/ CallBackServer.idl : IDL source for CallBackServer.dll/ This file will be processed by the MIDL tool to/ produce the type library (CallBackServer.tlb) and marshalling code.import oaidl.idl;import ocidl.idl;object,uuid(48CD3740-50A3-11d1-B5EC-0004ACFF171C),helpstring(ICallBack Interface),interface ICallBack : IUnknownhelpstring(method ComputationComplete) HRESULT ComputationComplete( long lResult );uuid(DB5CCD8E-5489-11D1-883A-444553540000),helpstring(IMath Interface),pointer_default(unique)interface IMath : IUnknownhelpstring(method Add) HRESULT Add(in long lOp1,in long lOp2);helpstring(method Subtract) HRESULT Subtract(in long lOp1,in long lOp2);helpstring(method Multiply) HRESULT Multiply(in long lOp1,in long lOp2);helpstring(method Divide) HRESULT Divide(in long lOp1,in long lOp2);helpstring(method Advise) HRESULT Advise(in ICallBack* pCallBack);helpstring(method UnAdvise) HRESULT UnAdvise();uuid(DB5CCD81-5489-11D1-883A-444553540000),version(1.0),helpstring(CallBackServer 1.0 Type Library)library CALLBACKSERVERLibimportlib(stdole32.tlb);importlib(stdole2.tlb);uuid(DB5CCD8F-5489-11D1-883A-444553540000),helpstring(Math Class)coclass Mathdefault interface IMath;/* source, default */ interface ICallBack;/CallBack/Proxy/CallBackServerps.defLIBRARY CallBackServerPSDESCRIPTION Proxy/Stub DLLEXPORTSDllGetClassObject PRIVATEDllCanUnloadNow PRIVATEGetProxyDllInfo PRIVATEDllRegisterServer PRIVATEDllUnregisterServer PRIVATE/CallBack/Server/CallBack/Server/CallBackServer.cpp/ CallBackServer.cpp : Implementation of DLL Exports./ Note: Proxy/Stub Information/ To build a separate proxy/stub DLL, / run nmake -f CallBackServerps.mk in the project directory.#include stdafx.h#include resource.h#include initguid.h#include CallBackServer.h#include CallBackServer_i.c#include Math.hCComModule _Module;BEGIN_OBJECT_MAP(ObjectMap)OBJECT_ENTRY(CLSID_Math, CMath)END_OBJECT_MAP()/ DLL Entry Pointextern CBOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)if (dwReason = DLL_PROCESS_ATTACH)_Module.Init(ObjectMap, hInstance);DisableThreadLibraryCalls(hInstance);else if (dwReason = DLL_PROCESS_DETACH)_Module.Term();return TRUE; / ok/ Used to determine whether the DLL can be unloaded by OLESTDAPI DllCanUnloadNow(void)return (_Module.GetLockCount()=0) ? S_OK : S_FALSE;/ Returns a class factory to create an object of the requested typeSTDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)return _Module.GetClassObject(rclsid, riid, ppv);/ DllRegisterServer - Adds entries to the system registrySTDAPI DllRegisterServer(void)/ registers object, typelib and all interfaces in typelibreturn _Module.RegisterServer(TRUE);/ DllUnregisterServer - Removes entries from the system registrySTDAPI DllUnregisterServer(void)_Module.UnregisterServer();return S_OK;/CallBack/Server/CallBackServer.def; CallBackServer.def : Declares the module parameters.LIBRARY CallBackServer.DLLEXPORTSDllCanUnloadNow PRIVATEDllGetClassObject PRIVATEDllRegisterServer PRIVATEDllUnregisterServer PRIVATE/CallBack/Server/CallBackServer.rc/Microsoft Developer Studio generated resource script./#include resource.h#define APSTUDIO_READONLY_SYMBOLS/ Generated from the TEXTINCLUDE 2 resource./#include winres.h/#undef APSTUDIO_READONLY_SYMBOLS/ English (U.S.) resources#if !defined(AFX_RESOURCE_DLL) | defined(AFX_TARG_ENU)#ifdef _WIN32LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US#pragma code_page(1252)#endif /_WIN32#ifdef APSTUDIO_INVOKED/ TEXTINCLUDE/1 TEXTINCLUDE DISCARDABLE BEGINresource.h0END2 TEXTINCLUDE DISCARDABLE BEGIN#include winres.hrn0END3 TEXTINCLUDE DISCARDABLE BEGIN1 TYPELIB CallBackServer.tlbrn0END#endif / APSTUDIO_INVOKED#ifndef _MAC/ Version/VS_VERSION_INFO VERSIONINFOFILEVERSION 1,0,0,1PRODUCTVERSION 1,0,0,1FILEFLAGSMASK 0x3fL#ifdef _DEBUGFILEFLAGS 0x1L#elseFILEFLAGS 0x0L#endifFILEOS 0x4LFILETYPE 0x2LFILESUBTYPE 0x0LBEGINBLOCK StringFileInfoBEGINBLOCK 040904B0BEGINV
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号