CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 1999
    Posts
    6

    COM Design queries

    Hi All,

    I'm a newbie to COM development, and I'm developing Com dlls for a project I'm currently working on.

    I have a couple of questions relating to the implementation of com dll servers; specifically,

    1. If I need to implement multiple unrelated objects/interfaces, should these be in separate dll's or is it okay for them to be part of the same COM object?

    2. One of the interfaces my Com object exposes will need to also use Com in its implementation (ADO, which is what I'm hiding from the client). As the ADO com implementation of ADO lists 'Both' as the supported threading model, and I'm developing apartment threading objects, will this be okay? What I'm getting at is that I'll call CoinitializeEx(NULL, COINIT_APARTMENTTHREADED) (I know that CoInitialize(NULL) is equiv) from each thread that will use my Com object, which will then internally instanciate an ADO object. Will this work correctly?

    TIA for advice/comments
    Regards,
    Richard



  2. #2
    Join Date
    Jun 1999
    Posts
    17

    Re: COM Design queries


    1. Single DLL can have up to 1024 interfaces...., each can have number of methods/properties

    2. Basically "Both" means both: free to use with STA or MTA appartments


  3. #3
    Join Date
    Jul 1999
    Posts
    6

    Re: COM Design queries

    Thanks for your reply,

    But, I know that a dll can support multiple interfaces , I'm more interested in whether I should (from a good design point of view)..

    Cheers
    Richard


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

Featured