Re: Wrap a DLL (Small Project)
don cole wrote:
> I was wondering if you could give the dummmies version of what WMOTOR is and
> what it is used for ? I D/Led it but can't heads or tails of it. What would
> the input be and what would the output be?
>
> Thanks,
>
> Don Cole
> Bonds > Ruth.
> Giants in second last place.
Don:
motor.eu is an include file (library) that can be used to
do both Windows, X-Windows programming or can be used to
access any custom DLL on either OS system. The advantage
is that to use a dll function/procedure all you have to
do is declare it. To use a structure all you have to do
is describe it using the record function.
record("NameOfStructure","DescriptionOfStructure")
example:
record("POINT", -- name of structure
"x:long:1 "& -- member name is x. value is long integer. number of long
integers.
"y:long:1 ") -- member name is y. value is long integer. number of long
integers.
library("dll_where_function_is") -- selects which DLL to use for declares.
-- Note when a DLL is selected it is in effect for each declare
-- until the next DLL is selected; library() only effects declares.
example: library("user32.dll")
declare("some_function_name",#of_parameters,TypeOfReturn)
-- TypeOfReturns u - unsigned s - signed n - none (which is a procedure)
example: declare("ScreenToClient",2,s) -- 2 params. returns signed.
-- using a function
example:
atom RetValue, lpPoint
lpPoint = struc("POINT") -- create a point structure.
RetValue = f("ScreenToClient",{hMyWindow,lpPoint}) -- call the function.
If you understand windows programming, you should be able
to look at the demos which are highly commented; and easily
understand it's use.
Bernie
My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API
Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
|
Not Categorized, Please Help
|
|