C# HRESULT comparison

Posted by: Rick Strahls WebLog, on 19 Apr 2007 | View original | Bookmarked: 0 time(s)

I just had a little brain freeze dealing with an HRESULT error from a COMException. When dealing with COM objects you still need to deal with the unfortunate COM idiosyncrasies like HRESULT values which get returned from just about every COM call. COMException exposes this HRESULT as an int value in the Exception's ErrorCode property. Now in my brain freeze haze I tried something like this: try{    this.OutputBuffer = this.ComInstance.GetType().InvokeMember("ProcessHit", BindingFlags.InvokeMethod,   ...

Advertisement
Category: C# | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2702 | Hits: 397

Similar Posts

  • How to make IIS hosted WCF service work with Card Space using localhost more
  • VB expression trees - string comparisons more
  • What Makes A How-Do-I Video Great ? more
  • Chaining the C# ?? Operator more
  • MSIL: Part 3 more
  • Mobile Application Blocks ContainerModel / Funq: an introduction more
  • Mobile Application Blocks ContainerModel / Funq: an introduction more
  • VS 2010 SKUs Lost? more
  • Silverlight misconceptions, bad reviews, bad comparisons more
  • Paco Underhill and His Silver Bullet Technology more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD