Re: RAS Entry in C - I really really need help
- From: "Darren Beckley" <darren.beckley@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 3 Feb 2006 00:56:28 -0000
Instead of using RAS API, send config XML to the CM_GPRSEntries
configuration service provider via the DMProcessConfigXML(). Look at
http://msdn.microsoft.com/library/en-us/guide_ppc/html/ppc_wce51grfcm_gprsentriescspozup.asp
http://msdn.microsoft.com/library/en-us/apippc/html/ppc__mdref_dmprocessconfigxml.asp
Hope that helps,
Darren
"David Burrows" <dave@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23MiETEsJGHA.2628@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I using the below code to set-up a RAS entry and dial params in a C setup
program for a connection later on. The entries are copied directly from a
working RAS connection I can make in the "Connections"->"My ISP" editor of
PocketPC2003 SE3.
I just can't seem to get it to work connectly.
There looks to be a connection but it fails on authorisation and yet if I
use the exact same values in the "My ISP" editor it works.
I'm really at my wits end. In the code I'm checking every return for
error codes - this bit is missing below - but all functions succeed. It
seems so simple and yet it doesn't work. What is the editor doing that
I'm not?
Any help would be great.
SETUP CODE.....
RASENTRY RASEntry;
memset( &RASEntry, 0, sizeof(RASEntry) );
RASEntry.dwSize = sizeof(RASEntry);
RASEntry.dwfNetProtocols = RASNP_Ip;
RASEntry.dwFramingProtocol = RASFP_Ppp;
RASEntry.dwfOptions = RASEO_RemoteDefaultGateway;
wcscpy( RASEntry.szLocalPhoneNumber, TEXT("~GPRS!internet") );
wcscpy( RASEntry.szDeviceType, TEXT("modem") );
wcscpy( RASEntry.szDeviceName, TEXT("Cellular Line") );
RasSetEntryProperties( NULL, TEXT("Custom GPRS"), &RASEntry,
sizeof(RASEntry), NULL, NULL );
RASDIALPARAMS RASDialParams;
memset( &RASDialParams, 0, sizeof(RASDialParams) );
RASDialParams.dwSize = sizeof(RASDialParams);
wcscpy( RASDialParams.szEntryName, TEXT("Custom GPRS") );
wcscpy( RASDialParams.szUserName, TEXT("web") );
wcscpy( RASDialParams.szPassword, TEXT("web") );
RasSetEntryDialParams( NULL, &RASDialParams, false );
USAGE CODE....
RASDIALPARAMS RASDialParameters;
memset( &RASDialParameters,0,sizeof( RASDIALPARAMS ) );
RASDialParameters.dwSize = sizeof( RASDIALPARAMS );
wcscpy( RASDialParameters.szEntryName, TEXT("Custom GPRS") );
BOOL Password = false;
RasGetEntryDialParams( NULL, &RASDialParameters, &Password );
RasDial( NULL, NULL, &RASDialParameters, 0xFFFFFFFF, m_hWnd,
&hRASConnection ) ;
.
- References:
- RAS Entry in C - I really really need help
- From: David Burrows
- RAS Entry in C - I really really need help
- Prev by Date: Re: crak for activesync 4 to allow desktoptodevice and devicetodes
- Next by Date: Re: ActiveSync 4.1 does not offer DMA connection to emulator
- Previous by thread: RAS Entry in C - I really really need help
- Next by thread: Re: Check Certificate of a File
- Index(es):
Relevant Pages
|