Product: Microstation Connect Edition Update 15 and SDK
I have generated a native MDL Application(containing .ma and DLL) build on c++ using the MicroStation SDK's bmake tool. When I look at the details tab on the property page of the DLL, the information like product name, product version, file version, Copyright, etc fields are empty. How to get this information on the DLL?
I came across the generateAssemblyInfocpp.mki file from the mki folder. I was able to generate a file assemblyinfo.cpp using the mki file, this assemblyinfo.cpp file generated contains all the information which I need on the DLL's property page. If this is the process, then how to use the generated assemblyinfo.cpp to get the required?
Jon Summers said:It's nothing to do with a Viz Studio resource file. Perhaps someone from Bentley can confirm?
I think it's clear from mki itself ;-)
"Mixed assembly" is term used for NET assembly containing also native code (so it's not pure NET IL) and typically is created using C++/CLI language.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Devender Choudhary said:I came across the generateAssemblyInfocpp.mki file from the mki folder
That file looks like it's intended for mixed-mode compilation (C++/CLR). It's nothing to do with a Viz Studio resource file. Perhaps someone from Bentley can confirm?
Regards, Jon Summers LA Solutions
Devender Choudhary said:How to get information like copyright, product name, product version on a DLL?
Create a Win32 resource (.rc) file that contains your version info. The simplest way is to use Viz Studio or copy the data below (Choudhary.rc)...
.rc
Choudhary.rc
// Microsoft Visual C++ generated resource script. // #include "resource.h" // #defines generated by Viz Studio #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (United Kingdom) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK #pragma code_page(1252) #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 21,01,20,0 PRODUCTVERSION 10,15,0,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "080904b0" BEGIN VALUE "Comments", "BoM uses Item Type instances to store business data" VALUE "CompanyName", "Your Company Name" VALUE "FileDescription", "Choudhary" VALUE "FileVersion", "21.01.20.0" VALUE "InternalName", "Choudhary" VALUE "LegalCopyright", "Copyright (c) 2020..2021 Your company" VALUE "OriginalFilename", "Choudhary.dll" VALUE "ProductName", "Choudhary CONNECT Edition" VALUE "ProductVersion", "10.15.0.0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x809, 1200 END END #endif // English (United Kingdom) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED
Compile that using Microsoft's resource compiler. resource.h is generated by Viz Studio. Here's the bmake code...
resource.h
#---------------------------------------------------------------------- # Compile the Windows resource files for the DLM #---------------------------------------------------------------------- $(tempObjects)Choudhary.res : $(baseDir)Choudhary.rc $(baseDir)resource.h
The linker merges that resource file with your projects object files. Put it in the object list in your bmake file...
objects = \ $(tempObjects)Choudhary.obj \ $(tempObjects)Choudhary.res \ ...
There's more here, including a sample project.
Hi Jan,
I couldn't find much information from Stack Overflow and other forums. Do you have a way of getting these information onto the DLL using bmake tool? or any other .mki file for native c++ dll which would solve the purpose?
Hi Devender,
I think assembly info mki is used for mixed assemblies, created e.g. using C++/CLI, not for native C++ dll.
I think your question is "general Windows software development" topic. Did you check e.g. Stack Overflow?
With regards,