Results 1 to 5 of 5

Thread: use dll

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: use dll

    A .dot dll is not a standard dll, it's an "Assembly" which is a IL (intermediate language byte code), not something that can be loaded by the standard C++ load library calls.
    Someone may have written a loader but it's not an out of the box option.

    If you have the source code for the dll, then I'd reccomend adding "attributes to the class declarations and members you want "exported" making them COM ready, then use the Active Qt API to treat them like any other COM object. Find some tutorials on the COM on .NET stuff by searching for CCW (COM Callable Wrapper) and RCW (Runtime Callable Wrapper). I used this technique to create a Windows Explorer context menu shell extension in C#.

    If you don't have the source code, then it'd be quite easy to create a .NET wrapper for the dll which does the above mentioned stuff. Create yourself a new "Class Library" project in Visual Studio, then add a "Reference" to the dll, include the namespaces from the external dll and you can wrap each public member into a COM callable class.

    I m trying to embed dotnet dll into my QWidget
    Are you trying to display ui controls on your QWidget? I'm not sure if it's that simple, maybe if the Control is defined as a COM object it will work, this will require some experimentation on your part.

  2. The following user says thank you to stevey for this useful post:

    ellacharmed (8th November 2012)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.