PC Review


Reply
Thread Tools Rate Thread

Call to absolute address

 
 
Don
Guest
Posts: n/a
 
      26th Nov 2004
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.
 
Reply With Quote
 
 
 
 
Chris Dunaway
Guest
Posts: n/a
 
      29th Nov 2004
On Fri, 26 Nov 2004 15:55:21 GMT, Don wrote:

> 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.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing absolute address to a relative address Highlystrung Microsoft Excel Programming 2 24th Oct 2008 08:15 PM
absolute address DosFreak Microsoft VC .NET 0 9th Jan 2008 08:53 PM
How do I avoid excel change absolute address to relative address =?Utf-8?B?TWlndWVs?= Microsoft Excel Misc 3 10th May 2007 11:18 PM
what is difference between absolute address and relative address? =?Utf-8?B?d2hhdCBpcyBkaWZmZXJlbmNlIGJldHdlZW4gYWJz Microsoft Excel Misc 1 22nd Jul 2006 08:17 AM
transform relative address to absolute address Franz Microsoft Dot NET Framework 1 1st Jun 2004 10:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:56 PM.