Re: w32api GUI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The FFI extension works great and seems to be more intuitive than w32api.
Thanks for your help.

-bill
"Dvdmandt" <dvdmandt@xxxxxxxxx> wrote in message
news:20040325184212.48978.qmail@xxxxxxxxxxxxxxx
> Hi.. Intresting idea, but you really should forget about that extension..
It
> doesn't really work, it's no longer under development and it's not
supported
> afaik.. :p In PHP5, a new extension, named FFI will replace w32api.. I
don't
> think it's included, so you'll have to get it from pecl or snaps.php.net..
>
> Also, shouldn't you use some hWnd? 0 seems a bit bad... :p But anyway, I
> don't really have any idea what I'm writing about..
>
>
> Oh, and you might wanna try other PHP versions.. I had code working in
4.2.*
> and maybe even 4.3.0, that doesn't work with latest versions...
> -- 
> // DvDmanDT
> MSN: dvdmandt¤hotmail.com
> Mail: dvdmandt¤telia.com
> "Bill Zeller" <bill@xxxxxxxxx> skrev i meddelandet
> news:20040325024801.32333.qmail@xxxxxxxxxxxxxxx
> > Hey guys,
> >
> > I have a non-standard question regarding Windows programming.
> >
> > My objective is to create a small PHP wrapper for some basic win32 api
> > stuff, such as creating message boxes and some dialog windows. This
would
> be
> > used for windows command line scripting, not for web development. I
> realize
> > php-gtk exists, but I'd like to do this mainly for the native
widget-ness
> > and to learn more about the windows API.
> >
> > I have three questions.
> >
> > (using windows xp pro and php-4.3.4)
> > 1) What's wrong with this code? The documentation is not up to date, and
> > this should work. (other functions, using the same idea, do work. For
> > example, "long GetTickCount () From Kernel32.dll" works fine)
> >
> > <?php
> > if (!dl("php_w32api.dll")) {
> >   echo "Unable to load php_w32api.dll";
> >   exit;
> > }
> >
> > $api = new win32;
> > $api->registerfunction("long MessageBox (long hWnd, string lpText,
string
> > lpCaption, long uType) from User32.dll");
> >
> > if ($api->MessageBox(0, "testing", "testing somemore", 0) == 0)
> > {
> >     echo "failed";
> > }else{
> >     echo "succeeded";
> > }
> > ?>
> >
> > (nothing happens and failed is always printed)
> >
> > 2) Will this be supported in PHP 5? I downloaded RC 1 and don't see a
> > php_w32api.dll in the extensions directory.
> >
> > 3) Do you know another way of accessing functions in dlls on windows?
> >
> > Thanks
> >
> > Best Regads,
> > Bill Zeller

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux