I tried your code and I got 2200 as a return code which is probably wrong but the buffer value was populated correctly with the name of the current directory. : I have a problem reading the return code of DLL functions that returns a : "long" (or DWORD). : I have tried all the possible type-specifiers (n,N,l,L,u,U) without success. : Using "n" the result is ever 0, otherwise is 4290772992! : What is the right type-specifier? : You can try this behaviour using this script (the return code should be the : number of written characters): //DWORD GetCurrentDirectory( : // DWORD nBufferLength, : // LPTSTR lpBuffer : //); : Dim buffer, string : Dim result, number : Space 128, buffer : Call "kernel32.dll", "GetCurrentDirectory", : "nSn", True, 128, buffer, result : ConcatEx "result=", result, ", buffer=", buffer, buffer : MessageBox buffer
|