Click here to Skip to main content
16,006,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to Close the instance by if i have its HANDLE Pin
Anthony_Yio7-Jun-04 1:37
Anthony_Yio7-Jun-04 1:37 
GeneralAccessing folders of remote system Pin
aparajita6-Jun-04 20:58
aparajita6-Jun-04 20:58 
GeneralRe: Accessing folders of remote system Pin
Brian Delahunty6-Jun-04 21:47
Brian Delahunty6-Jun-04 21:47 
GeneralRe: Accessing folders of remote system Pin
aparajita13-Jun-04 21:34
aparajita13-Jun-04 21:34 
GeneralRe: Accessing folders of remote system Pin
David Crow7-Jun-04 2:19
David Crow7-Jun-04 2:19 
GeneralCreating movable bar Pin
aparajita6-Jun-04 20:47
aparajita6-Jun-04 20:47 
GeneralRe: Creating movable bar Pin
Anthony_Yio6-Jun-04 20:48
Anthony_Yio6-Jun-04 20:48 
GeneralProblem with header file -MAC Address Pin
6-Jun-04 20:25
suss6-Jun-04 20:25 
Hi,
I included this file in my source code and depsite this it throws error.
I am ruunng on Windows 2000 PROFESSIONAL.
Looks strange.
Psl helpme out.This is the source code available from MSDN.

//#include "windows.h" header file"
#include <windows.h>
//#include "stdio.h" header file
#include <stdio.h>
//#include "tchar.h" header file
#include <tchar.h>
//#include "iphlpapi.h" header file
#include <iphlpapi.h>

int main()
{
HRESULT hr;
IPAddr ipAddr;
ULONG pulMac[2];
ULONG ulLen;

ipAddr = inet_addr ("192.168.25.31");
memset (pulMac, 0xff, sizeof (pulMac));
ulLen = 6;

hr = SendARP (ipAddr, 0, pulMac, &ulLen);
printf ("Return %08x, length %8d\n", hr, ulLen);

size_t i, j;
char * szMac = new char[ulLen*3];
PBYTE pbHexMac = (PBYTE) pulMac;

//
// Convert the binary MAC address into human-readable
//
for (i = 0, j = 0; i < ulLen - 1; ++i) {
j += sprintf (szMac + j, "%02X:", pbHexMac[i]);
}

sprintf (szMac + j, "%02X", pbHexMac[i]);
printf ("MAC address %s\n", szMac);

delete [] szMac;

return 0;
}


after compiling:

ErrorBig Grin | :-D :\kuttanur\macaddress\mac.cpp(5) : fatal error C1083: Cannot open include file: 'iphlpapi.h': No such file or directory


Regards
GeneralRe: Problem with header file -MAC Address Pin
Antony M Kancidrowski6-Jun-04 22:27
Antony M Kancidrowski6-Jun-04 22:27 
GeneralRe: Problem with header file -MAC Address Pin
Member 11501766-Jun-04 22:35
Member 11501766-Jun-04 22:35 
GeneralRe: Problem with header file -MAC Address Pin
Antony M Kancidrowski6-Jun-04 22:42
Antony M Kancidrowski6-Jun-04 22:42 
GeneralRe: Problem with header file -MAC Address Pin
Member 11501766-Jun-04 22:59
Member 11501766-Jun-04 22:59 
GeneralRe: Problem with header file -MAC Address Pin
Member 11501767-Jun-04 1:44
Member 11501767-Jun-04 1:44 
GeneralRe: Problem with header file -MAC Address Pin
David Crow7-Jun-04 2:24
David Crow7-Jun-04 2:24 
QuestionHow to dynamically remove/add pages in Wizard mode? Pin
Member 4148776-Jun-04 20:00
Member 4148776-Jun-04 20:00 
GeneralShellExe to execute any exe ,,,, what si to close it Pin
Zeeshan Bilal6-Jun-04 19:11
Zeeshan Bilal6-Jun-04 19:11 
GeneralRe: ShellExe to execute any exe ,,,, what si to close it Pin
Anthony_Yio6-Jun-04 20:42
Anthony_Yio6-Jun-04 20:42 
GeneralRe: ShellExe to execute any exe ,,,, what si to close it Pin
Zeeshan Bilal6-Jun-04 20:56
Zeeshan Bilal6-Jun-04 20:56 
GeneralRe: ShellExe to execute any exe ,,,, what si to close it Pin
Antony M Kancidrowski6-Jun-04 22:39
Antony M Kancidrowski6-Jun-04 22:39 
QuestionCAN i access Video Camera through COM port Pin
Zeeshan Bilal6-Jun-04 18:22
Zeeshan Bilal6-Jun-04 18:22 
Generaltoolobar question Pin
User 5838526-Jun-04 18:20
User 5838526-Jun-04 18:20 
GeneralRe: toolobar question Pin
Michael Dunn6-Jun-04 19:48
sitebuilderMichael Dunn6-Jun-04 19:48 
GeneralMSDataGrid Pin
Alton Williams6-Jun-04 18:07
Alton Williams6-Jun-04 18:07 
Questionwill this be compiler(M$ cl) bug or Memory leakage? Pin
DengJW6-Jun-04 17:14
DengJW6-Jun-04 17:14 
AnswerRe: will this be compiler(MS cl) bug or Memory leakage? Pin
Michael Dunn6-Jun-04 19:56
sitebuilderMichael Dunn6-Jun-04 19:56 

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.