Ask a Question related to PHP Bugs, Design and Development.
-
elvir at innvue dot com #1
#40581 [NEW]: Pass Struct type to COM object from PHP
From: elvir at innvue dot com
Operating system: Windows Server 2003
PHP version: 5.2.1
PHP Bug Type: COM related
Bug description: Pass Struct type to COM object from PHP
Description:
------------
hello,
I have a COM object created in c++. One of methods accept a struct as a
parameter. I have to call this method from PHP script.
Reproduce code:
---------------
object accepted:
typedef [uuid(5A0CB3A7-798A-42ff-B864-F8D90B55DB7C)] struct mystruct
{
LPSTR var1;
LPSTR var2;
LPSTR var3;
LPSTR var4;
} mystruct
$newCom = new COM("classname.methodname") or die (" COM exeption");
if(method_exists ($newCom, "ResetS"))
// this retun true
Expected result:
----------------
what i want is:
call my method with the following param from php:
$newCom->mymethod(mystruct sructPHP, GUID sku);
Please can you help me?
Actual result:
--------------
I tryed to create an object in PHP and call method i get the following
error:
'com_exception' with message 'Error [0x80028019] Old format or invalid
type library.
--
Edit bug report at [url]http://bugs.php.net/?id=40581&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40581&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40581&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40581&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40581&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40581&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40581&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40581&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40581&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40581&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40581&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40581&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40581&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40581&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40581&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40581&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40581&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40581&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40581&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40581&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40581&r=mysqlcfg[/url]
elvir at innvue dot com Guest
-
Cannot serialize object of type System.Object[,]. Multidimensional arrays are not supported
Hi, I get this on server when trying to retun a 2 dim array. I apprecaite that they are not supported as per... -
Issues with declaring struct arrays inside of a struct
I have the following C++ code: define MAXXPAXX 64 // Pack sub component of database struct. typedef PREFIX_PACKED struct { DWORD packid;... -
Calling fun taking struct and not pointer to struct?
Robert Feldt wrote: I'm a little confused by the question... are you asking if: 1) The act of using a struct in the declaration of another... -
Fwd: Calling fun taking struct and not pointer to struct?
Related to the recent thread about nested structs and Ruby/DL here is the answer from Ruby/DL's author: So that's what I ask you: Is inlining... -
#25419 [NEW]: Call-time pass-by-reference has been deprecated but without it it's impossible to pass a object-reference via call_user_function
From: roland at inkoeln dot com Operating system: Linux PHP version: 4.3.3 PHP Bug Type: Variables related Bug description: ... -
tony2001@php.net #2
#40581 [Opn->Fbk]: Pass Struct type to COM object from PHP
ID: 40581
Updated by: [email]tony2001@php.net[/email]
Reported By: elvir at innvue dot com
-Status: Open
+Status: Feedback
Bug Type: COM related
Operating System: Windows Server 2003
PHP Version: 5.2.1
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
Previous Comments:
------------------------------------------------------------------------
[2007-02-21 17:29:27] elvir at innvue dot com
Description:
------------
hello,
I have a COM object created in c++. One of methods accept a struct as a
parameter. I have to call this method from PHP script.
Reproduce code:
---------------
object accepted:
typedef [uuid(5A0CB3A7-798A-42ff-B864-F8D90B55DB7C)] struct mystruct
{
LPSTR var1;
LPSTR var2;
LPSTR var3;
LPSTR var4;
} mystruct
$newCom = new COM("classname.methodname") or die (" COM exeption");
if(method_exists ($newCom, "ResetS"))
// this retun true
Expected result:
----------------
what i want is:
call my method with the following param from php:
$newCom->mymethod(mystruct sructPHP, GUID sku);
Please can you help me?
Actual result:
--------------
I tryed to create an object in PHP and call method i get the following
error:
'com_exception' with message 'Error [0x80028019] Old format or invalid
type library.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40581&edit=1[/url]
tony2001@php.net Guest
-
elvir at innvue dot com #3
#40581 [Fbk->Opn]: Pass Struct type to COM object from PHP
ID: 40581
User updated by: elvir at innvue dot com
Reported By: elvir at innvue dot com
-Status: Feedback
+Status: Open
Bug Type: COM related
Operating System: Windows Server 2003
PHP Version: 5.2.1
New Comment:
c++ codes:
typedef [uuid(5A0CB3A7-798A-42ff-B864-F8D90B55DB7C)] struct mystruct
{
LPSTR var1;
LPSTR var2;
LPSTR var3;
LPSTR var4;
} mystruct
<?php
$newCom = new COM("classname.methodname") or die (" COM exeption");
if(method_exists ($newCom, "ResetS")){
echo "method exists ...";
$newCom->ResetS(struct, GUID);
}else{
echo "method doesn't exist...";
}
?>
Question is: how can i create a struct (c++) type in php to pass to
COM.
Previous Comments:
------------------------------------------------------------------------
[2007-02-21 17:33:32] [email]tony2001@php.net[/email]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2007-02-21 17:29:27] elvir at innvue dot com
Description:
------------
hello,
I have a COM object created in c++. One of methods accept a struct as a
parameter. I have to call this method from PHP script.
Reproduce code:
---------------
object accepted:
typedef [uuid(5A0CB3A7-798A-42ff-B864-F8D90B55DB7C)] struct mystruct
{
LPSTR var1;
LPSTR var2;
LPSTR var3;
LPSTR var4;
} mystruct
$newCom = new COM("classname.methodname") or die (" COM exeption");
if(method_exists ($newCom, "ResetS"))
// this retun true
Expected result:
----------------
what i want is:
call my method with the following param from php:
$newCom->mymethod(mystruct sructPHP, GUID sku);
Please can you help me?
Actual result:
--------------
I tryed to create an object in PHP and call method i get the following
error:
'com_exception' with message 'Error [0x80028019] Old format or invalid
type library.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40581&edit=1[/url]
elvir at innvue dot com Guest



Reply With Quote

