|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-03 02:17 UTC] foxkill at gmx dot de
[2011-01-01 21:03 UTC] jani@php.net
-Status: Open
+Status: Bogus
-Package: Feature/Change Request
+Package: *General Issues
[2011-01-01 21:03 UTC] jani@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
Description: ------------ I need to use a dll external function. My code in php 4.2.3 was: ------------------ w32api_register_function("MYLIB.DLL", "MYFUNC", "long"); $attr1="string1"; $attr2="string2"; $attr3="string3"; $attr4="string4"; $attr5="string5"; $attr6=long2Str(2);// long $iError=MYFUNC($attr1,$attr2,$attr3,$attr4,$attr5,$attr6); $iRtn=str2Long($siRtn); -------------- The code works. Now (php 4.3.2) my code is: -------------- $api = new win32(); $api->RegisterFunction("int MYFUNC(string attr1, string attr2, string attr3, string attr4, string attr5, int &attr6) From MYLIB.DLL"); $attr1="string1"; $attr2="string2"; $attr3="string3"; $attr4="string4"; $attr5="string5"; $attr6=2;// long $iError=$api->MYFUNC($attr1,$attr2,$attr3,$attr4,$attr5,$attr6); ------------------- and php crashes. I've traced the dll call and I've seen that arguments aren't pass well to the dll. In PHP 4.2.3 version, first argument (attr1) offsets 0x04 bytes (in the call stack) but in 4.3.3 version the same first argument offsets 0x08 bytes. It seems that PHP 4.3.3 version puts an extra (???) attribute in the call stack.