Click here to Skip to main content
15,904,023 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to call c++ .dll with object file library in vb 6 Pin
Naveen13-May-09 20:46
Naveen13-May-09 20:46 
GeneralRe: how to call c++ .dll with object file library in vb 6 Pin
zhiyuan1613-May-09 20:57
zhiyuan1613-May-09 20:57 
GeneralRe: how to call c++ .dll with object file library in vb 6 Pin
CPallini13-May-09 21:20
mveCPallini13-May-09 21:20 
QuestionHow to increase size of tool tip in my application. Pin
birajendu13-May-09 9:55
birajendu13-May-09 9:55 
AnswerRe: How to increase size of tool tip in my application. Pin
Randor 13-May-09 10:40
professional Randor 13-May-09 10:40 
AnswerRe: How to increase size of tool tip in my application. Pin
Chandrasekharan P13-May-09 17:26
Chandrasekharan P13-May-09 17:26 
AnswerRe: How to increase size of tool tip in my application. Pin
«_Superman_»13-May-09 19:03
professional«_Superman_»13-May-09 19:03 
QuestionCan't find a solution for showing more dialog windows. Pin
hrddd13-May-09 8:13
hrddd13-May-09 8:13 
AnswerRe: Can't find a solution for showing more dialog windows. Pin
Maximilien13-May-09 8:53
Maximilien13-May-09 8:53 
QuestionHow to calculate the time between LBUTTONDOWN and LBUTTONUP? Pin
wb_program13-May-09 8:04
wb_program13-May-09 8:04 
AnswerRe: How to calculate the time between LBUTTONDOWN and LBUTTONUP? Pin
JBAK_CP13-May-09 8:30
JBAK_CP13-May-09 8:30 
AnswerRe: How to calculate the time between LBUTTONDOWN and LBUTTONUP? Pin
Nibu babu thomas13-May-09 18:45
Nibu babu thomas13-May-09 18:45 
AnswerRe: How to calculate the time between LBUTTONDOWN and LBUTTONUP? Pin
Taran913-May-09 21:07
Taran913-May-09 21:07 
QuestionCannot Open Recordset Pin
Astitva2313-May-09 8:00
Astitva2313-May-09 8:00 
AnswerRe: Cannot Open Recordset Pin
Stuart Dootson13-May-09 9:17
professionalStuart Dootson13-May-09 9:17 
AnswerRe: Cannot Open Recordset Pin
Astitva2313-May-09 12:10
Astitva2313-May-09 12:10 
GeneralRe: Cannot Open Recordset Pin
Stuart Dootson13-May-09 12:54
professionalStuart Dootson13-May-09 12:54 
QuestionNeed help about tab control!!!!!!!! Pin
happy5217713-May-09 4:46
happy5217713-May-09 4:46 
AnswerRe: Need help about tab control!!!!!!!! Pin
David Crow13-May-09 10:27
David Crow13-May-09 10:27 
QuestionApplication loses focus Pin
Tommy Svensson13-May-09 4:35
Tommy Svensson13-May-09 4:35 
AnswerRe: Application loses focus Pin
Randor 13-May-09 5:30
professional Randor 13-May-09 5:30 
AnswerRe: Application loses focus Pin
«_Superman_»13-May-09 19:09
professional«_Superman_»13-May-09 19:09 
QuestionApplication crash when application launch. Pin
Le@rner13-May-09 2:33
Le@rner13-May-09 2:33 
AnswerRe: Application crash when application launch. Pin
Cedric Moonen13-May-09 2:44
Cedric Moonen13-May-09 2:44 
GeneralRe: Application crash when application launch. Pin
Le@rner13-May-09 2:47
Le@rner13-May-09 2:47 
CString dnsbuf_str,IPdomain;
IPdomain = HostInfo(dnsbuf_str);

and 

CString CLeftView::HostInfo(CString str)
{
	CString str1;
	struct hostent *remoteHost;
	ShellExecute(NULL,_T("Open"), _T("ipconfig.exe"),_T("/flushdns"),NULL,0);
	char *host_name = new char [str.GetLength()+1];
	memset(host_name,0,str.GetLength()+1);
	
	wcstombs(host_name, str, str.GetLength()+1);

	struct in_addr addr;
	WSADATA wsaData;
	int iResult;
	iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
    if (iResult != 0)
		return _T("N/A");
	remoteHost = gethostbyname(host_name);
	if (remoteHost == NULL)
		return _T("N/A");
	else
	{
		addr.s_addr = *(u_long *) remoteHost->h_addr_list[0];
		str1=CString(inet_ntoa(addr));
		return str1;
	}
}


To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.

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.