How to automatically connect to web via DUN and detecting IP

G

Guest

I am writing an Compact Framework 2.0 application in C# for a CE 4.2 device.
I need to programmatically connect to the Internet via Dial Up Networking.
I have Internet Explorer set up to where it automatically connects (dials via
DUN) to the Internet when attempting to go to a web site. However, when I
use HttpWebRequest (i.e. Webreqest - post); it does not automatically connect
to the Internet if not connected. I need to connect first, then my program
can connect to the Internet. I though .NET would automatically connect like
IE. Thus apparently I need to manually connect to the Internet in my
program.

In the past I used the Connection Manager in eMbedded C++, however, I cannot
use this since it references cellcore.dll, which does not exist since my
device is a
PDA and not a cell phone. Is there a managed API I can call to
programmatically connect to the Internet. I know I can shell execute
"rnaapp.exe -eDUN", where DUN is the name of my Dial Up Networking
connection. However this is awkward since it prompts the user to click "OK"
to actually dial. I do not want the user to get prompted; I just want to
automatically connect.

Also, what managed function do I call to see what the current IP address is
of my CE device?
 
G

Guest

There is no way to use RAS or GPRS on a PDA. It has to be a phone edition
device.
 
G

Guest

There must be a more elegant way to programmatically connect to the Internet
on a CE device via Dial Up Networking. I am able to programmatically connect
to the Internet by doing a shell execute of "rnaapp.exe -eCellular". This
brings up the "dial" dialog box and the user has to click "OK" to actually
connect to the Internet. Thus, I know you can do it. I am just wondering if
there is a way to dial into the Internet so the user doesn't see anything
(i.e. doesn't have to click on "OK) to start the dial. Is there another way
I can invoke a dial up connection and force it to dial, not requring the user
to select OK (or anything else)? Also, what Framework function should I use
to see what the IP address is of the device, once it is connected?
 
P

Paul G. Tobey [eMVP]

I think that you should be able to use TAPI to make a dial-up networking
connection, but it's going to require some coding and I've never done that
particular operation. You could contact the device OEM, if it's a
non-Pocket PC device, and see what they have for you.

Once you've connected, you should be able to use something like the
OpenNETCF Smart Device Framework Adapter class to get the IP address. You
should probably check that site for some TAPI support, too. I don't
remember any specifically, but I could be wrong about that. Searching the
archives of this group using GoogleGroups for TAPI might help, too:

www.opennetcf.org

http://groups.google.com/group/micr...ork/topics?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top