Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a COBOL DLL with vba?
Message
 
To
All
General information
Forum:
Visual Basic
Category:
VBA
Title:
Calling a COBOL DLL with vba?
Miscellaneous
Thread ID:
00521784
Message ID:
00521784
Views:
45
Hello all of you!
I have got a big problem. I try to call a cobol dll with vba (MS Access).
This cobol program has to get some input parameters and gives some output parameters.

The cobol variables look like this:
01 RRINT.
05 RRINT-CONTROL.
10 RRINT-VERS      PIC X(04).
10 RRINT-FILE_DIR  PIC X(80).
...

05 RRINT-INPARAMS.
10 RRINT-RT_KZ     PIC X(01).
10 RRINT-WKZ       PIC 9(03).
...

05 RRINT-OUTPARAMS.
10 RRINT-RKL_HAFT  PIC X(03).
...

10 RRINT-RKL_GEBRL_TAB.
    20 RRINT-GEBIETSREFORML-ITEM OCCURS 30.
    25 RRINT-RKL_GEBRL_PLZ        PIC 9(05).
...
my declaration in VBA looks (e.g.) like this:
Declare Function COBOLFUNCTION Lib "cobol.DLL" (ByVal VERS As String, ByVal FILE_DIR As String, ByVal RT_KZ As String, ByVal WKZ As String,ByRef RKL_HAFT As String, ByRef RKL_GEBRL_PLZ As String)

Dim VERS As String * 4
Dim FILE_DIR As String * 80 
Dim RT_KZ As String * 1   
...
Now everytime I try to call the dll (with Call COBOLFUNCTION(params...)) I encounter a memory violation and the program closes.

I tried it several ways. (Different sequences and so on)
I searched the Internet (Microsoft Knowledge Base, other sites) but I found nothing that could help me.

I instantly hope that you can help me.

Many thanks in advance
Judith
Next
Reply
Map
View

Click here to load this message in the networking platform