如何使用 DMProcessConfigXML 来配置我的 Windows Mobile 设备? [英] How do I use DMProcessConfigXML to provision my Windows Mobile device?
问题描述
我想创建一个 C# 程序来配置 Windows Mobile 设备.我在名为 DMProcessConfigXML 的函数上找到了 MSDN 文档,但没有说明关于如何使用此功能.
I want to create a C# program to provision Windows Mobile devices. I have found MSDN documentation on a function called DMProcessConfigXML, but no instructions on how to use this function.
如何在我的 Windows Mobile 应用程序中使用此功能?我怀疑这与使用 pinvoke 有关.
How can I use this function in my Windows Mobile app? I suspect it has something to do with using pinvoke.
谢谢,
保罗
推荐答案
从托管代码中,您可以调用 Microsoft.WindowsMobile.Configuration 中的 ConfigurationManager.ProcessConfiguration命名空间.msdn这是示例代码:
From managed code, you can call ConfigurationManager.ProcessConfiguration found in the Microsoft.WindowsMobile.Configuration namespace. msdn Here is sample code:
XmlDocument configDoc = new XmlDocument();
configDoc.LoadXml(
"<wap-provisioningdoc>"+
"<characteristic type=\"BrowserFavorite\">"+
"<characteristic type=\"Microsoft\">"+
"<parm name=\"URL\" value=\"http://www.microsoft.com\"/>"+
"</characteristic>"+
"</characteristic>"+
"</wap-provisioningdoc>"
);
ConfigurationManager.ProcessConfiguration(configDoc, false);
无需 P/Invoke.
No need to P/Invoke.
这篇关于如何使用 DMProcessConfigXML 来配置我的 Windows Mobile 设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!