As far as I know this is not really possible.
Depending on how much you know about the environment of the users, the following might be a workaround however:
The command
qwinsta
will give you a list of sessions for the computer. Within these sessions one will be the active one, so if this program is used in an interactive session only this will basically contain the "logged in user" as you described it (it is far more complicated really, there could be many users logged on but only one can be active and I just hope you know enough about the usage scenario of your program to make use of that). You could parse the output and work with that username.
Of course this is a dirty hack and it assumes that during the run time of your task there is no chance that users change.
Also though I chose the qwinsta.exe because it is a very basic approach that needs no API calls or something I am still not sure if the CMD has sufficient parsing capabilities to get the necessary information for you.