Wednesday, April 13, 2016

Using the VB DLL with VB .NET

QUESTION
The .NET framework is throwing an error on your DLL; something about the Cache manager.

ANSWER
This is not a managed DLL and will not work automatically in a .NET environment. Since the DLL does not have header information in it, you have to provide that information with the DllImport directive. Remember to specify the character coding as ANSI in the DllImport statement. Similarly, you will have to explicitly allocate the storage for any string you pass in to the DLL's functions, eg VerStr = Space(80).

Follow the "VB .NET" or ".NET" labels on our site to see other blog posts related to using our software in the .NET framework envionment.