I'm trying to call a DLL function from VA Smalltalk (my first time), something like:
| dllMethod result |
dllMethod := PlatformFunction
callingConvention: 'C'
function: 'doNothing'
library: 'Only.dll'
parameterTypes: #( )
returnType: #uint32.
result := dllMethod call.
.....
^ result.
The DLL is located in the "C:\WINDOWS\system32" folder and registered.
The DLL is originally some basic Java code packaged as a bean and then as an ActiveX control (using ActiveX Bridge) - I've followed the instructions on <http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html>
When running the Smalltalk code I get the following: 'Primitive failed in: PlatformFunction>>#call due to OS error4'
Can anyone help me understand what I'm doing wrong or otherwise advise how to access Java code from VA Smalltalk ?
Thanks