Results 1 to 20 of 21

Thread: Cannot load user32.dll from extern C file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    Join Date
    Oct 2008
    Posts
    306
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    6
    Thanked 9 Times in 8 Posts

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

    You can always try using GetModuleHandle to get the handle to the already loaded dll if you really do want to use GetProcAddress.
    If there is a better way I would definitely go for it.

    Did you ever try using GetLastError ?
    Yes:
    Qt Code:
    1. qDebug() << init_raw_mouse(1, 0, 1) // Outputs 0;
    2. qDebug() << GetLastError(); // Outputs 0
    To copy to clipboard, switch view to plain text mode 

    Here they say that if I recompile QT passing -D _WIN32_WINNT=0×501 as arguments, I could filter WM_INPUT messages.
    But I still would have to use that C file for the rest of the implementation(to get the different input's and their respective x & y axis).
    How can I rebuild QT? Can that happen trough QtCreator? I have VS2010, but don't use it.


    Added after 4 minutes
    :

    Quote Originally Posted by squidge View Post
    In a Windows application, I can just use RegisterRawInputDevices(), I've never needed to do LoadLibrary/GetProcAddress, as they are standard functions.

    This is why I'm confused. It's a standard library.
    So if I included windows.h I could trim the code a bit? (I have no idea on Win32 programming.)


    Added after 6 minutes
    :
    The website I downloaded the demo was here. I'm including the whole app in the attachment.
    Attached Files Attached Files
    Last edited by been_1990; 22nd October 2010 at 19:30.

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.