Click here to Skip to main content
15,741,692 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi All,

I am facing a problem in adding resources at run time. The old resources are getting deleted automatically.
The sequence is as follow:
1. Reading the binary contents of a file.
2. Trying to add to resources section of another executable.
3. The resources are being added as "BIN1" -> "IDR_SAMPLEBIN1" and so on.
4. After some steps, the previously added resources are getting deleted.
5. At the end of 8 cycles, i expect resources "BIN1" through "BIN8" but i found only 2 or 3 of them.

I could not understand what could be wrong.
I am using BeginUpdateResource(), UpdateResource() and EndUpdateResource() for the same.

Any help is greatly appreciated.

Thanks and Regards,
Kishor Reddy
Sergey Alexandrovich Kryukov 23-Mar-15 10:24am    
From the standpoint of the reader of this your post, you don't do anything wrong. You are just not doing anything. If you do, you don't show it. How anyone is supposed to help you?
[no name] 25-Mar-15 4:36am    

I posted a separate thread with the source code and the output.

Please let me know if anything else is needed.

Thanks and Regards,
Kishor Reddy
Sergey Alexandrovich Kryukov 25-Mar-15 9:18am    
You should have edited your original question, instead of re-posting, which is considered as abuse.

1 solution

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900