Highlighted
Absent Member.
Absent Member.
325 views

Error calling DLL function in runtime 9

[Migrated content. Thread originally posted on 28 January 2011]

Hi, i call a dll function using the format "myfunction@WINAPI". The function correctly does its work, but crashes when returns, with an error message of memory access violation. With previous runtimes the function worked correctly.

Other functions of the same dll works correctly, all called with the WINAPI calling convention. For debug purpose i tried calling other working functions with the wrong calling convention, say "__cdecl", obtaining the same anomalous behaviour: the function is called, it performs its work and crashes on return.

Is it possible that "myfunction" is not called with the correct calling convention even if specified with @WINAPI?(setting the environment variable fails as well)
0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Error calling DLL function in runtime 9

Try executing using --a2n and see if that resolves this issue
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Error calling DLL function in runtime 9

Good morning, i just tried and this does not fix the issue. However it is a C++ dll, not a .NET one.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Error calling DLL function in runtime 9

Have you changed your function lately?

It would be very helpful to see the declaration of the C function as well as how you invoke it from ACUCOBOL-GT along with the ACUCOBOL-GT data definitions.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Error calling DLL function in runtime 9

I found the problem. I was not passing a request argument to the C function. Sorry but this is a 3rd party dll. Thank you for support.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.