flat assembler
Message board for the users of flat assembler.

Index > Windows > import vs LoadLibrary/GetProcAddress

Author
Thread Post new topic Reply to topic
b1528932



Joined: 21 May 2010
Posts: 287
b1528932
I am using LoadLibrary method to get function addreses.
Reason for it is i want to have control over my program. If certain feature (api) is not avaiable, i want to use socondary function, instead of bailing out entire program.


My iat has only 2 imports. LoadLibraryA and GetProcAddress.
However some AV report this as a virus, and people complain.
Do you have a solution for me? When i put something in my iat, i have no guarantee that it will be there in next windows release.
Post 15 Nov 2010, 15:30
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
perhaps you can put the dll with the exe?
this way, if its not present in the windows, the one you added will be used.
Post 15 Nov 2010, 15:49
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Windows doesn't remove API functions with next releases.
Post 15 Nov 2010, 16:23
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932
vid wrote:
Windows doesn't remove API functions with next releases.


what about RegisterServiceProcess()? Cant find it in newer dlls.
Post 15 Nov 2010, 17:29
View user's profile Send private message Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz
I found something like that API but it's name is RegisterServicesProcess in user32.dll
Post 15 Nov 2010, 17:51
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
b1528932: use imports for all the normal API functions, and LoadLibrary + GetProcAddress for the special ones. That should give you ever so slightly faster loadspeed (especially if you BIND imports, at least for pre-vista OSes), stop AVs from bitching, and is generally the sane thing to do.
Post 15 Nov 2010, 19:11
View user's profile Send private message Visit poster's website Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932
Quote:
I found something like that API but it's name is RegisterServicesProcess in user32.dll


this function was documented. they removed it. they did it once, they do it again. what if they remove LoadLibraryA?
Post 17 Nov 2010, 23:21
View user's profile Send private message Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz
b1528932
Then how would people import libraries ? :/ I think its not removable API. maybe they'll remove GetProcAddress API ?
Post 17 Nov 2010, 23:35
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
b1528932,

RegisterServiceProcess() was Win9x-specific, one shouldn't expect to find it in NT. MS didn't remove it since it didn't exist in NT from the beginning.
Post 18 Nov 2010, 07:00
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.