private static void HandleError(int error) { if (error != NativeMethods.ERROR_SUCCESS) { throw new System.ComponentModel.Win32Exception(error); } }