CmAcquireConnection(hConnection) to connect to wifi network returns CMRE_CONNECTION_ACQUIRE_FAILED RRS feed

  • Question

  • Problem Statement :

    I have a use case wherein the user can export the wifi network settings on the windows CE device and import the settings on the another wince device.

    My windows CE7 device is connected to a WPA2 Personal network.The connection Manager API CmGetConnectionConfig returns the profile XML string .This string has the passphrase which is in protected format.

    <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">

    Now if I am using the above WiFi profile xml as is to connect to the personal network in the Device 2  using CmAddConnectionConfig, followed by CmAcquireConnection, the CmAcquireConnection returns the error code CMRE_CONNECTION_ACQUIRE_FAILED. However I noticed that If I attempt to the same network in second device by replacing the protected value to false and the keymaterial with the original passphrase , it works fine. Please let me know how do I resolve this issue . 

    Is it possible that I can decrypt the key material using Cryptographic API's by executing the logic in first device.


    Thursday, August 23, 2018 2:26 PM


  • Found the solution. The keymaterial has to be decrypted using UnProtectKeyMaterial to make it work on the other device.
    • Marked as answer by RachanaSingh Tuesday, September 4, 2018 7:03 AM
    Tuesday, September 4, 2018 7:03 AM