M
madjuice
Unregistered / Unconfirmed
GUEST, unregistred user!
[?]我用CREATPROCESS创建几个进程(它方系统中的,用于对ORACLE数据库作处理,<br>此进程,运行后连接ORALCE数据库,并对数据库作处理),(系统平台为WINNT4。0,<br>DELPHI5编制,ORACLE为ORACLE7。3。4)调试用其他WIN应用程序都可以,但创建这<br>几个进程时,进程运行后显示“UNABLE TO GET ORACLE LOGIN PARAMETERS 。PIBLINKS<br>TERMINATING”(PIBLINKS为进程名);用WINNT开始菜单中运行可正常建立进程。下面<br>是我的部分程序代码,请各位高手帮忙,谢谢!<br><br>procedure EstablishProcess(i:integer);<br>Var<br>siStartupInfo:array [0..n] of STARTUPINFO;<br>saProcess,saThread:SECURITY_ATTRIBUTES;<br>fSuccess:array [0..n]of boolean;<br>spnum:string;<br>begin<br>fSuccess:=false;<br>ZeroMemory(@siStartupInfo,sizeof(siStartupInfo));<br>siStartupInfo.cb:=sizeof(siStartupInfo);<br>saProcess.nLength:=sizeof(saProcess);<br>saProcess.lpSecurityDescriptor:=PChar(nil);<br>saProcess.bInheritHandle:=false;<br>saThread.nLength:=sizeof(saThread);<br>saThread.lpSecurityDescriptor:=PChar(nil);<br>saThread.bInheritHandle:=true;<br>jincheng:=PChar(trim(form1.Memo2.Lines));<br>fSuccess:=CreateProcess(PChar(nil),jincheng,@saProcess,@saThread,false,<br>CREATE_DEFAULT_ERROR_MODE,Pchar(nil),Pchar(nil),siStartupInfo,piProcInfoGPS);<br>if( not fSuccess)then<br>begin<br> Form1.Memo1.Lines.Add(FormatDateTime('mmmm d, yyyy, " at " hh:mm AM/PM',now)+' '+inttostr(jfail)+' times Create Process '+ jincheng +' fail.');<br> end;<br> end else<br> begin<br> Form1.Memo1.Lines.Add(FormatDateTime('mmmm d, yyyy, " at " hh:mm AM/PM',now)+' '+inttostr(jsucc)+' times Create Process '+ jincheng +' success.');<br> end;<br>end;