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:
  1. Dim strHTTP As String 'data buffer for HTTP header output
  2. strHTTP = "Location: ./win2000.gif" & vbCrLf & vbCrLf
  3. retval = WriteFile(STDOUT, ByVal strHTTP, Len(strHTTP), lngBytesWritten, ByVal 0&)

PHP Code:
char chBuff//data buffer
chBuff "Location: ./win2000.gif\n\n";
retval WriteFile(hStdOutchBufflstrlen(chBuff), &dwBytesWrittenNULL); 
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)?