LSM 510 VBA ProgrammingLSM 510 META Access to Windows API Function and external DLLs Carl Zeiss03/06 B 45-0021 e 5-5Example:Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)Declare Function RegOpenKeyEx _Lib "advapi32.dll" Alias "RegOpenKeyExA" _(ByVal hKey As Long, ByVal lpSubKey As String, _ByVal ulOptions As Long, ByVal samDesired As Long, _phkResult As Long) As LongPublic Declare Function RegCloseKey _Lib "advapi32.dll" (ByVal hKey As Long) As LongPublic Declare Function RegQueryValueEx _Lib "advapi32.dll" Alias "RegQueryValueExA" _(ByVal hKey As Long, ByVal lpValueName As String, _ByVal lpReserved As Long, lpType As Long, _lpData As Any, lpcbData As Long) As Long ' Note that if you declare the lpData parameteras String, you must pass it By Value.Public Const HKEY_CLASSES_ROOT = &H80000000Public Const SYNCHRONIZE = &H100000Public Const READ_CONTROL = &H20000Public Const STANDARD_RIGHTS_READ = (READ_CONTROL)Public Const KEY_QUERY_VALUE = &H1Public Const KEY_ENUMERATE_SUB_KEYS = &H8Public Const KEY_NOTIFY = &H10Public Const KEY_READ = ((STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE OrKEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE))Public Const REG_SZ = 1 ' Unicode null terminated stringPublic Const ERROR_SUCCESS = 0&