Results 1 to 3 of 3

Thread: Dynamic Dll's?

  1. #1

    Thread Starter
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186
    We do exactly what you need to do, but we use ActiveX DLL's. This way you can say:
    Code:
    objWhatever = CreateObject("DLLName.ClassName")
    I don't know enough about straight forward C++ to say this for certain, but I think you can achieve this by using a type library:
    Code:
    //-------------------------------------------------------------------
    //  IMainForm
    //-------------------------------------------------------------------
        [
          odl,
          uuid(06CFF40F-A63B-11D3-8476-00E029423382),
          version(1.0),
          dual,
          nonextensible,
          oleautomation
        ]
        interface IMainForm : IDispatch {
            [id(0x01), propget]
            HRESULT Window([out, retval] IWindow** retval);
        };
    In the simple example above, I think that the use of the word "oleautomation" makes this class creatable with VB's "CreateObject" function.

    Hope this helps.
    Shrog
    VB6 Ent SP5
    Win2000

  2. #2

    Thread Starter
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186
    On second thought, I'm totally wrong. You cannot create an object using a TLB.

    The fact is that the DLL is not a COM object, so you would not be able to use it dynamically in VB, only staticly.

    Shrog
    VB6 Ent SP5
    Win2000

  3. #3
    Guest
    The problem is: The dll's are not mine..!

    I'll see what I can come up with... and perhaps I'll just write a c++ dll that will call the dll's for me... that way it should work (I hope)

    Gerco.

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