Results 1 to 4 of 4

Thread: ACtiveX and COM

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2003
    Posts
    1

    Smile ACtiveX and COM

    I have a small doubt. Can any one help me.I am trying to understand the concept of "COM".

    I just created an activex dll ,referenced it in my Project and used it.It is a simple DLL which performs addition of 2 numbers.Can i call it a COM component

    I have not created any interfaces because i dont know how to create them.I have read that all com components shold implement atleast one interface called IUnknown interface and additional interfaces like IDispatch and IClassfactory are also Possible

    So i would like to know whethet the component i created is a com component or just an active x component.

    if both are different how to make my Activex Component a COM component

  2. #2
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    An ActiveX component is a COM component. COM stands for Component Object Model. ActiveX is a fancy name for the COM components that VB makes.

    VB automatically create the interfaces that are required for the ActiveX/COM component to work. It's one of the things that contibutes to making VB a Rapid Application Development tool.

  3. #3
    Banned
    Join Date
    Jul 2003
    Location
    New delhi
    Posts
    143
    com basically stand for companet object model.
    it is a in process server.

    every class can be inherited by the the word IMPLEMENT

    so you can make any calss to subclass of other.

    then the part to make dll file to make it compile in which mode that u have to chose.

    best is binary compatibilty

    again project compatibilty
    no compatibilty


    Biswajit das

  4. #4
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    Originally posted by biswajitdas
    com basically stand for companet object model.
    it is a in process server.
    Actually COM (Component Object Model) components can be In Process or Out of Process.

    An In Process component is a DLL, and when it runs it will run in the same thread space as the application that is using it.

    An Out of Process component is an EXE, and when it runs it will run in its own, seperate thread space than the thread space that the application using it is running in.

    Out of Process COM components are better for applications that require the data to be more secure. Lets say if there is an error in the code of the component, and this error would cause the program to lock up. A DLL would cause the calling application to also lock up. An EXE wouldn't cause the calling application to lock up. Using an Out of Process component would allow to to trap these errors, close the component, and run a new component without the user having to exit and restart your application.

    Examples of Out of Process components are: Excel and Word.


    There is an excellent book about Visual Basic and COM. It's called 'VB COM', the ISBN # is 1-861002-13-0
    Here's a link to it at BN.COM -> http://search.barnesandnoble.com/boo...KJ&cds2Pid=946
    I used this book to help study for the Microsoft exams.

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