相关疑难解决方法(0)

如何查看OutputDebugString的输出?

我想OutputDebugString()在我的应用程序中使用,然后可以选择在现场部署应用程序时在单独的查看器中显示它.

也就是说,我不想更改标志并重建我的.exe来打开和关闭调试.

谷歌搜索,似乎DebugView应该处理,但它和TraceTool都没有显示此代码的任何输出.

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
begin
   OutputDebugString(PChar('Hello, wurld'));
end;

end.
Run Code Online (Sandbox Code Playgroud)

我已阅读文档但无济于事,并看到其他人遇到过类似的问题,但尚未发布解决方案.

有解决方案吗?

delphi outputdebugstring debugview

11
推荐指数
3
解决办法
2万
查看次数

Delphi 2009:如何在Vista下的Windows服务和桌面应用程序之间进行通信?

桌面应用程序如何与Vista/Windows2008/Windows7下的Windows服务进行通信?应用程序需要向服务发送小字符串并接收字符串响应.两者都是用Delphi 2009编写的.(请提供示例代码)

delphi windows-services ipc delphi-2009 windows-vista

5
推荐指数
2
解决办法
8074
查看次数