Created On:  7 June 2010

Problem:

When calling a COM interface that was generated using the IMTK, (Interface Mapper Toolkit), from a .NET client program sometimes the error "MFCLBINP Error 402" is reported when the interface method is called.

This occurs when the unmanaged COBOL program which will be called by the COM interface is a Dynamic Link Library (.DLL) and it is not linked to the multi-threaded runtime system.

Resolution:

This only occurs if a .DLL is being called. .int and .gnt programs do not exhibit this behavior.
Please ensure that the .DLL to be called from the generated COM interface is linked to the multi-threaded run-time system.

If this .DLL is created in a Net Express project then using the IDE, select Project->Build Settings->Link Settings and check the Multi-threaded option.
If you are creating this .DLL using cbllink then use the option -rM.
Incident #2452152