Re: [PHP] Win32 Getting username from windows

2004-01-17 Thread John W. Holmes
Gastovski (James) wrote: I'm using the following code to extract the username running on the windows machine: [start code] $api = new win32; $api->registerfunction("long GetUserName (string &a, int &b) From advapi32.dll"); $len = 255; $name = str_repeat("\0", $len); if ($api->GetUserName($name, $l

[PHP] Win32 Getting username from windows

2004-01-17 Thread Gastovski \(James\)
I'm using the following code to extract the username running on the windows machine: [start code] $api = new win32; $api->registerfunction("long GetUserName (string &a, int &b) From advapi32.dll"); $len = 255; $name = str_repeat("\0", $len); if ($api->GetUserName($name, $len) == 0) { die("faile