English 中文(简体)
如何探测德尔菲探索者提出的公开请求?
原标题:How to detect file open requests from Explorer in Delphi?

我的Delphi Alexandria方案将书记官处的某些档案延期与申请名称联系起来,因此,Windows显示权利icon。 但是,当我在探索者正确类型档案上出现双立点时,我正在努力让我的方案注意到这一要求。 我想要的是,视通过Paramcount和ParaStr(1)等案卷延期而拦截电话。 我如何在4月的档案中确定事情。

  • a) notice there is a request for a filename
  • b) work out whether the program is already running
  • c) pass the parameters on if so, or
  • d) start the program with the parameter?

d) is already OK but I don t know how to set up a)
Thanks

最佳回答

A) When you register a file extension in the Registry, you have to tell Windows exactly how you want your app to be called when the file extension is executed. The typical scenario is for Windows to simply run a new instance of your app with the full file path passed in as a command line parameter. As you said, you can simply use ParamCount()/ParamStr() to look for and retrieve that parameter when your app starts running. Other choices include sending a message to a DDE server running in your app, or invoking an instance of the IDropTarget, IExecuteCommand, or IExplorerCommand interface that your app implements, etc.

B) 检测贵方现有照片的最常见方法是,要创建一个有名的焦土物体,如Win32 ;Mutex ,其名称是持久性但独特的。 视窗在设计时制造物体,并将告诉你该物体是否已经存在。 如果是的话,那么你就必须将档案路送至现有的旁观,然后立即撤出。 否则,继续正常运行,按需要处理档案。

或者,正如你似乎已经知道的那样,你可以简单地寻找一个已知的窗口。 你们可能必须做些什么才能向法庭发出档案。 因此,你可以“生产2个有1个石块的鸟类”,这样说。

C) 有许多网站Inter-Process Communication,可供在程序之间发送数据。 在这种情况下,使用WM_COPYDATA 窗口信息是一项共同选择。 其他选择包括使用名称的管道、邮件地址、袖珍、COM等。 使用你想要的任何方法。

D) 你们不必为此做任何事情。

问题回答

暂无回答




相关问题
determining the character set to use

my delphi 2009 app has a basic translation system that uses GNUGetText. i had used some win API calls to prepare the fonts. i thought it was working correctly until recently when someone from Malta ...

Help with strange Delphi 5 IDE problems

Ok, I m going nuts here. For the last (almost) four years, I ve been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include: Seemingly random errors in coride50.bpl ...

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How convert string to integer in Oxygene

In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn t appear to be part of Oxygene, and I can ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签