1. dll.e question

I think I've seen a similar post for this before. I could probably do some
testing to figure this out but heres may question anyway...

I want to use KERNEL32.DLL-GetProcAddress() to get the address of a c routine, I
have some embedded asm code that uses c funcs and i want to link it staticly, ie:
the returned addresses will either be from a *.dll or a *.so file... anyway i
want to know if I can pass dll.e's open_dll() return value to GetProcAddress() or
do I have to use GetModuleHandle() or LoadLibrary() to aquire the correct handle?

new topic     » topic index » view message » categorize

2. Re: dll.e question

Hayden McKay wrote:
> 
> I think I've seen a similar post for this before. I could probably do some
> testing
> to figure this out but heres may question anyway...
> 
> I want to use KERNEL32.DLL-GetProcAddress() to get the address of a c routine,
> I have some embedded asm code that uses c funcs and i want to link it
> staticly,
> ie: the returned addresses will either be from a *.dll or a *.so file...
> anyway
> i want to know if I can pass dll.e's open_dll() return value to
> GetProcAddress()
> or do I have to use GetModuleHandle() or LoadLibrary() to aquire the correct
> handle?

The entry point that open_dll() returns is good for Windows, as shown in the
dsearch.exw demo program. Hopefully the same holds under Linux for .so files.

CChris

new topic     » goto parent     » topic index » view message » categorize

3. Re: dll.e question

Hayden McKay wrote:
> 
> I think I've seen a similar post for this before. I could probably do some
> testing
> to figure this out but heres may question anyway...
> 
> I want to use KERNEL32.DLL-GetProcAddress() to get the address of a c routine,
> I have some embedded asm code that uses c funcs and i want to link it
> staticly,
> ie: the returned addresses will either be from a *.dll or a *.so file...
> anyway
> i want to know if I can pass dll.e's open_dll() return value to
> GetProcAddress()
> or do I have to use GetModuleHandle() or LoadLibrary() to aquire the correct
> handle?

An easier way is to use define_c_var.  It simply returns the address of the
symbol.  While made for using variables, it works for routines, as well.

Matt

new topic     » goto parent     » topic index » view message » categorize

4. Re: dll.e question

thanks matt, nice reply! define_c_var is sometin' most people would overlook on
this subject. must thankyou for good post... blink

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu