lazarus for win32 serviceApp
Posted jjw
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了lazarus for win32 serviceApp相关的知识,希望对你有一定的参考价值。
procedure TMyThread.Execute; begin //Application.EventLog.FileName:=‘d:xx.txt‘; //Application.EventLog.Info(‘OKOKOK‘); //DbgOutThreadLog(‘OOKKOOKK‘ +#13+#10); while not Self.Terminated do begin try SQLDBLibraryLoader1.ConnectionType := ‘Firebird‘; SQLDBLibraryLoader1.LibraryName := ‘D:Firebird_3_0fbclient.dll‘; SQLDBLibraryLoader1.Enabled := True; SQLDBLibraryLoader1.LoadLibrary; SQLConnector1.ConnectorType := ‘Firebird‘; SQLConnector1.CharSet:= ‘utf8‘; SQLConnector1.HostName:=‘192.168.1.102‘; SQLConnector1.DatabaseName:=‘d:firebird_3_0myDBjjw.fdb‘; SQLConnector1.UserName:=‘sysdba‘; SQLConnector1.Password:=‘jjw‘; SQLConnector1.Connected := True; SQLQuery1.SQL.Text:=‘select * from test‘; SQLQuery1.Open; SQLQuery1.Insert;; SQLQuery1.FieldByName(‘id‘).AsInteger:=100; SQLQuery1.FieldByName(‘msg‘).AsString:=‘ok‘; SQLQuery1.Post; SQLQuery1.ApplyUpdates; SQLTransaction1.Commit; SQLQuery1.Close; SQLConnector1.Close; SQLDBLibraryLoader1.Enabled := False; DbgAppendToFile(‘d:log.txt‘, ‘ok‘+#13+#10); except on E: Exception do DbgOutThreadLog(E.Message + ‘ERROR_JJW‘ +#13+#10); end; end; end;
调试和delphi一样,附加服务进程.
以上是关于lazarus for win32 serviceApp的主要内容,如果未能解决你的问题,请参考以下文章
Indy 10.5.8 for Delphi and Lazarus 修改版(2011)
LAZARUS是啥软件呀???哪位高手知道?我想学这个怎么样呢?