Click here to Skip to main content
15,890,717 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Some libraries are missing in my command line project linker settings in vc++ code in vs-2008...!? Pin
Randor 11-Sep-09 4:32
professional Randor 11-Sep-09 4:32 
GeneralRe: Some libraries are missing in my command line project linker settings in vc++ code in vs-2008...!? Pin
Vetukuri Raju11-Sep-09 5:07
Vetukuri Raju11-Sep-09 5:07 
QuestionHow to get network connection speed WinXP using C & WinAPI Pin
mikey_eff10-Sep-09 2:44
mikey_eff10-Sep-09 2:44 
AnswerRe: How to get network connection speed WinXP using C & WinAPI Pin
David Crow10-Sep-09 3:26
David Crow10-Sep-09 3:26 
GeneralRe: How to get network connection speed WinXP using C & WinAPI Pin
mikey_eff10-Sep-09 4:50
mikey_eff10-Sep-09 4:50 
GeneralRe: How to get network connection speed WinXP using C & WinAPI Pin
David Crow10-Sep-09 5:11
David Crow10-Sep-09 5:11 
GeneralRe: How to get network connection speed WinXP using C & WinAPI Pin
mikey_eff10-Sep-09 6:18
mikey_eff10-Sep-09 6:18 
AnswerRe: How to get network connection speed WinXP using C & WinAPI Pin
Randor 10-Sep-09 4:07
professional Randor 10-Sep-09 4:07 
Hi Mikey,

If you use the IP Helper library[^] then you can do this:

#include "Iphlpapi.h"
#pragma comment(lib, "iphlpapi.lib")
VOID PrintEthernetSpeeds()
{
	BYTE *pBuf=NULL;
	DWORD dwSize=0;
	DWORD dwResult=0;
	BOOL bConnected=FALSE;
	PMIB_IFTABLE pMIBTable;
	CString str;
	GetIfTable(NULL,&dwSize,FALSE);
	pBuf=new BYTE[dwSize];
	pMIBTable=reinterpret_cast<PMIB_IFTABLE>(pBuf);

	if(NO_ERROR == GetIfTable(pMIBTable,&dwSize,FALSE))
	{
		for(UINT i=0; i < pMIBTable->dwNumEntries; ++i)
		{
			if(MIB_IF_TYPE_ETHERNET == pMIBTable->table[i].dwType)
			{
				char szBuf[MAX_PATH];
				sprintf(szBuf,"%s is %ld\n",pMIBTable->table[i].bDescr,pMIBTable->table[i].dwSpeed);
				TRACE(szBuf);
			}
		}
	}
	delete []pBuf;
}


Best Wishes,
-David Delaune
GeneralRe: How to get network connection speed WinXP using C & WinAPI Pin
mikey_eff10-Sep-09 4:48
mikey_eff10-Sep-09 4:48 
AnswerRe: How to get network connection speed WinXP using C & WinAPI Pin
kilt10-Sep-09 6:18
kilt10-Sep-09 6:18 
Questionhow to remove space while writing data to text file using CFile in vc++ [modified] Pin
jadhavjitendrar10-Sep-09 1:46
jadhavjitendrar10-Sep-09 1:46 
AnswerRe: how to remove space while writing data to text file using CFile in vc++ Pin
Adam Roderick J10-Sep-09 1:51
Adam Roderick J10-Sep-09 1:51 
QuestionRe: how to remove space while writing data to text file using CFile in vc++ Pin
CPallini10-Sep-09 2:37
mveCPallini10-Sep-09 2:37 
AnswerRe: how to remove space while writing data to text file using CFile in vc++ Pin
jadhavjitendrar10-Sep-09 17:27
jadhavjitendrar10-Sep-09 17:27 
QuestionRe: how to remove space while writing data to text file using CFile in vc++ Pin
CPallini10-Sep-09 21:39
mveCPallini10-Sep-09 21:39 
GeneralRe: how to remove space while writing data to text file using CFile in vc++ Pin
David Crow10-Sep-09 3:32
David Crow10-Sep-09 3:32 
QuestionExcel and unicode big endian Pin
Rakesh510-Sep-09 1:45
Rakesh510-Sep-09 1:45 
QuestionDelete Content Folder Pin
kumar sanghvi10-Sep-09 1:24
kumar sanghvi10-Sep-09 1:24 
AnswerRe: Delete Content Folder Pin
Nuri Ismail10-Sep-09 1:33
Nuri Ismail10-Sep-09 1:33 
AnswerRe: Delete Content Folder Pin
Adam Roderick J10-Sep-09 1:39
Adam Roderick J10-Sep-09 1:39 
GeneralRe: Delete Content Folder Pin
David Crow10-Sep-09 3:38
David Crow10-Sep-09 3:38 
QuestionRead Image's RGB co-ordinates Pin
Game-point10-Sep-09 1:07
Game-point10-Sep-09 1:07 
AnswerRe: Read Image's RGB co-ordinates Pin
CPallini10-Sep-09 1:37
mveCPallini10-Sep-09 1:37 
GeneralRe: Read Image's RGB co-ordinates Pin
Game-point10-Sep-09 1:52
Game-point10-Sep-09 1:52 
GeneralRe: Read Image's RGB co-ordinates Pin
Selvam R10-Sep-09 2:06
professionalSelvam R10-Sep-09 2:06 

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.