有一些Win32的物体,根据SDK,这些物体可以“继承”特定过程所创造的儿童过程。 (喷口、通风、管道......)
这实际上意味着什么?
请允许我说,我有一个名称有名的事件标语,用<条码>创建。 InheritHandle ==真实,另一个时间=虚假
。
现在我开始一个儿童进程。 这两项活动如何影响儿童进程? 在何种情况下,这些假设是不同的?
有一些Win32的物体,根据SDK,这些物体可以“继承”特定过程所创造的儿童过程。 (喷口、通风、管道......)
这实际上意味着什么?
请允许我说,我有一个名称有名的事件标语,用<条码>创建。 InheritHandle ==真实,另一个时间=虚假
。
现在我开始一个儿童进程。 这两项活动如何影响儿童进程? 在何种情况下,这些假设是不同的?
如果你制造/开标并允许继承该物品,允许继承的儿童过程(例如,你可以具体说明<代码>b)。 InheritHandles = TRUE for CreatProcess 继承后处理的人的处理价值与父母的操作相同。 例如:
CreateEvent
returns a handle to an event object, handle is 0x1234
.0x1234
without having to call CreateEvent
or OpenEvent
. You could for example pass the handle value in the command line of the child process.这对无名物体是有用的,因为这些物体重新命名,其他过程可以打开。 如果你想要他们的话,利用遗产继承程序就可以接触到没有姓名的物品。
现有答复中未提到的一点是,允许儿童继承财产的程序只影响儿童过程;这还可能影响到处理对象的寿命。 如果家长程序退出,儿童过程的操作者将保持目标。
在允许儿童继承过程时,必须考虑它是否会产生比应当更长的物体;例如,有些申请只想允许某一个孩子在某个时候经营,并且可能这样做,用某个名字制造一个事件标语,看它是否已经存在。 如果他们创立了一个儿童过程,继承该事件的标语,而父亲或母亲的亡故,就可能产生错误的正面结果。
更常见的情况是,档案的继承处理可能会导致档案的继续使用(因而无法使用)的时间比本来应该长。
因此,最佳做法是:
将所有企业视为不可继承企业,除非它们特别需要继承。
如果子处理不需要继承,请通过<条码> FALSE。 InheritHandles 。
如果一个分处理程序确实需要继承, 允许它继承所需要的具体操作。
另一方面,这有时可能是有益的;例如,如果你
如果你制造了一个事件,并允许儿童过程继承处理过程,那么儿童过程可以将处理方法运用到父母确定的相同目标。 在任务完成后,儿童利用活动向父母发出信号(可继承的事件物体的许多其他用途)。
EDIT: Removed disinformation.
I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...
Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...
I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...
How can I create an empty file at the DOS/Windows command-line? I tried: copy nul > file.txt But it always displays that a file was copied. Is there another method in the standard cmd? It should ...
I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...
My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...
Yes, I know, the archive bit is evil. That being said, is there support for querying it with find , and modifying it with chmod ? My googling has turned up nothing......
I built a Java application that is delivered on USB sticks. To ensure compatibility, I ship an appropriate JVM on the sticks. I made an EXE that simply invokes this JVM with the application jar. Now ...