hi everyone ....
I know that the inc files include the prototypes for the functions that I want to call through invoke method ...
does this mean that I can cut the size of my progs by typing in the specific prototypes for the functions I need insted of including .inc files?
and about .lib files ... all I know that they are an import library ... so what does an import library mean and why do I need them ... and can part of them be included manually in the source file insted of including the whole lib like the prototypes in the .inc files?

thank you for helping me understand and sorry if my question was not usefull to the others ...

:confused:
Posted on 2002-04-15 00:57:20 by code1101
hi code1101

does this mean that I can cut the size of my progs by typing in the specific prototypes for the functions I need

The prototypes are just to tell invoke about the functions they are not included in your final program so including the .inc won't increase the size of your program.
The import libraries are what contrain the actual code of the procedures you call, only the procedures you actually use are included in your final program.
Posted on 2002-04-15 01:12:49 by Kudos
code1101,

kudos is right, all the include files do is provide prototypes so that the assembler know how many parameteres and what size they are. The worst you will get it a slightly longer assemble time but you code will only increase if you write more of it.

Feel free to ask questions in here, thats what we are here for among other things and I am sure other people will be interested in the answer to the question.

Regards,

hutch@movsd.com
Posted on 2002-04-15 01:48:07 by hutch--

hi code1101

The import libraries are what contrain the actual code of the procedures you call.


hmm ... what do you exactly mean when you say that they contain the actuall code of the procedures? isn't the actual code in the dll itself ...

as I understood ... if my program invokes a function, windows takes control and passes the parameters from my program to the dll that can do that function for me ... then it takes the results from the dll and passes them back to my program ... so if the lib files contains the code of these functions then I don't need the dlls to be available at the system ( which isn't correct as I know ) ...

so I still can't figure out where the lib files fit in in this process ... can you guys explain more to me about lib files and the process of calling an api function coz I'm confused here ... and thanks in advance ...
Posted on 2002-04-15 13:30:50 by code1101
a library file can contain code that goes into your exe, but import
libs don't - the actual code is in the DLLs. (Well, actually there's a
little code drawn in from an import library - a "jmp [__imp__function]"
per imported function you use).
Posted on 2002-04-15 13:38:41 by f0dder
hmmm ... f0dder ...

you said the actual code is in the dlls ( and that whatI thought too) but kudos said that the import libs contain the actual code ?!?!

again ...
if the dlls contain the actual code .... then what is the use of the import libs (.lib)?
if the import libs contain the actual code ... then how come I need the dlls?

PS: if you don't make understand it then prepare yourself for a fight .:grin:

:stupid:
Posted on 2002-04-15 18:53:15 by code1101
*import* libraries don't contain the code (as I explained above).
Their use is to allow languages that support multi-module programming
to easily use DLL files. Ie, you just use the multi-module feature
of (most) pascal, C, <whatever> compilers and most assemblers,
without having to make the *language* DLL-aware. You could make
the language DLL-aware and skip import libraries (I think betov
has done this with spasm), but for existing languages it was less
hassle to use the import library scheme.
Posted on 2002-04-15 18:58:22 by f0dder
thanks for clearing that out ... :cool:
Posted on 2002-04-15 19:05:52 by code1101