RegistrationServices.UnregisterAssembly Method
Unregisters the classes in a managed assembly.
[Visual Basic] Public Overridable Function UnregisterAssembly( _ ByVal assembly As Assembly _ ) As Boolean Implements IRegistrationServices.UnregisterAssembly [C#] public virtual bool UnregisterAssembly( Assembly assembly ); [C++] public: virtual bool UnregisterAssembly( Assembly* assembly ); [JScript] public function UnregisterAssembly( assembly : Assembly ) : Boolean;
Parameters
- assembly
- The assembly to be unregistered.
Return Value
true if assembly contains types that were successfully unregistered; otherwise false if the assembly contains no eligible types.
Implements
IRegistrationServices.UnregisterAssembly
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentNullException | assembly is a null reference (Nothing in Visual Basic). |
| InvalidOperationException | The full name of assembly is a null reference (Nothing in Visual Basic).
-or- A method marked with ComUnregisterFunctionAttribute is not static (Shared in Visual Basic) . -or- There is more than one method marked with ComUnregisterFunctionAttribute at a given level of the hierarchy. -or- The signature of the method marked with ComUnregisterFunctionAttribute is not valid. |
Remarks
UnregisterAssembly removes the registry entries for the types in the specified assembly previously added by RegisterAssembly. This method also calls any unregistration functions found in the assembly.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
RegistrationServices Class | RegistrationServices Members | System.Runtime.InteropServices Namespace