S shuoshuo2002 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-12 #1 我编了一个Service程序,请问如何将我程序运行中的错误信息写到 windows2000的事件查看 器内!
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-14 #2 var h:THandle; ps:array[0..0] of PChar; begin h:=RegisterEventSource(nil,'Application'); ps[0]:='这里输入信息'; if not ReportEvent(h,EVENTLOG_INFORMATION_TYPE,0{随便},10000{随便},nil,1,0,@ps,nil) then RaiseLastWin32Error; DeregisterEventSource(h); end;
var h:THandle; ps:array[0..0] of PChar; begin h:=RegisterEventSource(nil,'Application'); ps[0]:='这里输入信息'; if not ReportEvent(h,EVENTLOG_INFORMATION_TYPE,0{随便},10000{随便},nil,1,0,@ps,nil) then RaiseLastWin32Error; DeregisterEventSource(h); end;