An HRESULT value that you typically get from a call to a COM method. If the value is 0, which is equal to S_OK, this method throws Platform::InvalidArgumentException because COM methods that succeed should not throw exceptions.
Use this method to create an exception out of an HRESULT that is returned, for example, from a call to a COM interface method. You can use the overload that takes a String^ parameter to provide a custom message.
It is strongly recommended to use CreateException to create a strongly-typed exception rather than creating a Platform::COMException that merely contains the HRESULT.