cindy
cindy

Reputation: 213

How to disconnect the connection with Connection Manager in WEC7

I'm developing an application that shows available wifi network and allow to connect/disconnection on windows compact 7(x86).

I need to use the Connection Manager APIs because it includes Connection Manager in the OS design.

I can add a connection config with CmAddConnectionConfig and connect with CmAcquireConnection successfully. But I did not find a function which can disconnect the target connection. I've tried the function CmReleaseConnection, but it always returns CMRE_INVALID_CONNECTION.

There is limited information about Connection Manager in Internet and I found somebody met the same problem.

I'm working on it for about three days. It would be appreciated if you can help me to solve it or give me some suggestions.

Upvotes: 2

Views: 397

Answers (1)

cindy
cindy

Reputation: 213

As CmReleaseConnection cannot work as expected, I will use CmDeleteConnectionConfig for deleting and then create another network profile without doing the connection. I found this solution from MSDN.

Upvotes: 1

Related Questions