Using PHP with windows API's. Possible?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Aristona
Forum Commoner
Posts: 33
Joined: Thu Dec 02, 2010 8:14 am

Using PHP with windows API's. Possible?

Post by Aristona »

Hello,

I am a PHP developer but I want to use PHP for something else. I want PHP to handle something and post result to a form by using windows API's like ShowMessage() SendMessage().
For example; PHP queries database with (SELECT TOP 1 Username FROM USERS) and appoints the result into $username variable. Then $username variable should be posted into a textbox of a form application. (e.g A textbox of Blahblah.exe which is running.)

Is it possible to do it with PHP?

Ps. I know it's possible with languages such as C++, VB but I want to know if it is possible with PHP. (somehow)
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Using PHP with windows API's. Possible?

Post by AbraCadaver »

I haven't used COM in a while and not that extensively, and I have never used this: http://us3.php.net/manual/en/function.c ... object.php

But it sounds like what you want.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Using PHP with windows API's. Possible?

Post by Weirdan »

AbraCadaver wrote:I haven't used COM in a while and not that extensively, and I have never used this: http://us3.php.net/manual/en/function.c ... object.php

But it sounds like what you want.
Nope, that's for COM servers - meaning applications specifically exposing API through COM. Aristona wanted to use lower level winapi calls.

I once used this extension: http://www.php.net/manual/en/intro.w32api.php but it wasn't maintained even then and had some bugs (like not being able to call functions with more than 3 parameters).
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Using PHP with windows API's. Possible?

Post by Weirdan »

This extension looks promising btw http://winbinder.org/manual.php
Post Reply