Hello all,
I wrote a simple .cpp file that gets a windows username using:
char *username = getenv("USERNAME");
cout << username;
The result is the username that i want, however when i create this file as a cfx and access it from cold fusion i get a NULL value. Is this a CFMX issue with anything non-string based sent back to it, meaning that when I send a regular string value, the output .cfm file prints the value to the screen. However when i send the generated value listed below, I get an error. Can anyone help me? I followed the instructions on how to create a cfx file, but nothing gives me a simple explanation on how to just return a simple char value.
This is what i entered:
#include....
...
void ProcessTagRequest( CCFXRequest* pRequest )
{
try
{
char *varUserName = getenv("USERNAME");
pRequest->SetVariable( "varTest", varUserName);
...
}
}
Thanks,
Joe
p.s. using CFMX 6.1
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- RE: CFMX 6.1 and CFX play nice? Joseph Fry
- RE: CFMX 6.1 and CFX play nice? Mike Townend
- Re: CFMX 6.1 and CFX play nice? Thomas Chiverton
- Re:CFMX 6.1 and CFX play nice? Joseph Fry
- OT: i-fram and tab focus Mark A. Kruger - CFG
- RE: i-fram and tab focus Bryan F. Hogan