How can I access WinAPI?

I’m currently developing somewhat creepy game that I want to seem to go into player’s real life. Obviously I can’t get player’s real name, so I’d like to get next best thing to it - Windows username. To do that I need to access WinAPI, but I don’t know how to do that.

I am not C++ wizard (most likely will have to use it), so I’d like someone write me basic code template which would access WinAPI dll (one of them - user, kernel, any - I’ll get proper function in place when I’ll edit this template), execute some function and save returned values into, let’s say scene variables.


The C++ implementation in GD doesn’t allow the developer to link their code to others libraries (except libraries used by Game Develop). So you can’t use the WinAPI.

Can’t it be fixed?

//edit: And how about dynamic linking?