I am a Haskell newbie trying to do COM automation using Haskell. I am using
hscom (Krasimir's implementation of COM automation). I have run into a problem
and need some help.
I have a Variant returned from a COM method invocation. When I print it, it
shows up as below.
Variant VT_DISPATCH
I need to invoke methods on the wrapped interface. My attempt to unbox it as
below runs into 'rigid type' error.
someFunc (Variant VT_DISPATCH val) query = do
dispId <- getMethodID "MethodName" val
The code above generates this error.
Couldn't match expected type `IDispatch a'
against inferred type `a1'
`a1' is a rigid type variable bound by...
I am probably missing something pretty basic. Any help on this is greatly
appreciated!
Thanks