Accessing EHLLAPI DLL files

new topic     » topic index » view thread      » older message » newer message

Hi All,
    I need some help on this, I have some questions on using functions from
DLL files..
    I'm trying to reproduce a sample Visual Basic program (I don't know VB!)
in Euphoria (EHLLAPI DLL stuff). The program needs to use a specific (win32)
DLL file (which I'm also trying for the first time), with Euphoria I've
successfully called and executed a function in another DLL file (which was a
major step forward for me!!) where I could see the function I am calling in
the DLL (Using Dependency Walker). However I have a problem (or 2) with the
DLL I really need to use.

    An excerpt from the reference manual..
>The EHLLAPI entry point (hllapi) is always called with the following four
parameters:
>1.EHLLAPI Function Number (input)
>2. Data Buffer (input/output)
>3. Buffer Length (input/output)
>4. Position (input); Return Code (output)
 >   The prototype for the EHLLAPI is; (long hllapi(LPINT, LPSTR, LPINT,
LPINT)"
> Each parameter is passed by reference not by value...... (etc etc)

My first problem is that I always get an error (-1) from my
define_c_function . The function I am calling is not listed in the DLL I
have to call, I am assuming that it must be in another DLLs that the first
one links to (?), also the book says I have to call the function by number
(I still don't fully understand if I am defining it correctly) i.e.
ehlapi = open_dll("EHLAPI32.DLL")
ConnectPS = define_c_func(ehlapi, "1", {C_INT, C_POINTER, C_INT}, C_INT)

The ref book goes on to say..
>All the parameters in the hllapi call are pointers and the return code of
the EHLLAPI function is returned in the value of the 4th parameter, not as
the value of the function..
Which would suggest that I cannot get the return code with just the normal
ret = c_func(ConnectPS....

    Hopefully I've explained this enough (it's tricky when you don't really
know what you are talking about!!)...Help!!
.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu