|
|
is there any API in linux through which we can set static IP address or connect to DHCP
|
|
|
|
|
Wrong forum dude!
With respect to markkuk's reply.
Sorry Pal. The word "linux" forced me to think so.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
modified on Monday, August 11, 2008 8:37 AM
|
|
|
|
|
pls suggest where i can post my query
|
|
|
|
|
|
A negative vote? I did something wrong?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
modified on Monday, August 11, 2008 5:18 AM
|
|
|
|
|
The IP address is set either using the socket() API with a RTM_NEWADDR message through a RTNETLINK socket, or with the ioctl() API and a SIOCSIFADDR command. DHCP is handled by userspace client programs that set the IP address by one of the previously mentioned APIs.
|
|
|
|
|
Hi All,
When database server abruptly goes down, Client hangs in ExecuteSql statement.
I know only the remote(database) port number.
Is there any way to identify the local port that is connected to the remote port and terminate it?
Any help is appreciated.
Thanks in advance.
Regards, Selva
Selva
|
|
|
|
|
Yes, it can be done by following the instructions in this prior post[^].
Best Wishes,
-David Delaune
|
|
|
|
|
|
Dear All,
I have created a project (dialog based MFC) to display values in the .dat file. I have 4 dialogs and each of the one dialog should display appropriate values parsed from the .dat file. All the parsing methods have been done in a separate class (which is not a dialog).
I call the parsing method (separate class) from first dialog and when I open the second dialog (by a button click event from the first dialog) the values are displaying correctly. After that, if I go back to the first dialog (by a button click event from the second dialog) all the values seems to be disappeared. I am doing something wrong with my code, please help me.
void FirstDlg::OnBnClickedButton1()
{
initvalues();
bool x=process_file();
if(x)
{
MessageBox(L"Processing file succeeded");
}
else
{
MessageBox(L"Processing file failed");
}
}
void FirstDlg::OnBnClickedButton2()
{
OnCancel();
SecondDlg ptr1;
ptr1.DoModal();
DisplayValues();
}
void SecondDlg::OnBnClickedButton1()
{
OnCancel();
FirstDlg ptr1;
ptr1.DoModal();
DisplayValues();
}
modified on Tuesday, August 12, 2008 3:14 AM
|
|
|
|
|
it appears that you are not setting the values to be displayed on the first dialog when you do navigate from the second dialog
BTW are you using a property sheet?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I also tried to set the values before displaying the result is the same. Please advice. (I used displayvalues(); before calling the dialog.
_AnShUmAn_ wrote: BTW are you using a property sheet?
I cant understand correctly.
|
|
|
|
|
bhanu_8509 wrote: I cant understand correctly.
if you are using a property sheet you can use the sheet class to store the common information. [it's like a wizard then]
Objects of class CPropertySheet represent property sheets, otherwise known as tab dialog boxes. A property sheet consists of a CPropertySheet object and one or more CPropertyPage objects [As you have screens while installing some software where you do have to click on next/back/finish buttons with some view of the dialogs changing]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You have two FirstDlg::OnBnClickedButton1() methods. Why?
bhanu_8509 wrote: After that, if I go back to the first dialog (by a button click event from the second dialog) all the values seems to be disappeared.
Which would be correct based on what you've shown in SecondDlg::OnBnClickedButton1() . The call to DisplayValues() does not happen until after DoModal() has returned.
"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
|
|
|
|
|
DavidCrow wrote: You have two FirstDlg::OnBnClickedButton1() methods. Why?
I am very sorry David. I have done a typing mistake. I am very sorry. Now I have edited my post.
DavidCrow wrote: Which would be correct based on what you've shown in SecondDlg::OnBnClickedButton1(). The call to DisplayValues() does not happen until after DoModal() has returned.
I understand now that call effect to DisplayValues() will happen after DoModal() has returned. Please tell me how to avoid this. I used Singleton objects using Static members but the same problem presists. Please help me.
Thank you very much for your kind reply.
|
|
|
|
|
bhanu_8509 wrote: Please help me.
-- Dialog1 <---
| |
| |
| |
| |
---> Dialog2 --
Having a design such as this is, IMO, a recipe for failure. Why not use a property sheet or tabbed dialog instead?
"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
|
|
|
|
|
Sorry David. I cannot understand exactly from your diagram. I am very new to MFC. My requirement is to use Dialogs only, Tabbed dialog and Property sheet should not be used.
Please help me.
|
|
|
|
|
bhanu_8509 wrote: I cannot understand exactly from your diagram.
I was just implying that having dialog1 call dialog2 which calls dialog1 etc is a bad design. I'm not saying it can't be done, but the solution will be neither straight forward nor elegant.
bhanu_8509 wrote: My requirement is to use Dialogs only, Tabbed dialog and Property sheet should not be used.
Since a tabbed dialog and a property sheet are both dialogs, your requirement makes no sense.
"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
|
|
|
|
|
Dear David,
Please help me how to proceed with good design for my requirement.
Many thanks in advance.
|
|
|
|
|
Create a dialog with a tab control (CTabControl ), or create a property sheet with four property pages.
"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
|
|
|
|
|
Hi Friends,
I am getting this error in my program. in Stdafx header file...
fatal error C1083: Cannot open include file: 'afximpl.h': No such file or directory.
But this file is available in C:\Program files\Microsoft Visual Studio.Net 2003\vc7\atlmfc\src\mfc\afximpl.h
So i dont know how to resolve this error.
Could any one try to resolve this.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
how are you including the file? #include <afximpl.h> and before doing that you must #include<afxtempl.h>
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
I included #include<afxtempl.h> , still its not working..
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Hi,
Yes i did as you told. I included both the headers
Still its not working..
Thanks and Regards.
SANTHOSH V
|
|
|
|