return C++ string to PHP var?

return C++ string to PHP var?

am 14.11.2008 02:51:07 von Albus Dumbledore

I have to create a data access layer (DAL) to be used in PHP. It looks like
writing a COM object and loading it from PHP would be the best bet.

Question 1: Is COM the best solution here?

Question 2: if I had an interface "char* query("Blah")" How would I return
the result set into a PHP var?

Question 3: Anyone know of a good tutorial that creates a COM object and
accesses it via PHP?

Thanks! (P.S. this is my first time posting in a newsgroup)



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: return C++ string to PHP var?

am 14.11.2008 10:47:31 von Stut

On 14 Nov 2008, at 01:51, Albus Dumbledore wrote:
> I have to create a data access layer (DAL) to be used in PHP. It
> looks like
> writing a COM object and loading it from PHP would be the best bet.
>
> Question 1: Is COM the best solution here?

COM would be one way to go, or you could write it as a PHP extension.

> Question 2: if I had an interface "char* query("Blah")" How would
> I return
> the result set into a PHP var?

If using COM just return it from the COM method as a bstr. COM/PHP
will do what it needs to in order to give that to the caller as a PHP
string.

> Question 3: Anyone know of a good tutorial that creates a COM object
> and
> accesses it via PHP?

Never seen one, it's not what you might call a "normal" thing to do.
My friend Google knows a lot of stuff, it might know about this too.

-Stut

--
http://stut.net/

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php