hey why does this function doesn't work with win2k ?

i use: SaveString HKEY_CURRENT_USER, "\Software\Microsoft\Windows\CurrentVersion\Run", "Carnet", "1" 'SlacheCheck(App.Path) & "\" & App.EXEName & ".exe -autocheck"
__________________________________________________


Public Const HKEY_CURRENT_USER = &H80000001
Public Const REG_SZ = 1

Public Sub SaveString(hKey As Long, strPath As String, strValue As String, strdata As String)
Dim keyhand As Long
Dim r As Long
r = RegCreateKey(hKey, strPath, keyhand)
r = RegSetValueEx(keyhand, strValue, 0, REG_SZ, ByVal strdata, Len(strdata))
r = RegCloseKey(keyhand)
End Sub