Highlighted
Absent Member.
Absent Member.
1273 views

Cancelling a native DLL called from managed code

Jump to solution

Hi,

My program, Visual Cobol managed code, calls an unmanaged DLL containing print routines using PrintEasy by Easirun. The call functions with no Problem, but, the Statement:

cancel "LSdruck" doesn't remove LSdruck.dll from Memory resulting in a blank page being printed first on next call. A log Shows "newInstance" in the dll is only established on first call.

Is there a method of removing the dll from Memory other than the - not working - cancel Statement?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Cancelling a native DLL called from managed code

Jump to solution

Although you cannot cancel the program you should be able to specify IS INITIAL in the program-id of the unmanaged program and each time it is called it will be in its initial state if that is what you are looking for

View solution in original post

0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Cancelling a native DLL called from managed code

Jump to solution

Sorry but the .Net framework/CLR does have a mechanism for unloading native DLLs, so the .net runtime has no way of removing it on a CANCEL time or at Stop Run time.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Cancelling a native DLL called from managed code

Jump to solution

Although you cannot cancel the program you should be able to specify IS INITIAL in the program-id of the unmanaged program and each time it is called it will be in its initial state if that is what you are looking for

View solution in original post

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.