Click here to Skip to main content
15,917,859 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Prime numbers... Pin
Mike Nordell3-Jun-02 22:41
Mike Nordell3-Jun-02 22:41 
GeneralRe: Prime numbers... Pin
Matt Gullett4-Jun-02 0:41
Matt Gullett4-Jun-02 0:41 
GeneralRichEdit Control and strange debug errors Pin
dazinith3-Jun-02 4:38
dazinith3-Jun-02 4:38 
GeneralRe: RichEdit Control and strange debug errors Pin
Tomasz Sowinski3-Jun-02 4:39
Tomasz Sowinski3-Jun-02 4:39 
GeneralRe: RichEdit Control and strange debug errors Pin
dazinith3-Jun-02 8:10
dazinith3-Jun-02 8:10 
GeneralRe: RichEdit Control and strange debug errors Pin
Tomasz Sowinski3-Jun-02 10:43
Tomasz Sowinski3-Jun-02 10:43 
Generalfind default dns server Pin
srana13-Jun-02 4:26
professionalsrana13-Jun-02 4:26 
GeneralRe: find default dns server Pin
Albert Pascual3-Jun-02 6:11
sitebuilderAlbert Pascual3-Jun-02 6:11 
#include <iads.h>
#include <windows.h>
#include <windns.h>
#include <winsock.h>
#include <winerror.h>

#include "stdafx.h"

#include <activeds.h>
#include <stdio.h>

int main(void)
{

PDNS_RECORD pDnsRecord;
DNS_STATUS status;
char szNameBuf[64];
struct hostent *hostinfo;
WORD wVersionRequested = MAKEWORD(1,1);
WSADATA wsaData;
in_addr address;

printf("DNS Server lookup ...!\n");

// Get host by name
if ( WSAStartup(wVersionRequested, &wsaData) )
return 0;

if ( gethostname(szNameBuf,64) )
return 0;

if ( (hostinfo = gethostbyname(szNameBuf)) == NULL )
return 0;
// End Get host by name

// Reverse order
// reverse the byte-order
address.S_un.S_addr = ntohl(*((DWORD*) hostinfo->h_addr_list[0]));

// use "dotted" string format
sprintf(szNameBuf, "%s.in-addr.arpa", inet_ntoa(address));


status =
DnsQuery_A( szNameBuf,
DNS_TYPE_PTR,
DNS_QUERY_BYPASS_CACHE,
NULL,
&pDnsRecord,
NULL );
QuestionATL 7.0 download? Pin
Francisco Moraes3-Jun-02 4:29
Francisco Moraes3-Jun-02 4:29 
AnswerRe: ATL 7.0 download? Pin
Michael P Butler4-Jun-02 23:05
Michael P Butler4-Jun-02 23:05 
Generalstrange CScrollBar problem - HELP! Pin
3-Jun-02 3:04
suss3-Jun-02 3:04 
GeneralRe: strange CScrollBar problem - HELP! Pin
Tomasz Sowinski3-Jun-02 3:15
Tomasz Sowinski3-Jun-02 3:15 
GeneralRe: strange CScrollBar problem - HELP! Pin
3-Jun-02 3:44
suss3-Jun-02 3:44 
QuestionHow to resize toolbar when it was floating? Pin
white jungle3-Jun-02 2:35
white jungle3-Jun-02 2:35 
AnswerRe: How to resize toolbar when it was floating? Pin
3-Jun-02 3:22
suss3-Jun-02 3:22 
AnswerRe: How to resize toolbar when it was floating? Pin
Tomasz Sowinski3-Jun-02 3:49
Tomasz Sowinski3-Jun-02 3:49 
Generalproblem:How draw text with NOT mode Pin
Alexey Kourakolov3-Jun-02 2:16
Alexey Kourakolov3-Jun-02 2:16 
GeneralRe: problem:How draw text with NOT mode Pin
Tomasz Sowinski3-Jun-02 2:59
Tomasz Sowinski3-Jun-02 2:59 
GeneralRe: problem:How draw text with NOT mode Pin
Alexey Kourakolov3-Jun-02 3:16
Alexey Kourakolov3-Jun-02 3:16 
GeneralProblems with my DLL Pin
3-Jun-02 2:03
suss3-Jun-02 2:03 
GeneralRe: Problems with my DLL Pin
Mike Nordell3-Jun-02 22:51
Mike Nordell3-Jun-02 22:51 
GeneralCreate a Linked List BaseClass Pin
Bug3-Jun-02 1:57
Bug3-Jun-02 1:57 
GeneralRe: Create a Linked List BaseClass Pin
Tomasz Sowinski3-Jun-02 1:54
Tomasz Sowinski3-Jun-02 1:54 
GeneralRe: Create a Linked List BaseClass Pin
3-Jun-02 5:01
suss3-Jun-02 5:01 
GeneralRe: Create a Linked List BaseClass Pin
Bug3-Jun-02 22:43
Bug3-Jun-02 22:43 

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.