PartyPooper Posted February 16, 2006 Share Posted February 16, 2006 I'm trying to learn more about DllCall and thought I'd start with something simple like getting the current cursor position (in screen coordinates) but since I know nothing of user32.dll (only what I've seen others do with it), I'm shooting in the dark. For now, I'll keep it simple and just work with user32.dll until I know more about functions and structures of DLL's. Can someone tell me how where I can find out about the functions of user32.dll and how I determine what to put on the DllCall line (it's structure I guess)? This is what I have so far (it's only a guess at how the function may look like). I was hoping it would tell me the current X & Y of the cursor but as I don't know the structure of user32.dll, I can't go any further. Func _CursorPos() Local $POINT = DllStructCreate("long;long") Local $X, $Y DllStructSetData($POINT, 1, $X) DllStructSetData($POINT, 1, $Y) Local $ret = DllCall("user32.dll", "int", "GetCursorPos", "ptr", DllStructGetPtr($POINT)) MsgBox(0,'',($ret[0]/65535), ($ret[1]/65535)) EndFunc Link to comment Share on other sites More sharing options...
PartyPooper Posted February 17, 2006 Author Share Posted February 17, 2006 Thanks for correcting the function Larry (I was close - a good guess), however, I'm still no wiser as to the functions and structures of user32.dll (or any other dll for that matter) which is really what I would like to learn. So can anyone point me in the direction of said info. Thanks Link to comment Share on other sites More sharing options...
greenmachine Posted February 17, 2006 Share Posted February 17, 2006 msdn.microsoft.com Search under the name of the function you want to call. To get a list of functions, I use DllExp (not sure where I got it though). Link to comment Share on other sites More sharing options...
PartyPooper Posted February 17, 2006 Author Share Posted February 17, 2006 Thanks greenmachine. I Googled DllExp and got a copy so hopefully this will shed some light on the matter. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now