请这样声明:
function RegisterServiceProcess(dwProcessId,dwType:DWORD):DWORD;stdcall;
    external 'KERNEL32.DLL';
即把Integer变成Dword