• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 428
  • Last Modified:

How to read a resource?

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
ChristopH1987
Asked:
ChristopH1987
2 Solutions
 
Jaime OlivaresCommented:
resname is 1, and not "1", you must use MAKEINTRESOURCE macro to load it.
Something like:

LoadBitmap(hInst, MAKEINTRESOURCE(1));
0
 
jkrCommented:
>>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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now