Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 02:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



LoadLibrary locks on loading Global Hook Driver

Discussion on LoadLibrary locks on loading Global Hook Driver within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2014
Posts: 24
Received Thanks: 7
LoadLibrary locks on loading Global Hook Driver

So, I am working on a driver for hooking the keyboard to replace certain keystrokes with another set of keystrokes. Anyways, I have a console version that works fine. When I close the console window, the driver unloads as normal.

The problem is, when I make a GUI to load the driver, it does not unload when I exit the program (which technically never exits). So here is where the lock occurs (please ignore the MessageBox calls, I was just testing something)...

Code:
MessageBox(NULL, "Gate 6", "Info", MB_OK);
fclose(fp);
Settings.Driver = LoadLibrary(GDODGE_DRIVER_NAME);
MessageBox(NULL, "Gate 7", "Info", MB_OK);
I searched Google for some answers, but the only things I could find are really long winded, and complex, answers to how Windows handles and why it handles load locking for drivers. None of them actually answered my question. There was one project in C++ which showed a driver loaded via a GUI app, but it is using a completely different method, and the sample app doesn't even work as expected.

I have attached the source code.
Attached Files
File Type: zip GDodgeGUI.zip (43.9 KB, 2 views)
pushbyte is offline  
Reply


Similar Threads Similar Threads
DLL Laden LoadLibrary()
09/22/2009 - General Coding - 2 Replies
Hi hab ein Problem und zwar wenn ich eine DLL lade mir die MessageBox in der DLL nicht angezeigt wird. Hab schon vieles Probiert aber es klappt einfach nicht. Hier der Code der die DLL lädt: #include <iostream> #include <windows.h> int main() { HMODULE lib = LoadLibrary("D:\\test.dll");
Cont locks
03/02/2009 - Planetside - 1 Replies
You guys ever get to rain in on Cont pop locks anymore or does that not happen? This game looks like its ripe to jump back into but if there is no population to fight against why bother.



All times are GMT +1. The time now is 02:30.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.