In Windows NT you can use %USERNAME% and %COMPUTERNAME% in scripts, extracting this info off of PCs. I need to do the same thing in my simple C++ program. Basically, I need to do this:
char *thisComputer = %COMPUTERNAME%;
char *thisUser = %USERNAME%;
YES, I *know* this isn't correct syntax, - I'm showing this to illustrate what I need my end result to do, not the actual coding itself. Does anyone know if this is possible? Or can point me in the right direction? Last night I looked through a whole bunch of header files, specifically lmaccess.h and others, but I could find what I was looking for. Thanks for ANY help guys!
-Mark