Direct3D device for NvFBC

I am using Grid SDK for NvFBC screen capture. On sample code one optional parameter for NvFBCLibrary is devicePtr. I have understood this is a Direct3D-device. I can create the device and everything works smoothly. But to create Direct3D device I need to create and display a window. This causes focus change, my fullscreen app I’m capturing goes to background. How to create a device without change in focus?