Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / June 2004

Tip: Looking for answers? Try searching our database.

GPRS connection, RAS entry structure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Francesco - 10 Jun 2004 11:42 GMT
Hi everybody,
I need to create via code a gprs connection.
I have no problem to Ras.dial a gprs connection created via pocket pc
user interface, but I can't understand which parameters I got to
specify on the RasSetEntryProperties function.
On the user interface, I specify the following additional AT commands:
+cgdcont=1,"IP","web.omnitel.it"

where do I have to specify this on the rasEntry structure????
Thanks for your help

I post here the eVC function I use to create the connection

COMM_API int CreateRasConnection(wchar_t *entryName,wchar_t
*modem,wchar_t *phoneNumber,wchar_t *userName,wchar_t *password)
{
    DWORD dwOutcome;
    RASENTRY RasEntry;
    RASDIALPARAMS RasDialParams;

    // Initialize the RASENTRY structure.
    memset (&RasEntry, 0, sizeof (RASENTRY));

    RasEntry.dwSize = sizeof (RASENTRY);

    // Retrieve the entry properties.
   dwOutcome = RasGetEntryProperties (    NULL,
                                        TEXT(""),      
                                        &RasEntry,
                                        &RasEntry.dwSize,
                                        NULL,
                                        NULL);
    if (dwOutcome) return dwOutcome;

    // Fill the RASENTRY structure.
    RasEntry.dwfOptions = RASEO_IpHeaderCompression +
RASEO_SwCompression;
    wcscpy (RasEntry.szDeviceType, RASDT_Modem);
    wcscpy (RasEntry.szDeviceName, modem);
    wcscpy (RasEntry.szLocalPhoneNumber, phoneNumber);
    RasEntry.dwFramingProtocol = RASFP_Ppp;
    RasEntry.dwfNetProtocols = RASNP_Ip;

    // Create a new phone-book entry.
    dwOutcome = RasSetEntryProperties (    NULL,
                                        entryName,
                                        &RasEntry,
                                        RasEntry.dwSize,
                                        NULL,
                                        0);
    if (dwOutcome) return dwOutcome;

    // Initialize the RASDIALPARAMS structure.
    memset (&RasDialParams, 0, sizeof (RASDIALPARAMS));
   
    // Configure the RASDIALPARAMS structure.
    RasDialParams.dwSize = sizeof (RASDIALPARAMS);
    wcscpy (RasDialParams.szEntryName, entryName);
    wcscpy (RasDialParams.szPhoneNumber, phoneNumber);
    wcscpy (RasDialParams.szUserName, userName);
    wcscpy (RasDialParams.szPassword, password);

    dwOutcome = RasSetEntryDialParams(    NULL,
                                        &RasDialParams,
                                        FALSE);

    return dwOutcome;
}
Alex Yakhnin [MVP] - 10 Jun 2004 16:42 GMT
These are "extra-dial" string command that could be set in the registry.
Take a look at this thread:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&threadm=O1vgRw2CEHA.
3408%40tk2msftngp13.phx.gbl&rnum=2&prev=/groups%3Fq%3Dextra%2Bdial-string%2Bmode
m%2Bregistry%26hl%3Den%26lr%3D%26ie%3DUTF-8%26c2coff%3D1%26selm%3DO1vgRw2CEHA.34
08%2540tk2msftngp13.phx.gbl%26rnum%3D2


--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org

> Hi everybody,
> I need to create via code a gprs connection.
[quoted text clipped - 64 lines]
> return dwOutcome;
> }

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.