private static Class20.Interface0 smethod_0() { Class20.Interface0[] interfaceArray1 = new Class20.Interface0[1]; Class20.Class22.SHGetMalloc(interfaceArray1); return(interfaceArray1[0]); }
protected override bool RunDialog(IntPtr hWndOwner) { bool flag = false; if (this.intptr_1 == IntPtr.Zero) { Class20.Class22.SHGetSpecialFolderLocation(hWndOwner, (int)this.specialFolder_0, ref this.intptr_1); if (this.intptr_1 == IntPtr.Zero) { Class20.Class22.SHGetSpecialFolderLocation(hWndOwner, 0, ref this.intptr_1); if (this.intptr_1 == IntPtr.Zero) { throw new InvalidOperationException("FolderBrowserDialogNoRootFolder"); } } } this.intptr_0 = IntPtr.Zero; if (this.bool_0) { this.int_1 += 2; } if (this.bool_1) { this.int_1 += 0x40; } if (!this.bool_6) { this.int_1 += 0x200; } if (this.bool_4) { this.int_1 += 0x10; } if (this.bool_3) { this.int_1 += 0x4000; } if (Control.CheckForIllegalCrossThreadCalls && (Application.OleRequired() != ApartmentState.STA)) { throw new ThreadStateException("DebuggingException: ThreadMustBeSTA"); } IntPtr zero = IntPtr.Zero; IntPtr hglobal = IntPtr.Zero; IntPtr ptr3 = IntPtr.Zero; try { Class20.Class21 class2 = new Class20.Class21(); hglobal = Marshal.AllocHGlobal((int)(int_0 * Marshal.SystemDefaultCharSize)); ptr3 = Marshal.AllocHGlobal((int)(int_0 * Marshal.SystemDefaultCharSize)); this.delegate0_0 = new Class20.Delegate0(this.method_2); class2.intptr_1 = this.intptr_1; class2.intptr_0 = hWndOwner; class2.intptr_2 = hglobal; class2.string_0 = this.string_0; class2.int_0 = this.int_1; class2.delegate0_0 = this.delegate0_0; class2.intptr_3 = IntPtr.Zero; class2.int_1 = 0; zero = Class20.Class22.SHBrowseForFolder(class2); if (((this.int_1 & 0x2000) != 0x2000) && ((this.int_1 & 0x1000) != 0x1000)) { if (zero != IntPtr.Zero) { Class20.Class22.SHGetPathFromIDList(zero, ptr3); this.bool_2 = true; this.string_1 = Marshal.PtrToStringAuto(ptr3); flag = true; } return(flag); } this.string_1 = Marshal.PtrToStringAuto(class2.intptr_2); flag = true; } finally { Class20.Interface0 interface2 = smethod_0(); interface2.Free(this.intptr_1); this.intptr_1 = IntPtr.Zero; if (zero != IntPtr.Zero) { interface2.Free(zero); } if (ptr3 != IntPtr.Zero) { Marshal.FreeHGlobal(ptr3); } if (hglobal != IntPtr.Zero) { Marshal.FreeHGlobal(hglobal); } this.delegate0_0 = null; } return(flag); }