For some reason that I cannot fathom, the following code fails on a client's Vista Business machine :-
This is a reproducable error, but only on his machine. Any ideas as to what is happening??
Iain Johnstone
Code:
DIM szStr AS ASCIIZ* %MAX_PATH DIM n_length AS DWORD ?"getting user name" n_length= SIZEOF(szStr) 'n_length holds the initial length of %MAX_PATH ?"n_length="+STR$(n_length) 'display length n=GetUserName (szStr, n_length) 'get the user name in szStr and the name length in n_length - DS copy stops here!!!!!! temp=szstr 'convert asciiz string to normal string ?"user name return (zero is bad)="+STR$(n)+$CRLF+"new n_length="+STR$(n_length)+$CRLF+"user name="+temp 'display findings
Iain Johnstone
Comment