Re: [Gambas-devel] System calls?
Brought to you by:
gambas
From: Jean-Francois P. <cm...@me...> - 2004-02-02 01:49:05
|
maybe instead of a dlopen component could it be possible to have an update to the function method declaration? for example in vb you would say Declare Function GradientFillRect Lib "msimg32" Alias "GradientFill" (ByVal hdc As Long, pVertex As TRIVERTEX, ByVal dwNumVertex As Long, pMesh As GRADIENT_RECT, ByVal dwNumMesh As Long, ByVal dwMode As Long) As Long this , I believe , would be better than dlopen since it would be faster and maybe would allow more tricky stuff like callbacks maybe ? such as these Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long) now these would also require something like the AddressOf operator to get the pointers to functions and variables , it would probably be a messy hack like it is in VB but it probably could work just the addition of a lib and alias argument to FUNCTION would make gambas so much more powerful anyone can say something about the feasability of this ? btw everyone should read Visual basic hardcore at http://www.mvps.org/vb/hardcore/ it greatly covers the subject of doing something vb never was meant to do Rob wrote: >On Sunday 01 February 2004 19:22, Ahmad Kamal wrote: > > >>>(this would open gambas to all the lib that will never have >>>a component) >>> >>> >>Exactly man, this is super important. infinite possibilities. >>If you can write it, please go ahead. >> >> > >I think I've only ever used dlopen() about once in my life, and >haven't written any gambas components yet. I decided it must be >possible, but if it's me who ends up writing it, it might be >2006 before it gets done ;) > >Rob > > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >Gambas-devel mailing list >Gam...@li... >https://lists.sourceforge.net/lists/listinfo/gambas-devel > > > > |