WlanSetProfilePosition (Compact 2013)
3/26/2014
This function sets the position of a single, designated profile in the preference list.
Syntax
DWORD WINAPI WlanSetProfilePosition(
__in HANDLE hClientHandle,
__in CONST GUID* pInterfaceGuid,
__in LPCWSTR strProfileName,
__in DWORD dwPosition,
__reserved PVOID pReserved
);
Parameters
- hClientHandle
[in] Handle to the session on the client. To obtain a handle, call the WlanOpenHandle function.
- pInterfaceGuid
[in] GUID of the interface.
- strProfileName
[in] Name of the profile. Profile names are case sensitive and the string must be NULL terminated.
- dwPosition
[in] Position in the preference list to which the profile should be shifted. Zero corresponds to the first profile in the list that is returned by the WlanGetProfileList function.
- pReserved
Reserved; set to NULL.
Return Values
Value |
Description |
---|---|
ERROR_SUCCESS |
The function succeeds. |
ERROR_ACCESS_DENIED |
You included Connection Manager in your OS. The caller does not have sufficient permissions to change the profile position. |
ERROR_INVALID_PARAMETER |
hClientHandle is NULL or invalid, pInterfaceGuid is NULL, strProfileName is NULL, or pReserved is not NULL. |
ERROR_INVALID_HANDLE |
The handle hClientHandle was not found in the handle table. |
RPC_STATUS |
Can be any remote procedure call (RPC) error code. The RPC call may be unsuccessful due to Wlan RPC server issues, such as when the RPC server is not started. Refer to RPC for more information. |
Remarks
If you include Connection Manager in your OS design:
- You must handle Wi-Fi connection operations using Connection Manager APIs such as CmAcquireConnection, CmAddConnectionConfig, or CmReleaseConnection.
- Otherwise, if you use this API, it returns ERROR_ACCESS_DENIED.
See Also
Reference
Native Wi-Fi Functions
WlanOpenHandle
WlanGetProfileList
Native Wi-Fi Reference