How do you make a routine given a declaration
like this?:

DWORD WNetGetLastError(
  LPDWORD lpError,     // error code
  LPTSTR lpErrorBuf,   // error description buffer
  DWORD nErrorBufSize, // size of description buffer
  LPTSTR lpNameBuf,    // buffer for provider name
  DWORD nNameBufSize   // size of provider name buffer
);

Currently, I have:

WNetGetLastError: make routine! [
        lpError [integer!] ; error code
        lpErrorBuf [string!] ; error description buffer
        nErrorBufSize [integer!] ; size of description buffer
        lpNameBuf [string!] ; buffer for provider name
        nNameBufSize [integer!] ; size of provider name buffer
        return: [integer!] ; either NO_ERROR or ERROR_INVALID_ADDRESS
] mpr "WNetGetLastErrorA"

It doesn't seem to work, always returning 487 ERROR_INVALID_ADDRESS.
But I think those are pointers there (LPDWORD, LPTSTR),
I am not really sure, where do I look that up?
So, I shouldn't specify [integer!] for LPDWORD,
and [string!] for LPTSTR, but what instead ?
Is it possible?

Anton.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to