updateresource question
-
hi, I am trying to programatically update the version information in a dllI am using Beginupdateresouce updateresource Endupdateresource. The functions always suceed but the resource is not updated. Is there any program or code which is available in the net to do this. any thoughts will be greately appreciated. I am running the program on NT. thanks karthik ps: I am running the program on NT I know that if we have the source we can edit version info in VC++,but I dont want to do it that way
-
hi, I am trying to programatically update the version information in a dllI am using Beginupdateresouce updateresource Endupdateresource. The functions always suceed but the resource is not updated. Is there any program or code which is available in the net to do this. any thoughts will be greately appreciated. I am running the program on NT. thanks karthik ps: I am running the program on NT I know that if we have the source we can edit version info in VC++,but I dont want to do it that way
If you may do it manually, try one tool from this address http://www.blubb.at/sweety/toolz/resource.htm
-
hi, I am trying to programatically update the version information in a dllI am using Beginupdateresouce updateresource Endupdateresource. The functions always suceed but the resource is not updated. Is there any program or code which is available in the net to do this. any thoughts will be greately appreciated. I am running the program on NT. thanks karthik ps: I am running the program on NT I know that if we have the source we can edit version info in VC++,but I dont want to do it that way
-
hi, I am trying to programatically update the version information in a dllI am using Beginupdateresouce updateresource Endupdateresource. The functions always suceed but the resource is not updated. Is there any program or code which is available in the net to do this. any thoughts will be greately appreciated. I am running the program on NT. thanks karthik ps: I am running the program on NT I know that if we have the source we can edit version info in VC++,but I dont want to do it that way
I figured it out! You MUST free the library prior to using the BeginUpdateResource, UpdateResource, EndUpdateResource sequence. Even though update always truly failed when library was loaded in memory, no errors were indicated or returned! Here is pseudo-code sequence... LoadLibraryEx <- no need to execute dll entry point FindResourceEx LoadResource LockResource <- gets pointer to data SizeofResource <- how much data you got ...allocate memory to hold modifiable copy of resource data ...make copy of resource data into memory block FreeLibrary <- important to do it here BeginUpdateResource ...modify resource data, or supply new data if you want UpdateResource EndUpdateResource ...deallocate memory you obtained earlier That's it! As a test, I was able to modify the fixed file version information (dwFileVersionMS and dwFileVersionLS fields in the VS_FIXEDFILEINFO) and see that the changes had occurred.
-
Well, I was unable to update resource also. I've just got the same second resource with the ID like I've wanted to update, but it appeares like I had 2 resources instead of 1 updated.
This happened to me also. However, I tracked it down to not setting the locale correctly when I saved the resource back to the file. You can load the resource specifying a generic language identifier... "If this parameter is MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), the current language associated with the calling thread is used." When you go to save it, however, the language ID better match what was in the file in the first place or else you will end up with another resource stuffed into the file with a different language identification associated with it! The resources in my file are tagged with the following: LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US