|
楼主 |
发表于 2013-8-30 20:50
|
显示全部楼层
COM Registration of the Libraries
What is great with managed platforms like Java and .NET is that once you have your byte-code binaries, you can use a single process to rule them all. So here are the COM-registration commands for the 3 implementations of the API (you’ll need to run them with administrator privileges):
Collapse | Copy Code
regasm /codebase /tlb FinanceCS.dll
...
regasm /codebase /tlb FinanceVBNet.dll
...
regasm /codebase /tlb FinanceCPP.dll
...
Some explanations:
“/codebase” tells regasm to reference the assemblies full path into the registry, not only its name; otherwise your assembly should be put into the GAC which in this case is useless and would be pure over-engineering (but sometimes, for assemblies shared by many applications, the GAC can be useful)
“/tlb” tells regasm to generate and register a TLB file for the DLLs: a TLB file holds some metadata that will be consumed by the clients of our API to allow for a more user-friendly usage especially by allowing auto-completion in the VBA editor.
Our API is now ready to get used by VBA. |
|