Thanks. By the way, how can I convert the hostname from " char FAR * "
to string so that I can reformat it ?
"FAR" is, as far as I know, a tag dating back to the 16-bit mode for x86 processors, where you had to worry about 16-bit unsegmented and 32-bit segmented processors. In 32-bit (and, presumably, 64-bit, in Win64) mode, all pointers are the same, so "FAR" can be ignored.
That means that "char FAR *" is just "char *" in 32-bit (or 64-bit) mode - and strings are, in many cases, pointed to by "char *"s.
I.e., the hostname *is* a null-terminated string, in some sense.
If there are no non-ASCII characters in the host name, the string is directly pointed to by the pointer. You can use it as a pointer to an ASCII string.
If there are non-ASCII characters in the host name, I *think* the pointer would point to a UTF-8 string. Depending on what reformatting you want to do, you might have to convert it to Unicode (not an intrinsically complicated transformation). I don't know what APIs in Windows are offered to do that.
================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/winpcap-users@winpcap.polito.it/
To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================