Results 1 to 20 of 21

Thread: Cannot load user32.dll from extern C file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Posts
    52
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default Re: Cannot load user32.dll from extern C file

    user32.dll should already be loaded and the msdn documentation doesn't actually specify what happens if you call LoadLibrary on a dll which is already loaded, though I see no reason why it would not work ok. Did you ever try using GetLastError ?

    You can always try using GetModuleHandle to get the handle to the already loaded dll if you really do want to use GetProcAddress. (though I do agree with squidge that this really isn't necessary).

    Chris.

  2. #2
    Join Date
    Sep 2010
    Posts
    145
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1
    Thanked 18 Times in 17 Posts

    Default Re: Cannot load user32.dll from extern C file

    Quote Originally Posted by chris_helloworld View Post
    the msdn documentation doesn't actually specify what happens if you call LoadLibrary on a dll which is already loaded
    It does. It just takes a closer read.

    The system maintains a per-process reference count on all loaded modules. Calling LoadLibrary increments the reference count.

Similar Threads

  1. Can Qwebview load xml/xsl file?
    By richardander in forum Qt Programming
    Replies: 3
    Last Post: 26th August 2015, 22:36
  2. Save/Load variables to FIle
    By Jordan in forum Qt Programming
    Replies: 2
    Last Post: 26th May 2010, 11:35
  3. How to load a .h or .cpp file in designer?
    By srohit24 in forum Qt Programming
    Replies: 2
    Last Post: 18th February 2009, 13:33
  4. extern class
    By zorro68 in forum Qt Programming
    Replies: 2
    Last Post: 5th October 2007, 21:08
  5. Load ActiveX from file
    By Passer_dj in forum Qt Programming
    Replies: 1
    Last Post: 13th August 2007, 23:24

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.