locked
RAS connection in windows xp RRS feed

  • Question

  • Hi,

    I have developed a project in C#, which involves a GPRS connection in compact framework. In order to create this GPRS connection I have used the OpenNetCf component "ConnectionManager".

    Now, I would like to develop the same project for Windows XP. I mean, I want to create a GPRS connection in WIndows XP and using the C# language. How can I achieve this?

    I have read something about RAS connection operations...but those components are written in C++ :S.

    Also, maybe:http://dotras.codeplex.com could help me....

    I don´t know what to do.

    Thanks.
    Wednesday, June 3, 2009 9:08 AM

Answers

  • I'm resurecting this thread to post a better answer in case it is helpful for someone else. 

    As you found out, XP does not have the connection manager that is present in WINCE.   best way I found was to use the RAS API directly.  You won't be able to call ras functions directly from .NET, however.  For this you can marshal the parameters down to the native layer.  I never made marshalling the complex RAS data structures work well enough - I'm not an expert in this domain.  To prevent the need to figure this out, I wrote a little DLL wrapper to do the native calls which greatly simplified the communications interface from C#.

    Larry Harris

    • Proposed as answer by Lawrence S Harris Thursday, February 16, 2012 8:55 PM
    • Marked as answer by lopezavila69 Tuesday, February 21, 2012 6:18 PM
    Thursday, February 16, 2012 8:55 PM

All replies

  • See if this thread helps: How to open/close GPRS connect?

    GL HTH

    William Wegerson (www.OmegaCoder.Com)
    • Proposed as answer by Harry Zhu Tuesday, June 9, 2009 4:14 AM
    • Marked as answer by Harry Zhu Wednesday, June 10, 2009 4:24 AM
    • Marked as answer by Harry Zhu Wednesday, June 10, 2009 4:24 AM
    • Unmarked as answer by OmegaMan Wednesday, June 10, 2009 9:18 AM
    • Unproposed as answer by lopezavila69 Monday, July 13, 2009 10:13 AM
    Thursday, June 4, 2009 3:39 PM
  • As I commented in the first post I have already used ConnectionManager to open a GPRS connection in compact Framework and it works even using the Microsoft Device Emulator.

    However, I need to do the same in Windows XP. I´m afraid ConnectionManager doesn´t work in this platform so...how can I start a GPRS connection in Windows XP??

    Thanks in advance.
    Wednesday, June 10, 2009 6:26 AM
  • I'm resurecting this thread to post a better answer in case it is helpful for someone else. 

    As you found out, XP does not have the connection manager that is present in WINCE.   best way I found was to use the RAS API directly.  You won't be able to call ras functions directly from .NET, however.  For this you can marshal the parameters down to the native layer.  I never made marshalling the complex RAS data structures work well enough - I'm not an expert in this domain.  To prevent the need to figure this out, I wrote a little DLL wrapper to do the native calls which greatly simplified the communications interface from C#.

    Larry Harris

    • Proposed as answer by Lawrence S Harris Thursday, February 16, 2012 8:55 PM
    • Marked as answer by lopezavila69 Tuesday, February 21, 2012 6:18 PM
    Thursday, February 16, 2012 8:55 PM