Calling COBOL DLL from VB4-16bit 
Author Message
 Calling COBOL DLL from VB4-16bit

I have a problem with a COBOL DLL which I am calling from VB.  The DLL has
worked for years but we have recently had some changes applied to the COBOL
code.  With the new DLL everything seems fine except when the VB program is
run for a second time, on exit from the DLL the machine GPFs.

I am using a normal Declare statement to identify the library and the entry
point etc.

If I reboot the machine, load VB, run the program, call the COBOL function
and then immediately do a GetModuleUsage(GetModuleHandle("DLLNAME")), the
usage count is 2.  Using the old DLL the usage count is 1 (which it should
be).

If I exit VB, start VB again and do the same again, the machine GPFs when I
exit VB.

The DLL is compiled using Microfocus COBOL compiler.

I would really appreciate some help.



Thu, 11 Oct 2001 03:00:00 GMT  
 Calling COBOL DLL from VB4-16bit
Try putting an INITIAL statement in the program id.
Quote:

>I have a problem with a COBOL DLL which I am calling from VB.  The DLL has
>worked for years but we have recently had some changes applied to the COBOL
>code.  With the new DLL everything seems fine except when the VB program is
>run for a second time, on exit from the DLL the machine GPFs.

>I am using a normal Declare statement to identify the library and the entry
>point etc.

>If I reboot the machine, load VB, run the program, call the COBOL function
>and then immediately do a GetModuleUsage(GetModuleHandle("DLLNAME")), the
>usage count is 2.  Using the old DLL the usage count is 1 (which it should
>be).

>If I exit VB, start VB again and do the same again, the machine GPFs when I
>exit VB.

>The DLL is compiled using Microfocus COBOL compiler.

>I would really appreciate some help.



Thu, 11 Oct 2001 03:00:00 GMT  
 Calling COBOL DLL from VB4-16bit

Quote:
> Try putting an INITIAL statement in the program id.




Quote:
> >I have a problem with a COBOL DLL which I am calling from VB.  The
DLL has
> >worked for years but we have recently had some changes applied to the
COBOL
> >code.  With the new DLL everything seems fine except when the VB
program is
> >run for a second time, on exit from the DLL the machine GPFs.

> >I am using a normal Declare statement to identify the library and the
entry
> >point etc.

> >If I reboot the machine, load VB, run the program, call the COBOL
function
> >and then immediately do a GetModuleUsage(GetModuleHandle("DLLNAME")),
the
> >usage count is 2.  Using the old DLL the usage count is 1 (which it
should
> >be).

> >If I exit VB, start VB again and do the same again, the machine GPFs
when I
> >exit VB.

> >The DLL is compiled using Microfocus COBOL compiler.

> >I would really appreciate some help.

Something else you can check, if it's a 16 bit COBOL DLL...

If you have compiled the COBOL DLLs using COBLIB then the Micro Focus
RTS will attempt to grab all available memory. Use the COBPOOL
environment variable to set how much memory the MF RTS should release or
compile using LCOBOL which follows the mixed language programming
standard for memory allocation.



Thu, 11 Oct 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problem calling COBOL DLL from VB4-16bit

2. How to Calling COBOL DLL from VB4-16bit

3. 32-bit MF COBOL DLL calling from VB4

4. Fortran DLL called from VB4?

5. Problems in calling Fortran DLLs from VB4 32-bit

6. VB4 calls MS FPST4.0 dll - Example ?

7. Want to use CLarion with VB4 16bit, paradoxal ?!

8. Problem O2/2 warp 32bit cobol calling 16bit c

9. MF cobol 16bit call under VisOc

10. Help on Net Express COBOL dll and calling the DLL from VB program

11. create fortran dll for vb4 using mingw

 

 
Powered by phpBB® Forum Software