#22768 [Opn->Fbk]: memory could not be read error when invoking a Microsft COM object
| From: | magnus@php.net | Date: | Tue, 18 Mar 2003 16:24:01 +0000 |
| Subject: | #22768 [Opn->Fbk]: memory could not be read error when invoking a Microsft COM object | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35839@lists.php.net to get a copy of this message | ||
ID: 22768
Updated by: magnus@php.net
Reported By: xtian_news at hotmail dot com
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Windows 2000 Server
PHP Version: 4.3.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-03-18 08:44:19] xtian_news at hotmail dot com
* I build a simple COM Object in Visual Basic 6 : its an "Active X DLL"
project.
Name of the compound : CheckYear
Name of the object : LeapYear
The only one method of the object :
============================================================
Public Function IsLeapYear(yr As Variant) As Boolean
'If year is divisible by 4 and not divisible by 100, or
'It is divisible by 400, it is a leap year
If (yr Mod 4 = 0 And yr Mod 100 <> 0) Or yr Mod 400 = 0 Then
IsLeapYear = True
Else
IsLeapYear = False
End If
End Function
============================================================
* I compile the VB6 project and obtain : Leapyear.dll
* I register this COM object in my windows 2000 server : regsvr32.exe
Leapyear.dll
* I write the following php script : try.php
=========================================================
<pre>
<?php
print "Hi\n";
$exapp = new COM("CheckYear.LeapYear");
?>
</pre>
==========================================================
* I execute :
php -f try.php
* I obtain
<pre>
Hi
</pre>
And a Windows error popup appears :
==========================================================
php.exe - application error
The instruction at "0x10030729" referenced memory at "0x110022ec". The
memory could not be "read".
==========================================================
Do you know the reason of this error and how to correct it ?
Thanks,
Christian
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22768&edit=1