views:

50

answers:

1

I am writing driver to a HID device. The driver opens HID device in exclusive access mode. This driver should run for all user. So it should be either User agent or daemon.

In driver I use some CoreGraphics API's which is under ApplicationService framework but Technote say's daemon won't get access to ApplicationService framework.

So I can go For User Agent , but i don't know what is the behavior of User Agent when Fast User Switching is done.

Could you please suggest in which direction I should go?

Regards
Devara Gudda

Edit: The CoreGraphics framework is used to post Events.

A: 

If you need the coregraphics libraries, you need to be entirely in the context of user space and running within their environment to provide the images. I don't know the specifics of what you're after, but you might be able to play some games with having a user-space component of the application get launched at need that provides the graphics back to the user in some fashion.

If you're a User Agent, when you get switched that code will still be running but the windowing mechanisms won't be writing to the screens that you can see. If you're just creating images deep under the covers, this may not matter. I don't recall if your code will be paused or not - I think it just goes "background", haven't looked into detail though.

The heart of the matter is what you're doing with the CoreGraphics libraries and why you need them. If you're generating background images for something that aren't user specific and you want to be running constantly regardless of user, then perhaps look into an alternate graphics library that doesn't require the windowing systems to do the graphics work (i.e. libgd or such)

heckj