ID: 21504
Comment by: iron at ironiq dot hu
Reported By: thingol at mail dot ru
Status: Open
Bug Type: Documentation problem
PHP Version: 4.3.2
New Comment:
The rewritten w32api extension works wrong on WinXP with PHP 4.3.2 (as
isapi dll) and IIS 5.
If I use the php as isapi dll, the unregisterfunction doesn't work. I
get an "Access Violation" if I run second time.
After restarting the IIS, the php script works first and doesn't on the
second time.
The sample:
$api = new win32;
$api->registerfunction("long GetTickCount () From Kernel32.dll");
[...]
$api->unregisterfunction("GetTickCount");
Previous Comments:
------------------------------------------------------------------------
[2003-05-12 14:00:14] thingol at mail dot ru
I notice that I use wrong syntax.
But:
<?php
dl("php_w32api.dll");
$api = new win32();
$api->RegisterFunction("long MessageBoxA (long hWnd, string &lpText,
string &lpCaption, long uType) From User32.dll", 0);
$str = "Test, oh my god";
$api->MessageBoxA(NULL, $str, $str, 0);
?>
with new ext shows no errors and no messagebox.
<?php
@dl("php_w32api.dll");
w32api_register_function("User32.dll", "MessageBoxA", "long");
$str = "Test, oh my god";
MessageBoxA(NULL, $str, $str, 0);
?>
with old ext shows messagebox.
------------------------------------------------------------------------
[2003-05-12 13:44:26] thingol at mail dot ru
This documentation gives no sample.
I try this code and it don't work:
<?php
dl("php_w32api.dll");
Win32::RegisterFunction("long MessageBox (long hWnd, string lpText,
string lpCaption, long uType) From User32.dll", 0);
$str = "Test, oh my god";
echo Win32::MessageBox(NULL, $str, "Information", 0);
?>
PHP 4.3.2RC1
------------------------------------------------------------------------
[2003-05-12 13:29:00] psychosos at gmx dot at
Jan Kleinsorge has made some documentation available at
http://mynnga.de/tom/loves/wob/w32api.txt . (I got the link to it from
his comment on the w32api documentation page at
http://www.php.net/manual/en/ref.w32api.php)
------------------------------------------------------------------------
[2003-03-11 15:00:30] gk at gknw dot de
Hey, now three months later after first bug report #21016 and still no
docu, no working sample or something else????
Is it that hard thing to modify the sample for the new extension???
G.
------------------------------------------------------------------------
[2003-03-07 07:56:22] gk at gknw dot de
I also would like to get a sample since the stuff in the docu isnt
working...
I've tried everything now;
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21504
--
Edit this bug report at http://bugs.php.net/?id=21504&edit=1
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php