public int GetAt(uint iProp, out PROPERTYKEY pkey) { System.Windows.Forms.MessageBox.Show(iProp.ToString()); pkey = new PROPERTYKEY(); pkey.fmtid = PKEY_Title; pkey.pid = (UIntPtr)0x2; return(S_OK); }
public int GetValue(ref PROPERTYKEY key, out PropVariant pv) { System.Windows.Forms.MessageBox.Show(key.fmtid.ToString()); pv = new PropVariant(); if (key.fmtid == PKEY_Title) { pv.variantType = 31; pv.pointerValue = Marshal.StringToHGlobalUni("Test"); return(S_OK); } else { pv.variantType = 0; //VT_EMPTY pv.pointerValue = IntPtr.Zero; return(S_OK); } }
public int IsPropertyWritable(ref PROPERTYKEY key) { //System.Windows.Forms.MessageBox.Show("Writable"); return(S_OK); }
public int SetValue(ref PROPERTYKEY key, ref object pv) { return(S_OK); }