Results 1 to 4 of 4

Thread: Another Newbie COM Question

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    2

    Another Newbie COM Question

    I'm new to the world of COM development. Can I develop COM apps in WinME? I run Visual Studio 6.0 and the COM & MTS references do not appear in the list.

  2. #2
    Addicted Member wolfofthenorth's Avatar
    Join Date
    Jan 2001
    Location
    Tatooine
    Posts
    169
    Hi,

    Yes. Any references from the project menu will provide access to objects contained within the server you referenced. You can declare objects that were not previously available, as seen in itellisence. Actually, you could have accessed the object without the reference through late binding, but it offers significantly less performance.

    If you want to make your own objects, do it in a class module. You can interact with your objects just like any other objects. You can complie them into an ActiveX Dll or EXE and add refernces to them from other of your projects.

    That which does not kill us, only makes us stronger.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    2

    Thanks for your reply,Wolfofthenorth. I didn't quite understand your first paragraph. I'm developing on my home machine, a stand-alone WinME box. There is no server so the only references I have access to are what came with VS.

    I want to create my own objects. I am using class modules. When I try to implement ObjectControl, I get compile errors because the COM references do not exist on my machine.

  4. #4
    Addicted Member wolfofthenorth's Avatar
    Join Date
    Jan 2001
    Location
    Tatooine
    Posts
    169
    Hi,

    By server I mean a dll or exe server. All of the items listed in the reference dialog box represent servers (actually interfaces). By selecting one of those items, your application can create the objects that it (the server) exposes.

    There are other ways of creating the objects, but this is arguably the best way.

    If you want to create your own objects. Create a class module that has public methods. Compile this as an ActiveX dll or exe (a dll will give you better performance). Then in your client application (standard exe) you can add a reference to your new dll and create the objects (classes) that you have publicly exposed. Then you can use their public methods like any other objects.

    Example

    dim objMyObject as Mydll.MyClass

    Set objMyObject = new Mydll.MyClass

    objMyObject.MyMethod1

    Set objMyObject = Nothing


    Hope this helps.

    That which does not kill us, only makes us stronger.

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