Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: Bush2000
Actually, you can. The environment variable is exploded when you make a file call.

Also, you can always use the Windows API to get the %username% environment variable

here's the declaration:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getenvironmentvariable.asp

DWORD GetEnvironmentVariable(
LPCTSTR lpName,
LPTSTR lpBuffer,
DWORD nSize
);


Nice try, though, newbie.
107 posted on 01/29/2004 2:13:51 PM PST by adam_az (Be vewy vewy qwiet, I'm hunting weftists.)
[ Post Reply | Private Reply | To 106 | View Replies ]


To: adam_az
Actually, you can. The environment variable is exploded when you make a file call.

Uh, no, it's not. My test app invokes a call to CreateFile() and it returns file not found -- and your assertion is inconsistent with the API docs. But what do I know -- I'm only compiling real code. You? You're just shooting off your mouth.
111 posted on 01/29/2004 4:52:29 PM PST by Bush2000
[ Post Reply | Private Reply | To 107 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson