Results 1 to 5 of 5

Thread: writing a COM api

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    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

    Parksie

  2. #2
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    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.
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

  3. #3

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    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?

    Parksie

  4. #4
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    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.

  5. #5

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    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.

    Parksie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width