Solved

How to read a resource?

Posted on 2004-09-17
2
406 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 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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

690 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