Raised This Month: $51 Target: $400
 12% 

Intercept dll's loading (windows)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 02-08-2010 , 03:41   Intercept dll's loading (windows)
Reply With Quote #1

Hello. I would like to know how to intercept dll's loading. Basically I would like to match a list of strings of names against each dll that loads and do operations in order to be able to use GetModuleInformation on them. I'm not seeking for instructions for hooking but for what should I hook. Sorry if it's not fully on topic.
__________________
joaquimandrade is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 02-09-2010 , 06:31   Re: Intercept dll's loading (windows)
Reply With Quote #2

Why not just use GetModuleHandle ?
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 02-09-2010 , 06:56   Re: Intercept dll's loading (windows)
Reply With Quote #3

Quote:
Originally Posted by berni View Post
Why not just use GetModuleHandle ?
Because I want to hook functions that happen when they initialize.
__________________
joaquimandrade is offline
HL-SDK
Member
Join Date: Jan 2009
Old 02-09-2010 , 15:53   Re: Intercept dll's loading (windows)
Reply With Quote #4

If loadlibrary is an import, detour that and check if it is loading the dll you're interested in.

What are you looking for specifically? If you just while(!handle) { handle = GetModuleHandle("silly.dll"); Sleep(10); }; You may be OK, unless you're looking for some stuff that gets called real early on.

Last edited by HL-SDK; 02-09-2010 at 15:57.
HL-SDK is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 02-09-2010 , 22:16   Re: Intercept dll's loading (windows)
Reply With Quote #5

Quote:
Originally Posted by HL-SDK View Post
If loadlibrary is an import, detour that and check if it is loading the dll you're interested in.

What are you looking for specifically? If you just while(!handle) { handle = GetModuleHandle("silly.dll"); Sleep(10); }; You may be OK, unless you're looking for some stuff that gets called real early on.
What Im looking is not for Half Life 2 so nevermind. Thanks both for the comments I will investigate more myself.
__________________
joaquimandrade is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 11:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode