I played a bit around with the W32API. Here is some code that actually works with the current release of W32API.
The interface changed completely, so all documentation about this extension is out-dated. While the old release
just implemented "plain" functions, the current version offers a class to handle all the API-related operations.
Additionally, functions are now registered using a SQL-like language with a single string.
$api = new win32;
$api->registerfunction("long GetUserName (string &a, int &b) From advapi32.dll");
$api->registerfunction("long GetTickCount () From Kernel32.dll");
$len = 255; $name = str_repeat("\0", $len); if ($api->GetUserName($name, $len) == 0)
if (!($time = $api->GetTickCount()))
echo "Username: $name<br>\nSystemtime: $time<br>\n";
GOOD LUCK !!