English 中文(简体)
我如何知道,如果“单列使用”的通信服务器机在停机时重新启用?
原标题:How do I know which "single use" out-proc COM server process to restart if it hangs?

I need to run some native C++ code in such way that if it crashes it doesn t affect my C# program. I can use an out-proc COM server with "single use" activation so that each COM object instance is hosted in a separate process.

现在,我建立了一套工人座椅,每个座椅都树立了这个共同点。 我还建立了“监视”线,将照顾到工人的read子。

Suppose the watchdog thread notices that the latest call to the out-proc object has been running for two days already and this likely means that the object code has just hung. So it wants to restart the process and needs the process id for that. How does it find the process id?

我认为,手头方式是,标语采用<代码>GetProcessId()的接口,而客户则要求采用这种方法并储存这一过程。

有什么其他办法?

问题回答

暂无回答




相关问题
How can i add a button to all windows explorer instances?

I am trying to add a button to one of the existing tool bars in any windows explorer instance. After much research i figured out that BHO (browser helper objects) are the best way to hook to ...

Hunting memory leaks

I m finding leaked heap blocks by using the following command in WinDbg !heap –l With each leaked heap block I get, I m running to following to get the stack trace. !heap -p -a leakedheapblock The ...

Why use CComBSTR instead of just passing a WCHAR*?

I m new to COM. What exactly is the advantage of replacing: L"String" with CComBSTR(L"String") I can see a changelist in the COM part of my .NET application where all strings are replaced in this ...

IThumbnailProvider and IInitializeWithItem

I am trying to develop an IThumbnailProvider for use in Windows 7. Since this particular thumbnail would also be dependant on some other files in the same directory, I need to use something other than ...

Getting a byte array from out of process C++ COM to C#

What s the best way to get a chunk of memory (i.e. void*) from a COM server to C#? We have been using an IStream (using CreateStreamOnHGlobal) and passing that back, which worked. However when we ...

COM Basic links

folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks

热门标签