public void Dispose() { if (this.PersistStream != null) { Marshal.FinalReleaseComObject(this.PersistStream); } this.LinkA = null; this.LinkW = null; this.PersistStream = null; }
private void Initialize() { object obj2 = new CoShellLink(); this.LinkW = obj2 as IShellLinkW; if (this.LinkW == null) { this.LinkA = obj2 as IShellLinkA; if (this.LinkA == null) { throw new NotSupportedException("IShellLink"); } } this.PersistStream = obj2 as Microsoft.COM.IPersistStream; if (this.PersistStream == null) { throw new NotSupportedException("IPersistStream"); } }