|
If your IP address is part of a private block (10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16) then there is no way for an IP address outside that network to connect to your IP address unless your gateway router is set up to do port forwarding or NAT or some other IP aliasing. If your IP address is not within these blocks, then it may or may not be route-able from the internet depending on firewall/gateway settings.
|
|
|
|
|
ipconfig displays 3 IP addresses in 3 lines, such as:
//-------------------------------------------
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.101
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.254
//-------------------------------------------
what do the 3 addresses stand for?
which one is Networking IP address?
|
|
|
|
|
includeh10 wrote: what do the 3 addresses stand for?
IP address
Subnet mask
Default gateway
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
includeh10 wrote: Default Gateway . . . . . . . . . : 192.168.1.254
This is what I called as "Proxy".. you get it? To check it, from your lan, from multiple machines, open IPchicken.com and check the IP adress. it will all be the same. That's what is actually getting exposed to the internet.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
A bitwise ANDing of the IP Address and the subnet mask will give you the network address. In this case: 192.168.1.101 AND 255.255.255.0 = 192.168.1.0.
|
|
|
|
|
how to detect a PC's 3 IP addresses by VC++:
Loacal, networking and internet IP addresses?
the PC is on Local-area networking with internet accessed.
|
|
|
|
|
|
Can anyone tell me how to convert a modeless dialog to a modal dialog?? And vise versa?? Is it possible??
Thanks for any help.
|
|
|
|
|
There's no difference between the code for a modeless dialog or a modal dialog. The difference lies in how the dialog is created. A modal dialog is 'run' by calling the dialog class DoModal() function, while a modeless dialog is created by calling CreateWindow() followed by ShowWindow() . Once created, they 'run' in that fashion until destroyed.
What are you trying to accomplish by converting from one to the other?
|
|
|
|
|
I was asked that question in an interview, i told him the creation part that there is difference in creating the dialog but i was not sure about converting one to the other.
Thanks for your answer. Appreciate it.
|
|
|
|
|
|
Hi
How can i read a USB Port Activity.If port is working mode(atached device) then show device information.Can any body help me..
Thx's in advance
|
|
|
|
|
NewVC++ wrote: How can i read a USB Port Activity.
You can read from the USB port via ReadFile() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
This is not absolutely correct. What you do in fact is access the driver of a specific device that sits on the bus. I am not sure, but I think the driver can answer what it wants to the ReadFile() 'request'.
Also, you will only access one device on the bus, not be able to read the USB port activity.
|
|
|
|
|
Cedric Moonen wrote: What you do in fact is access the driver of a specific device that sits on the bus.
I realize that. The device will need to be located using the SetupDiXXX() functions to enumerate all instances of the device's interface and get the device path to them. The path can then be passed to CreateFile() . With the handle that CreateFile() returns, ReadFile() can be used.
Cedric Moonen wrote: ...not be able to read the USB port activity.
Right, that's why I clarified the OP's request.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
Thxs for reply
But i am going to develop a USB Drive.I want to monitor only.If any thing is attached in USB Dirve then show information..
Plz help me
|
|
|
|
|
Hi,
I want to make a program for Arabic language.I know that arabic is written from right to left.I tried some ways to do that but I was not successful.I think this code should do that:
m_edit1.ModifyStyleEx(NULL,WS_EX_RTLREADING);
But it is not working.What could be the problem?Is there any way to make right-to-left everything on the screen?
Thanks,
ibrahim
|
|
|
|
|
iayd wrote: But it is not working.
Which means what? Have you tried adding that style at design time rather than at run time?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
|
This is my code for first Dialog
#if !defined(AFX_DIALOG1_H__F50AB9B4_5FA3_4068_843C_01A10ED22766__INCLUDED_)
#define AFX_DIALOG1_H__F50AB9B4_5FA3_4068_843C_01A10ED22766__INCLUDED_
#include "dialog2.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// dialog1.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// dialog1 dialog
class dialog1 : public CDialog
{
// Construction
public:
dialog2 d2;
dialog1(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(dialog1)
enum { IDD = IDD_DIALOG1 };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(dialog1)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(dialog1)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DIALOG1_H__F50AB9B4_5FA3_4068_843C_01A10ED22766__INCLUDED_)
//**************************************************************************
And second dialog Code is
#if !defined(AFX_DIALOG2_H__B49F8072_EB87_4558_8CE9_E83A7852E553__INCLUDED_)
#define AFX_DIALOG2_H__B49F8072_EB87_4558_8CE9_E83A7852E553__INCLUDED_
#include "dialog1.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// dialog2.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// dialog2 dialog
class dialog2 : public CDialog
{
// Construction
public:
dialog1 d1;
dialog2(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(dialog2)
enum { IDD = IDD_DIALOG2 };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(dialog2)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(dialog2)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DIALOG2_H__B49F8072_EB87_4558_8CE9_E83A7852E553__INCLUDED_)
Error is
Compiling...
dialog2.cpp
c:\documents and settings\kone\desktop\test_dialog\dialog1.h(19) : error C2146: syntax error : missing ';' before identifier 'd2'
c:\documents and settings\kone\desktop\test_dialog\dialog1.h(19) : error C2501: 'dialog2' : missing storage-class or type specifiers
c:\documents and settings\kone\desktop\test_dialog\dialog1.h(19) : error C2501: 'd2' : missing storage-class or type specifiers
dialog1.cpp
c:\documents and settings\kone\desktop\test_dialog\dialog2.h(18) : error C2146: syntax error : missing ';' before identifier 'd1'
c:\documents and settings\kone\desktop\test_dialog\dialog2.h(18) : error C2501: 'dialog1' : missing storage-class or type specifiers
c:\documents and settings\kone\desktop\test_dialog\dialog2.h(18) : error C2501: 'd1' : missing storage-class or type specifiers
Generating Code...
Error executing cl.exe.
test_dialog.exe - 6 error(s), 0 warning(s)
|
|
|
|
|
keyvan_jaferzade wrote: c:\documents and settings\kone\desktop\test_dialog\dialog1.h(19) : error C2146: syntax error : missing ';' before identifier 'd2'
Notice what is to the left of d2 ? dialog2 has not been declared at this point.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
i included this class at first of class
and i dont know what i should declare this class into another
|
|
|
|
|
keyvan_jaferzade wrote: i included this class at first of class
I see that now. My bad. The circular reference suggestion is what you need.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|