如何在启动时设置到Windows Mobile 6.1的无线点对点网络?我认为唯一的方法是通过编程来实现,但我一直无法找到创建网络的方法,我已经找到了OpenNetCF,但是在.NET CF中有没有办法做到这一点呢?或者如何在OpenNetCF中做到这一点?
我需要这样做,这样我才能进行套接字通信。
发布于 2013-01-18 21:58:09
Ad-hoc的另一个名字是“非基础架构模式”,所以如果你看一些the example service code that I have here,你会看到一个私有方法,看起来像这样:
private bool ConnectToNetwork(
string ssid,
string passphrase,
bool adhoc,
AuthenticationMode mode,
WEPStatus encryption)
{
// other setup code, etc
return m_wzc.AddPreferredNetwork(ssid,
!adhoc,
passphrase,
1,
mode,
encryption,
eap);
}您只需添加另一个公共方法,该方法调用ConnectToNetwork并将其设置为true (服务中的每个方法现在都传递false,因为我在编写代码时没有将即席作为要求)。
https://stackoverflow.com/questions/14384702
复制相似问题