GacInstallAssembly() private method

private GacInstallAssembly ( IntPtr InContext, String InAssemblyPath, String InDescription, String InUniqueID ) : bool
InContext System.IntPtr
InAssemblyPath String
InDescription String
InUniqueID String
return bool
Beispiel #1
0
        public static void GacInstallAssembly(
            IntPtr InContext,
            String InAssemblyPath,
            String InDescription,
            String InUniqueID)
        {
            Boolean Res;

            if (Is64Bit)
            {
                Res = NativeAPI_x64.GacInstallAssembly(InContext, InAssemblyPath, InDescription, InUniqueID);
            }
            else
            {
                Res = NativeAPI_x86.GacInstallAssembly(InContext, InAssemblyPath, InDescription, InUniqueID);
            }
            if (!Res)
            {
                throw new ApplicationException("Unable to install assembly in the GAC. This usually indicates either an invalid assembly path or you are not admin.");
            }
        }