Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Is EasyHook or any other hooking library supported by U++ ?  () 1 Vote
Re: Is EasyHook or any other hooking library supported by U++ ? [message #38720 is a reply to message #38712] Wed, 09 January 2013 08:38 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3437
Registered: August 2008
Senior Veteran
Hello smartytwiti

Do not worry about DLL calls in Windows. They are ultra easy to be used. Just some ways:
- If you have the adecuate .lib file you can include them in the linking process
- You can use U++ DLI files.
- If you want low level direct control, you can call them directly. Here is the code of class Dl in U++/Bazaar/Functions4U library:

class Dl {
public:
	Dl::Dl() {
		hinstLib = 0;
	}
	Dl::~Dl() {
		if (hinstLib) 
			if (FreeLibrary(hinstLib) == 0)
				throw Exc(t_("Dl cannot be released"));
	}
	bool Dl::Load(const String &fileDll) {
		if (hinstLib) 
			if (FreeLibrary(hinstLib) == 0)
				return false;
		
		hinstLib = LoadLibraryEx(TEXT(fileDll), NULL, LOAD_IGNORE_CODE_AUTHZ_LEVEL);
		if (!hinstLib) 
			return false;
		return true;
	}
	void *Dl::GetFunction(const String &functionName) {
		if (!hinstLib) 
			return NULL;
		return (void *)GetProcAddress(hinstLib, functionName);
	}
private:
	HINSTANCE hinstLib;	
};

With Load() you open the DLL file and with GetFunction() you get the pointer to the function


Best regards
IƱaki
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: File Operation
Next Topic: SetOrderBy ABS
Goto Forum:
  


Current Time: Fri Jul 18 09:52:32 CEST 2025

Total time taken to generate the page: 0.03075 seconds