Page 1 of 1

Posted: Tue Sep 17, 2002 4:39 am
by BackupUser
Restored from previous forum. Originally posted by Hi-Toro.

I really need to be able to do this ASAP -- is it possible to add the ability to extract file version information from exes/dlls (try right-clicking on a DLL, choosing Properties, then clicking 'Version'), because I want to list all the descriptions of Windows DLLs to a file.

I can't do this in PB at the moment, and the only references I can find on the net for doing this use C++ classes (yuk!), which I just can't port over :/

There are two examples [url http://codeguru.earthweb.com/misc/VersionInfo.shtml]here[/url] and [url http://codeguru.earthweb.com/misc/versi ... ce_2.shtml]here[/url]...

Though it would be nice to have in PB, does anyone know how to do this right now from PB? Any of the OOP experts reading? :)



--
See ya,
James L Boyd.
http://www.hi-toro.com/
--

Posted: Tue Sep 17, 2002 7:05 am
by BackupUser
Restored from previous forum. Originally posted by Rings.

it ist not so difficult if you read the api (for Version.dll)
so i post a tip to the Tips&Tricks section
viewtopic.php?t=2105

, maybe also available at the resourcesite

Its a long way to the top if you wanna .....CodeGuru

Posted: Tue Sep 17, 2002 2:48 pm
by BackupUser
Restored from previous forum. Originally posted by Hi-Toro.

Wow, thanks Rings -- that was quick! Where is the documentation you refer to though? I have the Win32 API doc, but all I could find was the GetFileVersion/Info functions (which aren't directly callable from PB). Also, what's the difference between GetFileVersion and GetFileVersionA? I remember commands like this (ending in A) on the Amiga, and never understood what they were for...?

Anyway, thanks again for doing that :)


--
See ya,
James L Boyd.
http://www.hi-toro.com/
--

Posted: Wed Sep 18, 2002 6:28 am
by BackupUser
Restored from previous forum. Originally posted by Rings.

I also own only the Winapi doc, but you can search them for the functions you want.
i look at the 'C'-example and then i converted it.
Thats right that the functions are not part of Purebasic directly, but you can use OpenLibrary and CallFunction with every DLL.
For the difference between the A and the W at the End of the functions,

the A stands for Ansi-Char.The function works and retrieve Strings in the ANSI-Char (0 to 255 decimal, for example A=65 ) Format.

the W stands for WideChar or UNICODE.The function works and retrieve Strings in the Windows WIDE-Char-Format, for example the whole chinese characters can been handled with these.

Purebasic as i know only accepts ANSI Strings.

hope that helps.

PS: you can now convert them to Blitz :)

Its a long way to the top if you wanna .....CodeGuru

Posted: Wed Sep 18, 2002 3:59 pm
by BackupUser
Restored from previous forum. Originally posted by Hi-Toro.

Thanks Rings :)
PS: you can now convert them to Blitz :)
Whatever do you mean? :wink:

Actually, this isn't for Blitz directly -- I want to create a list of all/most of the Windows 98 files in a fresh installation, partly to help me in stripping down Windoze to a bare minimum.

BTW I found that the code doesn't always get the version string from a file, even if there is one. I'll try and figure it out now that I have some good code to start from though -- thanks again!


--
See ya,
James L Boyd.
http://www.hi-toro.com/
--