Click here to Skip to main content
16,008,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Programming on multiprocessor computer Pin
Tomasz Sowinski13-Mar-02 2:21
Tomasz Sowinski13-Mar-02 2:21 
GeneralRe: Programming on multiprocessor computer Pin
Jon Hulatt13-Mar-02 2:45
Jon Hulatt13-Mar-02 2:45 
GeneralRe: Programming on multiprocessor computer Pin
Tomasz Sowinski13-Mar-02 2:42
Tomasz Sowinski13-Mar-02 2:42 
GeneralRe: Programming on multiprocessor computer Pin
Dang Xuan Ky14-Mar-02 5:35
Dang Xuan Ky14-Mar-02 5:35 
GeneralRe: Programming on multiprocessor computer Pin
Tomasz Sowinski14-Mar-02 5:50
Tomasz Sowinski14-Mar-02 5:50 
QuestionHow to get network card serial number? Pin
Ales Krajnc13-Mar-02 0:15
Ales Krajnc13-Mar-02 0:15 
AnswerRe: How to get network card serial number? Pin
Jon Hulatt13-Mar-02 1:45
Jon Hulatt13-Mar-02 1:45 
AnswerSendARP Pin
13-Mar-02 4:49
suss13-Mar-02 4:49 
// // Link with ws2_32.lib and iphlpapi.lib
//

#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <iphlpapi.h>


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

ipAddr = inet_addr ("216.145.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;
}
GeneralEnumerate handles Pin
Don Miguel13-Mar-02 0:05
Don Miguel13-Mar-02 0:05 
GeneralRe: Enumerate handles Pin
Stephen Kellett13-Mar-02 8:02
Stephen Kellett13-Mar-02 8:02 
GeneralRe: Enumerate handles Pin
Carlos Antollini13-Mar-02 8:26
Carlos Antollini13-Mar-02 8:26 
GeneralRe: Enumerate handles Pin
Don Miguel13-Mar-02 21:00
Don Miguel13-Mar-02 21:00 
GeneralRemoving application icon from alt+tab list Pin
KGS12-Mar-02 22:53
KGS12-Mar-02 22:53 
GeneralRe: Removing application icon from alt+tab list Pin
Tomasz Sowinski12-Mar-02 22:54
Tomasz Sowinski12-Mar-02 22:54 
GeneralRe: Removing application icon from alt+tab list Pin
KGS12-Mar-02 23:47
KGS12-Mar-02 23:47 
GeneralHelp! Pin
Jacky Wu12-Mar-02 22:27
Jacky Wu12-Mar-02 22:27 
GeneralUse Stingray Objective Grid 97 Pin
Simon Roth12-Mar-02 21:12
Simon Roth12-Mar-02 21:12 
GeneralRe: Use Stingray Objective Grid 97 Pin
Tomasz Sowinski12-Mar-02 23:04
Tomasz Sowinski12-Mar-02 23:04 
GeneralWindows CE and System font Pin
12-Mar-02 20:56
suss12-Mar-02 20:56 
QuestionHow to get highlighted text by double click? Pin
Pony12-Mar-02 20:07
Pony12-Mar-02 20:07 
AnswerRe: How to get highlighted text by double click? Pin
Tomasz Sowinski12-Mar-02 23:12
Tomasz Sowinski12-Mar-02 23:12 
GeneralRe: How to get highlighted text by double click? Pin
Pony13-Mar-02 6:22
Pony13-Mar-02 6:22 
QuestionCListCtrl -Max Visible text length 260? Pin
12-Mar-02 18:45
suss12-Mar-02 18:45 
AnswerRe: CListCtrl -Max Visible text length 260? Pin
Tomasz Sowinski12-Mar-02 22:57
Tomasz Sowinski12-Mar-02 22:57 
Generalwriting a plugin Pin
Dor12-Mar-02 14:34
Dor12-Mar-02 14:34 

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.