[PHP-DEV] Bug #11658 Updated: Getting values by reference don't work

2001-07-23 Thread phanto

ID: 11658
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: COM related
Operating System: Windows NT 4.0 SP 6
PHP Version: 4.0.6
New Comment:

doesn't work with VBScript either and due to the provided typelib i assume that it is 
a user (component) error.

-harald.

Previous Comments:


[2001-07-05 20:43:44] [EMAIL PROTECTED]

but by definition every interface derived from IDispatch that should support 
references must expect VARIANT *var instead of anothertype *var . am i wrong ?



[2001-07-02 05:08:05] [EMAIL PROTECTED]

I think it's very simple.

The COM-Object that I use is compiled with
Microsoft Visual C++ 6.0, if it matters.


The definition looks like this:

interface ICObject: IDispatch
{
  [id(1), helpstring(Methode Init)]
  HRESULT Init(BSTR bstrUser,
   long lwinID,
   BSTR bstrCustomer);
  [id(2), helpstring(Methode CheckLogin)]
  HRESULT CheckLogin(BSTR bstrUser,
 BSTR bstrServer,
 long *laccess);
  [id(3), helpstring(Methode CloseData)]
  HRESULT CloseData();
};

Note, that there is no VARIANT Type!
It's only BSTR and LONG.
So I get always a type mismatch, when I try to pass
variables with
$var = new VARIANT(8, VT_I4|VT_BYREF);
or 
$var = new VARIANT(test, VT_BSTR);
It doesn't matter, if it's passed by reference or not.
I think it's a more general problem. PHP tries to pass
the values as type VARIANT, but the interface is of another
type (here BSTR or LONG). Of course, I could be wrong.
When I pass the values directly as PHP-variables, then I
don't get the type-mismatch warning, but the variables
passed by reference don't change, as you can see in the
first message.

I hope, I maked it clear.





[2001-07-01 17:25:28] [EMAIL PROTECTED]

type mismatch means, that your com object expects another type. as you see the error 
message is german so the error doesn't happen in php but in the com-marshaller. you 
have to check what type your object expects and change the VT_I4 to the corresponding 
value.

if you can provide me an other example so that i can reproduce this on my machine i 
could help you more detailed



[2001-06-28 03:12:59] [EMAIL PROTECTED]

still closed?



[2001-06-27 04:16:21] [EMAIL PROTECTED]

It didn't work!
I get this:

Warning: Invoke() failed: Typ paßt nicht.
in D:\www\webze\application\index.php on line 10

translated: ...: Type mismatch.

Line 10 looks like this:
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

I have tried all of the combinations I could think of,
VT_UI1|BYREF, VT_UI2|BYREF, VT_UI4|BYREF, VT_I1|BYREF,
VT_I2|BYREF, VT_I4|BYREF, VT_INT|BYREF, VT_UINT|BYREF
It doesn't matter. I get always the same type mismatch warning.

Note that the variable $allowed in the function of the
COM-Object is defined as long.

Please help me to get this working.




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/?id=11658


Edit this bug report at http://bugs.php.net/?id=11658edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11658 Updated: Getting values by reference don't work

2001-07-05 Thread phanto

ID: 11658
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: COM related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

but by definition every interface derived from IDispatch that should support 
references must expect VARIANT *var instead of anothertype *var . am i wrong ?

Previous Comments:
---

[2001-07-02 05:08:05] [EMAIL PROTECTED]

I think it's very simple.

The COM-Object that I use is compiled with
Microsoft Visual C++ 6.0, if it matters.


The definition looks like this:

interface ICObject: IDispatch
{
  [id(1), helpstring(Methode Init)]
  HRESULT Init(BSTR bstrUser,
   long lwinID,
   BSTR bstrCustomer);
  [id(2), helpstring(Methode CheckLogin)]
  HRESULT CheckLogin(BSTR bstrUser,
 BSTR bstrServer,
 long *laccess);
  [id(3), helpstring(Methode CloseData)]
  HRESULT CloseData();
};

