function My_GetUserName : string; var buffer : array[ 0..255 ] of char; i : dword; begin fillChar( buffer, sizeof( buffer ), #0 ); i := sizeof( buffer ); getUserName( @buffer, i ); result := strPas( buffer ); end;When you call it:
ShowMessage( My_GetUserName );Output could be:
No comments:
Post a Comment