Re: win32std

From: Date: Thu, 20 Nov 2003 09:58:20 +0000
Subject: Re: win32std
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-219@lists.php.net to get a copy of this message
Hi Eric Colinet, you wrote: > Hi, > >> I successfully compiled win32std and its functions seem to >> work well too, > > Good news :-) JFYI: Ms VC++ 6 with headers from PHP 4.3.4 and the php4ts.lib from PHP 4.3.2 :-) > You can start by reading the README file, where all function are > (roughtly) documented. Yeah, did that first, but as I already mentioned, I should have read something about the RES protocol prior to posting :-) >> May I call Win32 API functions? >> Dunno what to do with func args like type and name... > > I think you talk about the w32api (or soon ffi) extension that is part > of the PHP distribution (4.3.4 at least). Yes, most probably. I recently tried to do what I want with the recent win32api extension. It's not really broken, buit the docs are outdated. And I dunno how to call win32api functions that need complex types such as arrays... Just for completeness - what I tried: $api = new Win32; $api->regiserFunction("bool EnumProcesses( array procs, int length, int needed) FROM psapi.dll"); # # Error: unknown type "array" so: $api->declareType("array { ... }"); # # what to do here... int[100] or sth else doesn't work... The function I would like to call is "EnumProcesses" in "psapi.dll" bool EnumProcesses( *int[] procs, int procsLength, *int realProcsLength) ^^^^ This array of integers is evil :o) - dunno how to declare that... > The res_* open allow the access to resource embeded in exe or dll files. Ok, figured aut that - but how to decode the info grabbed? > If think it could be a good idea to add more Windows control functions > like that in win32std. I'm open to suggestions about that. Well, I would appreciate a more generic way to call any win function, but it seems that that will be handled by ffi? Ciao, -- Michael - < mike(@)php.net >

Attachment: [application/pgp-signature]
« previous php.pecl.dev (#219) next »