Click here to Skip to main content
15,907,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Problem with icon style CListCtrl on Vista, but not on XP Pin
David Crow27-Oct-09 3:34
David Crow27-Oct-09 3:34 
AnswerRe: Problem with icon style CListCtrl on Vista, but not on XP Pin
Sternocera27-Oct-09 3:37
Sternocera27-Oct-09 3:37 
AnswerRe: Problem with icon style CListCtrl on Vista, but not on XP Pin
Michael Dunn27-Oct-09 14:38
sitebuilderMichael Dunn27-Oct-09 14:38 
GeneralRe: Problem with icon style CListCtrl on Vista, but not on XP Pin
Sternocera27-Oct-09 23:48
Sternocera27-Oct-09 23:48 
AnswerRe: Problem with icon style CListCtrl on Vista, but not on XP Pin
Greg Prosch30-Oct-09 12:30
Greg Prosch30-Oct-09 12:30 
GeneralRe: Problem with icon style CListCtrl on Vista, but not on XP Pin
Sternocera30-Oct-09 12:32
Sternocera30-Oct-09 12:32 
QuestionCalling WPF pages in VC++ Pin
kDevloper27-Oct-09 2:50
kDevloper27-Oct-09 2:50 
QuestionIcmpSendEcho error: 1231 Pin
Manmohan2927-Oct-09 2:25
Manmohan2927-Oct-09 2:25 
I got 1231 error value when using the code below.
1231: The network location cannot be reached. For information about network troubleshooting, see Windows Help.
my lan and internet is working fine.
then where is actually the problem residing.

HANDLE hIcmpFile;
unsigned long ipaddr = INADDR_NONE;
DWORD dwRetVal = 0;
char SendData[] = "Data Buffer";
LPVOID ReplyBuffer = NULL;
DWORD ReplySize = 0;

ipaddr = inet_addr((const char*)m_sAddress);
ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(SendData) +1;
ReplyBuffer = (VOID*)malloc(ReplySize);

hIcmpFile = IcmpCreateFile();
if (hIcmpFile == INVALID_HANDLE_VALUE)
{
 return -1;
}
dwRetVal = IcmpSendEcho(hIcmpFile, ipaddr, SendData, sizeof(SendData) + sizeof(ICMP_ECHO_REPLY), NULL, ReplyBuffer, ReplySize, 500);
if(dwRetVal != 0)
	{
		PICMP_ECHO_REPLY pEchoReply = (PICMP_ECHO_REPLY)ReplyBuffer;
		struct in_addr ReplyAddr;
		ReplyAddr.S_un.S_addr = pEchoReply->Address;

		m_sMessage.Format(_T("Received from %s Status = %ld RoundTripTime = %ld"), inet_ntoa(ReplyAddr), pEchoReply->Status, pEchoReply->RoundTripTime);
		return 0;
	}


Future Lies in Present.
Manmohan Bishnoi

AnswerRe: IcmpSendEcho error: 1231 Pin
Sternocera27-Oct-09 3:06
Sternocera27-Oct-09 3:06 
QuestionRe: IcmpSendEcho error: 1231 Pin
David Crow27-Oct-09 3:19
David Crow27-Oct-09 3:19 
AnswerRe: IcmpSendEcho error: 1231 Pin
Manmohan2927-Oct-09 3:30
Manmohan2927-Oct-09 3:30 
QuestionRe: IcmpSendEcho error: 1231 Pin
David Crow27-Oct-09 3:40
David Crow27-Oct-09 3:40 
AnswerRe: IcmpSendEcho error: 1231 Pin
Manmohan2927-Oct-09 4:44
Manmohan2927-Oct-09 4:44 
GeneralRe: IcmpSendEcho error: 1231 Pin
David Crow27-Oct-09 4:47
David Crow27-Oct-09 4:47 
QuestionHow to plug/unplug USB serial port problematically? Pin
pallaka27-Oct-09 2:10
pallaka27-Oct-09 2:10 
QuestionRe: How to plug/unplug USB serial port problematically? Pin
Roger Stoltz27-Oct-09 3:56
Roger Stoltz27-Oct-09 3:56 
QuestionWho calls InitInstance() Pin
Hari_1627-Oct-09 2:07
Hari_1627-Oct-09 2:07 
AnswerRe: Who calls InitInstance() Pin
Cedric Moonen27-Oct-09 2:10
Cedric Moonen27-Oct-09 2:10 
GeneralRe: Who calls InitInstance() Pin
Hari_1627-Oct-09 2:32
Hari_1627-Oct-09 2:32 
GeneralRe: Who calls InitInstance() Pin
Cedric Moonen27-Oct-09 2:41
Cedric Moonen27-Oct-09 2:41 
AnswerRe: Who calls InitInstance() Pin
CPallini27-Oct-09 2:49
mveCPallini27-Oct-09 2:49 
JokeRe: Who calls InitInstance() Pin
Roger Stoltz27-Oct-09 4:10
Roger Stoltz27-Oct-09 4:10 
GeneralRe: Who calls InitInstance() Pin
CPallini27-Oct-09 8:28
mveCPallini27-Oct-09 8:28 
Question[urgent]IRP_MJ_QUERY_INFORMATION,why it doesn't work??? [modified] Pin
ProgC_Feng27-Oct-09 1:15
ProgC_Feng27-Oct-09 1:15 
QuestionCar Motion Simulator Pin
katres27-Oct-09 0:23
katres27-Oct-09 0:23 

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.