View Single Post
 
Old 01-24-2016, 05:58 PM
OnErr0r's Avatar
OnErr0r OnErr0r is offline
Obsessive OPtimizer

Administrator
* Guru *
 
Join Date: Jun 2002
Location: Debug Window
Posts: 13,774
Default

Code:
BOOL InternetGetLastResponseInfoW(
  _Out_   LPDWORD lpdwError,
  _Out_   LPTSTR  lpszBuffer,
  _Inout_ LPDWORD lpdwBufferLength
);
BOOL == Long
_Out_ LPDWORD == ByRef As Long
_Out_ LPTSTR == ByVal As Long
_Inout_ LPDWORD == ByRef As Long

You can call the function once to determine the size of the buffer needed. LastDllError will equal ERROR_INSUFFICIENT_BUFFER. Then buffer the string using String$ and call it again. Pass StrPtr(lpszBuffer) for a pointer to a string buffer.

https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
__________________
Quis custodiet ipsos custodues.
Reply With Quote