请教关于delphi命名管道的问题
下面是网上找的一个事例,但在本机报错.
请教下错误原因,或者给另外的事例更好!谢谢
//Server
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TServer = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Server: TServer;
const
pipename:string='\\.\pipe\Server';
implementation
{$R *.dfm}
procedure TServer.Button1Click(Sender: TObject);
var
SPipeHandle:THandle;
Se:TSecurityAttributes;
WriteBuffer:DWORD;
Buffer:pchar;
begin
Se.nLength:=Sizeof(TSecurityAttributes);
Se.lpSecurityDescriptor:=nil;
Se.bInheritHandle:=True;
SPipeHandle:=CreateNamedPipe(pchar(pipename),PIPE_ACCESS_OUTBOUND OR FILE_FLAG_WRITE_THROUGH, PIPE_TYPE_BYTE or PIPE_WAIT,2,512,0,1000,@Se);
//此处建立并放回句柄
if SPipeHandle=-1 then
raise Exception.Create('Create pipe Failed');
try
if not Connec
相关问答:
一般都是怎么接活的?
收入怎么样
sohu?soho?
sohu 可能是small office house unit
小办公室,把家变成单位。
去威客网啊,很多个呢,还有外包的网站
学习学习。
现在Delphi做东西不行了,处于淘汰状 ......
select * from shuju.DB where 开盘价-收盘价<=0.02
开盘价 与收盘价 是数据库里的字段
select * from aTableName where ((开盘价-收盘价) <=0.02 )
开盘价比收盘价低两分以下的情况
Mark!!!!!!
se ......
1、我能否在delphi里调用另外一个后台程序,但是我不需要等待这个后台程序执行完成,还可以继续执行别的程序。请问具体怎么样才能实现。
2、我能否在delphi上执行一个快捷键,使delphi窗口程序能够刷新一下。[/size ......
var
FXmlDoc:IXMLDomDocument;
begin
使用FXmlDoc.save('文件路径');
结果发现保存后的该文件中文全部为乱码,如何解决
end;
参考这个
http://blog.csdn.net/jiangnanandi/archive/2008/11/28/3399804.aspx ......
谁知道,用什么工具?
用FreePascal可以
目前DELPHI不支持移动开发
学习了
不知道2011是否可以,拭目以待。
有人知道么~
貌似前段时间看到有支持的
prim
Delphi for iPhone 1.0 released!
......