Note, that there is no VARIANT Type!
It's only BSTR and LONG.
So I get always a type mismatch, when I try to pass
variables with
$var = new VARIANT(8, VT_I4|VT_BYREF);
or 
$var = new VARIANT(test, VT_BSTR);
It doesn't matter, if it's passed by reference or not.
I think it's a more general problem. PHP tries to pass
the values as type VARIANT, but the interface is of another
type (here BSTR or LONG). Of course, I could be wrong.
When I pass the values directly as PHP-variables, then I
don't get the type-mismatch warning, but the variables
passed by reference don't change, as you can see in the
first message.

I hope, I maked it clear.



---

[2001-07-01 17:25:28] [EMAIL PROTECTED]

type mismatch means, that your com object expects another type. as you see the error 
message is german so the error doesn't happen in php but in the com-marshaller. you 
have to check what type your object expects and change the VT_I4 to the corresponding 
value.

if you can provide me an other example so that i can reproduce this on my machine i 
could help you more detailed

---

[2001-06-28 03:12:59] [EMAIL PROTECTED]

still closed?

---

[2001-06-27 04:16:21] [EMAIL PROTECTED]

It didn't work!
I get this:

Warning: Invoke() failed: Typ paßt nicht.
in D:ebzeapplicationindex.php on line 10

translated: ...: Type mismatch.

Line 10 looks like this:
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

I have tried all of the combinations I could think of,
VT_UI1|BYREF, VT_UI2|BYREF, VT_UI4|BYREF, VT_I1|BYREF,
VT_I2|BYREF, VT_I4|BYREF, VT_INT|BYREF, VT_UINT|BYREF
It doesn't matter. I get always the same type mismatch warning.

Note that the variable $allowed in the function of the
COM-Object is defined as long.

Please help me to get this working.


---

[2001-06-26 10:19:19] [EMAIL PROTECTED]

closed

---

The remainder of the comments for this report are too long.
To view the rest of the comments, please
view the bug report online.


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11658edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11658 Updated: Getting values by reference don't work

2001-06-28 Thread andrej . aschenbrenner

ID: 11658
User Update by: [EMAIL PROTECTED]
Old-Status: Closed
Status: Open
Bug Type: COM related
Operating system: Windows NT 4.0 SP 6
PHP Version: 4.0.6
Description: Getting values by reference don't work

still closed?

Previous Comments:
---

[2001-06-27 04:16:21] [EMAIL PROTECTED]
It didn't work!
I get this:

Warning: Invoke() failed: Typ paßt nicht.
in D:ebzeapplicationindex.php on line 10

translated: ...: Type mismatch.

Line 10 looks like this:
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

I have tried all of the combinations I could think of,
VT_UI1|BYREF, VT_UI2|BYREF, VT_UI4|BYREF, VT_I1|BYREF,
VT_I2|BYREF, VT_I4|BYREF, VT_INT|BYREF, VT_UINT|BYREF
It doesn't matter. I get always the same type mismatch warning.

Note that the variable $allowed in the function of the
COM-Object is defined as long.

Please help me to get this working.


---

[2001-06-26 10:19:19] [EMAIL PROTECTED]
closed

---

[2001-06-26 10:19:03] [EMAIL PROTECTED]
$user = test_user;
$allowed = new VARIANT(8, VT_I4|VT_BYREF);

$instance = new COM(dll.CObject) or die(Unable to
instanciate dll.CObject);
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed-value;

/* you can use $allowed-type to check it against
 * VT_* constants
 * look into the php documentation for more flags
 * passing variables by reference is a deprecated
 * zend feature (i don't know why) and it didn't work
 * in every case in earlier versions.
 */



---

[2001-06-26 07:00:49] [EMAIL PROTECTED]
The #11660 was already bogused. Reopened this one.


---

[2001-06-25 17:21:56] [EMAIL PROTECTED]
Was submitted twice. Dup. of 11660

