|
If bConnected is false then it means that the internet is not connected (but I believe that you know that already). I thought you were getting bConnected = TRUE, even though you were offline. That's why I asked you to remove [if(bConnected)] just too see what would happen. You shouldn't get worried about the dwFlags value. I bet you want to know why the dwFlags doesn't have the INTERNET_CONNECTION_OFFLINE flags set? Sorry, but I don't have an answer for that.
To wrap things up, your code works fine.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Hi all,
I want to create an application in VC++ and have the following question.
1. Which project type i should choose, whether MFC.exe or AppWizard.
2. After creating interface, User should login to application. This login user id and password at the value avaible in database(MSaccess). Here say on OK action i create CDatabase Instance and open the database.
I want to use this instance for the rest of dialog to open other tables in the database. My question is how to make it gobally avaible.
Can someone point to me a link or good site. I am beginner in this language.
Thanks in advance,
Regards
Valli
|
|
|
|
|
2. Use a singleton.
Jonathan de Halleux.
|
|
|
|
|
ValliS wrote:
After creating interface, User should login to application. This login user id and password at the value avaible in database(MSaccess). Here say on OK action i create CDatabase Instance and open the database.
Make your CDatabase instance a member of your CWinApp derived class. You can then access it anywhere in your project by using AfxGetApp.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Thanks for the replies. I will try it.
Regards
Valli
|
|
|
|
|
I want to shutdown the other PC through programatically. All PC r already connected through network.
If we can shutdown one PC which is WN2000 and other is WNME.
If anyone know Plz tell me.
|
|
|
|
|
ExitWindowsEx( EWX_SHUTDOWN, 0 ).
Check out the other flags that this function uses as well because I am just giving you an example, which might not always apply to your case.
You can also check InitiateSystemShutdownEx.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I want to ask one more question.
If we can shutdown one PC which is WN2000 and other is WNME. Both of them r connected through network
If anyone know Plz tell me.
|
|
|
|
|
To shutdown another PC, use InitiateSystemShutdownEx() , but this only works for Win2k/XP PCs. You can't shutdown a remote Win9x/ME system without writing a server that runs on that machine and communicating with the program over the network.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I should start reading the questions more carefully. He is asking how to shutdown a computer through a network and I didn't even get that part!!!
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I want to make a programme which shutdown the Other PC(means which is already connected to the network).
can we do it.
|
|
|
|
|
|
Hi, Everyone
I want to know that what is the difference between DLL and LIB file.
Or There is similarity between DLL and LIB file.
Also tell me Dynamic and static DLL.
|
|
|
|
|
DLL is for 'Dynamic link library'. This means that it contains executable code (!!) that can be loaded at run time. So, you don't have to include your dll in your project when compiling.
The lib is in fact a 'static link library'. This means it contains functions (!!) that can be loaded at linkage. So, you need to include your library in the project when compiling your program.
For the static library, the functions within the library will be 'pasted' in your own program so you don't need the library with your executable. For the dll, when you execute your program, it will search for the dll, and execute code from within the dll. So you need to provide the dll with your executable!
BTW, I never heard about static dll.
Hope this helps
|
|
|
|
|
I think by dynamic and static dll, he meant dynamically or statically linking to a dll.
I don't think there is any such thing as a dynamic or static dll.
In dynamic linking to a dll, you don't require the lib file, whereas in static linking you require the lib file.
|
|
|
|
|
|
Go to http://webopedia.com/TERM/l/library.html[^].
From there on, browse through linker, runtime, DLL, compiler, etc...
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Hi All
does ne1 know the best way to find the left part of a CString
so if i wanted to find the first 2 characters in mystring
CString mystring "0434324423"
and then compare them, with two other characters
in SQL i would have
if left(mystring,2) = '03'
thanks
si
|
|
|
|
|
CString mystring = "0434324423";
if(mystring.Left(2) == "03")
{
<Do what you want>
}
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Nothing easier than this
Sometimes I ask myself whether people don't search the MSDN (no offense)
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi Friends,
Is there any difference between Win32 ans Win32s ? I hope the question is peroper.
|
|
|
|
|
|
Great information. for me.thanx.
VikramS
|
|
|
|
|
win32s("win32 subset") is an extension for windows 3.1 to support win32!
that's it!
Don't try it, just do it!
|
|
|
|
|
I noticed that the C libraries test for _UNICODE, while Win32 tests for UNICODE.
Would it be OK to
#ifdef UNICODE
#define _UNICODE
#undef _MBCS
#endif
as first statement in stdafx.h?
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|