I want to get the icon from one exe file and assign it to another using win32 api (beginupdateresource, updateresource, endupdateresource) or some other way. I want to do it in run time. Updateresource is working for text kind of resources. But when i try to do it for icon, the new exe file says the format is not correct or something. Can anyone help me on this?