Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 13th, 2005, 10:15 AM   #1
Pedja
Programmer
 
Join Date: Nov 2005
Location: Belgrade, Serbia & Montenegro
Posts: 31
Rep Power: 0 Pedja is on a distinguished road
Send a message via ICQ to Pedja Send a message via MSN to Pedja Send a message via Yahoo to Pedja
Unhappy Problem with extracting file description from .exe files!!!

I am trying to extract informations from .exe and .dll files. It works fine, but for some files VerQueryValue function (API) gets the wrong value of language identifier, so I can't extract file description. E.g. for POWERPNT.EXE it gets 0 instead of 1033 (en-us). Is there a chance that language identifier isn't specified in .exe file? How can I get file description in that case? Can anyone tell me what might be the problem and what should I do?
Pedja is offline   Reply With Quote
Old Dec 13th, 2005, 10:21 AM   #2
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Could you post the code?
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Dec 13th, 2005, 10:22 AM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I seem to recall we discussed this some.
Quote:
Originally Posted by MSDN
Return Value

If the specified version-information structure exists, and version information is available, the return value is nonzero. If the address of the length buffer is zero, no value is available for the specified version-information name.

If the specified name does not exist or the specified resource is not valid, the return value is zero.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Dec 13th, 2005, 11:23 AM   #4
Pedja
Programmer
 
Join Date: Nov 2005
Location: Belgrade, Serbia & Montenegro
Posts: 31
Rep Power: 0 Pedja is on a distinguished road
Send a message via ICQ to Pedja Send a message via MSN to Pedja Send a message via Yahoo to Pedja
Thanks, but I am aware of all those things. Still, I know that I can get file description out even if there is no language identifier specified inside the file. First time I call VerQueryValue to get language and code page identifiers, so I could, get file description the second time I call the function, using those values. I have a programme that succedes in getting all of those informations out, so it can be done. I just don't know what to do. Should I go through all language identifiers until I get non-zero value for file description. That doesn't seem like very good solution, but it could work. Help?
Pedja is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:47 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC