Calling a DLL 
Author Message
 Calling a DLL

I want to call functions in a DLL not written in Cobol from MF Cobol
4.0. The plattform is Win NT 4.0.
That works until I have to pass some parameters by value. The problem is
that the types of the parameters are SINGLE. In Cobol I defined them
with the typedef FLOAT.
But when I call my function, I get an error that this type cannot be
passed by value, only by reference. But the function needs the parameter
by value.
Any ideas how to do this?

Frank Pohlmann

--
____________________________________________________________________
Frank Pohlmann
B?urer TRADE GmbH
Eckendorfer Str. 2 - 4
33609 Bielefeld
Tel.: 0521/96652-0       Fax: 0521/96652-99

____________________________________________________________________



Sun, 11 Nov 2001 03:00:00 GMT  
 Calling a DLL
Frank,

The problem you hit is that the 4.0 product has a size limit of 32-bits for
data items BY VALUE but a float is 64-bit. I think you will be able to get
round the problem (though I haven't checked it so I could be wrong...) by
redefining the item as a group item consisting of two PIC X(4) COMP-5 items
and pass each of the two elements BY VALUE.

Quote:

>I want to call functions in a DLL not written in Cobol from MF Cobol
>4.0. The plattform is Win NT 4.0.
>That works until I have to pass some parameters by value. The problem is
>that the types of the parameters are SINGLE. In Cobol I defined them
>with the typedef FLOAT.
>But when I call my function, I get an error that this type cannot be
>passed by value, only by reference. But the function needs the parameter
>by value.
>Any ideas how to do this?

>Frank Pohlmann

>--
>____________________________________________________________________
>Frank Pohlmann
>B?urer TRADE GmbH
>Eckendorfer Str. 2 - 4
>33609 Bielefeld
>Tel.: 0521/96652-0       Fax: 0521/96652-99

>____________________________________________________________________



Sun, 11 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

2. Mixed Language - DVF 6.0 DLL calling Delphi4 DLL

3. VC++ dlls calling FORTRAN dlls

4. From a stub .dll call another .dll

5. C++ Call to DLL made in LabVIEW Fails the second time it is called

6. Q: Visual Smalltalk calls a DLL in OS/2

7. External calls without DLL/C

8. calling CW-dll from VB

9. Calling Clarion DLL from VB

10. Calling Delphi DLLs

11. Problem with call from Dll.

12. CALLING A DLL

 

 
Powered by phpBB® Forum Software