Visual Basic 6 Cannot Find Dao350 Dll

Visual Basic 6 Cannot Find Dao350 Dll

I have a Visual Basic 6 .project file that is being built with MSBuild. MSBuild is using VB6.exe to do this, and finds the executable fine.

However, the VB6 executable itself cannot find the DAO350.dll file. The dll is located in the usual directory of C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\DAO350.DLL

The dll has been registered successfully with the command regsvr32.exe "C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\DAO350.DLL" In addition, the dll has been unregistered and re-registered successfully to no avail. It has also been replaced by a version of the DAO350 dll that is known to work.

Any help is greatly appreciated.

1 Answer

way 1:

Add reference DAO 3.6 library to project.

way 2:

Const TypeLibCLSID = "{00025E01-0000-0000-C000-000000000046}"
References.AddFromGuid TypeLibCLSID, 5, 0

way 3:

strPath = Environ$("CommonProgramFiles(x86)") & "\Microsoft Shared\DAO\DAO350.DLL"

or

strPath = Environ$("CommonProgramFiles") & "\Microsoft Shared\DAO\DAO350.DLL"
References.AddFromFile(strPath)
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.