|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-16 04:24 UTC] sander@php.net
[2002-04-16 10:20 UTC] sander@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 23:00:02 2025 UTC |
Using the Windows binary build of PHP 4.2.0 RC4, the function w32api_invoke_function() seems to be broken. With the w32api extension loaded, I can call other w32api functions such as w32api_register_function(), but if I call w32api_invoke_function() PHP spits out this error: <b>Fatal error</b>: Call to undefined function: w32api_invoke_function() in <b >C:\source\uptime.php</b> on line <b>13</b> uptime.php is a test script I downloaded from the w32api CVS directory. Here it is: <?php dl("php_w32api.dll"); w32api_register_function("kernel32.dll", "GetTickCount", W32_LONG); w32api_register_function("User32.dll", "MessageBoxA", W32_LONG); $ticks = w32api_invoke_function("GetTickCount"); $secs = floor($ticks / 1000); $mins = floor($secs / 60); $hours = floor($mins / 60); $str = sprintf("You have been using your computer for:". "\r\n %d Milliseconds, or \r\n %d Seconds". "or \r\n %d mins or\r\n %d hours %d mins.", $ticks, $secs, $mins, $hours, $mins - ($hours*60)); w32api_invoke_function("MessageBoxA", NULL, $str, "Uptime Information", MB_OK); ?> php_w32api.dll is the only module I'm loading. w32api_invoke_function() *does* exist in CVS and looks like it should work just fine, but apparently something broke when the binaries were built. I can't re-build anything myself since I don't own a copy of Microsoft VC++.