---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=11658


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11658 Updated: Getting values by reference don't work

2001-06-27 Thread andrej . aschenbrenner

ID: 11658
User Update by: [EMAIL PROTECTED]
Status: Closed
Bug Type: COM related
Operating system: Windows NT 4.0 SP 6
PHP Version: 4.0.6
Description: Getting values by reference don't work

It didn't work!
I get this:

Warning: Invoke() failed: Typ paßt nicht.
in D:\www\webze\application\index.php on line 10

translated: ...: Type mismatch.

Line 10 looks like this:
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

I have tried all of the combinations I could think of,
VT_UI1|BYREF, VT_UI2|BYREF, VT_UI4|BYREF, VT_I1|BYREF,
VT_I2|BYREF, VT_I4|BYREF, VT_INT|BYREF, VT_UINT|BYREF
It doesn't matter. I get always the same type mismatch warning.

Note that the variable $allowed in the function of the
COM-Object is defined as long.

Please help me to get this working.


Previous Comments:
---

[2001-06-26 10:19:19] [EMAIL PROTECTED]
closed

---

[2001-06-26 10:19:03] [EMAIL PROTECTED]
$user = test_user;
$allowed = new VARIANT(8, VT_I4|VT_BYREF);

$instance = new COM(dll.CObject) or die(Unable to
instanciate dll.CObject);
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed-value;

/* you can use $allowed-type to check it against
 * VT_* constants
 * look into the php documentation for more flags
 * passing variables by reference is a deprecated
 * zend feature (i don't know why) and it didn't work
 * in every case in earlier versions.
 */



---

[2001-06-26 07:00:49] [EMAIL PROTECTED]
The #11660 was already bogused. Reopened this one.


---

[2001-06-25 17:21:56] [EMAIL PROTECTED]
Was submitted twice. Dup. of 11660

---

[2001-06-25 09:00:11] [EMAIL PROTECTED]
Example:

$user = test_user;
$allowed = 8;

$instance = new COM(dll.CObject) or die(Unable to
instanciate dll.CObject);
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed;

$allowed has always the value that you have specified
above, here: 8; When I change $allowed to 6788, then
I get 6788. It seems that the variable won't be changed
when you pass it by reference.
It doesn't matter if i use the  sign or not!
Note that the variable $allowed have to be integer,
I can't pass a variant type to the COM-Function CheckLogin.

The same has been working with previous versions of PHP,
until 4.0.5 and above.

In need this functionality because i use a lot of stuff
like that: 

$instance-some_function($var1, $var2, $var3);

any clue, what's going up?



---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=11658


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11658 Updated: Getting values by reference don't work

2001-06-26 Thread jeroen

ID: 11658
Updated by: jeroen
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Duplicate
Bug Type: COM related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

Was submitted twice. Dup. of 11660

Previous Comments:
---

[2001-06-25 09:00:11] [EMAIL PROTECTED]
Example:

$user = test_user;
$allowed = 8;

$instance = new COM(dll.CObject) or die(Unable to
instanciate dll.CObject);
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed;

$allowed has always the value that you have specified
above, here: 8; When I change $allowed to 6788, then
I get 6788. It seems that the variable won't be changed
when you pass it by reference.
It doesn't matter if i use the  sign or not!
Note that the variable $allowed have to be integer,
I can't pass a variant type to the COM-Function CheckLogin.

The same has been working with previous versions of PHP,
until 4.0.5 and above.

In need this functionality because i use a lot of stuff
like that: 

$instance-some_function($var1, $var2, $var3);

any clue, what's going up?



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11658edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11658 Updated: Getting values by reference don't work

2001-06-26 Thread phanto

ID: 11658
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: COM related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

$user = test_user;
$allowed = new VARIANT(8, VT_I4|VT_BYREF);

$instance = new COM(dll.CObject) or die(Unable to
instanciate dll.CObject);
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed-value;

