According to wikipedia clarion, some weird TopSpeed ββ"double quick call" can be used, where they use 4 registers for parameters instead of two. If the code is compiled using this calling convention, it will not be possible to directly call from C #.
TopSpeed ββ/ Clarion / JPI The first four integer parameters are passed to the eax, ebx, ecx, and edx registers. Floating-point parameters are passed on the floating-point stack β registers st0, st1, st2, st3, st4, st5 and st6. Structure parameters are always pushed onto the stack. Additional parameters are passed to the stack after the registers are exhausted. Integer values ββare returned in eax, pointers in edx, and floating point types in st0.
If this is not the case, probably one of your parameters is not the correct size, otherwise you will get AV instead of a damaged stack error.
You can also try to establish a calling convention in dllimport. Besides "TOPSPEED", the kernel also supports stdcall and cdecl, but "TOPSPEED" is the default. Below is a link to a tutorial on interacting with vb6 and clarion.
http://pisoft.ru/verstak/insider/cw_vb.htm
source share