Windows Creation Hook Events In Windows Service

findvikas

New member
Joined
Feb 2, 2006
Messages
4
Programming Experience
3-5
I have written an application in VB.NET which recieves windows creation events from system. i have used registershellhookwindow api and its working just fine. but now i converted this application into windows service and it stops recieving events any more. attached is the class that i have created for recieving window creation event. please help me ASAP as i need this to be done by 2 days.
 

Attachments

  • WindowCreationHook.zip
    1.6 KB · Views: 92
Is some 'interact with desktop' problem.
 
No the service is running in interactive mode. i suppose this is something related to the same problem that i faced while making a shell application in VB6. i created a similar shell application in vb6 long time back and that also stop receiving events if explorer.exe is not running which is but natural a case with custom shell applications then i tried regestering my own taskbar making a call to SystemParatemersInfo using SPI_SETMINIMIZEDMATRICS. i suppose this should solve the problem but the thing is i am finding it difficult to implement this API function call in VB.NET as it involves lots of complex structures.
 
John

Thanks for the suggestion but i am upto Windows API and dont want to use WMI because its show and does not give notifications for every new window created. :)
 
Well even if i compromise with WMI then also i cannot get Window Creation events as WMI is being able to give Process Creation Events but not for every top level window created in the system which is a must for my application.
 
Back
Top