From: [EMAIL PROTECTED] Operating system: Windows XP Pro PHP version: 4.2.0 PHP Bug Type: Unknown/Other Function Bug description: w32api_invoke_function() is missing
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++. -- Edit bug report at http://bugs.php.net/?id=16628&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16628&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16628&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16628&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16628&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16628&r=support Expected behavior: http://bugs.php.net/fix.php?id=16628&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16628&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16628&r=submittedtwice