Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: dllcall
What are you hoping to do?
You can get documentation for the Windows DLLs fairly easily. Ummm the MS Website has a lot of the documentation required.
However it can be a tough task to get your first few DllCalls running, but after that it gets a *lot* easier.
When using DllCall to call DLLs special pains must be taken for and "output" type parameters in the calling parameters.
Different special pains must be taken for any API thts wants a "structure".
But basically you are in the correct place.
For Windows APIs See..
Functions in Alphabetical order:
http://msdn.microsoft.com/library/psdk/psdkref/alphafunc_3bjm.htmFunctions by category:
http://msdn.microsoft.com/library/psdk/psdkref/catfunc_26m1.htmGet a few of them working to cut your teeth. Post code here for comments and help. Keep it simple. Drink lots of coffee.
MAKE SURE YOUR MACHINE IS BACKED UP!
The code below doesn't generate any errors, but sometimes the SAME character being tested is true (1) and sometimes it's False (0)!
Is there some sort of caching going on? I'm I doing it wrong? What's going on?
I tried adding GetLastError but it always returns 0. Pretty sure I'm doing it wrong.
******************************************* a0="@" dllname=strcat(dirwindows(1),"USER32.DLL") dllname2=strcat(dirwindows(1),"Kernel32.dll") a1=DllCall(dllname, word:"IsCharAlphaNumericA", lpstr:a0) error= DllCall(dllname2, long:"GetLastError") Message(a0,"Alpha/Num? = %a1%%@CRLF%Last Error = %error%")
>1)1)I've decided to take the >plunge into API calls. I'm >getting my feet wet with >simple calls like >IsCharAlphaNumericA.Not the simplest call. But not a bad choice.
> >The code below doesn't >generate any errors, but >sometimes the SAME character >being tested is true (1) and >sometimes it's False (0)! > >Is there some sort of caching >going on? I'm I doing it >wrong? What's going on? > >I tried adding GetLastError >but it always returns 0. >Pretty sure I'm doing it >wrong. >Basically you were not checking what you though you were checking. A string pointer was being passed, and it checked the somewhat random value of the string pointer.
>2) Is there are reference >chart (or at least a rule of >thumb) that shows how the >multitude of WinAPI data types >map to the 4 or 5 Winbatch >types?
a0="B" a0x=strsub(a0,1,1) a0x=Char2Num(a0x) dllname=strcat(dirwindows(1),"USER32.DLL") dllname2=strcat(dirwindows(1),"Kernel32.dll") a1=DllCall(dllname, long:"IsCharAlphaNumericA", long:a0x) error= DllCall(dllname2, long:"GetLastError") Message(a0,"Alpha/Num? = %a1%%@CRLF%Last Error = %error%")
Article ID: W14839
File Created: 2001:11:08:12:40:16
Last Updated: 2001:11:08:12:40:16