我的故事是我正在设计一个必须与Windows服务通信的新应用程序.经过大量研究后,我得出结论,命名管道是推荐的方法(如何从我的Delphi程序的一个实例发送一个字符串到另一个?)但是,似乎我不能在Win7中使用SendMessage或命名管道由于安全问题......消息永远不会到达应用程序的服务之外.
我使用的是Russell Libby的名为Pipe的组件,它在普通的桌面应用程序之间顺利运行,但Windows服务似乎在解决方案中占了一席之地.进一步的研究告诉我,双方都可以开放安全性让他们进行沟通,但是,我对此的知识水平最低限度,而且我无法对可能的API调用做出正面或反面的讨论. .
基于Delphi组件pipes.pas,需要做些什么来打开这个宝宝,这样双方才能开始交谈?我确定pipes.pas文件中的以下两个函数标识了安全属性,是否有人能够帮助我在这里?
谢谢!
procedure InitializeSecurity(var SA: TSecurityAttributes);
var
sd: PSecurityDescriptor;
begin
// Allocate memory for the security descriptor
sd := AllocMem(SECURITY_DESCRIPTOR_MIN_LENGTH);
// Initialize the new security descriptor
if InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION) then
begin
// Add a NULL descriptor ACL to the security descriptor
if SetSecurityDescriptorDacl(sd, True, nil, False) then
begin
// Set up the security attributes structure
SA.nLength := SizeOf(TSecurityAttributes);
SA.lpSecurityDescriptor := sd;
SA.bInheritHandle := True;
end
else
// Failed to init the sec descriptor
RaiseWindowsError; …Run Code Online (Sandbox Code Playgroud) delphi windows-services desktop-application c++builder named-pipes
我试图检测何时单击我的jQueryui选项卡组件上的新选项卡.我已经关注了几个指南和博客,但无法围绕这个过程.我有以下内容:
$('#tabs').tabs({
select: function(event,ui) {
alert('selected');
return false;
},
});
Run Code Online (Sandbox Code Playgroud)
我不知道我错过了什么,但警报从未触发过.我对jQuery的态度不强,所以我可能犯了一个愚蠢的错误,所以任何帮助都会受到赞赏.
谢谢,克里斯
更新:jsfiddle示例http://jsfiddle.net/T7czp/16/