Außerdem ist cnMaxUserNameLen total falsch.
* erstmal 254 statt 256
* und wird -1 statt +1 für die #0
Delphi-Strings haben zwar #0#0 eingebaut, aber dennoch könnte es somit einen Speicherüberlauf von 2 Chars / 4 Bytes geben.
Zitat:
Code:
/*
This file contains constants used throughout the LAN Manager
API header files. It should be included in any source file
that is going to include other LAN Manager
API header files or
call a LAN Manager
API.
NOTE: Lengths of strings are given as the maximum lengths of the
string in characters (not bytes). This does not include space for the
terminating 0-characters. When allocating space for such an item,
use the form:
TCHAR username[UNLEN+1];
*/
#define UNLEN 256 // Maximum user name length