[Migrated content. Thread originally posted on 27 September 2011]
We have made a COM wrapper around an existing COBOL program using the Interface Mapping Toolkit. In the existing COBOL program we have used several entrypoints with parameters that are defined in the linkage section. Registering and using it by making an instance of that object in VB6 is possible. Even intellisense works fine. Much of it does work, but when we we call one function a 100000 times (for that function has 100000 records) we get an Out of memory error followed by a MFCLBINP Error 601. We have tried the several COM options in the deploy option: Apartment, Both, Free and Neutral.Does someone have any idea what possibly might causes this problem?
Here is an extraction of the cobol program that we use:
Linkage section.
01 asPar0 pic x(4096).
01 filler redefines asPar0.
03 asPar0-data pic x(4095).
03 asPar0-ind pic 9(01).
01 asPar1 pic x(4096).
01 filler redefines asPar1.
03 asPar1-data pic x(4095).
03 asPar1-ind pic 9(01).
Entry âCOB_ADDNEWâ dynamicNTStdCallPlus2 using by reference asPar0.
copy âaddnewâ.
exit program return Returncode.
Entry âCOB_FIELDDEFSâ dynamicNTStdCallPlus2 using by reference asPar0
by reference asPar1.
copy âfielddefsâ.
exit program return Returncode
and so on.