Why this function don´t work correct with the Windows XP and Microsoft Access 2003?

In the line "PID2" exist a err.

Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Public Declare Function GetCurrentProcess Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0

Public Sub DesativaCtrlAltDel()

Dim pid As Long, PID2 As Long

pid = GetCurrentProcessId()
PID2 = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)

End Sub


Please send me a help.



Congratulations,


Marcelo Arruda.