using.dll files in c or c++

Discussion in 'C++' started by codoll53, Mar 22, 2007.

  1. codoll53

    codoll53 New Member

    Joined:
    Feb 23, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    I am trying to emulate a mouse and am using the following command to set the mouse cursor and am getting errors:
    [DllImport("user32")]
    public static extern int SetCursorPos(int x, int y)
    I am very lost and any help would be appreciated
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,376
    Likes Received:
    388
    Trophy Points:
    83
    You dont need to be doing it using the DllImport in C-C++ but just add the following header file Winuser.h or include Windows.h and link the dll.

    In C# you the DllImport the way you have demonstrated.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice