Hello,
I've run into an issue regarding the use of pointers in a .net assembly when using Thin Client(version 9.2.4). The code that follows runs fine when local, however through thin client the acuthin executable crashes when running the Marshal.StructureToPtr in the .net code. I'm suspecting this is because the pointer is getting created server side, rather than client side. I did find some documentation regarding calling dlls that use pointers through thin client(7.2.6.3 Passing pointers in DLL calls ), however neither the -Zm compile option or the M$ memory calls seemed to solve the problem. In the windows event viewer I'm seeing acuthin throw a memory access violation. Any help here would be much appreciated. Thanks!
.net Code:
public int Swipe_Card(int resultPointer)
{
var code = CardSwipeResultCode.SwipeTechnicalError;
try
{
var pointer = new IntPtr(resultPointer);
SwipeResult result;
(result, code) = DebitCreditProcessor.SwipeCard();
Marshal.StructureToPtr(result, pointer, true);
}
catch (Exception exception)
{
DisplayErrorMessage(exception);
}
return (int)code;
}
COBOL Code:
77 RESULT-POINTER USAGE POINTER.
SET RESULT-POINTER TO ADDRESS OF SWIPE-RESULT
MODIFY NET-HANDLE
"@Swipe_Card"
(RESULT-POINTER)
GIVING WS-RESULT
#ThinClientPointer.netAssembly