欢迎来到天天文库
浏览记录
ID:37708347
大小:72.00 KB
页数:13页
时间:2019-05-29
《ATL包容实例模板》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、///Contain/Contain.idl//Contain.idl:IDLsourceforContain.dll////ThisfilewillbeprocessedbytheMIDLtoolto//producethetypelibrary(Contain.tlb)andmarshallingcode.import"oaidl.idl";import"ocidl.idl";[uuid(380F79EA-4098-11D1-883A-444553540000),helpstring("IMathInterf
2、ace"),pointer_default(unique)]interfaceIMath:IUnknown{[helpstring("methodAdd")]HRESULTAdd(longlOp1,longlOp2,long*plResult);[helpstring("methodSubtract")]HRESULTSubtract(longlOp1,longlOp2,long*plResult);[helpstring("methodMultiply")]HRESULTMultiply(longlOp1,lo
3、nglOp2,long*plResult);[helpstring("methodDivide")]HRESULTDivide(longlOp1,longlOp2,long*plResult);};[uuid(380F79F9-4098-11D1-883A-444553540000),helpstring("IAdvancedMathInterface"),pointer_default(unique)]interfaceIAdvancedMath:IUnknown{[helpstring("methodFact
4、orial")]HRESULTFactorial(shortsOp,long*plResult);[helpstring("methodFibonacci")]HRESULTFibonacci(shortsOp,long*plResult);};[uuid(380F79FD-4098-11D1-883A-444553540000),version(1.0),helpstring("Contain1.0TypeLibrary")]libraryCONTAINLib{importlib("stdole32.tlb")
5、;importlib("stdole2.tlb");[uuid(380F7A0B-4098-11D1-883A-444553540000),helpstring("AdvancedMathClass")]coclassAdvancedMath{[default]interfaceIAdvancedMath;interfaceIMath;};};///Contain/Containps.defLIBRARY"ContainPS"DESCRIPTION'Proxy/StubDLL'EXPORTSDllGetClass
6、Object@1PRIVATEDllCanUnloadNow@2PRIVATEGetProxyDllInfo@3PRIVATEDllRegisterServer@4PRIVATEDllUnregisterServer@5PRIVATE///Contain/Containps.mkContainps.dll:dlldata.objContain_p.objContain_i.objlink/dll/out:Containps.dll/def:Containps.def/entry:DllMaindlldata.ob
7、jContain_p.objContain_i.objkernel32.librpcndr.librpcns4.librpcrt4.liboleaut32.libuuid.lib.c.obj:cl/c/Ox/DWIN32/D_WIN32_WINNT=0x0400/DREGISTER_PROXY_DLL$8、///Contain/AdvancedMath.cpp//AdvancedMath.cpp:ImplementationofCAdvancedMath#include"stdafx.h"#include"Contain.h"#include"AdvancedMath.h"///////////////////////////////////////////////////
8、///Contain/AdvancedMath.cpp//AdvancedMath.cpp:ImplementationofCAdvancedMath#include"stdafx.h"#include"Contain.h"#include"AdvancedMath.h"///////////////////////////////////////////////////
此文档下载收益归作者所有