Hi all, I need to ensure that in case the assembly/dll qualifies all prerequisite for Installation in GAC path viz., Strong name, Signing etc., this should install assembly/dll in GAC path ie., ("C:\Windows\Microsoft.NET\Assembly\abc.dll")
#include <stdafx.h>
#include <windows.h>
....
...
#using <mscorlib.dll>
using namespace System;
using namespace System::EnterpriseServices::Internal;
bool InstallABC() {
try {
System::EnterpriseServices::Internal::Publish ^ pb = System::EnterpriseServices:;Internal::Publish();
pb->GacInstall(@"C:\Abc.dll");
} catch(SecurityException & ex) {
return false;
}
return true;
}
if not it should display a message box, of Unsuccessfull in Installing the Assembly/dll in the GAC path, Since, I am writing this code as managed (C++/CLI extensions) within Unmanaged C++, I want to handle the Exception without allowing calling OS terminate/abort process,
could you share me some examples on managed(C++/CLI) specific to the above GACInstall(..) API.
Also, in exception handling does above code sufficient to capture the Unhandled Exception due to failure on part of Dll/Assembly to be placed in GAC.
Any Help in resolving the above would be much appreciable,
Details:
VS2008 IDE , Windows 7 o/s, Usage of GACInstall(..) programmatically,
Regards,
VishalK_90