|
|
hi all,
i have a requirement to check the status when internet connection is lost and as well as again reconnected
when i disable and enable network connections it is shown well and good but when internet connection is lost from service provider stil my application shows me internet connection available
is there any other way to dectect internet connection ?
other than using
internetgetconnectedstate() method !
thanks
ranjith
|
|
|
|
|
as I know, there is no fast checking.
2 methods are:
(1) ftp - you need to provide a server which you have rights to access, then use ftp to check.
(2) try to "download" a file, but you can stop downloading once download starts because you just need to check connection.
This issue can be done by CInternetConnection.
(1) is faster than (2), but not very fast.
(2) may need only 1 second If internet connection is OK.
But if connection is not OK, you may have to wait for up to a few of minutes to get result - timeout does't work well in the case.
|
|
|
|
|
|
How can I determine the available/installed RAM on a machine? In VC++.
|
|
|
|
|
|
|
Hi,
I have a string formatted somewhere in my program as
Cstring strMain;
strMain.Format("Health: \nWealth");
At some other part of the program, I need 'Health:’ as a separate string and ‘Wealth’ as a separate string. I tried using sscanf but it is not separating the strings.
Cstring s1,s2;
Cstring strOriginal = getmain();
Sscanf(strOriginal,"%s: %s",s1,s2);
This give just ‘Health’ . i.e. both s1 and s2 hold the string ‘Health’
Please can you tell me the right way?
Fortitudine Vincimus!
-- modified at 9:02 Saturday 8th July, 2006
|
|
|
|
|
First of all, you can't use pass CString 's directly to sscanf . Arguments to sscanf must be pointers.
If you are using the '\n' as the delimiter, you could try something like the following:
CString s1,s2;
CString strOriginal = getmain();
int offset = strOriginal.Find('\n');
if (offset >= 0) {
s1 = strOriginal.Left(offset);
s2 = strOriginal.Mid(offset + 1);
}
Software Zen: delete this;
|
|
|
|
|
Thanks a lot.
Fortitudine Vincimus!
|
|
|
|
|
hi all,
i am getting following error in vc ++ .net 7.0
fatal error C1083: Cannot open include file: 'olestd.h': No such file or directory
can any one help me to solve this problem ?
Regards
venu
|
|
|
|
|
for which function, you are referrnig the same file? I strongly believe that, the file is local one(defined for your project).
AFAIK there's no such file named, oldstd.h
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
i'd like to see color dialog when i click a button(ID_BORDERCOLOR) on my ToolColor and then i can get color by m_bordercolor in CView.
Thanks
all for development
|
|
|
|
|
add message handler for ID_BORDERCOLOR, then inside the message handler,
add the code
CColorDialg dlg;
dlg.DoModal();
COLORREF clr = dlg.GetColor();
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
hai guys
here i have oneproblem to get the specified port is running or not by
programatically .plz kindely help me in my project
#sankar#
|
|
|
|
|
|
Thanque for ur reply but i didn't get it ,plz send me clearly
#sankar#
-- modified at 6:59 Saturday 8th July, 2006
|
|
|
|
|
See the sample from MSDN[^]
if we fail to bind to a specified port of listen to a specified port fails, which means that, the port is in use or invalid.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
|
Hello i hav a Dialog class say ABC. In this dialog i have a listbox & button control.
i have another class say XYZ in the same file say it has a Display() Fucntion in which i have add some string into the list box.
what i want when a user click on button dispaly function should be called.
for calling a listbox control variable i have made a object of dialog class within the display function and with the help of this object i call the listbox control variable and add the string into the list box.
and on button click i hav made aobject of xyz class.and call the display function but its giving me assertion error.
what should i do to avoif this error.
thanx
|
|
|
|
|
aavesh wrote: or calling a listbox control variable i have made a object of dialog class within the display function and with the help of this object i call the listbox control variable and add the string into the list box.
I think wha you were doing is wrong.
Seems you need something like this.
this is code can't be applied directly... Just a logic "how to do"
class CXYZ
{
public:
SetListBoxHandle(CListBox* pListBox);
Display();
};
class CMyDialog
{
private:
CXYZ m_xyz;
CListBox m_ListBox;
BOOL OnInitDialog()
{
m_xyz.SetListBoxHandle(&m_pListBox);
}
void OnBtnClick()
{
m_xyz.Display();
}
};
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
hi thanx for replying me.i hav got the answer where i was making mistake but one thing is also which is i'm not getting that how can i call the list control variable in display function.
thanx
|
|
|
|
|
Plz saarth reply me..
i'm waiting for ur reply.
|
|
|
|
|
sorry I left office yesterday...
for that purpose, there's in Set handler function.
keep that in a member varible (pointer type of CListBox) and call when it is required.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
hello
thanx for replying..
sorry i tried to do it but i'm not getting in display function when i call the sethandler function what should i pass into the sethandler function.
i'm doing like this
CTestList::Display()
{ List control variable here
CListBox *l1 = sethandlerlist("what i have to pass here");
l1->AddString("Abc");
}
tell me where i making mistake
thanx
|
|
|
|