|
Posted by jnasti on November 9, 2007, 11:41 am
Please log in for more thread options On Nov 9, 11:03 am, "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:
> I'm thinking you'd need a service that exposes a set of IOCTLs for
> registration, deregistration, etc. When an app wants to register, it would
> call an IOCTL passing in its own process handle, and the service would spawn
> a thread specifically for that process. It could then use a wait on that
> process handle, which will unblock when the process terminates. The apps
> would *not* link to the service (as they really can't in any meaningful
> way).
>
> To make it easier, I'd probably create some form of SDK that provides a lib
> that apps link to and call. That lib would extract the PID fromt he running
> process and in turn call the IOCTL behind the scenes.
>
> --
>
Exactly what I'm looking to do. That was the whole reference to the
RIL implementation (RIL proxy is compared to my library clients link
to, RIL driver is compared to my service DLL that processes the IOCTL
calls from the proxy). The APIs will be something like Initialize,
Deinitialize, GetThisItem, SetThisItem, etc
So the library can get the calling PID from the Initialize call. Then
it can just set some wait on that PID with WaitForSingleObject in a
new thread in the service DLL. That would allow the main thread in
service DLL to still continue to process, while still waiting for the
client to terminate. Can I just set the wait time as INFINITE and I
will be notified just as the client exits?
|