Normally a service reads values at the startup like from the registry. In a running service you can allocate some
global shared memory but you must grant the access rights.
Everything else you must handle in the worker function like in this
Simple Windows Service in C++ which you can access via the control codes in the range of 128 to 255.
Pay attention that services are running in administrator mode.