Re: php_com/problem with variant

From: Date: Thu, 06 Dec 2007 12:11:20 +0000
Subject: Re: php_com/problem with variant
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-4947@lists.php.net to get a copy of this message
Hi, I have still the same problem. Because I didn't find a solution, I am aktualy writing a php extension that wrapps around the needed functions of the third-party com-sdk. My plan: - Connect to the third-party lib throuh COM direcly from my php-source-files. - Using all running third-party functions direcly from my php-source-files without my extension because that way is stable and extension-coding is displeasing. - Wrapp the functions "ArcValue" and "PlotValues" with an self-made extension, so that I can call the specified functions with C. - Call this self-made functions from my php-source-code (as first parameter I'll set the COM-reference to the PIPoint) An code-example in php could be: 1 <?php 2 $comObjPi = new COM('PISDK.PISDK'); 3 $server = $comObjPi->Servers->Item("123.123.123.123"); 4 $server->Open("123.123.123.123;UID=foo;pwd=bar"); 5 $point = $server->PIPoints("SINUSOID"); 6 com_load_typelib('PISDK.PISDK'); and now the wrapper: 7 $value = myArcValueFunction($point, mktime(), rtBefore); 8 ?> But now my problem: Writing an php extension is not that problem. But using COM from an php extension is new for me. Because I have to use nmake (or haven't I?) I can't use the "#import' statements. Following the in "normal c++" required rows: #import "pisdkcommon.dll" no_namespace #import "piTimeServer.dll" no_namespace #import "pisdk.dll" no_namespace And when I didn't import that third-Party-dlls then nmake throws compiler-errors because normaly I have to tell PHP that the first parameter from myArcValueFunction is from type PIPointPtr (defined in one of the DLLs). Any suggestions? -- Mit freundlichen Grüßen / Best Regards Oliver Espeter

« previous php.pecl.dev (#4947) next »