Click here to Skip to main content
15,901,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: passing CString into ofstream? Pin
ldsdbomber2-Mar-06 21:54
ldsdbomber2-Mar-06 21:54 
QuestionWMI Win32_PingStatus address help Pin
viperlogic2-Mar-06 5:47
viperlogic2-Mar-06 5:47 
QuestionRe: WMI Win32_PingStatus address help Pin
David Crow2-Mar-06 8:02
David Crow2-Mar-06 8:02 
AnswerRe: WMI Win32_PingStatus address help Pin
viperlogic2-Mar-06 8:19
viperlogic2-Mar-06 8:19 
GeneralRe: WMI Win32_PingStatus address help Pin
David Crow2-Mar-06 8:26
David Crow2-Mar-06 8:26 
GeneralRe: WMI Win32_PingStatus address help Pin
viperlogic2-Mar-06 8:36
viperlogic2-Mar-06 8:36 
GeneralRe: WMI Win32_PingStatus address help Pin
Ryan Binns2-Mar-06 16:59
Ryan Binns2-Mar-06 16:59 
GeneralRe: WMI Win32_PingStatus address help Pin
viperlogic2-Mar-06 22:44
viperlogic2-Mar-06 22:44 
GeneralRe: WMI Win32_PingStatus address help Pin
Nibu babu thomas3-Mar-06 0:27
Nibu babu thomas3-Mar-06 0:27 
GeneralRe: WMI Win32_PingStatus address help Pin
viperlogic3-Mar-06 4:36
viperlogic3-Mar-06 4:36 
GeneralRe: WMI Win32_PingStatus address help Pin
Ryan Binns3-Mar-06 13:50
Ryan Binns3-Mar-06 13:50 
GeneralRe: WMI Win32_PingStatus address help Pin
viperlogic6-Mar-06 9:08
viperlogic6-Mar-06 9:08 
GeneralRe: WMI Win32_PingStatus address help Pin
viperlogic6-Mar-06 9:27
viperlogic6-Mar-06 9:27 
Questionreading a string from a file Pin
SWDevil2-Mar-06 5:33
SWDevil2-Mar-06 5:33 
AnswerRe: reading a string from a file Pin
David Crow2-Mar-06 6:34
David Crow2-Mar-06 6:34 
GeneralRe: reading a string from a file Pin
SWDevil2-Mar-06 8:14
SWDevil2-Mar-06 8:14 
GeneralRe: reading a string from a file Pin
David Crow2-Mar-06 8:28
David Crow2-Mar-06 8:28 
GeneralRe: reading a string from a file Pin
SWDevil2-Mar-06 8:36
SWDevil2-Mar-06 8:36 
GeneralRe: reading a string from a file Pin
Wes Aday2-Mar-06 9:09
professionalWes Aday2-Mar-06 9:09 
GeneralRe: reading a string from a file Pin
Wes Aday2-Mar-06 9:11
professionalWes Aday2-Mar-06 9:11 
Questionchar buff !! :( Pin
Eytukan2-Mar-06 5:14
Eytukan2-Mar-06 5:14 
AnswerRe: char buff !! :( Pin
Phil.Benson2-Mar-06 5:26
professionalPhil.Benson2-Mar-06 5:26 
AnswerRe: char buff !! :( Pin
David Crow2-Mar-06 6:36
David Crow2-Mar-06 6:36 
GeneralRe: char buff !! :( Pin
Eytukan6-Mar-06 22:40
Eytukan6-Mar-06 22:40 
sorry for late reply David, just got into this(sock) module in a round robin fashion. hmm but the problem is still there. Frown | :(
i have some fundamental doubt :
<code>

typedef struct alcPacket
{
        char workStationID[20];
        char NTLogin[20];
}*alcPacket_t;

</code>



Why the sizeof alcPaket shows 120 ?
and in the receiving end, tested the strlen for the

<code>
    nRet = recvfrom(hSocket,achInBuf,120,0,(struct sockaddr*)&stSrcAddr,&addr_size);
	alcp = (alcPacket_t)achInBuf;
	//ZeroMemory(alcp->NTLogin,60);
	printf("\n%s",alcp->NTLogin);
	printf("\n%d",strlen(alcp->NTLogin));
	printf("\n%s",alcp->workStationID);
	printf("\n%d",strlen(alcp->workStationID));
</code>



It prints the values as
48 for NTLogin WRONG, with that junk characters
11 for Workstation ID.RIGHT

what could be the problem ??Confused | :confused:




VuNic
GeneralRe: char buff !! :( Pin
Eytukan6-Mar-06 22:49
Eytukan6-Mar-06 22:49 

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.