Subversion Repositories f9daq

Rev

Blame | Last modification | View Log | RSS feed

Sample of using USMCDLL.dll library with MS Visual Basic 6.0

Files:

DLGForm.frm - main dialog
DLGForm.frx      - 
Project1.vbw     - project file
Dialog.frm       - start dialog where dll is inited and devices are enumerated
Module1.bas      - module file with dll function declarations and sample MsgBox output functions
Project1.vbp     - project file
OUTPUT\USMCVBDLL.dll    - Interface DLL to connect VB 6.0 program to standard DLL 
OUTPUT\USMCVBTest.exe   - VB 6.0 Output exe program
OUTPUT\uSMC Library.dll - Dev. Kit file (connected to NI VISA)
OUTPUT\USMCDLL.dll      - USMCDLL.dll

Notes:
Sample can be used to start with writing your own applications controlling uSMC devices.
0) Contents of "output" directory should be placed to installation directory of SMCVieW.
1) IMPORTANT Visual Basic 6.0 does not close dll files used when it's debugger (interpretator)
running, so when you start debugging more then once it can't find any connected controllers.
To work properly it (Visual Basic) must be restarted any time you finish debugging.
There are no such problems when you start created exe file.
2) IMPORTANT Other problem is that Visual Basic does not search for dll in current directory,
so to run debugger you should copy USMCDLL.dll, uSMC Library.dll and USMCVBDLL.dll in 
@win@\System32\ directory. There is no such problem when running exe file, when you placed it in directory where dll’s are.