[python-win32] ISensLogon COM Object
le dahut
le.dahut at laposte.net
Thu Jan 10 09:38:59 CET 2008
First, thank you for your answer, you really remove me a spine of the foot.
I have to use ISensLogon for this reason
http://technet2.microsoft.com/WindowsVista/en/library/6ec4ec6d-6b84-44c9-b3af-116589a42b861033.mspx?mfr=true
today I use Winlogon Notification package to catch Logon and Logoff
events. Maybe I could use SCM...?
Tim Roberts a écrit :
> le dahut wrote:
>> I've seen several examples in C, Delphi and VB, but I still don't know
>> how to call "ISensLogon" in python :
>> win32com.client.Dispatch("ISens.Logon") doesn't work, I've tried many
>> other things with no more success.
>
> You're still thinking about this backwards. You don't call ISensLogon
> (as you have seen). It's not a service that you USE. Instead, it's a
> service that you PROVIDE. These are callbacks. You develop a COM
> server that implements the ISensLogon functions. Then you create an
> object from your own COM server, and register that object with the SENS
> services using IEventSubscription, which is implemented by the
> CLSID_CEventSubscription server.
>
> After you have done that, the system will start sending events to your
> ISensLogon routines. But first, you have to create a COM server (so you
> can implement ISensLogon). That's the first step. There are sample COM
> servers in Python on the web.
>
>
>> Could you give me a short example on how to start with this ?
>
> There really is no short example. This Microsoft knowledge base article
> includes a C++ sample app that shows how to implement ISenseNetwork,
> which is practically identical to ISensLogon:
> http://support.microsoft.com/kb/321381
>
> What are you really trying to accomplish here? This is complicated, and
> there may be an easier way to do what you want.
>
More information about the python-win32
mailing list