Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > BOOK: Professional C#, 2nd and 3rd Editions
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Professional C#, 2nd and 3rd Editions
This is the forum to discuss the Wrox book Professional C#, 3rd Edition by Simon Robinson, Christian Nagel, Karli Watson, Jay Glynn, Morgan Skinner, Bill Evjen; ISBN: 9780764557590
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C#, 2nd and 3rd Editions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 21st, 2003, 07:12 AM
Registered User
Join Date: Aug 2003
Location: Pune, Maharashtra, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using win 32 dll in C#

I have used the function InternetGetConnectedState() to check whether the system is connected to internet. It is working Correctly.
But the Function returns the description about the connection in its out parameter (here Description) how can i print that description.
i tried printing Value in Description but it prints number.
I tried Comparing it with Return Constants but it gives Error .
The Constant Name Is undefined.

private extern static bool InternetGetConnectedState(out int Description, int ReservedValue ) ;

Abhijeet Kumar
Software Engineer
Cybage Software Pvt. Ltd.
  #2 (permalink)  
Old August 23rd, 2003, 05:48 AM
Friend of Wrox
Join Date: Jun 2003
Location: , , .
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma

Hi Abhijeet

The value that is being retruned is of typ DWORD
and the numerical value stored in it is what you
are seeing when you print it. The right way is to check
the returned value against constants but instead of using
the constant names .Net check the values of these constants
in Wininet.h file and check the returned value against them.
Like the constant INTERNET_CONNECTION_LAN has the value 2
defined in Wininet.h.


Ankur Verma
.Net and C++ Specialist
Wiley Tech Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
nitepad in win 32 satishsatao C++ Programming 1 April 7th, 2006 03:26 AM
Win 32 VC++ Implementation doubts !!! indupriyav Visual C++ 1 December 16th, 2005 11:57 AM
Working with Win 32 Registry pannet1 BOOK: Access 2003 VBA Programmer's Reference 4 April 27th, 2005 03:45 AM
Win '98 vs. Win XP rgerald Access VBA 0 February 19th, 2004 12:30 PM

All times are GMT -4. The time now is 05:50 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.