/* you can use $allowed-type to check it against
 * VT_* constants
 * look into the php documentation for more flags
 * passing variables by reference is a deprecated
 * zend feature (i don't know why) and it didn't work
 * in every case in earlier versions.
 */



Previous Comments:
---

[2001-06-26 07:00:49] [EMAIL PROTECTED]
The #11660 was already bogused. Reopened this one.


---

[2001-06-25 17:21:56] [EMAIL PROTECTED]
Was submitted twice. Dup. of 11660

---

[2001-06-25 09:00:11] [EMAIL PROTECTED]
Example:

$user = test_user;
$allowed = 8;

$instance = new COM(dll.CObject) or die(Unable to
instanciate dll.CObject);
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed;

$allowed has always the value that you have specified
above, here: 8; When I change $allowed to 6788, then
I get 6788. It seems that the variable won't be changed
when you pass it by reference.
It doesn't matter if i use the  sign or not!
Note that the variable $allowed have to be integer,
I can't pass a variant type to the COM-Function CheckLogin.

The same has been working with previous versions of PHP,
until 4.0.5 and above.

In need this functionality because i use a lot of stuff
like that: 

$instance-some_function($var1, $var2, $var3);

any clue, what's going up?



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11658edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11658 Updated: Getting values by reference don't work

2001-06-26 Thread phanto

ID: 11658
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: COM related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

closed

Previous Comments:
---

[2001-06-26 10:19:03] [EMAIL PROTECTED]
$user = test_user;
$allowed = new VARIANT(8, VT_I4|VT_BYREF);

$instance = new COM(dll.CObject) or die(Unable to
instanciate dll.CObject);
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed-value;

/* you can use $allowed-type to check it against
 * VT_* constants
 * look into the php documentation for more flags
 * passing variables by reference is a deprecated
 * zend feature (i don't know why) and it didn't work
 * in every case in earlier versions.
 */



---

[2001-06-26 07:00:49] [EMAIL PROTECTED]
The #11660 was already bogused. Reopened this one.


---

[2001-06-25 17:21:56] [EMAIL PROTECTED]
Was submitted twice. Dup. of 11660

---

[2001-06-25 09:00:11] [EMAIL PROTECTED]
Example:

$user = test_user;
$allowed = 8;

$instance = new COM(dll.CObject) or die(Unable to
instanciate dll.CObject);
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed;

$allowed has always the value that you have specified
above, here: 8; When I change $allowed to 6788, then
I get 6788. It seems that the variable won't be changed
when you pass it by reference.
It doesn't matter if i use the  sign or not!
Note that the variable $allowed have to be integer,
I can't pass a variant type to the COM-Function CheckLogin.

The same has been working with previous versions of PHP,
until 4.0.5 and above.

In need this functionality because i use a lot of stuff
like that: 

$instance-some_function($var1, $var2, $var3);

any clue, what's going up?



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11658edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11658 Updated: Getting values by reference don't work

2001-06-26 Thread sniper

ID: 11658
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Duplicate
Status: Open
Bug Type: COM related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

The #11660 was already bogused. Reopened this one.


Previous Comments:
---

[2001-06-25 17:21:56] [EMAIL PROTECTED]
Was submitted twice. Dup. of 11660

---

[2001-06-25 09:00:11] [EMAIL PROTECTED]
Example:

$user = test_user;
$allowed = 8;

$instance = new COM(dll.CObject) or die(Unable to
instanciate dll.CObject);
$instance-CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed;

$allowed has always the value that you have specified
above, here: 8; When I change $allowed to 6788, then
I get 6788. It seems that the variable won't be changed
when you pass it by reference.
It doesn't matter if i use the  sign or not!
Note that the variable $allowed have to be integer,
I can't pass a variant type to the COM-Function CheckLogin.

The same has been working with previous versions of PHP,
until 4.0.5 and above.

In need this functionality because i use a lot of stuff
like that: 

$instance-some_function($var1, $var2, $var3);

any clue, what's going up?



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11658edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]