I think Merri's solution will also cause random crashes if VBClassicRocks solution also crashed at times. My gut feeling is that the DLL is using c_Decl calling conventions. You should be able to find that info within the source.

VB cannot call cDECL functions correctly becuase it doesn't expect them. A hack/workaround is needed.
For example, zLIB.DLL was extremely popular before GDI+ came about. That DLL allowed us VBers to encode/decode PNG files, but it was written with cDECL conventions. Some nice souls out there converted the DLL to c_StdCall so we can use them in VB like other common APIs. Maybe the same thing applies here? Is there a c_STDCALL version of F_MOD?

Here is a link to a planetsourcecode project that uses Assembly to allow VB to call c_DECL functions. I can vouch for the author -- very good coder.