Attribute VB_Name = "dwlcore"
'******************************************************************************
'  Copyright  2003  Dipl.-Ing. H.-D. Kassl  All rights reserved.
'
'  Kassl GmbH
'  27607 Langen (Germany)
'  http://www.kassl.de/dWinlock
'  e-mail: dWinlock@Kassl.de
'
'  this unit includes all interface functions to the dWinlock dwlgina3.dll
'
'*****************************************************************************}

'Prototype of key callback function
'see also SetKeyCallback function

'Sub MyKeyEvent(ByVal userdata As Long, ByVal wnd As Long, ByVal down As Long, ByVal vk As Long, ByVal shift As Long)
'Here goes your code
'End Sub


  ' modifiers (Ctrl,Shift,Alt,Win) constants
  Public Const MOD_ALL = 255
  Public Const MOD_ALT = 1
  Public Const MOD_CONTROL = 2
  Public Const MOD_SHIFT = 4
  Public Const MOD_WIN = 8

  ' Constants for disable Desktop items
  ' see also function wlDisableItem
  Public Const wlTaskBar = 1
  Public Const wlDesktop = 2
  Public Const wlStartbutton = 3
  Public Const wlTaskLinks = 4
  Public Const wlTaskTray = 5
  Public Const wlTaskRebar = 6
  Public Const wlAccessibility = 7
  Public Const wlAccHighContrast = 8
  Public Const wlAccFilterKeys = 9
  Public Const wlAccMouseKey = 10
  Public Const wlAccStickyKeys = 11
  Public Const wlAccToggleKeys = 12
  Public Const wlShutdown = 13

  ' dwlGinaInstallFlags to use with wlInstallDwl and wlUninstallDwl
  Public Const giForceInstall = 1
  Public Const giForceUninstall = 2
  Public Const giForceReboot = 4
  Public Const giNoReboot = 8
  Public Const giNoWarnings = 16

  ' constants to use with function wlWinVersion
  Public Const vWinunknown = 1
  Public Const vWin95 = 2
  Public Const vWin98 = 3
  Public Const vWinMe = 4
  Public Const vWinNT = 5
  Public Const vWin2000 = 6
  Public Const vWinXP = 7
  Public Const vWinVista = 8

  ' constants for function SetKeyCallback
  Public Const kDownEvents = 1
  Public Const kUpEvents = 2
  
  Declare Function wlDisableKey Lib "dwlgina3.dll" (ByVal windows&, ByVal vk&, ByVal Modifiers&, ByVal disable&) As Long
  Declare Function wlIsItemDisabled Lib "dwlgina3.dll" (ByVal Item&) As Long
  Declare Function wlDisableItem Lib "dwlgina3.dll" (ByVal Item&, ByVal disable&) As Long
  Declare Function wlIsKeyDisabled Lib "dwlgina3.dll" (ByVal window&, ByVal vk&, ByVal Modifiers&) As Long
  Declare Function wlGetDisabledKey Lib "dwlgina3.dll" (ByVal i&, ByVal window&, ByVal vk&, ByVal shift&) As Long
  Declare Function wlInstallDwl Lib "dwlgina3.dll" (ByVal Flags&) As Long
  Declare Function wlUninstallDwl Lib "dwlgina3.dll" (ByVal Flags&) As Long
  Declare Function wlIsDwlInstalled Lib "dwlgina3.dll" () As Long
  Declare Function wlIsNTSystem Lib "dwlgina3.dll" () As Long
  Declare Function wlNeedDwlInstall Lib "dwlgina3.dll" () As Long
  Declare Function wlExitWindows Lib "dwlgina3.dll" (ByVal Flags&) As Long
  Declare Function wlWinVersion Lib "dwlgina3.dll" () As Long
  Declare Function wlVersion Lib "dwlgina3.dll" () As Long
  Declare Function wlGetKeyState Lib "dwlgina3.dll" (ByVal Key&) As Long
  Declare Function wlSetKeySendMessage Lib "dwlgina3.dll" (ByVal window&, ByVal KeyDownMsg&, ByVal KeyUpMsg&) As Long
  Declare Function wlSetKeyPostMessage Lib "dwlgina3.dll" (ByVal window&, ByVal KeyDownMsg&, ByVal KeyUpMsg&) As Long
  Declare Function wlSetKeyCallback Lib "dwlgina3.dll" (ByVal Callback As Long, ByVal UserData As Long, ByVal Flags&) As Long
  Declare Function wlSetKeyState Lib "dwlgina3.dll" (ByVal Key&, ByVal TurnOn&) As Long
  Declare Function wlMapScancode Lib "dwlgina3.dll" (ByVal InputCode, ByVal OutputCode) As Long
  Declare Function wlDisableDesktopIcon Lib "dwlgina3.dll" (ByVal index) As Long
  Declare Function wlDesktopIconCount Lib "dwlgina3.dll" () As Long
  Declare Function wlRestoreDesktopIcons Lib "dwlgina3.dll" () As Long
  Declare Sub wlExit Lib "dwlgina3.dll" ()
  Declare Sub wlRestoreAll Lib "dwlgina3.dll" ()
  Declare Function wlSetStartMenu Lib "dwlgina3.dll" (ByVal window&) As Long
  Declare Function wlReplaceKey Lib "dwlgina3.dll" (ByVal window&, ByVal vk&, ByVal fsModifiers&, ByVal vk_out&, ByVal fsModifiers_out&) As Long
  Declare Function wlSetNoShutdown Lib "dwlgina3.dll" (ByVal disable&, ByVal QueryEndSessionCallback As Long, ByVal UserData As Long) As Long
  Declare Function wlGetDisabledMessage Lib "dwlgina3.dll" (ByVal i, ByVal window&, ByVal MsgID&) As Long
  Declare Function wlIsMessageDisabled Lib "dwlgina3.dll" (ByVal window&, ByVal MsgID) As Long
  Declare Function wlDisableMessage Lib "dwlgina3.dll" (ByVal window&, ByVal MsgID, ByVal disable) As Long
  Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
  