Call to absolute address

D

Don

Environment: VB6 under W98

I have to use a DLL which has a single entry point expressed as an
absolute address. Any function to be invoked is then specified as one
of the arguments. The number of arguments is fixed.

Question: How do I issue a call to an absolute address from VB6 (and
pass arguments<==!)?

The sample code supplied with the DLL uses C and I, essentially, have
to convert the following C statement into VB6:

return (*(LPEntryPointProc)g_EntryPoint)(arg1, arg2, etc... );

I can think of a couple of approaches but none I'm really happy with.

For example, I could write a C wrapper and stick it in a DLL, but it
seems very silly to have to drag around such a one-trick-pony DLL.

Or, I could call some "harmless" API routine with a callback option
and misuse the callback feature to jump to the DLL. The problem,
however, is passing arguments...!?

So, if anyone has any other ideas or suggestions - including
undocumented calls and other tricks - I'd be very grateful.

Don.
 
C

Chris Dunaway

Environment: VB6 under W98

FYI: This is not a VB6 group. You might try asing your question in the
following group:

Microsoft.Public.Vb.General.Discussion
So, if anyone has any other ideas or suggestions - including
undocumented calls and other tricks - I'd be very grateful.

Don't know if this will help, but I saw this in another thread:

<Quote>
From the Visual Studio Command prompt run

dumpbin /exports C:\misc\rtbdll\rtbdts.dll

That will show you what the entry points are.
</Quote>

Perhaps this will give you an alternate way to call the methods in the .dll

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top