Solved

How to read a resource?

Posted on 2004-09-17
2
340 Views
Last Modified: 2010-04-01
Hello...

I have an exe-file "C:\windows\system32\ntoskrnl.exe" and i like to read the Bitmap "1". But if I try to open the Bitmap from HINSTANCE = LoadLibrary("C:\\windows\\system32\\ntoskrnl.exe")        with ResName = "1" and ResType = RT_BITMAP... an error name "Resource 1 doesnt exists" appears.

How can i read an exchange the Bitmap "1" in the exe file?

Thanks for advance!
0
Comment
Question by:ChristopH1987
2 Comments
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 50 total points
ID: 12085167
resname is 1, and not "1", you must use MAKEINTRESOURCE macro to load it.
Something like:

LoadBitmap(hInst, MAKEINTRESOURCE(1));
0
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 12086139
>>How can i read an exchange the Bitmap "1" in the exe file?

You cannot exchange ist since ntoskernel.exe will most certainly be in use. Apart from that, any changes will be null and void since the SFP will revert them immediately.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now