|
thank you very much, ravi.
now I understand the principle. Is there any tutorial material I can read to learn more? I'm pretty new to the network programming. what I have done is limited to very basic stuff, such as one-to-one send/recv applciation.
thanks again!
|
|
|
|
|
lucy wrote: I want the client application to do a query in the LAN, and find out what the candidate server's IP address is...
Use NetServerEnum() for this.
Once you can successfully enumerate through all machines in your LAN, then you can go about "pinging" their ports.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
lucy wrote: I then found this article:
http://www.codeproject.com/internet/ipaddress.asp[^]
It seems to have an unnecessary call to gethostname() , as szHostName is not used for anything.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
change the form view class at run time
ahmed
|
|
|
|
|
is that a question ?
is that an order ?
is that a suggestion ?
|
|
|
|
|
anmllll wrote: change the form view class at run time
which form view class
|
|
|
|
|
|
I am trying to create a "Wife is coming" button. The present process of deleting the brower history, temporary internet files, cookies, etc has too many clicks and is too time comsuming (considering the wife is coming and will go straight to the history to find evidence of my porn surfing -- yeah, i'll say it; i'm whipped).
Anyway, I need a 1-click solution. I already know how to create an icon in the internet explorer task bar that will run a .exe or .vbs file using regedit.exe. Now I need a file to run that will do what Internet Explorer does when it deletes the cache, history, etc that I can link to the icon in the registry.
I know that when I click the "Delete All" button in IE7, the rundll.exe process turns on for a few seconds until the cache is clear, then ends when it is finished. What I need to know is what .dll is being run to delete the cache and can I create a .vbs file that can do the same thing?
Any help I can get is greatly appreciated.
Matt
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
That's almost what I am looking for, however, what I really need is a .vbs or .bat file that will use rundll.exe to do everything. Is this possible? How does IE7 delete it's history/cache? I am almost certain it uses rundll.exe. I just don't know which .dll it uses. (possibly wininet.dll or occache.dll???) Even if I knew which .dll is used, I need the correct code to make the .dll delete everything I want it to delete.
|
|
|
|
|
Honestly, I would look for a program called CCleaner
It basically is a secure "wife is coming" button. You can just have it erase once instead of the DoD 15 times or w/e it is, that'll make it faster.
If you were looking to make your own for the challenge tho, I really don't know; I'm just suggesting something that's already out there.
|
|
|
|
|
How can i get the system time and display it?
|
|
|
|
|
shamsteady wrote: How can i get the system time...
Use GetSystemTime(), or time() .
shamsteady wrote: ...and display it?
Use printf() , or cout .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It said GetSystemTime() is undeclared. Am i missing something?
|
|
|
|
|
shamsteady wrote: Am i missing something?
Yes, the inclusion of a header file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
shamsteady wrote: Yes, the inclusion of a header file.
shamsteady wrote: t said GetSystaremTime() is undeclared. Am i missing something?
which compiler are you using@!
|
|
|
|
|
Also, you can use the time_t structure.
time_t t;
time(&t);
cout<<ctime(&t);
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
See
SYSTEMTIME m_SysTime;
char DisplayTime[255];
::GetSystemTime(&m_SysTime);
sprintf(DisplayTime,"%d/%d/%d...%d::%d::%d::%d",
m_SysTime.wMonth,m_SysTime.wDay,
m_SysTime.wYear,m_SysTime.wHour,
m_SysTime.wMinute,m_SysTime.wSecond,m_SysTime.wMilliseconds);
|
|
|
|
|
Hi All,
I'm trying to overload the assignment (=) operator so that I can achieve the following:
int x = myclass;
instead of:
int x = myclass.Value();
I am implementing it as follows:
class CMyClass
{
private:
int m_nValue;
public:
int& operator=(CMyClass& class);
int Value() { return m_nValue; };
};
int& CMyClass::operator=(CMyClass& class)
{
return class.Value();
}
But I keep on getting a compiler errors either saying that there is no suitable conversion, or that it cannot convert from CMyClass to int.
Clearly my syntax (or something) is screwed, so how can I fix it ?
Thanks
OD
|
|
|
|
|
Write a casting operator instead:
operator int() const { return m_nValue; }
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Damn, you were faster
|
|
|
|
|
Nemanja Trifunovic wrote: Damn, you were faster
Hehe, sometimes I get lucky.
Haven't refreshed in about two hours.
It was a good thing that we suggested the same thing though...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks, worked like a charm !
|
|
|
|
|
od@ananzi.co.za wrote: I'm trying to overload the assignment (=) operator so that I can achieve the following:
int x = myclass;
instead of:
int x = myclass.Value();
If I got your intention correctly, you need operator int , not operator =
|
|
|
|