HectorSosa

Does anybody know how to change the details in the About Box for a MMC 3.0 snapin

It looks like part of the details are being loaded from the SnapInSettings attribute on the class that inherits from the SnapIn class. I tried using SnapInAboutSettings with no success. There doesn't seem to be an example of using this attribute anywhere.

Right now, I'm only missing the icon and the version information in the about box. I would appreciate anybody pointing me to a document or some resource on the Internet.

Thanks!

Hector Sosa, Jr
http://www.painlesssvn.com


Re: .NET Base Class Library MMC 3.0 About box details

HectorSosa

Anybody know how to do this




Re: .NET Base Class Library MMC 3.0 About box details

Feng Chen - MSFT

Hi HectorSosa,

I suggest that you can look into this article: Creating MMC Snapin using C# (Part I)

Thanks!






Re: .NET Base Class Library MMC 3.0 About box details

HectorSosa

I'm using the new MMC 3.0 release from Microsoft. My application is 98% finished, and I don't want to use IronRing's library. I would have to start over, and I definitely don't want to do that.

The link to MSDN articles on MMC 3.0 is here:

How-To Develop Snap-ins Using MMC
http://msdn2.microsoft.com/en-us/library/ms692755.aspx

That's about all that I have found about MMC 3.0 in 10 months. Feng, this is not aimed at you, but this has been EXTREMELY frustrating for me. It's like Microsoft has been tight-lipped about information on this library. I know that these things can be done, because I see larger companies doing it. Heck, several of the new snapins in Vista do all kinds of things that are not documented in the link I gave above.




Re: .NET Base Class Library MMC 3.0 About box details

HectorSosa

A kind soul gave me the answer in the Microsoft.Public.Management.MMC newsgroup. Here is his post:

You need to create a native code resource DLL (minimal C++ dll with an RC
file) and put the resources for the About Box in there. Then add code to
your snapin to let the mmc client know where they are.

Inside your DLL rc file:

/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_LOGO16 BITMAP "..\\AboutDll\\Resources\\icon16.bmp"
IDB_LOGO32 BITMAP "..\\AboutDll\\Resources\\icon32.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
IDI_ABOUT_ICON ICON "..\\AboutDll\\Resources\\My.ico"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_PRODUCT_NAME "Product name text for the About Box"
IDS_COMPANY "My company name or copyright information"
IDS_DESCRIPTION "My product's description"
END
STRINGTABLE
BEGIN
IDS_VERSION "1.2.3.4"
END

Inside your DLL resource.h file:

#define IDS_PRODUCT_NAME 101
#define IDS_COMPANY 103
#define IDS_DESCRIPTION 104
#define IDB_LOGO32 105
#define IDB_LOGO16 106
#define IDI_ABOUT_ICON 107
#define IDS_VERSION 201

Inside your SnapIn:

/// <summary>
/// Resource DLL identifiers for the About Box.
/// </summary>
[
SnapInAboutAttribute("About.dll",
ApplicationBaseRelative = true,
DisplayNameId = 101,
VersionId = 201,
VendorId = 103,
DescriptionId = 104,
IconId = 107,
LargeFolderBitmapId = 105,
SmallFolderBitmapId = 106,
SmallFolderSelectedBitmapId = 106
)
]

There is a bug in the mmc that causes problems when you update your resource
DLL. The mmc client caches the string information in a Registry Key:

HKEY_USERS\S-1-5-21-1123561945-789336058-854245398-1004\Software\Microsoft\Windows\ShellNoRoam\MUICache
And it uses the strings in there from that point on even if you change them
in your resource DLL. The only way around this issue is to either delete the
relevant values under this key, or change the numeric ids of the resources
whenever you update them. I have reported this bug to Microsoft but have not
got a response yet.


Hope this helps



Larry Gillstrom




Re: .NET Base Class Library MMC 3.0 About box details

Low Key

I'm hitting the same issue as HectorSosa while trying to update the version number string. This is definitely a bug, whether in Explorer/Shell or MMC 3.

Also, on my Vista test machine, the cache is located at HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache.

This is ridiculous... any word on whether it will be fixed




Re: .NET Base Class Library MMC 3.0 About box details

HectorSosa

The only way I found to deal with this is to use the InstallUtil.exe utility to uninstall and re-install the snapin. That seems to fix this issue.