Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Why do I Receive Error Code -2147417850 (RPC_E_CHANGED_MODE) when I use NIMX_CopyConfiguration?

Primary Software: LabWindows/CVI Development Systems>>Full Development System
Primary Software Version: 8.1
Primary Software Fixed Version: N/A
Secondary Software: Measurement Studio>>Professional Edition (Base Package), Utility Software>>Measurement & Automation Explorer

Problem: I'm currently using NIMAX_CopyConfiguration in my application, but when the function returns I receive error code -2147417850 (RPC_E_CHANGED_MODE). Why am I receiving this error and what can I do to fix it?

Solution:

NIMAX_CopyConfiguration returns this error when called from a thread that has initialized the Component Object Model (COM) to use the multi-threaded apartment (MTA) threading model. A thread initializes COM to use the MTA by explicitly calling CoInitializeEx with MTA or by loading another COM component that does so.

To resolve this error, you must ensure that the calling thread has not initialized COM or has initialized COM to use the single-threaded apartment (STA) threading model.



Related Links:

Attachments:





Report Date: 02/27/2007
Last Updated: 03/06/2007
Document ID: 3ZQKQMLT

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit