For the C sample add the following method in your application:
invokeCATM "This method calls the C ATM function in the CATM DLL. The method assumes the record wrapper has already been created and that the constants in the CATM sample structure have been placed in a pool dictionary" | atmStruct platformFunction | atmStruct := SampleCATMStruct new. atmStruct pinNumber: '12345'. platformFunction := PlatformFunction callingConvention: 'c' function: 'atm' library: 'catm' parameterTypes: #(uint32 pointer) returnType: #none. platformFunction coroutineCallWithArray: (Array with: AtmQuery with: atmStruct) threadKey: nil. Transcript show: (atmStruct firstName); cr; show: (atmStruct lastName); cr; show: (atmStruct checkingBalance); cr.
Type the following on the System Transcript window and run it:
MyExtFunc new invokeCATM
You should see the following on your System Transcript window:
John Smith 7890.03