Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Exception occurs when native Dialog System program calls managed WinForm

Exception occurs when native Dialog System program calls managed WinForm

PROBLEM:

Customer has a native Dialog System application that displays a window on which an ActiveX control resides.

This native application displays this Dialog System window and then calls a managed code .Net WinForm application that displays a Windows Form which also has an ActiveX control on it.

When the program does this it gets the following exception:

    Application Exception  A device attached to the system is not functioning.

What is causing this to occur?

RESOLUTION:

Try setting the following environment variable in your computers environment

MFOLECL_NO_THREAD_INIT=ON

This is a problem that is caused by the Micro Focus native OLE support calling CoInitialize on a thread that it did not own, mainly the managed code thread.

If this environment variable is set the OLE support will not try to initialize a thread that it does not own.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-03-19 09:09
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.