Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to read a resource?

Posted on 2004-09-17
2
Medium Priority
?
426 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 200 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 800 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

618 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