![]() WPD_OBJECT_CAN_DELETE.fmtid = new Guid(0圎F6B490D, 0x5CD8, 0x437A, 0xAF, 0xFC, 0xDA, 0x8B, 0圆0, 0圎E, 0x4A, 0x3C) ĭeviceValues.SetBoolValue(ref WPD_OBJECT_CAN_DELETE, Convert.ToInt32(NewFolderProperties.WPD_OBJECT_CANNOT_DELETE)) Ĭontent.CreateObjectWithPropertiesOnly(DeviceValues, NewFolderProperties.I have this same problem also, with the only difference being that mine is a 16GB Cruzer Glide. Var WPD_OBJECT_CAN_DELETE = new _tagpropertykey() If (NewFolderProperties.WPD_OBJECT_CANNOT_DELETE = true) WPD_OBJECT_KEYWORDS.fmtid = new Guid(0圎F6B490D, 0x5CD8, 0x437A, 0xAF, 0xFC, 0xDA, 0x8B, 0圆0, 0圎E, 0x4A, 0x3C) ĭeviceValues.SetStringValue(ref WPD_OBJECT_KEYWORDS, NewFolderProperties.WPD_OBJECT_KEYWORDS) Var WPD_OBJECT_KEYWORDS = new _tagpropertykey() If (NewFolderProperties.WPD_OBJECT_KEYWORDS.Length > 0) WPD_OBJECT_ISSYSTEM.fmtid = new Guid(0圎F6B490D, 0x5CD8, 0x437A, 0xAF, 0xFC, 0xDA, 0x8B, 0圆0, 0圎E, 0x4A, 0x3C) ĭeviceValues.SetBoolValue(ref WPD_OBJECT_ISSYSTEM, Convert.ToInt32(NewFolderProperties.WPD_OBJECT_ISSYSTEM)) Var WPD_OBJECT_ISSYSTEM = new _tagpropertykey() If (NewFolderProperties.WPD_OBJECT_ISSYSTEM = true) WPD_OBJECT_ISHIDDEN.fmtid = new Guid(0圎F6B490D, 0x5CD8, 0x437A, 0xAF, 0xFC, 0xDA, 0x8B, 0圆0, 0圎E, 0x4A, 0x3C) ĭeviceValues.SetBoolValue(ref WPD_OBJECT_ISHIDDEN, Convert.ToInt32(NewFolderProperties.WPD_OBJECT_ISHIDDEN)) Var WPD_OBJECT_ISHIDDEN = new _tagpropertykey() If (NewFolderProperties.WPD_OBJECT_ISHIDDEN = true) WPD_OBJECT_CONTENT_TYPE.fmtid = new Guid(0圎F6B490D, 0x5CD8, 0x437A, 0xAF, 0xFC, 0xDA, 0x8B, 0圆0, 0圎E, 0x4A, 0x3C) ĭeviceValues.SetGuidValue(ref WPD_OBJECT_CONTENT_TYPE, WPD_CONTENT_TYPE_ALL) Var WPD_OBJECT_CONTENT_TYPE = new _tagpropertykey() WPD_OBJECT_FORMAT.fmtid = new Guid(0圎F6B490D, 0x5CD8, 0x437A, 0xAF, 0xFC, 0xDA, 0x8B, 0圆0, 0圎E, 0x4A, 0x3C) ĭeviceValues.SetGuidValue(WPD_OBJECT_FORMAT, WPD_OBJECT_FORMAT_ALL) Var WPD_OBJECT_FORMAT = new _tagpropertykey() WPD_OBJECT_NAME.fmtid = new Guid(0圎F6B490D, 0x5CD8, 0x437A, 0xAF, 0xFC, 0xDA, 0x8B, 0圆0, 0圎E, 0x4A, 0x3C) ĭeviceValues.SetStringValue(ref WPD_OBJECT_NAME, NewFolderProperties.WPD_OBJECT_NAME) Var WPD_OBJECT_NAME = new _tagpropertykey() This._device.SendCommand(0, DeviceValues, out ResultValues) WPD_OBJECT_PARENT_ID.fmtid = new Guid(0x7E9A7ABF, 0圎568, 0x4B34, 0xAA, 0x2F, 0x13, 0xBB, 0x12, 0xAB, 0x17, 0x7D) ĭeviceValues.SetStringValue(ref WPD_OBJECT_PARENT_ID, NewFolderProperties.WPD_OBJECT_PARENT_ID) Var WPD_OBJECT_PARENT_ID = new _tagpropertykey() Guid WPD_CONTENT_TYPE_FOLDER = Guid.Empty PortableDeviceApiLib.IPortableDeviceValues ResultValues = (PortableDeviceApiLib.IPortableDeviceValues)new PortableDeviceTypesLib.PortableDeviceValuesClass() PortableDeviceApiLib.IPortableDeviceValues DeviceValues = Internal void CreateFolder(CSBNewGPSFolder NewFolderProperties) ![]() ![]() Here is my code. CSBNewGPSFolder contains the new folder name, parentID, etc.Īny suggestions would be greatly appreciated. I am not sure if it is telling me it cannot find an element it is expecting or that one of the elements I have defined it cannot find. (Exception from HRESULT: 0x80070490)"} System.Exception " I may be barking up the wrong tree, but I am trying to use CreateObjectWithPropertiesOnly method.Īfter I connect to the device, I run the code below. pretty much most of what I need to do but make folders. I can connect to the device, enumerate the files and folders, read files, write files, pull properties of objects. I am building an app that accesses a WPD device, specifically a GPS device.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |