News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

"About Dll" Settings

Started by Strobe Raver, August 10, 2009, 11:10:40 PM

Previous topic - Next topic

Strobe Raver

Anyway to put a name, description, author, date created on a dll file with Masm32?

Like so in C#:
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]


[assembly: AssemblyVersion("1.0.*")]

Astro

Hmm... Interesting question!

You might need to create a resource file to do that.

Best regards,
Astro.

Strobe Raver

Would it be possible to create a resource file in the QEditor?

Astro

Found this! Looks interesting!! http://www.resedit.net/

QuoteWould it be possible to create a resource file in the QEditor?
If you know the format the .rc file needs to be in, you can use the menu to compile it to binary file than you can then link with. The linker converts the .res file to COFF format before adding it to the final .exe.

Best regards,
Astro.

fearless

RadASM has an option to add versioninfo resource which contains all the above info

Or you could add your own file (mydll.rc for example) and manually add the contents:

#define VERINF1 1
VERINF1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEOS 0x00000004
FILETYPE 0x00000000
BEGIN
 BLOCK "StringFileInfo"
 BEGIN
   BLOCK "040904B0"
   BEGIN
     VALUE "CompanyName", "fearless\0"
     VALUE "FileVersion", "1.0.0.0\0"
     VALUE "FileDescription", "AutoUpdate Uploader\0"
     VALUE "InternalName", "AUUploader\0"
     VALUE "LegalCopyright", "(C) 2009 -[Nwo]- fearless\0"
     VALUE "LegalTrademarks", "(C) 2009 -[Nwo]- fearless\0"
     VALUE "OriginalFilename", "AUUploader.exe\0"
     VALUE "ProductName", "AUUploader\0"
     VALUE "ProductVersion", "1.0.0.0\0"
   END
 END
 BLOCK "VarFileInfo"
 BEGIN
   VALUE "Translation", 0x0409, 0x04B0
 END


then use RC.EXE to compile the resource to a .res file, then convert it to an object file with CVTRES.EXE and finally link in the OBJ file to your other OBJ files to create your EXE or DLL

Using RadASM it is a much easier process
ƒearless

dedndave

you guys should have a look at Erol's site (Vortex)
he has some cool stuff there
also, he is invaluable when it comes to helping us make sense of this type of thing

http://www.vortex.masmcode.com/

Astro

Bookmarked!  :U

Thanks!

I tried the resource editor app I linked to - it created the Version tab but it was empty.

@fearless: That worked! I've been searching the 'net and couldn't find anything relating to the actual format of the source file. All the information MS seem to have is .NET orientated now.  :(

Best regards,
Astro.

Strobe Raver

I think I will be using RadASM IDE instead. fancy stuff  :cheekygreen:  :boohoo:



It's not working for me, setting the file details for a DLL

Strobe Raver

it isn't work for me  :dazzled:

how do I put a resource file into a dll?  :'(



dedndave

so far, i have only used one to create an icon
(i will want to learn more about it in a short time - i have a few things i want to learn before i move on)
but, that forum has all kinds of threads on the subject
use the search window
also, Vortex is the man for this kind of stuff
his site....
http://www.vortex.masmcode.com/

fearless

To add a resource file into your dll using RadASM:

- Create new DLL project: File Menu->New Project->DLL Project radio button

- Add your code as required, define your .def file library exports

- Add the version resource to your project by clicking on Project Menu->Versioninfo

- Edit the version info information to your liking

- Assemble, Link or Build to compile all together

- Right click on DLL in windows explorer, properties, version tab to view all your info you have just added to your DLL
ƒearless

Strobe Raver

I have it working in MASM32 QEditor. Used a program called "RLINK32.EXE" (Homepage)

Just had to link the compiled resource file (.RES) to the library (.DLL).  :green2

---

What's neat is I found "Edit -> Settings -> Edit Menus"

With just a few clicks, I can: build a DLL, and link a resource file to it.  :dance:

---

RLINK32.EXE does not take directories so this handy batch file will work:
@echo off

REM Link resource files to dll/exe with this

COPY /Y RLINK32.EXE %1
CD %1
START "RLINK32.EXE %2 %3"
ECHO
ECHO Cleaning up...
DEL /F /Q "RLINK32.EXE"
PAUSE
[/s]

Astro

Hi,

If you've got the paths set up, create the resource file, then as part of the link line (after compiling the .rc to .res using rc.exe) add:

LINK (parameters here) SomeFile.obj SomeFile.res

This will add the resources to the final exe/dll/etc.. and you're good to go!  :thumbu

Best regards,
Astro.