Does the Win32 function lstrlen work on a array of characters the way VB's Len would work on a string. It seems to work ok, but I'm not too familiar with the different Win32 data types (it wants a LPCTSTR but I pass it a pointer to a char).
Here's the code I'm converting:
VB Code:
Dim strHTTP As String 'data buffer for HTTP header output strHTTP = "Location: ./win2000.gif" & vbCrLf & vbCrLf retval = WriteFile(STDOUT, ByVal strHTTP, Len(strHTTP), lngBytesWritten, ByVal 0&)
PS - Does anyone know of a good reference for converting VB string functions (like Left$ or Space$) to the equivalent Win32 API functions (not ANSI C/C++ functions)?PHP Code:char * chBuff; //data buffer
chBuff = "Location: ./win2000.gif\n\n";
retval = WriteFile(hStdOut, chBuff, lstrlen(chBuff), &dwBytesWritten, NULL);
