Hi!
I am doing my first steps with .NETCOBOL. Now I have the following problem:
I have to call an unmanaged C function from a managed NETCOBOL program. The function has got one parameter that is defined as void* resp. char*. I need to pass COBOL different types of groups (having of course different lengths) to this function, e.g.
01 TEST1
05 F1 PIC S9(9) COMP-5.
05 F2 PIC X(10).
01 TEST2
05 F1 PIC S(9) COMP-5.
05 F2 PIC S(9) COMP-5.
05 F3 PIC X(20).
...
I have made prototype definition with the first group definition and this worked fine. But I can't make a prototype definition for all possible group definitions that I want to pass to my C function. How can I write a prototype with the definition of a variable length parameter?
I have tried to use POINTER and some other dirty tricks but no success. Anyone her with a good idea or solution to my problem?
Martin
I am doing my first steps with .NETCOBOL. Now I have the following problem:
I have to call an unmanaged C function from a managed NETCOBOL program. The function has got one parameter that is defined as void* resp. char*. I need to pass COBOL different types of groups (having of course different lengths) to this function, e.g.
01 TEST1
05 F1 PIC S9(9) COMP-5.
05 F2 PIC X(10).
01 TEST2
05 F1 PIC S(9) COMP-5.
05 F2 PIC S(9) COMP-5.
05 F3 PIC X(20).
...
I have made prototype definition with the first group definition and this worked fine. But I can't make a prototype definition for all possible group definitions that I want to pass to my C function. How can I write a prototype with the definition of a variable length parameter?
I have tried to use POINTER and some other dirty tricks but no success. Anyone her with a good idea or solution to my problem?
Martin