Edit report at https://bugs.php.net/bug.php?id=50305&edit=1

 ID:                 50305
 Comment by:         user at kkdf2 dot sakura dot ne dot jp
 Reported by:        noon at ms8 dot url dot com dot tw
 Summary:            DOTNET Warning
 Status:             Open
 Type:               Bug
 Package:            COM related
 Operating System:   Windows Vista
 PHP Version:        5.3.1
 Block user comment: N
 Private report:     N

 New Comment:

I've posted a patch.

I'm not sure whether it works well or not.


Previous Comments:
------------------------------------------------------------------------
[2011-01-14 08:40:11] ka...@php.net

This means that the variant conversion (as the error says) failed, 0xD is the 
variant type value of the object being converted. 0xD evaluates to 13 which is 
VT_UNKNOWN, an object that implements the IUnknown interface.

I however doubt theres anyone who will look at fixing this anytime soon as 
COM/dotnet needs an active maintainer

------------------------------------------------------------------------
[2011-01-13 12:51:02] t33th4n at gmail dot com

Description:
------------
Error is valid.
Trying to create a dialog with .NET, but basic functions are failing to proceed.

Reproduce code:
---------------
                $form1 = new DOTNET("System.Windows.Forms, Version=1.0.5000.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089", 'System.Windows.Forms.Form');
                $button1 = new DOTNET("System.Windows.Forms, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 
'System.Windows.Forms.Button');
                $button1->Text = "Press me!";
                $form1->Controls->Add($button1);
                $form1->Show();

Expected result:
----------------
Add a button control to the form.

Actual result:
--------------
Warning: main(): variant->zval: conversion from 0xd ret=-1 in 
D:\xampplite\php\form1.php on line 10
PHP Fatal error:  Call to a member function Add() on a non-object in 
D:\xampplite\php\form1.php on line 10

------------------------------------------------------------------------
[2009-11-26 03:02:16] noon at ms8 dot url dot com dot tw

Description:
------------
runtime: .Net Framework 3.5


I need to add a button to a windows form. 
When I run the script "$x->Control", it generates warning message as follows:  

Warning: main(): variant->zval: conversion from 0xd ret=-1 in 
C:\Windows\Microsoft.NET\Framework\v3.5\ofg.php

Reproduce code:
---------------
<?php
$x = new DOTNET('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089', 'System.Windows.Forms.Form', CP_UTF8);
$y = $x->Controls;
$x->showDialog();
?>

Expected result:
----------------
$y = $x->Controls;

^^^^ $y must be Object

Actual result:
--------------
Warning: main(): variant->zval: conversion from 0xd ret=-1 in 
C:\Windows\Microsoft.NET\Framework\v3.5\ofg.php


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=50305&edit=1

Reply via email to