Click here to Skip to main content
15,914,323 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: looking for non-MFC based socket programming sample Pin
capricious_00118-Jun-06 20:51
capricious_00118-Jun-06 20:51 
GeneralRe: looking for non-MFC based socket programming sample Pin
George_George18-Jun-06 21:02
George_George18-Jun-06 21:02 
GeneralRe: looking for non-MFC based socket programming sample Pin
George_George18-Jun-06 21:19
George_George18-Jun-06 21:19 
GeneralRe: looking for non-MFC based socket programming sample Pin
capricious_00118-Jun-06 21:29
capricious_00118-Jun-06 21:29 
GeneralRe: looking for non-MFC based socket programming sample Pin
George_George18-Jun-06 21:40
George_George18-Jun-06 21:40 
GeneralRe: looking for non-MFC based socket programming sample Pin
capricious_00118-Jun-06 21:51
capricious_00118-Jun-06 21:51 
GeneralRe: looking for non-MFC based socket programming sample Pin
George_George19-Jun-06 17:32
George_George19-Jun-06 17:32 
QuestionProblem when passing by reference Pin
capricious_00118-Jun-06 20:44
capricious_00118-Jun-06 20:44 
Hey Guys,

It must be a very simple mistake I am making however I am receiving a problem when passing a LPSTR value by reference.

I have 2 functions. Below are their prototypes:

bool GetRSLocation_Reg(LPSTR&);
bool retrieveLogFileLocation(LPSTR&);

//Call main and do some other stuff

LPSTR RegLocation

if(GetRSLocation_Reg(RegLocation)){
   cout << "The output of the RegLocation var is correct here: " << RegLocation << endl;
   if(retrieveLogFileLocation(RegLocation)){
    //Success
   }
}


The first function returns in a file path and assigns it to a LPSTR variable by reference. When outputting the referenced value WITHIN the function definition of "GetRSLocation_Reg" to console, it is correct. Before the "retreiveLogFileLocation" function is called, RegLocation also returns the correct value. However within function definition for retreiveLogFileLocation, the contents of the variable RegLocation have changed. It appears to be holding gibberish :s

Would anyone know what I am doing wrong that is causing this?

Thanks

Robbie
AnswerRe: Problem when passing by reference Pin
Viorel.18-Jun-06 21:07
Viorel.18-Jun-06 21:07 
GeneralRe: Problem when passing by reference Pin
capricious_00118-Jun-06 21:33
capricious_00118-Jun-06 21:33 
AnswerRe: Problem when passing by reference Pin
ThatsAlok18-Jun-06 22:21
ThatsAlok18-Jun-06 22:21 
AnswerRe: Problem when passing by reference Pin
ThatsAlok18-Jun-06 22:21
ThatsAlok18-Jun-06 22:21 
AnswerRe: Problem when passing by reference Pin
Hamid_RT18-Jun-06 23:09
Hamid_RT18-Jun-06 23:09 
QuestionIncorporating VC++ with flash Pin
Shraddha Gautam18-Jun-06 20:38
Shraddha Gautam18-Jun-06 20:38 
AnswerRe: Incorporating VC++ with flash Pin
Viorel.18-Jun-06 21:21
Viorel.18-Jun-06 21:21 
GeneralRe: Incorporating VC++ with flash Pin
harry_niceguy19-Jun-06 20:17
harry_niceguy19-Jun-06 20:17 
Questionvisual assist for eVC Pin
raviudari18-Jun-06 20:22
raviudari18-Jun-06 20:22 
AnswerRe: visual assist for eVC Pin
ThatsAlok18-Jun-06 22:19
ThatsAlok18-Jun-06 22:19 
QuestionEvent Logging Pin
joshiprashant18-Jun-06 20:17
joshiprashant18-Jun-06 20:17 
Questionconvertng LPARAM to CString Pin
sach!!18-Jun-06 20:14
sach!!18-Jun-06 20:14 
AnswerRe: convertng LPARAM to CString Pin
Viorel.18-Jun-06 20:26
Viorel.18-Jun-06 20:26 
AnswerRe: convertng LPARAM to CString Pin
NiceNaidu18-Jun-06 20:28
NiceNaidu18-Jun-06 20:28 
AnswerRe: convertng LPARAM to CString Pin
_AnsHUMAN_ 18-Jun-06 20:29
_AnsHUMAN_ 18-Jun-06 20:29 
AnswerRe: convertng LPARAM to CString Pin
ThatsAlok18-Jun-06 22:19
ThatsAlok18-Jun-06 22:19 
Questionhow can we get the point in the child window with respect to parent window Pin
vasusree18-Jun-06 20:11
vasusree18-Jun-06 20:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.