Exemplo n.º 1
0
 public static extern uint WlanSetProfileEapXmlUserData(
     SafeClientHandle hClientHandle,
     [MarshalAs(UnmanagedType.LPStruct)] Guid pInterfaceGuid,
     [MarshalAs(UnmanagedType.LPWStr)] string strProfileName,
     SetEapUserDataMode dwFlags,
     [MarshalAs(UnmanagedType.LPWStr)] string strUserDataXML,
     IntPtr pReserved);
Exemplo n.º 2
0
 public static extern int WlanSetProfileEapXmlUserData(
     [In] IntPtr clientHandle,                                                   // The client's session handle, obtained by a previous call to the WlanOpenHandle function.
     [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,                 // The GUID of the interface.
     [In, MarshalAs(UnmanagedType.LPWStr)] string profileName,                   // The name of the profile associated with the EAP user data. Profile names are case-sensitive. This string must be NULL-terminated.
     [In] SetEapUserDataMode dwFlags,                                            // A set of flags that modify the behavior of the function.
     [In, MarshalAs(UnmanagedType.LPWStr)] string userDataXML,                   // A pointer to XML data used to set the user credentials, The XML data must be based on the EAPHost User Credentials schema. To view sample user credential XML data, see EAPHost User Properties: http://msdn.microsoft.com/en-us/library/windows/desktop/bb204765(v=vs.85).aspx
     IntPtr reservedPtr
     );
Exemplo n.º 3
0
        public static bool SetProfileEapXmlUserData(SafeClientHandle clientHandle, Guid interfaceId, string profileName, SetEapUserDataMode eapUserDataModeFlag, string userDataXML)
        {
            var result = WlanSetProfileEapXmlUserData(
                clientHandle,
                interfaceId,
                profileName,
                eapUserDataModeFlag,
                userDataXML,
                IntPtr.Zero);

            //ERROR_ACCESS_DENIED Access is denied.
            //ERROR_BAD_PROFILE The network connection profile is corrupted.
            //ERROR_INVALID_PARAMETER A parameter is incorrect.
            //ERROR_INVALID_HANDLE A handle is invalid.
            //ERROR_NOT_ENOUGH_MEMORY Not enough storage is available to process this command.
            //ERROR_NOT_SUPPORTED The request is not supported.
            //ERROR_SERVICE_NOT_ACTIVE The service has not been started.
            //RPC_STATUS Various error codes.
            return(CheckResult(nameof(WlanSetProfileEapXmlUserData), result, false));
        }