Re: Problem with using ConnectionManager API on Win CE (pocket pc)
- From: Kerstin Pirrung <pirrung@xxxxxxxxx>
- Date: Mon, 17 Oct 2005 01:39:52 -0700
Hi!
Configuring the connection manager - well, that's what gave me a few grey
hairs until I'd got it right. Unfortunately, I'm working on MDAs in with
german platforms so I can't tell you exactly what to configure on your
device.
Typically, your browser has some settings concerning server, adresses (ip
or name), pop-server, proxy etc. so the connection manager does not need
to know any of these to be used for a successful connection.
Your application, on the other hand, does - normally - not know any of
these so the connection manager has to have that information configured
(something like options - advanced ... proxy config ... I don't know as
I've got a different platform).
On my MDA, I have configured 2 networks - one to be used by browser /
mail which looks rather straightforward and one for our company network
with server adresses and all that to be used by our application.
Miraculously, the OS always choses the right one though both of them are
allowed to be used by programs :-)
I found the following web page to be quite helpful:
http://theillustratednetwork.mvps.org/WM2003/Connection_Manager/Connectio
nManager.html
Regards,
Kerstin
"=?Utf-8?B?VG9tSG9mdGU=?=" <tomhofte@xxxxxxxxx> wrote in
news:86EFA3CB-7752-4D1C-B5E0-A944656532C5@xxxxxxxxxxxxx:
> Hi Kerstin,
>
> I can connect to the internet (and stay connected) when I connect to
> the internet
> by starting a browser on my IPAQ rx3715 with Win Ce on it. But what
> about the configuration u mentioned in your pervious reply? Do I have
> to set some special setting in the confguration of the
> ConnectionManager to be able to use the Connection Manager properly.
>
> Now, I have just one ISP connection configured with the connection
> manager. This connection is set up as a Bluetooth dialup moden that
> connects with internet through my mobile phone. I can test the
> connection succesfully by setting up te connection with the connection
> manager icon in the upper-right corner of the screen.
>
> I hope you cna help me further...
>
> Kind regards,
>
> -Tom Hofte
>
> "Kerstin Pirrung" wrote:
>
>> Hi again!
>>
>> Well, normal behaviour for the ConnectionManager after establishing a
>> connection is to _stay_ connected until
>> ConnMgrReleaseConnection(...); - so if you loose your connection,
>> some error has occurred.
>>
>> retVal = ConnMgrEstablishConnectionSync(...) gives a cryptival error
>> code in some cases even though pdwStatus == CONNMGR_STATUS_CONNECTED.
>> If this is the case, a deep look into winerror.h can give a clue.
>>
>> Can other applications connect to the internat - not manually, but
>> programmatically? If yes, we can be quite convinced your connedtion
>> manager settings are all right.
>>
>> Regards,
>> Kerstin
>>
>>
>>
>>
>> "=?Utf-8?B?VG9tSG9mdGU=?=" <tomhofte@xxxxxxxxx> wrote in
>> news:DA6AACA1-C6E9-4282-BD72-C396289EE559@xxxxxxxxxxxxx:
>>
>> > Hi Kerstin,
>> >
>> > I get pdwStatus == CONNMGR_STATUS_CONNECTED. I have checked this
>> > with debug statements.
>> >
>> > ConnMgrEstablishConnectionSync(...) shows the same behaviour.
>> > Is there not a way to tell the Connection Managers to stay
>> > connected after the connection is established?
>> >
>> >
>> >
>> > "Kerstin Pirrung" wrote:
>> >
>> >> Hi!
>> >>
>> >> Your code looks perfectly all right to me... could have been
>> >> copied from my project.
>> >>
>> >> So you get pdwStatus == CONNMGR_STATUS_CONNECTED? Should be, as
>> >> your icon changes...
>> >>
>> >> What hError does hError = ConnMgrEstablishConnectionSync(...) give
>> >> you?
>> >>
>> >> Kerstin
>> >>
>> >>
>> >>
>> >> "=?Utf-8?B?VG9tSG9mdGU=?=" <tomhofte@xxxxxxxxx> wrote in
>> >> news:B864E9D1-A37A-4B5D-87DC-0DF5C62EB6A3@xxxxxxxxxxxxx:
>> >>
>> >> > Hi all,
>> >> >
>> >> > I have implemented a function in c++ in eVC++ 4.0 to
>> >> > automatically establisch a connection using the
>> >> > ConnectionManager API in the cellcore.dll.
>> >> >
>> >> > The code fragment below is reponsible for the connection:
>> >> >
>> >> > CONNMGR_CONNECTIONINFO sConInfo;
>> >> > memset(&sConInfo,0,
>> >> > sizeof(CONNMGR_CONNECTIONINFO));
>> >> > sConInfo.cbSize=sizeof(CONNMGR_CONNECTIONINFO);
>> >> > // We want to use the "guidDestNet" parameter
>> >> > sConInfo.dwParams=CONNMGR_PARAM_GUIDDESTNET;
>> >> > // This is the highest data priority.
>> >> > sConInfo.dwPriority=
>> >> > CONNMGR_PRIORITY_USERINTERACTIVE;
>> >> > sConInfo.dwFlags=0;
>> >> > // Lets be nice and share the connection with
>> >> > // other applications
>> >> > sConInfo.bExclusive=FALSE;
>> >> > sConInfo.bDisabled=FALSE;
>> >> > sConInfo.guidDestNet=IID_DestNetInternet;
>> >> >
>> >> > ConnMgrEstablishConnectionSync(
>> >> > &sConInfo,&phWebConnection,60000,&pdwStatus)
>> >> >
>> >> > The code is working and when I run the code on my IPAQ RX3715, I
>> >> > can see that the applicaties tries to connect to the internet
>> >> > using the standard ISP internet connection set on the device.
>> >> > However after established the connection (I can see ths has
>> >> > happened by looking at the ConnectionManager icon in the
>> >> > upper-right corner of the screen), the connection is immediately
>> >> > disconnected. Again, I can see ths has happened by looking at
>> >> > the ConnectionManager icon in the upper-right corner of the
>> >> > screen. There is a cross in it..
>> >> >
>> >> > Howeve, I can establish the same connection by hand and then it
>> >> > remains connected...
>> >> >
>> >> > What am I do wrong here?
>> >> >
>> >> > I hope someone can help me with this urgent problem...
>> >> >
>> >> > Tnx in advance!
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>>
>>
>
.
- References:
- Re: Problem with using ConnectionManager API on Win CE (pocket pc)
- From: Kerstin Pirrung
- Re: Problem with using ConnectionManager API on Win CE (pocket pc)
- From: TomHofte
- Re: Problem with using ConnectionManager API on Win CE (pocket pc)
- From: Kerstin Pirrung
- Re: Problem with using ConnectionManager API on Win CE (pocket pc)
- From: TomHofte
- Re: Problem with using ConnectionManager API on Win CE (pocket pc)
- Prev by Date: Out Of File/Socket Descriptors
- Next by Date: RE: Problems implementing the IMessageFilter to filter keypress events
- Previous by thread: Re: Problem with using ConnectionManager API on Win CE (pocket pc)
- Next by thread: Re: Problem with using ConnectionManager API on Win CE (pocket pc)
- Index(es):
Relevant Pages
|