IProvisioningProfileWireless (C#)

Discussion in 'Wireless Networking' started by pdbogen@gmail.com, Sep 4, 2007.

  1. Guest

    I'm trying to write a small C# app that will take an XML WPS schema
    and add it to any/all wireless interfaces on the system. I'm doing
    this by looping through NetworkInterface.GetAllNetworkInterfaces(),
    and plugging each guid in turn into a CreateProfile() call. Using the
    example WPA schema, I'm getting a status code 33 along with a 'could
    not be found . (Exception from HRESULT: 0x80030002
    (STG_E_FILENOTFOUND))' exception, and I don't really have any idea
    what's causing it.

    Any input would be appreciated it. The relevent portion of code is

    public uint ImportProfile( string fileName ) {
    StreamReader xmlFile = File.OpenText( fileName );
    string xml;
    uint status = 0;
    xml = xmlFile.ReadToEnd( );
    IProvisioningProfileWireless ippw = new
    NetProvisioningClass( );
    foreach ( NetworkInterface netInt in
    NetworkInterface.GetAllNetworkInterfaces( ) ) {
    System.Guid guid = new Guid( netInt.Id );
    try {
    ippw.CreateProfile( xml.ToString( ), null, ref
    guid, out status );
    } catch ( Exception x ) {
    throw (new Exception( "Error Code " +
    status.ToString( ) + "\n" + x.Message, x ));
    return status;
    , Sep 4, 2007
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Barbara Nelson

    iProvisioningProfileWireless sample code?

    Barbara Nelson, Aug 10, 2005, in forum: Wireless Networking
    Barbara Nelson
    Aug 10, 2005
  2. =?Utf-8?B?UGV0ZQ==?=

    IProvisioningProfileWireless CreateProfile

    =?Utf-8?B?UGV0ZQ==?=, Feb 1, 2006, in forum: Wireless Networking
    Feb 1, 2006

Share This Page