Click here to Skip to main content
15,914,165 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Edit Box from funtion Pin
Alpha Siera20-Sep-04 3:00
Alpha Siera20-Sep-04 3:00 
GeneralRe: Edit Box from funtion Pin
W00dSt0ck20-Sep-04 3:18
W00dSt0ck20-Sep-04 3:18 
GeneralRe: Edit Box from funtion Pin
Alpha Siera20-Sep-04 3:31
Alpha Siera20-Sep-04 3:31 
GeneralRe: Edit Box from funtion Pin
Arsalan Malik20-Sep-04 3:08
Arsalan Malik20-Sep-04 3:08 
GeneralRe: Edit Box from funtion Pin
W00dSt0ck20-Sep-04 4:10
W00dSt0ck20-Sep-04 4:10 
GeneralRe: Edit Box from funtion Pin
David Crow20-Sep-04 5:36
David Crow20-Sep-04 5:36 
Generalglobal hotkey: i dont get the WM_HOTKEY message Pin
Member 134487420-Sep-04 2:00
Member 134487420-Sep-04 2:00 
GeneralInternetGetConnectedState and LAN Pin
WernerP20-Sep-04 1:05
WernerP20-Sep-04 1:05 
Hi,

I am using InternetGetConnectedState to determine, whether a LAN connection exists.

IBZHTTP_API LRESULT canConnectLAN() {
DWORD dwFlags;
InternetGetConnectedState(&dwFlags,0);
return LRESULT( 0 < (dwFlags & INTERNET_CONNECTION_LAN) );
}

I tested this function on two computers(PC1, PC2), both connected to the same LAN. Both have additionally RAS installed and a proxy exists. The LAN connections are activated.

PC1: Return value dwFlags is 56, which is correct, it means

INTERNET_CONNECTION_LAN (0x02)
INTERNET_CONNECTION_PROXY (0x04)
INTERNET_RAS_INSTALLED (0x10)
INTERNET_CONNECTION_CONFIGURED (0x40)

PC2: Return value dwFlags is 50 which is not enough, it means only

INTERNET_RAS_INSTALLED (0x10)
INTERNET_CONNECTION_CONFIGURED (0x40)

When RAS connections with modem are defined on PC2, dwFlags is correct with respect to RAS, 51:

INTERNET_CONNECTION_MODEM (0x01)
INTERNET_RAS_INSTALLED (0x10)
INTERNET_CONNECTION_CONFIGURED (0x40)

What could be the reason, that InternetGetConnectedState does not report the LAN connection on PC2?
Thank you
Werner
QuestionHow to lock a CFile in VC++ 6.0? Pin
Neeranjan19-Sep-04 22:26
Neeranjan19-Sep-04 22:26 
AnswerRe: How to lock a CFile in VC++ 6.0? Pin
Alpha Siera19-Sep-04 22:40
Alpha Siera19-Sep-04 22:40 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
Neeranjan19-Sep-04 22:59
Neeranjan19-Sep-04 22:59 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
Alpha Siera20-Sep-04 0:22
Alpha Siera20-Sep-04 0:22 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
David Crow20-Sep-04 5:43
David Crow20-Sep-04 5:43 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
Neeranjan20-Sep-04 20:22
Neeranjan20-Sep-04 20:22 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
David Crow21-Sep-04 3:40
David Crow21-Sep-04 3:40 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
Neeranjan21-Sep-04 4:38
Neeranjan21-Sep-04 4:38 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
David Crow21-Sep-04 5:24
David Crow21-Sep-04 5:24 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
Neeranjan21-Sep-04 20:37
Neeranjan21-Sep-04 20:37 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
David Crow22-Sep-04 5:02
David Crow22-Sep-04 5:02 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
Neeranjan22-Sep-04 18:40
Neeranjan22-Sep-04 18:40 
GeneralRe: How to lock a CFile in VC++ 6.0? Pin
David Crow23-Sep-04 2:50
David Crow23-Sep-04 2:50 
GeneralCalling C# web service from c++/MFC Pin
fajlerköaölgja19-Sep-04 22:09
fajlerköaölgja19-Sep-04 22:09 
Generalstupid question Pin
eli1502197919-Sep-04 21:49
eli1502197919-Sep-04 21:49 
GeneralRe: stupid question Pin
fajlerköaölgja19-Sep-04 22:33
fajlerköaölgja19-Sep-04 22:33 
GeneralRe: stupid question Pin
eli1502197919-Sep-04 23:10
eli1502197919-Sep-04 23:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.