private void Dispose(bool disposing) { if (!disposed) { disposed = true; if (disposing) { if (shellLink != null) { Marshal.ReleaseComObject(shellLink); shellLink = null; } } } }
/// <summary> /// Initializes a new instance of the <see cref="ShellLink"/> class. /// </summary> public ShellLink() { shellLink = (NativeInterfaces.IShellLinkW) new ShellLinkCoClass(); }
/// <summary> /// Initializes a new instance of the <see cref="ShellLink"/> class. /// </summary> public ShellLink() { shellLink = (NativeInterfaces.IShellLinkW) new ShellLinkCoClass(); disposed = false; }
/// <summary> /// Initializes a new instance of the <see cref="ShellLink"/> class. /// </summary> public ShellLink() { shellLink = new NativeInterfaces.NativeShellLink(); disposed = false; }