we have a repeated DLL call in our application, which takes around 2/3 of overall runtime. Currently that is done as user primitive, which takes a uint32 (pointer address) and a String and is coded as
- Code: Select all
<primitive: 'lib': function>
I'd like to experiment with asynchronous resource calls to improve the performance of that DLL function. Therefore I want to call the same function as PlatformFunction (first synchronosly and as next step asynchronously). I tried several variants of creating that PlatformFunction (by looking at other PlatformFunction calls and the documentation), but all I got were primitiveFailed with "Unknown API type" (and I'm sure this primitiveFailed happens on the Smalltalk side, as I have a debugger attached to the DLL). My modified code looks like this:
- Code: Select all
(PlatformFunction
callingConvention: 'userprim'
function: 'function'
library: 'lib'
parameterTypes: #(#uint32 #pointer)
returnType: #void)
callWith: address with: string.
Has anybody tried something like this before? Any other advice, what (probably stupid) mistakes I made?
Ciao and Thanks, Michael