RE: [PHP4BETA] Win32 COM

From: Date: Thu, 02 Dec 1999 15:47:59 +0000
Subject: RE: [PHP4BETA] Win32 COM
Groups: php.version4 
Request: Send a blank email to php-version4+get-7247@lists.php.net to get a copy of this message
I fixed most of the problems. I'm not familiar with COM objects, and looked at the prototypes to try to figure out how to use them. Most of the things I was trying to set were properties, so they now work. The prototype for the remaining one function is: [id(0x0000001a), helpstring("method GetDatabaseDate")] HRESULT GetDatabaseDate([out, retval] DATE* date); Does anyone know how to get PHP to like a date? Thanx. Peter -----Original Message----- From: Charles Boening [mailto:bones@jahl.com] Sent: Thursday, December 02, 1999 1:09 AM To: 'Peter Bowen' Cc: 'php4beta@lists.php.net' Subject: RE: [PHP4BETA] Win32 COM Tell us about your COM object. VB? ATL? MFC? I saw a similar problem earlier today when I was writing a wrapper for another DLL (ZP4 Address thing). Anyway, I was trying to use a 'variant' data type in VB6 as a public member variable. PHP Didn't seem to like that. I get the impression that PHP likes to see strict typing of variables. Try making your member variables strings. Oh ya, I also noticed a problem with a member variable that was an array. Again, this was in a VB6 COM Object. Charlie -----Original Message----- From: Peter Bowen [mailto:pzb@ARISTOTLE.ORG] Sent: Wednesday, December 01, 1999 7:53 PM To: 'php4beta@lists.php.net' Subject: [PHP4BETA] Win32 COM I think that this is similar to another problem I saw on the list recently. I have attached the code and errors. Any help would be appreciated. This is my first use of the COM module in PHP4, and it seems to work OK, but with some major excpetions. Thanx Peter Code: $gen = new COM("AddressObject.AddressCheck"); $initerr = $gen->Initialize("e:\\mp4\\","e:\\mp4\\"); if ($initerr > 0) { $initerrstr = $gen->GetInitializeErrorString(); echo "Error: $initerr<BR>"; echo "$initerrstr<P>"; } else { $gen->ClearProperties(); $dbasedate = $gen->GetDatabaseDate(); // *** Line 12 *** $build = $gen->GetBuildNumber(); $gen->Company("Aristotle Publishiing"); $gen->Address("205 Pennsylvania"); $gen->City(""); $gen->State(""); $gen->Zip("20003"); $gen->Urbanization($Urbanization); } Errors: Warning: Unsupported variant type in C:\Inetpub\wwwroot\vlo\com.phtml on line 12 Warning: Invoke() failed: Member not found. in C:\Inetpub\wwwroot\vlo\com.phtml on line 14 Warning: Unsupported variant type in C:\Inetpub\wwwroot\vlo\com.phtml on line 14 Warning: Invoke() failed: Member not found. in C:\Inetpub\wwwroot\vlo\com.phtml on line 15 Warning: Unsupported variant type in C:\Inetpub\wwwroot\vlo\com.phtml on line 15 Warning: Invoke() failed: Member not found. in C:\Inetpub\wwwroot\vlo\com.phtml on line 16 Warning: Unsupported variant type in C:\Inetpub\wwwroot\vlo\com.phtml on line 16 Warning: Invoke() failed: Member not found. in C:\Inetpub\wwwroot\vlo\com.phtml on line 17 Warning: Unsupported variant type in C:\Inetpub\wwwroot\vlo\com.phtml on line 17 Warning: Invoke() failed: Member not found. in C:\Inetpub\wwwroot\vlo\com.phtml on line 18 Warning: Unsupported variant type in C:\Inetpub\wwwroot\vlo\com.phtml on line 18 Warning: Invoke() failed: Member not found. in C:\Inetpub\wwwroot\vlo\com.phtml on line 19 -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net

« previous php.version4 (#7247) next »