-
writing a COM api
Hi All,
I have just finished an application and have been requested to build a seperate component which will allow third parties to gain some control of this app.
Can anyone give me some pointers/tips ?
I have never written an api before. I realise I need to make extensive use of interfaces but how to I get the api to reference my project ?
Any urls/tutorials much appreciated.
Thanks in Advance:wave:
-
Re: writing a COM api
You need to use the Commvisible attribute to make your project Comm compatible.
And you need to realize that you can not just use .Net Objects to be passed back and forth.
Strings, Shorts, Integers, Dates will do but an int64 can be a problem because the Code using your comm probably doesn't have a variable like that.
Structures defined with comm compatible Variabele will do fine as well ofcourse
In VB 2003 you can have only 1 Comm visible class in your project.
Furthermore you need to play around with regasm to register your 'Comm' Project
I suppose you can google and find out more with these pointers.
-
Re: writing a COM api
I still don't get it.
How do i reference the methods in my exe when designing the api COM object?
-
Re: writing a COM api
Is COM an absolute requirement? Nothing stops you from exposing .Net code as APIs, but it can only be called from other .Net apps.
-
Re: writing a COM api
My exe is written in .net but a third party need to access some of the functionality of my exe from unmanaged code. I think it will be ither Delphi of old VB.
As I said I dont have a problem with the COM side of it.
I am just not sure how to reference various methods and properties in my exe.