DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 8 Aug 2007 04:48:06 -0700,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    John K am
          2    Simon Hart
                 3    John K am
                        4    Paul G. Tobey [eMVP] p space tobey no spam AT no instrument no spam DOT com


How to automatically connect to web via DUN and detecting IP   
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?
-- 
Thank you.
Date:Wed, 8 Aug 2007 04:48:06 -0700   Author:  

RE: How to automatically connect to web via DUN and detecting IP   
There is no way to use RAS or GPRS on a PDA. It has to be a phone edition 
device.

-- 
Simon Hart
http://simonrhart.blogspot.com


"John K" wrote:


> 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?
> -- 
> Thank you.
Date:Thu, 9 Aug 2007 00:42:01 -0700   Author:  

RE: How to automatically connect to web via DUN and detecting IP   
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?
-- 
Thank you.


"Simon Hart" wrote:


> There is no way to use RAS or GPRS on a PDA. It has to be a phone edition 
> device.
> 
> -- 
> Simon Hart
> http://simonrhart.blogspot.com
> 
> 
> "John K" wrote:
> 
> > 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?
> > -- 
> > Thank you.
Date:Thu, 9 Aug 2007 07:14:04 -0700   Author:  

Re: How to automatically connect to web via DUN and detecting IP   
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/microsoft.public.dotnet.framework.compactframework/topics?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8

Paul T.

"John K" <KTJ@newsgroups.nospam> wrote in message 
news:CB07DD4E-1F80-406B-9E49-6B22D05792CA@microsoft.com...

> 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?
> -- 
> Thank you.
>
>
> "Simon Hart" wrote:
>
>> There is no way to use RAS or GPRS on a PDA. It has to be a phone edition
>> device.
>>
>> -- 
>> Simon Hart
>> http://simonrhart.blogspot.com
>>
>>
>> "John K" wrote:
>>
>> > 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?
>> > -- 
>> > Thank you. 
Date:Thu, 9 Aug 2007 08:32:48 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us