Calling a dll that references another dll
Working on an application that requires a call to a dll written for c++. In the dll it calls other dlls. I am able to setup the reference to the first dll and a reference to the tlb for the second dll. I have the following:
Private Declare Function IServiceFactory Lib "C:\users\public\desktop\mycapture\wintvpublic.dll" (ByVal GetBoards_C As Long) As Long
Private Declare Sub IBoard Lib "C:\users\public\desktop\mycapture\datamodel.dll" (GetFriendlyName_C)
The first dll (wintvpucblic) has IServiceFactory that is suppose to GetBoards_C which references Iboard in datamodel.dll as GetFriendlyName_C. These names are what appears in Vb Object Browser. Need little guidance as to where to go from here. I need to get the name of the tuner board, I guess from GetFriendlyName_C but am not sure how to continue with the code. Any help appreciated.
Unlike controls, library files do not need to be registered. Visual Basic only requires a reference to the one that is called directly from VB code in order to compile the program. There are many library files called that are not directly referenced in VB code. When one is called upon and not registered in the registry, Windows will search for it in the application directory first, then in the Windows System directory, and finally in the Windows directory. Only then will it give up and produce an error.
I once had a problem, where an unreferenced library file for Crystal Report Writer (CRPE32.DLL) had been modified by an accounting program. The solution to the problem was to add the unmodified file to the application directory.