How can i insert some items from PRODUCTVERSION structure in strings? I need it for aboutbox?
for example:
var_blabla db "I'm a string version: ", PRODUCTVERSION.version, ". Some other info...", 0
hi igor, you dont need to make code for this, just add new statistic and in propertis panel as caption enter what you want :U
Igor,
Welcome Aboard :U
The forum 'Search' and your favorite seach engine will answer many questions before we can and save you time. :dance:
Use GetFileVersionInfo, if you are interested in specific data for your about box.
But the flip side to this is, it should be know at assembly time as well.
Regards, P1 :8)
Hi Igor
You could have a look at RadASM's AddinMana sources.
The GetInfo proc extracts some info from the versioninfo.
KetilO
OK thanks for your replys.
@P1
I tried forum search but i could not find anything...
To Igor,
Is it working?
I think what trodon is saying is, keep a static contol in the About box and just set it in the code.
This I think can be done by either having a predefined version/build number, etc or by using GetFileVersionInfo on the EXE itself. (I have not checked this, but should work) :)
Cheers,
Shantanu
I guess I will have to use GetFileVersionInfo, but it would involve some unnecessary code because what I really need is to join product version string in some other string at assembly time and not at runtime. Why I need this to be done in this way, it's because I have Version Updating turned on in RadASM and I need my aboutbox to reflect version changes automatically.
@trodon
I don't know what is statistic, did you meant static? If I'm not mistaken you suggested that I should just manually fill in caption of static control, that is not what I need.
@KetilO
Is GetInfo proc something like GetFileVersionInfo that P1 mentioned? I'll try to find AddinMana source and take a look.
P.S.
I don't have internet at home (where I'm programming in masm) so I can't test right away, things that you suggest. That is way I was so stingy with information in my last post, sorry about that.
Quote@trodon
I don't know what is statistic, did you meant static? If I'm not mistaken you suggested that I should just manually fill in caption of static control, that is not what I need.
yes, i was meen that, this is easy solution :wink
Igor,
An important note. you will probably not know the size of the buffer you need to create when calling GetFileVersionInfo so use MAX_PATH. If you specify to small a buffer, GetFileVersionInfo will just truncate the information to fit your buffer and not tell you that there was a problem.
Oh, and GetInfo must be a radasm macro or addin so it probably also calls GetFileVersionInfo, so the same warning applies here also unless Ketilo says differently.
Paul
Quote from: PBrennick on September 28, 2006, 06:31:03 PM
An important note. you will probably not know the size of the buffer you need to create when calling GetFileVersionInfo so use MAX_PATH. If you specify to small a buffer, GetFileVersionInfo will just truncate the information to fit your buffer and not tell you that there was a problem.
GetFileVersionInfoSizeIgor, heres portion of code from one of my programs, hope it helps
:::
invoke GetFileVersionInfoSize,addr tmpi.szExePath,addr dwHandle
mov ebx,eax
.if eax
invoke GetMem,ebx
mov edi,eax
invoke GetFileVersionInfo,addr tmpi.szExePath,dwHandle,ebx,edi
mov pLen,ebx
invoke VerQueryValue,edi,T('\VarFileInfo\Translation\'),addr pBuf,addr pLen
invoke strcpy,addr tbuf,T('\StringFileInfo\')
invoke strlen,addr tbuf
mov edx,pBuf
lea eax,tbuf[eax]
mov edx,[edx]
rol edx,16
invoke DwToHex,edx,eax
;-
invoke strcpy,addr tbuf2,addr tbuf
invoke strcat,addr tbuf2,T('\FileDescription\')
invoke VerQueryValue,edi,addr tbuf2,addr pBuf,addr pLen
invoke AddLinef,T('FileDescription: %s'),pBuf
;-
invoke strcpy,addr tbuf2,addr tbuf
invoke strcat,addr tbuf2,T('\FileVersion\')
invoke VerQueryValue,edi,addr tbuf2,addr pBuf,addr pLen
invoke AddLinef,T('FileVersion: %s'),pBuf
;-
invoke strcpy,addr tbuf2,addr tbuf
invoke strcat,addr tbuf2,T('\LegalCopyright\')
invoke VerQueryValue,edi,addr tbuf2,addr pBuf,addr pLen
invoke AddLinef,T('LegalCopyright: %s'),pBuf
;-
invoke FreeMem,edi
.endif
:::
Quote from: drizz on September 28, 2006, 10:27:43 PMIgor, heres portion of code from one of my programs, hope it helps
drizz, please help him with letting him know which support files to include. Plus the T macro with AddLinef too.
Regards, P1 :8)
drizz,
He will also need the data specifications for plen, tbuf, pbuf and tbuf2. I think I got them all.
Paul
of course. i wrapped it up in this project, no dependencies.
[attachment deleted by admin]
drizz,
You did not include the RES folder in your zip so verinfdlg.res is missing.
Paul
Quote from: PBrennick on September 29, 2006, 02:36:43 PM
drizz,
You did not include the RES folder in your zip so verinfdlg.res is missing.
Hi Paul, are you 100% certain? i've downl. it again, made separate radasm config. on my drive E:
to recheck the project and it builds ok..., and all is fine. ::)
?!?
drizz,
Man, do I ever hate it when I am wrong. Still, I will always admit to my errors as this makes me reliable.
I am sorry to have wasted your time, my friend. And I thank you for being so polite about it.
EDIT: By the way, why have you been hiding such a VERY useful application. It is going right into my toolbox. Thank you very much for sharing.
Paul
Paul, Nothing to be sorry about. Can i suggest a break from computer for a while?
This things are nothing but result of exhaustion. Recharge batteries :)
i hope i'm not out of the line.
EDIT :) :What application do you mean?
drizz,
A break from the computer would be a great idea but that would be impossible as the library for the GeneSys Project is in need of constant updating. We are up to 85 functions, now. This increase in our function set is from July 15th, so all that traffic in 2.5 months. I have been busier than a cat covered with vaseline!
No, you are not out of line, just trying to be helpful. Perhaps, I will just contine to work on the project and not try to be too helpful to others. This would be a hard thing for me to do as I am disabled and the computer is all I have now. We will see what we willsee.
By the way, verinf.exe is the file I am referring to.
Paul
Paul, sorry i didnt know about your condition,
if you want work - theres something in user contributed code now :wink
drizz,
Where would I find that. I have been an assembly coder since the '70s and I really miss it.
As far as my condition goes, all the Mods and Hutch are very aware of my condition and they have been extremely supportive of me. I care very much for all of them and YOU have just made the list. There are other members on that list and whenever I have to go to the hospital, they are all notified. I do not like to post my condition as it looks like I am trying to get sympathy if I do. Your question deserved an answer, though, so I chose to be honest.
Paul