PHP and DLL loaded into MTS: not working

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sethuraman.Harish@gmail.com

    #1

    PHP and DLL loaded into MTS: not working

    I have built a sample dll that just sets string data in the
    outparameters. I am able to access the DLL functions from PHP and get
    responses when I use the following call:

    echo "<b>TestCom Library COM Call</b>";
    $TestCom = new COM("TestCom.Se rver") or die("Unable to instanciate
    TestCom");
    echo "<br/>Loaded TestCom calling Test.";
    $TestCom->Test($lOut, $lOut1, $lOut2, $lOut3);
    echo "<br/>Output:$lOut , $lOut1, $lOut2, $lOut3";

    Output:teststr, teststr1, teststr2, teststr3

    When I host this dll in MTS, The output I recieve is .
    Output: ,,,

    When hosted in MTS, I am able to get the same output if I call the dll
    functions from vbscript/VB.

    Can anyone help me identify where I am making a mistake, or can anyone
    give me any pointers?

    Thanks for the help in advance.

  • Jim Carlock

    #2
    Re: PHP and DLL loaded into MTS: not working

    <Sethuraman.Har ish@gmail.comwr ote:
    : I have built a sample dll that just sets string data in the out
    : parameters. I am able to access the DLL functions from
    : PHP and get responses when I use the following call:
    :
    : echo "<b>TestCom Library COM Call</b>";
    : $TestCom = new COM("TestCom.Se rver") or die("Unable to instanciate TestCom");
    : echo "<br/>Loaded TestCom calling Test.";
    : $TestCom->Test($lOut, $lOut1, $lOut2, $lOut3);
    : echo "<br/>Output:$lOut , $lOut1, $lOut2, $lOut3";
    :
    : Output:teststr, teststr1, teststr2, teststr3
    :
    : When I host this dll in MTS, The output I recieve is .
    : Output: ,,,

    Try...
    $1Out = "Nothing Special";
    echo($1Out);

    Perhaps they need to start with an underscore or letter? And
    also, note, that PHP makes the variable names case-sensitive
    whereas VBScript / VB is NOT case-sensitive.

    From: http://www.php.net/language.variables

    <snip>
    Variable names follow the same rules as other labels in
    PHP. A valid variable name starts with a letter or
    underscore, followed by any number of letters, numbers,
    or underscores. As a regular expression, it would be
    expressed thus:

    '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
    </snip>

    Hope this helps. Good luck.

    --
    Jim Carlock
    Post replies to the group.


    Comment

    Working...