你试试吧,我只修改了这部分内容。<br><br>procedure SendHokKey;stdcall;<br>var<br> sa : TSecurityAttributes;<br> sd : TSecurityDescriptor;<br> si : TStartupInfo;<br> pi : TProcessInformation;<br>begin<br> InitializeSecurityDescriptor(@sd, SECURITY_DESCRIPTOR_REVISION);<br> SetSecurityDescriptorDacl(@sd, True, nil, False);<br><br> sa.nLength := SizeOf(TSecurityAttributes);<br> sa.lpSecurityDescriptor := @sd;<br> sa.bInheritHandle := True;<br><br> ZeroMemory(@si, SizeOf(si));<br> ZeroMemory(@pi, SizeOf(pi));<br><br> si.cb := sizeof(si);<br> CreateProcess(nil, 'C:/winnt/notepad.exe', @sa, @sa, FALSE, 0, <br> nil, nil, si, pi);<br> CloseHandle(pi.hThread);<br> CloseHandle(pi.hProcess);<br>end;