Advertisement
Combreal

IPropertyStore01.cpp

Mar 8th, 2023
747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | Source Code | 0 0
  1. #include <shobjidl.h>
  2. #include <propkey.h>
  3. #include <propvarutil.h>
  4.  
  5. //Tying around IPropertyStore, change an mp3 file property
  6.  
  7. void main()
  8. {
  9.     CoInitialize(NULL);
  10.     IPropertyStore* store = NULL;
  11.     SHGetPropertyStoreFromParsingName(L"C:\\Temp\\tests\\judas-priest-firepower.mp3", NULL, GPS_READWRITE, __uuidof(IPropertyStore), (void**)&store);
  12.     PROPVARIANT variant;
  13.     store->GetValue(PKEY_Music_AlbumArtist, &variant);
  14.     InitPropVariantFromString(L"Tata Monique", &variant);
  15.     store->SetValue(PKEY_Music_AlbumArtist, variant);
  16.     store->Commit();
  17.     store->Release();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement