Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

dmprocessconfigxml (aygshell)
 

aygshell is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for dmprocessconfigxml in other DLLs exists, click on Find References to the right.

.
Summary
Send XML to Windows Mobile to provision a device for all kinds of different aspects of configuration.

C# Signature:

[DllImport("aygshell.dll", CharSet = CharSet.Unicode)]
static unsafe extern CONFIG_E DMProcessConfigXML(string pszWXMLin, CFGFlags dwFlags, out char * ppszwXMLout);

User-Defined Types:

public enum CFGFlags : uint {
     Process = 0x0001,
     Metadata = 0x0002,
}

public enum CONFIG_E : uint {
     Ok = 0x00000000,
     ObjectBusy = 0x80042001,
     CancelTimeout = 0x80042002,
     EntryNotFound = 0x80042004,
     ProcessingCanceled = 0x00042005,
     CspException = 0x80042007,
     TransactioningFailure = 0x80042008,
     BadXml = 0x80042009,
}

Alternative Managed API:

Microsoft.SmartDevice.Connectivity.Device.ProvisionDevice(string, Device.ConfigActions), although it is a desktop managed method and only works remotely, whereas this P/Invoke can be executed directly on the device.

Notes:

It is very important to properly dispose of the char* buffer that is created by this call. See the sample code for a wrapper method that can make this easy.

Andrew Arnott has an MSDN blog tag that discusses various aspects of provisioning devices: http://blogs.msdn.com/andrewarnottms/archive/tags/provisioning/default.aspx

Sample Code:

[DllImport("coredll.dll", EntryPoint = "??_V@YAXPAXABUnothrow_t@std@@@Z")] static extern void DeleteArray(IntPtr ptr, IntPtr junk); public static CONFIG_E DMProcessConfigXML(      string xml, CFGFlags flags, out string resultXml) {      CONFIG_E result;      unsafe {      char* xmlOutPointer;      result = DMProcessConfigXML(xml, flags, out xmlOutPointer);      resultXml = new string(xmlOutPointer);      DeleteArray((IntPtr)xmlOutPointer, IntPtr.Zero);      }      return result; } Documentation: DMProcessConfigXML@msdn on MSDN

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions