Getting a System.Runtime.InteropServices.COMException when trying to use BitmpaMetadata to extract EXIF/XMP data?
Well if that's the case, it's probably cause you're attempting to use this class from a MTA thread. In order to fix this, just change the apartment of the thread where this code is running from MTA to STA (either using the [STAThread] Attribute or by setting the ApartmentState member of the thread that you're spinning off to run this code).
Here's the details of the exception:
Message="A null reference pointer was passed to the stub. (Exception from HRESULT: 0x800706F4)"
at MS.Internal.HRESULT.Check(Int32 hr)