|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-02 15:04 UTC] stone@php.net
[2011-01-01 01:48 UTC] jani@php.net
-Status: Open
+Status: Bogus
-Package: Feature/Change Request
+Package: *General Issues
[2011-01-01 01:49 UTC] jani@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 10:00:01 2025 UTC |
Description: ------------ If the 3rd registerfunction (for messageboxa) is commented out, the code works properly. Tested with cli version of php. Reproduce code: --------------- <?php error_reporting(E_ALL); $api = new win32(); $api->registerfunction("long GetTickCount () From Kernel32.dll"); echo "Ticks=",$api->GetTickCount(),"\n"; $api->registerfunction("long GetUserName (string &a, int &b) From advapi32.dll"); $s1 = " "; $size = strlen($s1); $api->GetUsername($s1,$size); $s1 = substr($s1,0,$size); echo "u='$s1'\n"; print_r(get_class_methods($api)); $api->registerfunction("int MessageBoxA(long hWnd, string &title, string &lpCaption, int uType) from User32.dll"); ?> Expected result: ---------------- Ticks=192755858 u='jlim ' Array ( [0] => registerfunction [1] => unregisterfunction [2] => registercallback [3] => definetype [4] => gettypesize [5] => inittype [6] => decref [7] => gettickcount [8] => getusername ) <br /> Actual result: -------------- Ticks=192755858 u='jlim ' Array ( [0] => registerfunction [1] => unregisterfunction [2] => registercallback [3] => definetype [4] => gettypesize [5] => inittype [6] => decref [7] => gettickcount [8] => getusername ) <br /> <b>Fatal error</b>: Call to undefined function: registerfunction() in <b>d:\in etpub\wwwroot\php\w32.inc.php</b> on line <b>18</b><br />