Cant run SDK as service

Hi all,

After using successfully the SDK with multi camera’s i tried to run the execution (that work great) as a service.

I got the following error:
",“msg”: “Could not create main OpenGL context.”,"

This error is raised only when I run the executable as service, if I run it as an exec everything is ok.
I did some reading that there is problem to run service that use OpenGL

Any advice ?

Hi Gilad,

To my knowledge regular consumer Windows does not allow services to access an interactive windowing session which is required for OpenGL context creation. This is a general limitation of Windows because otherwise you could run multiple separate interactive user sessions from within a single license/system. This limitation might be different for Windows Server editions but I’m not sure about that.

There is one potential option as a workaround: If your Windows system has an active user session (i.e. there is a graphical user currently logged in and the session is active) a service can “hijack” that very session and run a command there instead of the isolated service environment. Have a look at this StackOverflow post as a first pointer: c# - Start a windows service and launch cmd - Stack Overflow


How many sensors do you use? Is it realsense? Can you tell me your email address? I want to see your effect.