I found this VB class that allows you to easily call cdecl routines from VB - without writing a wrapper function! Use your own subroutines for callbacks. It's amazing, but it works. Saved me a whole lot of work.
Universal dll function caller
Features: Transparent CDECL/stdcall function calling. Call functions by ordinal or name. Module (.bas) callbacks for CDECL functions. Object (.cls/.frm/.ctl) callbacks for CDECL and stdcall functions. Support for multiple callbacks. Support for multiple cCallFunc.cls instances. Support unicode path\module names.
Tracy Dryden
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
Universal dll function caller
Features: Transparent CDECL/stdcall function calling. Call functions by ordinal or name. Module (.bas) callbacks for CDECL functions. Object (.cls/.frm/.ctl) callbacks for CDECL and stdcall functions. Support for multiple callbacks. Support for multiple cCallFunc.cls instances. Support unicode path\module names.
Tracy Dryden
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.