1

I am having a problem with a 32-bit MMC snap-ins (on a x64 server 2008 machine). The snap-ins have been successfully registered. When I launch the associated.msc file using the mmc (with 32 bit option), the name(s) of the snap-ins are displayed on the LHS but the RHS shows an error page that says the page could not be loaded.

Using procmon, I think that I have identified that the problem relates to the failure to locate a DLL that is also shipped with the product and used by the snap-in. This is located in a directory c:\\bin and this directory is specified in the PATH environment variable. However, the MMC seems to be looking only in the c:\windows\sysWOW6432 directory (i.e. the 32 bit version of the c:\windows\system32 on the 64 bit machine). I wouldn't mind this if it also went on to search the other directories specified on the PATH (which includes the c:\\bin directory).

I have tested this hypothesis and put the DLLs in the syswow6432 directory and things seem to work correctly from there on out.

I would obviously not want to put all the product specific DLLs in the system directory and would prefer to keep them within the product specific directory.

Can anyone explain the failure to locate the DLL on the PATH and a resolution.

1 Answers1

0

Use the /codebase option of RegAsm.exe when registering your dependent assemblies. You can specify the fully-qualified path to your assembly which will be lazy-loaded when the snapin is selected from the MMC snapin tree.

On 64-bit MS operating systems, in the absence of /codebase, dependent assemblies/DLLs of 32-bit snapins are loaded from the SYSWOW64 directory while 64-bit snapins load dependent assemblies/DLLs from the system32 directory. PATH does not seem to figure into the equation, although, alternatively, you could probably use gacutil.exe to install your dependent assemblies into the GAC vice polluting SYSWOW64.

TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130