private void Dispose(bool p) { if (processAddr != IntPtr.Zero) { NativeApi.VirtualFreeEx(hProcess, processAddr, 4096, NativeApi.MEM_RELEASE); processAddr = IntPtr.Zero; } if (hProcess != IntPtr.Zero) { NativeApi.CloseHandle(hProcess); hProcess = IntPtr.Zero; } if (_asyncHandle != null) { _asyncHandle.Dispose(); _asyncHandle = null; } #if export if (writer != null) { writer.Dispose(); writer = null; sheet = null; } #endif }
public COCFillManager(WebBrowser2 browser, string dataFile, string ruleFilePath) : base(browser, dataFile, ruleFilePath) { base.FillType = "COC"; base.Version = Properties.Resources.FillRule; _asyncObject = new FillAsyncHandler(); }
public COCFillManager(WebBrowser2 browser, string dataFile) : base(browser, dataFile, FileHelper.GetFillVersionByName(WebBrowserUtils.Properties.Resources.FillRule)) { base.FillType = "COC"; base.Version = Properties.Resources.FillRule; _asyncObject = new FillAsyncHandler(); _fillThread = new System.Threading.Thread(InnerBeginFill); }
protected FillBase(WebBrowser2 browser, Uri currentUri) { _browser = browser; _currentUri = currentUri; _asyncObject = new FillAsyncHandler(); _fillThread = new Thread(FillWorker); _state = Fillers.FillState.New; _browser.ScriptErrorsSuppressed = true; }
private Main_3C(IntPtr hwnd, string dataFile, uint processId) { DataFile = dataFile; _handle = hwnd; _selectedNode = IntPtr.Zero; _keyRelation = new List <KeyValuePair <string, object> >(); _treeView = null; this.processId = processId; hProcess = NativeApi.OpenProcess(0x1FFFFF, false, this.processId); processAddr = NativeApi.VirtualAllocEx(hProcess, IntPtr.Zero, 4096, NativeApi.MEM_COMMIT, NativeApi.PAGE_READWRITE); _asyncHandle = new FillAsyncHandler(); this.GetTreeView(); #if export sheet = null; writer = null; #endif }