Reply to can't get return value from COM in PHP5

Your name:

Reply:


Posted by klingus@gmail.com on 11/07/02 11:31

I am running into problems obtaining the return value of a method I
have in a COM+ DLL.

I have the following code snippet:

STDMETHOD(add)(long num1, long num2, long* result);

STDMETHODIMP CsampleApp::add(long num1, long num2, long *result)
{
*result = num1 + num2;

return S_OK;
}

I wrote a PHP script to invoke this method. It can't get the new value
from this function.

<?php
echo "Call Com Object<br>";
$instance = new COM("sampleApp.SimpleCom");

$instance ->test(1, 2, $returnValue);
echo "Return should be: " . $returnValue;

$instance->release();
?>

I am getting $returnValue = 0 instead of 3.

I have tried using Variants but that is not going well. I am hoping
someone may be able to assist me.

Thank you in advance.
Kelvin

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация