That error typically occurs when you try to initialize COM in a thread in which COM is already initialized and you specify a different threading model than was specified the first time.
Are you explicitly calling CoInitializeEx somewhere else in the same thread? Are you using the Measurement Studio CNiGraph C++ class wrapper for the ActiveX control? If so, what version of Measurement Studio are you using?