Click here to Skip to main content
16,012,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Problem when passing by reference Pin
Viorel.18-Jun-06 21:07
Viorel.18-Jun-06 21:07 
Probably within the GetRSLocation_Reg function you assign a temporary string (maybe allocated on the stack) to the RegLocation pointer. This string cannot be used after exiting from function, because the stack is reused by other calls.

You can try another way, by allocating a space for RegLocation before calling the function:

bool GetRSLocation_Reg(LPSTR location)
{
    . . .
    strcpy(location, .....);
    return true;
}

char RegLocation[256]; // allocate enough space
if(GetRSLocation_Reg(RegLocation))
{
    . . .
}

Alternatively, you can use CString class (in MFC projects) or std::string class from STL.
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 
AnswerRe: how can we get the point in the child window with respect to parent window Pin
Weiye Chen18-Jun-06 20:13
Weiye Chen18-Jun-06 20:13 

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.