ID:               26632
 User updated by:  Regis dot Derimay at iQvolution dot com
 Reported By:      Regis dot Derimay at iQvolution dot com
 Status:           Assigned
 Bug Type:         COM related
 Operating System: Windows XP Professional
 PHP Version:      5CVS
 Assigned To:      wez
 New Comment:

Ok for the subst.

For the rest of a problem, that is of course a bad news for me that you
you do not have time now because I presume that it could then be not
solved in PHP 5 release version. :-( 

Is there anything I can do to help you save time??


Previous Comments:
------------------------------------------------------------------------

[2004-02-22 05:20:36] [EMAIL PROTECTED]

I'll look into it, but don't have time to get stuck in

for a couple of weeks :/



Note: the subst thing is due to security privilieges that

your web server is using at runtime.

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

[2004-02-22 04:53:17] Regis dot Derimay at iQvolution dot com

Ok. Here the previous problem:

I registered the iQopen.dll (COM) using regsvr32 on a path defined with
a subst. The dos "subst" command allows to define a virtual harddrive
under windows. Interesting enough, if you register your COM using a
path based on a subst, PHP is not able to find the module (error of the
previous message). But other tools like Excel are able to do it.

So maybe you want to take a look on this.



Now I am able to load the initial script under PHP 5 beta 4. I am doing
the following:

<?php 

try {

        $iQlib = new COM("iQvolution.iQLibIf");



        $iQlib->load("c:\\A.iQmod");



        $numScans = $iQlib->getNumScans();

        echo "Nb of scans:{$numScans}<BR>\r\n";



        for($i = 0; $i < $numScans; $i++)

        {

                $objIf = $iQlib->getScanObject($i);

                $scanName = $objIf->getName();

                echo "&nbsp;&nbsp;Scan {$i}:&nbsp;{$scanName}<BR>\r\n";



                $scanIf = $objIf->getScanObjSpecificIf();

                $scanIf->getPosition($x, $y, $z, false);

                echo "$x";

        }



//    $iQlib->Release();

    $iQlib = null;

}

catch (exception $e)

{

        echo "<PRE>";

        print_r($e);

        echo "</PRE>";

}

?>



It crashing with a "memory could not be written" message. It displays

-------

Nb of scans:3

  Scan 0: 

-------



So basically the same as beta 3. How can we solve the problem ??

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

[2004-02-22 04:17:15] Regis dot Derimay at iQvolution dot com

Hi! Thanks for the answer.

Now I am using PHP 5 beta 4. I use the php-cgi.exe version.



I'm doing the following:

<?php 

        echo "Start";



try {

        $iQlib = new COM("iQvolution.iQLibIf");

}

catch (exception $e)

{

        echo "<PRE>";

        print_r($e);

        echo "</PRE>";

}



echo "End";

?>



It crashs echoing the following:

Start

com_exception Object

(

    [message:protected] => Failed to create COM object
`iQvolution.iQLibIf': The specified module could not be found.



    [string:private] => 

    [code:protected] => -2147024770

    [file:protected] => C:\Documents and Settings\rd\My
Documents\iQvolution\Develop\iQworks
HTML\Debug\iQworks\ProjectManagement\COM.php

    [line:protected] => 5

    [trace:private] => Array

        (

        )



)



End





Of course, it seems as the iQworks COM Obj is not registered, but this
is not true as for example Excel with a visual basic script is working
correctly.



Do you want me to send you the dlls? Or do something that could help to
debug the problem?



Thanks!



Régis

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

[2004-02-21 18:17:24] [EMAIL PROTECTED]

Sorry, this report slipped through the cracks.

I did however add automatic support for byref

parameters, so the code below *should* work

(no need to explicitly create variant objects

for $x, $y, $z).



Please let me know how you get on; try a recent PHP 5

snapshot (code was added a little while ago; beta 4

should work).



iQlib = new COM("iQvolution.iQLibIf");

$iQlib->load("c:\\A.iQmod");

$numScans = $iQlib->getNumScans();

for($i = 0; $i < $numScans; $i++) {

   $objIf = $iQlib->getScanObject($i);

   $scanIf = $objIf->getScanObjSpecificIf();

   $scanIf->getPosition($x, $y, $z, false);

}





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

[2004-02-21 03:33:16] Regis dot Derimay at iQvolution dot com

Is someone working on this very anoying bug? Did not here anything
since a while!



Thanks

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

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/26632

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

Reply via email to