RE: [GD-Windows] Adding custom resources to exes/dlls etc...
Brought to you by:
vexxed72
From: Warrick B. <War...@po...> - 2002-05-13 13:31:52
|
Aaargh! and I've just realised that BeginUpdateResource etc.. don't work on Windows95/98/Me. Will I have to manually load the exe file and add my resources? - what problems will I encounter in doing this? Thanks, Warrick. -----Original Message----- From: Warrick Buchanan [mailto:War...@po...] Sent: 13 May 2002 13:15 To: 'gam...@li...' Subject: [GD-Windows] Adding custom resources to exes/dlls etc... Hi, I'm playing around writing a program to add custom binary resources to an exe/dll. I've read through all the documentation on resources but I still seem to be doing something wrong. The situation is as follows: My program seems to update another exes resource fine (BeginUpdateResource() etc...), I add the resource as a RT_RCDATA and it's language as a neutral. If I then go to enumerate the resources attached to the updated exe I get as far as the name of the one I've added (I actually get it's name and type) but then if I try to enumerate it's languages I get an error saying the resource name is not valid. If I try to use FindResource on it, it fails with an invalid name as well. Looking through the MSDN docs more I'm beginning to think that I need to prefix my raw data when I add it in UodateResource() with a RESOURCEHEADER header structure. Also I'm worried that I have to be careful with alignment and does the SizeofResource() function include the size of the header into it's result? If this is the case it would seem nasty when I add a resource as I'd have to allocate a block of memory big enough to hold the resource and the header, put the header before it copy the resource data across and then write the whole block to the resource - is there no way of incrementally building up a resource directly? Thanks, Warrick. _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: ban...@so... _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |