NO

Author Topic: some newbi questions  (Read 8586 times)

whatsup

  • Guest
Re: some newbi questions
« Reply #15 on: February 13, 2010, 07:33:34 PM »
thanks for reply.

i see what you did, you simply used the loadlibrary,
but that's exactly the point i want to figure out,
is this the only way to load a dll (without lib func)
or
there is a way that windows loader will load it for me, according the data in the EXE header.

if the second is not possible in C, s this possible in other languges ?

for example in Assembler or Pascal

if i want to use a dll func in these langs without linking any Lib,
do i have to use loadlibrary, or windows loader will do that for me ?

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: some newbi questions
« Reply #16 on: February 13, 2010, 08:19:04 PM »
If you do not allow the linker to know the dependencies, then there is nothing put in the dependency table of the executable.

If you do not like to change the linker properties of the project properties, then you will not have any other way, than getting the address of the function manually as shown in the example.
---
Stefan

Proud member of the UltraDefrag Development Team

whatsup

  • Guest
Re: some newbi questions
« Reply #17 on: February 13, 2010, 11:41:04 PM »
so do you say that the only way to tell the linker the dependecies, is to link it to a lib ?

that was my point,
the dependecies are the name of the func and the dll , right ?

so that's my question, how to write the dll name in C,
from this discussion i understand that this is impossible,

where in basic for example it's very easy:

Code: [Select]
declare sub foo lib "kernel.dll"


if what i said so far is true, then it's a great disappoint that this little dll name, can't be include
in the func proto in C.

another question:
the lib that has the dll name, has also code to load it ? or only its name ?