You could probably write a C++ DLL and then call it from VB.