diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/Portable/pmp_p4s | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Plugins/Portable/pmp_p4s')
26 files changed, 15599 insertions, 0 deletions
diff --git a/Src/Plugins/Portable/pmp_p4s/Cert.zip b/Src/Plugins/Portable/pmp_p4s/Cert.zip Binary files differnew file mode 100644 index 00000000..6c36c3bc --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/Cert.zip diff --git a/Src/Plugins/Portable/pmp_p4s/MTP Error Codes.txt b/Src/Plugins/Portable/pmp_p4s/MTP Error Codes.txt new file mode 100644 index 00000000..66de9592 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/MTP Error Codes.txt @@ -0,0 +1,41 @@ +
+80004004 Operation aborted.
+80004005 Unspecified error.
+80004002 Interface not supported.
+80004001 Not implemented.
+80004003 Invalid pointer.
+8000FFFF Catastrophic failure.
+
+80070001 INVALID_FUNCTION
+80070002 FILE_NOT_FOUND
+80070003 PATH_NOT_FOUND
+80070004 TOO_MANY_OPEN_FILES
+80070005 ACCESS_DENIED
+80070006 INVALID_HANDLE
+80070007 ARENA_TRASHED
+80070008 NOT_ENOUGH_MEMORY
+8007000d INVALID_DATA
+80070015 ERROR_NOT_READY
+80070057 INVALIDARG
+
+80045000 BUSY
+80045001 INTERFACEDEAD
+80045002 INVALIDTYPE
+80045003 PROCESSFAILED
+80045004 NOTSUPPORTED
+80045005 NOTCERTIFIED
+80045006 NORIGHTS
+80045007 CALL_OUT_OF_SEQUENCE
+80045008 BUFFERTOOSMALL
+80045009 MOREDATA
+8004500A MAC_CHECK_FAILED
+8004500B USER_CANCELLED
+8004500C SDMI_TRIGGER
+8004500D SDMI_NOMORECOPIES
+8004500E REVOKED
+8004500F LICENSE_NOTEXIST
+80045010 INCORRECT_APPSEC
+80045011 INCORRECT_RIGHTS
+80045012 LICENSE_EXPIRED
+80045013 CANTOPEN_PMSN_SERVICE_PIPE
+80045013 TOO_MANY_SESSIONS
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/MyProgress.cpp b/Src/Plugins/Portable/pmp_p4s/MyProgress.cpp new file mode 100644 index 00000000..0f3772e0 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/MyProgress.cpp @@ -0,0 +1,95 @@ +#include "MyProgress.h" + +extern LPARAM ipc_transfer; + +MyProgress::MyProgress(TransferItem *_t) +: t(_t), refcount(1), estTicks(0) +{ +} + +MyProgress::~MyProgress() {} + + +HRESULT MyProgress::Begin(DWORD dwEstimatedTicks) +{ + estTicks = dwEstimatedTicks / 100; + return S_OK; +} + +HRESULT MyProgress::Progress(DWORD dwTranspiredTicks) +{ + if (estTicks > 0) { + int pc = dwTranspiredTicks / estTicks; + if(pc > 100) pc = 100; + t->pc = pc; + } + else t->pc = 0; + + wchar_t buf[100] = {0}; + wsprintf(buf,WASABI_API_LNGSTRINGW(IDS_TRANSFERRING_PERCENT), t->pc); + t->callback(t->callbackContext,buf); + + if (*(t->killswitch)) + return WMDM_E_USER_CANCELLED; + + return S_OK; +} + +#define PHASE_START 1 +#define PHASE_INPROGRESS 2 +#define PHASE_FINISH 3 +#define PHASE_DONE 4 +#define PHASE_ERROR 5 + +HRESULT MyProgress::End() +{ + t->phase = PHASE_FINISH; + return S_OK; +} + +#define IMPLEMENTS(ifc) if (riid == IID_ ## ifc) { ++refcount; *ppvObject = static_cast<ifc *>(this); return S_OK; } + +HRESULT MyProgress::QueryInterface(REFIID riid,void __RPC_FAR *__RPC_FAR *ppvObject) +{ + IMPLEMENTS(IUnknown); + IMPLEMENTS(IWMDMProgress); + IMPLEMENTS(IWMDMProgress2); + IMPLEMENTS(IWMDMProgress3); + *ppvObject = NULL; + return E_NOINTERFACE; +} + +ULONG MyProgress::AddRef() +{ + return ++refcount; +} +ULONG MyProgress::Release() +{ + int x = --refcount; + if (x == 0) + delete this; + + return x; +} + +HRESULT MyProgress::End2(HRESULT hrCompletionCode) +{ + return End(); +} + +HRESULT MyProgress::Begin3(GUID EventId,DWORD dwEstimatedTicks,OPAQUECOMMAND* pContext) +{ + return Begin(dwEstimatedTicks); +} + +HRESULT MyProgress::Progress3(GUID EventId,DWORD dwTranspiredTicks,OPAQUECOMMAND* pContext) +{ + return Progress(dwTranspiredTicks); +} + +HRESULT MyProgress::End3(GUID EventId,HRESULT hrCompletionCode,OPAQUECOMMAND* pContext) +{ + return End2( hrCompletionCode); +} + + diff --git a/Src/Plugins/Portable/pmp_p4s/MyProgress.h b/Src/Plugins/Portable/pmp_p4s/MyProgress.h new file mode 100644 index 00000000..967518cb --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/MyProgress.h @@ -0,0 +1,35 @@ +#ifndef NULLSOFT_MYPROGRESSH +#define NULLSOFT_MYPROGRESSH + +#include "P4SDevice.h" + +class MyProgress : public IWMDMProgress3 +{ +public: + MyProgress(TransferItem * t); + virtual ~MyProgress(); + + /* IUnknown methods */ + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid,void __RPC_FAR *__RPC_FAR *ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE Release(); + + /* IWMDMProgress methods */ + virtual HRESULT STDMETHODCALLTYPE Begin(DWORD dwEstimatedTicks); + virtual HRESULT STDMETHODCALLTYPE Progress(DWORD dwTranspiredTicks); + virtual HRESULT STDMETHODCALLTYPE End(); + + /* IWMDMProgress2 methods */ + virtual HRESULT STDMETHODCALLTYPE End2(HRESULT hrCompletionCode); + + /* IWMDMProgress3 methods */ + virtual HRESULT STDMETHODCALLTYPE Begin3(GUID EventId,DWORD dwEstimatedTicks,OPAQUECOMMAND* pContext); + virtual HRESULT STDMETHODCALLTYPE Progress3(GUID EventId,DWORD dwTranspiredTicks,OPAQUECOMMAND* pContext); + virtual HRESULT STDMETHODCALLTYPE End3(GUID EventId,HRESULT hrCompletionCode,OPAQUECOMMAND* pContext); +public: + TransferItem *t; + ULONG refcount; + DWORD estTicks; +}; + +#endif
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/P4SDevice.cpp b/Src/Plugins/Portable/pmp_p4s/P4SDevice.cpp new file mode 100644 index 00000000..ef76577a --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/P4SDevice.cpp @@ -0,0 +1,2185 @@ +#include "P4SDevice.h" +#include <time.h> +#include "msWMDM_i.c" +#include "../nu/AutoWide.h" +#include "../nu/AutoChar.h" +#include "../WAT/wa_logger.h" +#include "MyProgress.h" + +#include "WMDRMDeviceApp_i.c" + +extern C_ItemList devices; +extern HANDLE killEvent; +extern CRITICAL_SECTION csTransfers; + +#define plext L"pla" + +BOOL FormatResProtocol(const wchar_t *resourceName, const wchar_t *resourceType, wchar_t *buffer, size_t bufferMax); + +static BYTE* GetMetadataItem(IWMDMStorage4 * store, const WCHAR * name); +static IWMDMStorage4* GetOrCreateFolder(IWMDMStorage4 * store, wchar_t * name, P4SDevice * dev=NULL, bool album=false, const itemRecordW * item=NULL); + +// from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmdm/htm/wmdm_format_capability.asp +void FreeFormatCapability(WMDM_FORMAT_CAPABILITY formatCap) +{ + // Loop through all configurations. + for (UINT i=0; i < formatCap.nPropConfig; i++) + { + // Loop through all descriptions of a configuration and delete + // the values particular to that description type. + for (UINT j=0; j < formatCap.pConfigs[i].nPropDesc; j++) + { + switch (formatCap.pConfigs[i].pPropDesc[j].ValidValuesForm) + { + case WMDM_ENUM_PROP_VALID_VALUES_ENUM: + for (UINT k=0; k < formatCap.pConfigs[i].pPropDesc[j].ValidValues.EnumeratedValidValues.cEnumValues; k++) + { + PropVariantClear (&(formatCap.pConfigs[i].pPropDesc[j].ValidValues.EnumeratedValidValues.pValues[k])); + } + CoTaskMemFree(formatCap.pConfigs[i].pPropDesc[j].ValidValues.EnumeratedValidValues.pValues); + break; + case WMDM_ENUM_PROP_VALID_VALUES_RANGE: + PropVariantClear (&(formatCap.pConfigs[i].pPropDesc[j].ValidValues.ValidValuesRange.rangeMin)); + PropVariantClear (&(formatCap.pConfigs[i].pPropDesc[j].ValidValues.ValidValuesRange.rangeMax)); + PropVariantClear (&(formatCap.pConfigs[i].pPropDesc[j].ValidValues.ValidValuesRange.rangeStep)); + break; + case WMDM_ENUM_PROP_VALID_VALUES_ANY: + // No dynamically allocated memory for this value. + default: + break; + } + + // Free the memory for the description name. + CoTaskMemFree(formatCap.pConfigs[i].pPropDesc[j].pwszPropName); + } + // Free the memory holding the array of description items for this configuration. + CoTaskMemFree(formatCap.pConfigs[i].pPropDesc); + } + + // Free the memory pointing to the array of configurations. + CoTaskMemFree(formatCap.pConfigs); + formatCap.nPropConfig = 0; +} + +static HRESULT GetFormatCaps(WMDM_FORMATCODE formatCode, IWMDMDevice3* pDevice) +{ + // Get a list of supported configurations for the format. + WMDM_FORMAT_CAPABILITY formatCapList; + HRESULT hr = pDevice->GetFormatCapability(formatCode, &formatCapList); + if (FAILED(hr)) return E_FAIL; + if (formatCapList.nPropConfig == 0) + { + FreeFormatCapability(formatCapList); + return E_FAIL; // operation succeeded, but format not supported. + } + + // TODO: Display the format name. + // Loop through the configurations and examine each one. + for (UINT iConfig = 0; iConfig < formatCapList.nPropConfig; iConfig++) + { + WMDM_PROP_CONFIG formatConfig = formatCapList.pConfigs[iConfig]; + + // Preference level for this configuration (lower number means more preferred). + // TODO: Display the preference level for this format configuration. + + // Loop through all properties for this configuration and get supported + // values for the property. Values can be a single value, a range, + // or a list of enumerated values. + for (UINT iDesc = 0; iDesc < formatConfig.nPropDesc; iDesc++) + { + WMDM_PROP_DESC propDesc = formatConfig.pPropDesc[iDesc]; + // TODO: Display the property name. + + // Three ways a value can be represented: any, a range, or a list. + switch (propDesc.ValidValuesForm) + { + case WMDM_ENUM_PROP_VALID_VALUES_ANY: + // TODO: Display a message indicating that all values are valid. + break; + case WMDM_ENUM_PROP_VALID_VALUES_RANGE: + { + // List these in the docs as the propvariants set. + WMDM_PROP_VALUES_RANGE rng = + propDesc.ValidValues.ValidValuesRange; + // TODO: Display the min, max, and step values. + } + break; + case WMDM_ENUM_PROP_VALID_VALUES_ENUM: + { + // TODO: Display a banner for the list of valid values. + /* + WMDM_PROP_VALUES_ENUM list = propDesc.ValidValues.EnumeratedValidValues; + PROPVARIANT pVal; + for (UINT iValue = 0; iValue < list.cEnumValues; iValue++) + { + pVal = list.pValues[iValue]; + // TODO: Display each valid value. + PropVariantClear(&pVal); + PropVariantInit(&pVal); + }*/ + } + + break; + default: + FreeFormatCapability(formatCapList); + return E_FAIL; + //break; + } + } + } + // Now clear the memory used by WMDM_FORMAT_CAPABILITY. + FreeFormatCapability(formatCapList); + return hr; +} + +static __time64_t wmdmDateTimeToUnixTime(_WMDMDATETIME * t) { + tm m={0}; + m.tm_hour = t->wHour; + m.tm_min = t->wMinute; + m.tm_sec = t->wSecond; + m.tm_mday = t->wDay; + m.tm_mon = t->wMonth; + m.tm_year = t->wYear; + return _mktime64(&m); +} + +HRESULT getMetadata(IWMDMStorage4 *store2,IWMDMMetaData ** meta, bool noMetadata) { + const wchar_t ** propnames = (const wchar_t**)calloc(15,sizeof(void*)); + propnames[0] = g_wszWMDMFormatCode; + propnames[1] = g_wszWMDMTitle; + propnames[2] = g_wszWMDMAuthor; + propnames[3] = g_wszWMDMAlbumTitle; + propnames[4] = g_wszWMDMGenre; + propnames[5] = g_wszWMDMTrack; + propnames[6] = g_wszWMDMYear; + propnames[7] = g_wszWMDMFileSize; + propnames[8] = g_wszWMDMDuration; + propnames[9] = g_wszWMDMPlayCount; + propnames[10] = g_wszWMDMUserRating; + propnames[11] = g_wszWMDMUserLastPlayTime; + propnames[12] = g_wszWMDMLastModifiedDate; + propnames[13] = g_wszWMDMAlbumArtist; + propnames[14] = g_wszWMDMComposer; + HRESULT h; + if(noMetadata) { + h = store2->GetSpecifiedMetadata(1,(LPCWSTR*)propnames,meta); + if(h == WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED) h = S_OK; + if(h != S_OK) { // ugh. Guess that this is an AAC/M4A. Dirty workaround hack! + if (SUCCEEDED(store2->CreateEmptyMetadataObject(meta))) { + h = S_OK; + DWORD type = WMDM_FORMATCODE_UNDEFINEDAUDIO; + (*meta)->AddItem(WMDM_TYPE_DWORD,g_wszWMDMFormatCode,(BYTE*)&type,sizeof(type)); + } + } + } else { + h = store2->GetSpecifiedMetadata(13,(LPCWSTR*)propnames,meta); + if(h == WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED) h = S_OK; + } + free(propnames); + return h; +} + +void P4SDevice::foundSong(IWMDMStorage4 * store, IWMDMMetaData * meta,bool video,int pl,wchar_t * artist, wchar_t * album, IWMDMStorage4 * alb, IWMDMMetaData * albmeta) { + Playlist * pls = (Playlist *)playlists.Get(pl); + Song * song = new Song; + song->video = video; + song->meta = meta; + song->modified = false; + song->storage = store; + song->artist = artist; + song->album = album; + if(alb && albmeta) { + song->alb = alb; + song->albmeta = albmeta; + alb->AddRef(); + albmeta->AddRef(); + } + if(song->artist) song->artist = _wcsdup(song->artist); + if(song->album) song->album = _wcsdup(song->album); + pls->songs.Add(song); + store->AddRef(); + meta->AddRef(); + if(noMetadata || video) { + wchar_t buf[2048]=L""; + getTrackAlbum((songid_t)song,buf,2048); + if(video) meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumTitle,(BYTE*)L"~",4); + else { + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumTitle,(BYTE*)buf,wcslen(buf)*2 + 2); + buf[0]=0; + getTrackArtist((songid_t)song,buf,2048); + } + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAuthor,(BYTE*)buf,wcslen(buf)*2 + 2); + buf[0]=0; + getTrackTitle((songid_t)song,buf,2048); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMTitle,(BYTE*)buf,wcslen(buf)*2 + 2); + int n = getTrackTrackNum((songid_t)song); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMTrack,(BYTE*)&n,sizeof(DWORD)); + __int64 s = (__int64)getTrackSize((songid_t)song); + meta->AddItem(WMDM_TYPE_QWORD,g_wszWMDMFileSize,(BYTE*)&s,sizeof(__int64)); + } +} + +void P4SDevice::foundPlaylist(IWMDMStorage4 * store, IWMDMMetaData * meta) { + DWORD count = 0; + IWMDMStorage ** stores; + wchar_t buf[100] = {0}; + store->GetName(buf,100); + //OutputDebugString(buf); + if(store->GetReferences(&count,&stores) == S_OK) { + if(count > 0) { + Playlist * pl = new Playlist; + StringCchCopy(pl->name, ARRAYSIZE(pl->name), buf); + {wchar_t * ext = wcsrchr(pl->name,L'.'); if(ext) *ext=0;} + pl->storage = store; + pl->meta = meta; + meta->AddRef(); + store->AddRef(); + playlists.Add(pl); + int num = playlists.GetSize()-1; + for(unsigned int i=0; i<count; i++) { + IWMDMStorage4 * song=NULL; + /*{ + wchar_t buf[100] = {0}; + stores[i]->GetName(buf,100); + OutputDebugString(buf); + }*/ + if(stores[i]->QueryInterface(&song) == S_OK) if(song) { + /* + Song * s = new Song; + s->modified=false; + s->storage=song; + HRESULT h = getMetadata(song,&s->meta); + if (SUCCEEDED(h)) pl->songs.Add(s); + else delete s; + */ + //pl->songs.Add(song); + IWMDMMetaData * meta; + if (SUCCEEDED(getMetadata(song,&meta,noMetadata))) { + foundSong(song,meta,false,num); meta->Release(); + } + song->Release(); + } + stores[i]->Release(); + } + } else { + //OutputDebugString(L"ref count zero"); + } + CoTaskMemFree(stores); + } else { + //OutputDebugString(L"can't get playlist refs"); + } +} + +void P4SDevice::traverseStorage(IWMDMStorage * store, int level, wchar_t * artist, wchar_t * album) { + if(!store) return; + IWMDMStorage4 * store2=NULL; + ULONG num; + //OutputDebugStringA("1A"); + C_ItemList storages; + { + IWMDMEnumStorage * enstore=NULL; + IWMDMStorage * storeold=NULL; + HRESULT hr = store->EnumStorage(&enstore); + while(SUCCEEDED(hr)) { + if (WaitForSingleObject(killEvent,0) == WAIT_OBJECT_0) + break; + hr = enstore->Next(1,&storeold,&num); + if(SUCCEEDED(hr) && storeold) { + hr = storeold->QueryInterface(&store2); + storeold->Release(); + if(SUCCEEDED(hr) && store2) { + storages.Add(store2); + } + else break; + } + else break; + } + if(enstore) enstore->Release(); + } + //OutputDebugStringA("2A"); + //while (SUCCEEDED(hr) && enstore) { + IWMDMStorage4 * alb=NULL; + IWMDMMetaData * albmeta=NULL; + + for(int i=0; i<storages.GetSize(); i++) { + wchar_t buf[256]=L""; + store2 = (IWMDMStorage4*)storages.Get(i); + store2->GetName(buf,256); + wchar_t *ext = wcsrchr(buf,L'.'); + if(ext && _wcsicmp(ext,L".alb")==0) { + alb = store2; + alb->AddRef(); + alb->GetMetadata(&albmeta); + break; + } + } + + //albfiles.Add(new AlbFile(store2,meta)); + for(int i=0; i<storages.GetSize(); i++) { + if (WaitForSingleObject(killEvent,0) == WAIT_OBJECT_0) + break; + //OutputDebugStringA("1"); + store2 = (IWMDMStorage4*)storages.Get(i); + + if(store2 == alb) continue; + + wchar_t buf[256]=L""; + //OutputDebugStringA("2"); + store2->GetName(buf,256); + if(playlistsDir == NULL && _wcsicmp(buf,L"My Playlists")==0) { playlistsDir = store2; store2->AddRef(); } + if(playlistsDir == NULL && _wcsicmp(buf,L"Playlists")==0) { playlistsDir = store2; store2->AddRef(); } + + DWORD attribs=NULL; + store2->GetAttributes(&attribs,NULL); + //OutputDebugStringA("3"); + if(attribs & WMDM_FILE_ATTR_FOLDER) { + if(level==0) artist=buf; + else if(level==1) album=buf; + //OutputDebugStringA("5"); + WMDM_STORAGE_ENUM_MODE mode = ENUM_MODE_RAW; + store2->SetEnumPreference(&mode,0,NULL); + traverseStorage(store2,level+1,artist,album); + } else if(attribs & WMDM_FILE_ATTR_FILE || !attribs) { + IWMDMMetaData * meta=NULL; + //OutputDebugStringA("1"); + HRESULT h = getMetadata(store2,&meta,noMetadata); + //OutputDebugStringA("2"); + //OutputDebugStringA("4"); + /*{ + wchar_t buf2[400] = {0}; + wsprintf(buf2,L"name: %s atr: 0x%x, hr: 0x%x %s",buf,attribs,h,h == E_INVALIDARG?L"POOT":L""); + OutputDebugString(buf2); + }*/ + if(meta && h == S_OK) { + wchar_t * name=NULL; + WMDM_TAG_DATATYPE type; + BYTE * value=NULL; + UINT valuelen; + if(meta->QueryByName(g_wszWMDMFormatCode,&type,&value,&valuelen) == S_OK && type == WMDM_TYPE_DWORD) + { + switch(*(DWORD*)value) { // find out what it is... + case WMDM_FORMATCODE_ABSTRACTAUDIOVIDEOPLAYLIST: + case WMDM_FORMATCODE_WPLPLAYLIST: + case WMDM_FORMATCODE_M3UPLAYLIST: + case WMDM_FORMATCODE_MPLPLAYLIST: + case WMDM_FORMATCODE_ASXPLAYLIST: + case WMDM_FORMATCODE_PLSPLAYLIST: + foundPlaylist(store2,meta); + break; + case WMDM_FORMATCODE_ASF: + case WMDM_FORMATCODE_AVI: + case WMDM_FORMATCODE_MPEG: + case WMDM_FORMATCODE_WMV: + case WMDM_FORMATCODE_MP2: + case WMDM_FORMATCODE_3GP: + case WMDM_FORMATCODE_UNDEFINEDVIDEO: + foundSong(store2,meta,true); + break; + case WMDM_FORMATCODE_UNDEFINED: + { //ugh. nokiahack. + wchar_t * ext = wcsrchr(buf,'.'); + if(!ext) break; + if(!_wcsicmp(ext,L".mp4") || !_wcsicmp(ext,L".m4a")) foundSong(store2,meta,false); + } + break; + case WMDM_FORMATCODE_AIFF: + case WMDM_FORMATCODE_WAVE: + case WMDM_FORMATCODE_MP3: + case WMDM_FORMATCODE_WMA: + case WMDM_FORMATCODE_OGG: + case WMDM_FORMATCODE_AAC: + case WMDM_FORMATCODE_MP4: + case WMDM_FORMATCODE_AUDIBLE: + case WMDM_FORMATCODE_FLAC: + case WMDM_FORMATCODE_UNDEFINEDAUDIO: + foundSong(store2,meta,false,0,0,0,alb,albmeta); + break; + } + } else { + wchar_t * ext = wcsrchr(buf,'.'); + if(ext) { + bool m = noMetadata; + noMetadata = true; + if(!_wcsicmp(ext,L".mp3") || !_wcsicmp(ext,L".wma")) foundSong(store2,meta,false,0,artist,album); + else if(!_wcsicmp(ext,L".wmv") || !_wcsicmp(ext,L".avi")) foundSong(store2,meta,true,0,artist,album); + else if(!_wcsicmp(ext,L".asx") || !_wcsicmp(ext,L".pla")) foundPlaylist(store2,meta); + noMetadata = m; + } + } + meta->Release(); + if(name) CoTaskMemFree(name); + if(value) CoTaskMemFree(value); + } + } + if(store2) store2->Release(); + } + + if(alb) alb->Release(); + if(albmeta) albmeta->Release(); +} + +bool P4SDevice::songsEqual(songid_t a, songid_t b) { + wchar_t ba[1024] = {0}; + wchar_t bb[1024] = {0}; + getTrackTitle(a,ba,1024); + getTrackTitle(b,bb,1024); + if(wcscmp(ba,bb)) return false; + getTrackAlbum(a,ba,1024); + getTrackAlbum(b,bb,1024); + if(wcscmp(ba,bb)) return false; + getTrackArtist(a,ba,1024); + getTrackArtist(b,bb,1024); + if(wcscmp(ba,bb)) return false; + return true; +} + +int P4SDevice::songsCmp(songid_t a, songid_t b) { + int q=0; + wchar_t ba[1024] = {0}; + wchar_t bb[1024] = {0}; + getTrackTitle(a,ba,1024); + getTrackTitle(b,bb,1024); + q=wcscmp(ba,bb); if(q) return q; + getTrackAlbum(a,ba,1024); + getTrackAlbum(b,bb,1024); + q=wcscmp(ba,bb); if(q) return q; + getTrackArtist(a,ba,1024); + getTrackArtist(b,bb,1024); + return wcscmp(ba,bb); +} + +P4SDevice * sortDev; + +static int song_sortfunc(const void *elem1, const void *elem2) { + songid_t a = *(songid_t *)elem1; + songid_t b = *(songid_t *)elem2; + return sortDev->songsCmp(a,b); +} + +extern IWMDRMDeviceApp * DRMDeviceApp; + +static songid_t BinaryChopFind(songid_t find,Playlist * mpl, P4SDevice * dev) { + sortDev = dev; + songid_t * ret = (songid_t*)bsearch(&find,mpl->songs.GetAll(),mpl->songs.GetSize(),sizeof(songid_t),song_sortfunc); + return ret?*ret:NULL; +} + +P4SDevice::P4SDevice(IWMDMDevice3* pIDevice, bool noMetadata) : transcoder(NULL) { + error=0; + musicDir = L"Music"; + videoDir = L"Video"; + lastChange=NULL; + this->noMetadata = noMetadata; + if(DRMDeviceApp && DRMDeviceApp->SynchronizeLicenses(pIDevice,NULL,0,0) == S_OK) + { + //OutputDebugString(L"sync!"); + } + playlistsDir=NULL; + transferQueueSize=0; + Playlist * mpl = new Playlist; + playlists.Add(mpl); + + WMDevice = pIDevice; + if (NULL != WMDevice) + { + WMDevice->AddRef(); + if (FAILED(WMDevice->GetName(name,100))) + name[0] = L'\0'; + } + else + name[0] = L'\0'; + + // give loading indication to the user.... + pmpDeviceLoading load; + load.dev = this; + load.UpdateCaption = NULL; + SendMessage(plugin.hwndPortablesParent,WM_PMP_IPC,(intptr_t)&load,PMP_IPC_DEVICELOADING); + if(load.UpdateCaption) { + wchar_t buf[200]=L""; + wsprintf(buf,WASABI_API_LNGSTRINGW(IDS_LOADING),name); + load.UpdateCaption(buf,load.context); + } + Load(); +} + +void P4SDevice::Load() { + Playlist * mpl = (Playlist*)playlists.Get(0); + HRESULT hr; + IWMDMEnumStorage * enstore=0; + IWMDMStorage * store0=0; + IWMDMStorage4 * store=0; + hr = WMDevice->EnumStorage(&enstore); + ULONG num; + if(!enstore) {delete this; return;} + hr = enstore->Next(1,&store0,&num); + if (SUCCEEDED(hr)) hr = store0->QueryInterface(&store); + if(store0) store0->Release(); + else error=1; + if(enstore) enstore->Release(); + else error=1; + if (SUCCEEDED(hr) && !error) { + wchar_t buf[100] = {0}; + store->GetName(buf,100); + mpl->storage = store; + store->AddRef(); + WMDM_STORAGE_ENUM_MODE mode = ENUM_MODE_RAW; + store->SetEnumPreference(&mode,0,NULL); + + //traverseStorage(store); + IWMDMStorage * playlists; + if(store->GetStorage(L"Playlists",&playlists) == S_FALSE) { + if(store->GetStorage(L"My Playlists",&playlists) == S_FALSE) + { + playlists = NULL; + } + } + if(playlists) + { + traverseStorage(playlists); + playlists->QueryInterface(&playlistsDir); + playlists->Release(); + } + + IWMDMStorage * songs = NULL; + if(store->GetStorage(L"Music",&songs) == S_OK) + { + traverseStorage(songs); + songs->Release(); + } + else if(store->GetStorage(L"My Music",&songs) == S_OK) + { + traverseStorage(songs); + songs->Release(); + musicDir = L"My Music"; + } + else if(store->GetStorage(L"Music Files",&songs) == S_OK) + { + traverseStorage(songs); + songs->Release(); + musicDir = L"Music Files"; + } + else { // create a music folder + IWMDMStorageControl3 * storeControl=NULL; + store->QueryInterface(&storeControl); + if(storeControl) { + IWMDMStorage * newdir=NULL; + IWMDMMetaData * meta=NULL; + store->CreateEmptyMetadataObject(&meta); + storeControl->Insert3(WMDM_MODE_BLOCK|WMDM_CONTENT_FOLDER,WMDM_FILE_ATTR_FOLDER,NULL,musicDir,NULL,NULL,meta,NULL,&newdir); + if(newdir) newdir->Release(); + else error=1; + if(meta) meta->Release(); + else error=1; + storeControl->Release(); + } else error=1; + } + + if(store->GetStorage(L"Video",&songs) == S_OK) { traverseStorage(songs); songs->Release(); supportsVideo=true; } + if(store->GetStorage(L"TV",&songs) == S_OK) { traverseStorage(songs); songs->Release(); supportsVideo=true; } + + if(!playlists && !songs) traverseStorage(store); + } + if(!store) error=1; + if(error) {delete this; return;} + if(!playlistsDir) playlistsDir = GetOrCreateFolder(store,L"Playlists"); + if(!playlistsDir) {delete this; return;}//MessageBox(plugin.hwndWinampParent,L"An error has occured whilst trying to initialise the playlists on your device.\nPlaylists will not work correctly.",L"Playlists Error",0); + + sortDev = this; + qsort(mpl->songs.GetAll(),mpl->songs.GetSize(),sizeof(void*),song_sortfunc); + + // Now to recombobulate the playlists (this SUCKS slightly less now) + for(int i=1; i<playlists.GetSize(); i++) { + Playlist * pl = (Playlist *)playlists.Get(i); + int l = pl->songs.GetSize(); + for(int j=0; j<l; j++) { + songid_t plsong = (songid_t)pl->songs.Get(j); + songid_t mplsong = BinaryChopFind(plsong,mpl,this); + if(mplsong) pl->songs.Set(j,(void*)mplsong); + else { pl->songs.Del(j--); l--; } + + Song * p = (Song *)plsong; + p->meta->Release(); + p->storage->Release(); + delete p; + } + } + + requiresALB=false; + { // check for .alb support + WMDM_FORMAT_CAPABILITY formatCapList; + HRESULT hr = WMDevice->GetFormatCapability(WMDM_FORMATCODE_ABSTRACTAUDIOALBUM, &formatCapList); + bool size=false,data=false,format=false; + if(!FAILED(hr)) { + for(unsigned int i=0; i<formatCapList.nPropConfig; i++) { + WMDM_PROP_CONFIG formatConfig = formatCapList.pConfigs[i]; + for(unsigned int j=0; j<formatConfig.nPropDesc; j++) { + if(!formatConfig.pPropDesc[j].pwszPropName) continue; + if(wcscmp(formatConfig.pPropDesc[j].pwszPropName,g_wszWMDMAlbumCoverSize)==0) size=true; + else if(wcscmp(formatConfig.pPropDesc[j].pwszPropName,g_wszWMDMAlbumCoverData)==0) data=true; + else if(wcscmp(formatConfig.pPropDesc[j].pwszPropName,g_wszWMDMAlbumCoverFormat)==0) format=true; + } + } + } + if(size && data && format) requiresALB=true; + FreeFormatCapability(formatCapList); + } + + devices.Add(this); + SendMessage(plugin.hwndPortablesParent,WM_PMP_IPC,(intptr_t)this,PMP_IPC_DEVICECONNECTED); + + //transcoder = NULL; + transcoder = (Transcoder*)SendMessage(plugin.hwndPortablesParent,WM_PMP_IPC,(WPARAM)this,PMP_IPC_GET_TRANSCODER); + if(transcoder) { + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_MP3,WMDevice))) + transcoder->AddAcceptableFormat(L"mp3"); + //transcoder->AddAcceptableFormat(L"wav"); + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_WMA,WMDevice))) + transcoder->AddAcceptableFormat(L"wma"); + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_ASF,WMDevice))) + transcoder->AddAcceptableFormat(L"asf"); + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_AVI,WMDevice))) + transcoder->AddAcceptableFormat(L"avi"); + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_OGG,WMDevice))) + transcoder->AddAcceptableFormat(L"ogg"); + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_FLAC,WMDevice))) + transcoder->AddAcceptableFormat(L"flac"); + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_AUDIBLE,WMDevice))) + transcoder->AddAcceptableFormat(L"aa"); + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_MPEG,WMDevice))) { + transcoder->AddAcceptableFormat(L"mpeg"); + transcoder->AddAcceptableFormat(L"mpg"); + } + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_WMV,WMDevice))) + transcoder->AddAcceptableFormat(L"wmv"); + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_3GP,WMDevice))) + transcoder->AddAcceptableFormat(L"3gp"); + if(SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_MP4,WMDevice))) { + transcoder->AddAcceptableFormat(L"mp4"); + transcoder->AddAcceptableFormat(L"m4a"); + } + if(noMetadata || SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_AAC,WMDevice))) { + transcoder->AddAcceptableFormat(L"m4a"); + transcoder->AddAcceptableFormat(L"mp4"); + transcoder->AddAcceptableFormat(L"aac"); + } + } +} + +static void commitPlaylist(Playlist * pl) { + int l = pl->songs.GetSize(); + IWMDMStorage ** newOrder = (IWMDMStorage **)calloc(l, sizeof(IWMDMStorage *)); + for(int j=0; j<l; j++) ((Song *)pl->songs.Get(j))->storage->QueryInterface(&newOrder[j]); + pl->storage->SetReferences(l, newOrder); + for(int i=0; i<l; i++) newOrder[i]->Release(); + free(newOrder); + pl->modified = false; +} + +P4SDevice::~P4SDevice() { + SendMessage(plugin.hwndPortablesParent,WM_PMP_IPC,(intptr_t)this,PMP_IPC_DEVICEDISCONNECTED); + if(playlistsDir) playlistsDir->Release(); + for(int i=1; i<playlists.GetSize(); i++) { + Playlist * pl = (Playlist*)playlists.Get(i); + if(pl->modified) commitPlaylist(pl); + pl->storage->Release(); + pl->meta->Release(); + } + if(playlists.GetSize()) { + Playlist * pl = (Playlist*)playlists.Get(0); + pl->storage->Release(); + for(int j=0; j < pl->songs.GetSize(); j++) { + Song * s = (Song *)pl->songs.Get(j); + if (s) + { + if(s->modified) s->storage->SetMetadata(s->meta); + s->meta->Release(); + s->storage->Release(); + delete s; + } + } + } + + for(int i=0; i<devices.GetSize(); i++) { + if(devices.Get(i) == (void*)this) { + devices.Del(i); + return; + } + } + WMDevice->Release(); + if(transcoder) SendMessage(plugin.hwndPortablesParent,WM_PMP_IPC,(WPARAM)transcoder,PMP_IPC_RELEASE_TRANSCODER); +} + + void P4SDevice::Close() + { + delete this; + } + +__int64 P4SDevice::getDeviceCapacityAvailable() { + static __int64 prev; + IWMDMStorageGlobals * sg = NULL; + if(!playlistsDir) return 0; + playlistsDir->GetStorageGlobals(&sg); + if(sg) { + ULARGE_INTEGER s; + sg->GetTotalFree(&s.LowPart,&s.HighPart); + sg->Release(); + if(s.LowPart == 0 && s.HighPart == 0) return prev; + return prev = s.QuadPart; + } + return prev; +} + +__int64 P4SDevice::getDeviceCapacityTotal() { + static __int64 prev; + IWMDMStorageGlobals * sg = NULL; + if(!playlistsDir) return 0; + playlistsDir->GetStorageGlobals(&sg); + if(sg) { + ULARGE_INTEGER s; + sg->GetTotalSize(&s.LowPart,&s.HighPart); + sg->Release(); + if(s.LowPart == 0 && s.HighPart == 0) return prev; + return prev = s.QuadPart; + } + return prev; +} + +void P4SDevice::deleteTrack(songid_t songid) { + lastChange=NULL; + Song * s = (Song*)songid; + IWMDMStorageControl3 * storeControl=NULL; + s->storage->QueryInterface(&storeControl); + if(!storeControl) return; + for(int i=0; i<playlists.GetSize(); i++) { + Playlist * pl = (Playlist *)playlists.Get(i); + int j = pl->songs.GetSize(); + while(j-- > 0) if((Song *)pl->songs.Get(j) == s) { pl->songs.Del(j); pl->modified=true; } + } + if(storeControl->Delete(WMDM_MODE_BLOCK,NULL) != S_OK) return; + s->meta->Release(); + s->storage->Release(); + storeControl->Release(); + delete s; +} + +void P4SDevice::commitChanges() { + for(int i=1; i<playlists.GetSize(); i++) { + Playlist * pl = (Playlist*)playlists.Get(i); + if(pl->modified) commitPlaylist(pl); + } + + Playlist * pl = (Playlist*)playlists.Get(0); + for(int j=0; j < pl->songs.GetSize(); j++) { + Song * s = (Song *)pl->songs.Get(j); + if(s->modified) { + s->storage->SetMetadata(s->meta); + s->meta->Release(); + s->storage->GetMetadata(&s->meta); + s->modified = false; + } + } + lastChange=NULL; +} + +static int fileSizeA(char * filename) +{ + FILE * fh = fopen(filename,"rb"); + if(!fh) return -1; + fseek(fh,0,2); //seek to end; + int l = ftell(fh); + fclose(fh); + return l; +} + +#define MKVALIDFN(x) { wchar_t * n = x; while(n && *n == L'.') *(n++)=L'_'; while(n && *n) { if(*n == L'|' || *n == L'\\' || *n == L'/' || *n == L'?' || *n == L'<' || *n == L'>' || *n == L':' || *n == L'*' || *n == L'"') *n=L'_'; n++; } n = x+wcslen(x)-1; while(n && *n==L'.' && n>=x) *(n--)=0; } + +static IWMDMStorage4* GetOrCreateFolder(IWMDMStorage4 * store, wchar_t * name, P4SDevice * dev, bool album, const itemRecordW * item) { + if(!name[0]) name=L"Blank"; + MKVALIDFN(name); + if(!name[0]) name=L"Blank"; + if(!store) return NULL; + IWMDMEnumStorage * enstore=NULL; + HRESULT hr = store->EnumStorage(&enstore); + IWMDMStorage * store0; + IWMDMStorage4 * store4; + ULONG num; + if(!enstore) return NULL; + enstore->Reset(); + hr = enstore->Next(1,&store0,&num); + while(hr == S_OK) { + store4=NULL; + store0->QueryInterface(&store4); + store0->Release(); + wchar_t buf[100] = {0}; + store4->GetName(buf,100); + if(_wcsicmp(buf,name) == 0) { + return store4; + } + store4->Release(); + hr = enstore->Next(1,&store0,&num); + } + if(enstore) enstore->Release(); + // we must create it! + store0=store4=NULL; + IWMDMStorageControl3 * storeControl=NULL; + store->QueryInterface(&storeControl); + if(!storeControl) return NULL; + IWMDMMetaData * meta; + store->CreateEmptyMetadataObject(&meta); + storeControl->Insert3(WMDM_MODE_BLOCK|WMDM_CONTENT_FOLDER,WMDM_FILE_ATTR_FOLDER,NULL,name,NULL,NULL,meta,NULL,&store0); + meta->Release(); + if(!store0) return NULL; + store0->QueryInterface(&store4); + storeControl->Release(); + store0->Release(); + store->Release(); + if(album) { + wchar_t buffer[MAX_PATH]; + IWMDMStorageControl3 * storeControl; + wsprintf(buffer,L"%s.alb",name); + store4->QueryInterface(&storeControl); + IWMDMStorage * newpl=NULL; + IWMDMStorage4 * newpl4=NULL; + IWMDMMetaData * meta=NULL; + store4->CreateEmptyMetadataObject(&meta); + if (meta) + { + DWORD formatCode = WMDM_FORMATCODE_ABSTRACTAUDIOALBUM; + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMFormatCode,(BYTE*)&formatCode,sizeof(DWORD)); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumTitle,(BYTE*)name,(wcslen(name)*2)+2); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumArtist,(BYTE*)((wchar_t*)item->albumartist),(wcslen(item->albumartist)*2)+2); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMTitle,(BYTE*)name,(wcslen(name)*2)+2); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAuthor,(BYTE*)((wchar_t*)item->artist),(wcslen(item->artist)*2)+2); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMGenre,(BYTE*)((wchar_t*)item->genre),(wcslen(item->genre)*2)+2); + storeControl->Insert3(WMDM_MODE_BLOCK | WMDM_CONTENT_FILE,0,NULL,buffer,NULL,NULL,meta,NULL,&newpl); + storeControl->Release(); + if (newpl) + { + newpl->QueryInterface(&newpl4); + newpl->Release(); + } + if (newpl4) + { + newpl4->SetReferences(0,NULL); + newpl4->SetMetadata(meta); + newpl4->Release(); + } + meta->Release(); + } + } + return store4; +} + +// Disabled for 5.64 +// Fixes issues with exit failures and duplicates on transfer (view issue only) and other memory corruption issues +/*typedef struct { + C_ItemList * playlists; + void * item; +} addTrackStruct; + +void CALLBACK addTrack(ULONG_PTR dwParam) { + addTrackStruct * a = (addTrackStruct *) dwParam; + ((Playlist*)a->playlists->Get(0))->songs.Add(a->item); + delete a; +}*/ + +static void getTime(__time64_t value, _WMDMDATETIME * time) { + if(!time) return; + ZeroMemory(time,sizeof(_WMDMDATETIME)); + struct tm * t = _localtime64(&value); + if(!t) return; + time->wYear = t->tm_year; + time->wMonth = t->tm_mon; + time->wDay = t->tm_mday; + time->wHour = t->tm_hour; + time->wMinute = t->tm_min; + time->wSecond = t->tm_sec; +} + +static int atoi_nullok(char * str) { + if(str) return atoi(str); + return 0; +} + +static IWMDMStorage * storefoo; + +#define PHASE_START 1 +#define PHASE_INPROGRESS 2 +#define PHASE_FINISH 3 +#define PHASE_DONE 4 +#define PHASE_ERROR 5 + +extern CSecureChannelClient SAC; +extern int SynchronousProcedureCall(void * p, ULONG_PTR dwParam); + +void P4SDevice::doTransfer(TransferItem * t) { + static wchar_t buf[256]; + static IWMDMStorage4 * store; + static IWMDMStorageControl3 * control; + + switch(t->phase) { + case PHASE_START: + { + bool video = false; + DWORD formatCode=0; + wchar_t * point = wcsrchr(t->file,L'.'); + if(point) { + if(_wcsicmp(point,L".wma")==0) formatCode = WMDM_FORMATCODE_WMA; + else if(_wcsicmp(point,L".wav")==0) formatCode = WMDM_FORMATCODE_WAVE; + else if(_wcsicmp(point,L".ogg")==0) formatCode = WMDM_FORMATCODE_OGG; + else if(_wcsicmp(point,L".m4a")==0) formatCode = WMDM_FORMATCODE_MP4; + else if(_wcsicmp(point,L".aac")==0) formatCode = WMDM_FORMATCODE_AAC; + else if(_wcsicmp(point,L".aa")==0) formatCode = WMDM_FORMATCODE_AUDIBLE; + else if(_wcsicmp(point,L".flac")==0 || _wcsicmp(point,L".fla")==0) formatCode = WMDM_FORMATCODE_FLAC; + else if(_wcsicmp(point,L".asf")==0) { video=true; formatCode = WMDM_FORMATCODE_ASF; } + else if(_wcsicmp(point,L".avi")==0) { video=true; formatCode = WMDM_FORMATCODE_AVI; } + else if(_wcsicmp(point,L".mpg")==0) { video=true; formatCode = WMDM_FORMATCODE_MPEG; } + else if(_wcsicmp(point,L".mpeg")==0) { video=true; formatCode = WMDM_FORMATCODE_MPEG; } + else if(_wcsicmp(point,L".wmv")==0) { video=true; formatCode = WMDM_FORMATCODE_WMV; } + else if(_wcsicmp(point,L".m4v")==0) { video=true; formatCode = WMDM_FORMATCODE_MP4; } + else if(_wcsicmp(point,L".mp2")==0) { video=true; formatCode = WMDM_FORMATCODE_MP2; } + else if(_wcsicmp(point,L".mp4")==0) { + wchar_t buf[10]=L"0"; + extendedFileInfoStructW m = {t->file,L"type",buf,10}; + SendMessage(plugin.hwndWinampParent,WM_WA_IPC,(WPARAM)&m,IPC_GET_EXTENDED_FILE_INFOW); + formatCode = WMDM_FORMATCODE_MP4; + video = (buf[0]==L'1'); + } + else formatCode = WMDM_FORMATCODE_MP3; // mp3 or whatever + } + t->video = video; + + store = ((Playlist *)playlists.Get(0))->storage; + store->AddRef(); + + if(video) { + store = GetOrCreateFolder(store,videoDir,this); + if(_wcsicmp(t->track->artist,L"")) store = GetOrCreateFolder(store,t->track->artist); + } else { + store = GetOrCreateFolder(store,musicDir,this); + if(_wcsicmp(t->track->artist,L"")) store = GetOrCreateFolder(store,t->track->artist); + else store = GetOrCreateFolder(store,L"No Artist"); + if(_wcsicmp(t->track->album,L"")) store = GetOrCreateFolder(store,t->track->album,this,requiresALB,t->track); + else store = GetOrCreateFolder(store,L"No Album"); + } + /* + DWORD dw; + do { + WMDevice->GetStatus(&dw); + SleepEx(50,true); + } while(!(dw & WMDM_STATUS_READY)); + */ + if(!store) { + t->callback(t->callbackContext,WASABI_API_LNGSTRINGW(IDS_COUND_NOT_CREATE_FOLDER)); + *(t->songid)=NULL; + t->phase=PHASE_ERROR; + return; + } + + // create and fill in metadata... + + HRESULT hr; + hr = store->CreateEmptyMetadataObject(&t->meta); + if(hr != S_OK) { + wchar_t buf[100] = {0}; + wsprintf(buf,WASABI_API_LNGSTRINGW(IDS_COULD_NOT_CREATE_METADATA),hr); + t->callback(t->callbackContext,buf); + *(t->songid)=NULL; + t->phase=PHASE_ERROR; + return; + } + t->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMFormatCode,(BYTE*)&formatCode,sizeof(DWORD)); + if(t->track->artist) t->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAuthor,(BYTE*)((wchar_t*)(t->track->artist)),(wcslen(t->track->artist)*2)+2); + if(t->track->albumartist) t->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumArtist,(BYTE*)((wchar_t*)(t->track->albumartist)),(wcslen(t->track->albumartist)*2)+2); + if(t->track->composer) t->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMComposer,(BYTE*)((wchar_t*)(t->track->composer)),(wcslen(t->track->composer)*2)+2); + if(t->track->album) t->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumTitle,(BYTE*)((wchar_t*)(t->track->album)),(wcslen(t->track->album)*2)+2); + if(t->track->genre) t->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMGenre,(BYTE*)((wchar_t*)(t->track->genre)),(wcslen(t->track->genre)*2)+2); + if(t->track->title) t->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMTitle,(BYTE*)((wchar_t*)(t->track->title)),(wcslen(t->track->title)*2)+2); + if(t->track->track> 0) t->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMTrack,(BYTE*)&t->track->track,sizeof(DWORD)); + __int64 len = t->track->length; + len *= 10000000; + wchar_t buf2[256] = {0}; + t->meta->AddItem(WMDM_TYPE_QWORD,g_wszWMDMDuration,(BYTE*)&len,sizeof(__int64)); + int fs = fileSizeA(AutoChar(t->file)); + len = fs; + t->meta->AddItem(WMDM_TYPE_QWORD,g_wszWMDMFileSize,(BYTE*)&len,sizeof(__int64)); + wsprintf(buf2,L"%d",t->track->year); + if(t->track->year > 0) t->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMYear,(BYTE*)buf2,(wcslen(buf2)*2) + 2); + int v; + if (t->track->length) + { + v = 8*(fs/t->track->length); //atoi_nullok(getRecordExtendedItem(t->track,"BITRATE")) * 1000; + t->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMBitrate,(BYTE*)&v,sizeof(DWORD)); + } + v = t->track->playcount; + t->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMPlayCount,(BYTE*)&v,sizeof(DWORD)); + v = t->track->rating; + if(v>=0 && v<=5) t->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMUserRating,(BYTE*)&v,sizeof(DWORD)); + _WMDMDATETIME time1={0}, time2={0}; + getTime(t->track->lastplay,&time1); + t->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMUserLastPlayTime,(BYTE*)&time1,sizeof(DWORD)); + getTime(t->track->lastupd,&time2); + t->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMLastModifiedDate,(BYTE*)&time2,sizeof(DWORD)); + + control = NULL; + store->QueryInterface(&control); + IWMDMStorage * newstore=NULL; + + if(video) wsprintf(buf,L"%s%s",(wchar_t*)(t->track->title),(wchar_t*)(wcsrchr(t->track->filename,'.'))); + else wsprintf(buf,L"%02d - %s%s",t->track->track,(wchar_t*)(t->track->title),(wchar_t*)(wcsrchr(t->track->filename,'.'))); + + if(video) wsprintf(buf,L"%s%s",(wchar_t*)(t->track->title),wcsrchr(t->file,L'.')); + else wsprintf(buf,L"%02d - %s%s",t->track->track,(wchar_t*)(t->track->title),wcsrchr(t->file,L'.')); + MKVALIDFN(buf); + + if(!control) { + t->callback(t->callbackContext,WASABI_API_LNGSTRINGW(IDS_INCOMPATABLE_DEVICE)); + *(t->songid)=NULL; + t->phase = PHASE_ERROR; + return; + } + + t->phase = PHASE_INPROGRESS; + t->progress = new MyProgress(t); + storefoo = NULL; + + hr = control->Insert3(WMDM_MODE_BLOCK|WMDM_MODE_TRANSFER_PROTECTED|WMDM_CONTENT_FILE|WMDM_STORAGECONTROL_INSERTAFTER, + WMDM_FILE_ATTR_FILE, + t->file, + buf, + NULL, + t->progress, + t->meta, + NULL, + &storefoo); + //OutputDebugString(L"finished insert"); + + if (FAILED(hr)) { + wchar_t buf1[100] = {0}; + wsprintf(buf1,WASABI_API_LNGSTRINGW(IDS_ERROR_IN_INSERT),hr); + t->callback(t->callbackContext,buf1); + *(t->songid)=NULL; + t->phase = PHASE_ERROR; + return; + } + } + break; + case PHASE_FINISH: + //OutputDebugString(L"phase finish start"); + { + /* + DWORD dw; + WMDevice->GetStatus(&dw); + while(!(dw == WMDM_STATUS_READY)) { + SleepEx(50,true); + WMDevice->GetStatus(&dw); + } + */ + } + + t->progress->Release(); + control->Release(); + + if(storefoo) { /*OutputDebugString(L"storefoo");*/ storefoo->Release(); storefoo=NULL; } + if(store) { + IWMDMStorage * store0 = NULL; + store->GetStorage(buf,&store0); + store->Release(); + if(store0) { + IWMDMStorage4 * store4 = NULL; + store0->QueryInterface(&store4); + if(store4) { + store4->AddRef(); + store0->Release(); + store4->SetMetadata(t->meta); + //t->meta->Release(); + Song * song = new Song; + song->modified=false; + song->storage = store4; + song->meta = t->meta; + song->video = t->video; + //((Playlist*)playlists.Get(0))->songs.Add(song); + + // Disabled for 5.64 + // Fixes issues with exit failures and duplicates on transfer (view issue only) and other memory corruption issues +/* + addTrackStruct * a = new addTrackStruct; + a->item=song; + a->playlists = &playlists; + //PostMessage(plugin.hwndPortablesParent,WM_USER+3,(WPARAM)addTrack,(LPARAM)a); + SynchronousProcedureCall((void*)addTrack,(ULONG_PTR)a); +*/ + + *(t->songid) = (songid_t)song; + // sort out the album group... + if(t->track->album && requiresALB) { + IWMDMStorage * album0=NULL; + IWMDMStorage * parent=NULL; + IWMDMStorage4 * parent4=NULL; + IWMDMStorage4 * album4; + wchar_t buf[512] = {0}; + wsprintf(buf,L"%s.alb",(wchar_t*)(t->track->album)); + store4->GetParent(&parent); + if (parent) + { + parent->QueryInterface(&parent4); + parent->Release(); + if (parent4) + { + parent4->GetStorage(buf,&album0); + parent4->Release(); + if(album0) { + album0->QueryInterface(&album4); + album0->Release(); + DWORD refc; + IWMDMStorage ** refs; + IWMDMStorage ** newrefs; + album4->GetReferences(&refc,&refs); + newrefs = (IWMDMStorage **)calloc((refc + 1), sizeof(void*)); + for(DWORD i=0; i<refc; i++) newrefs[i] = refs[i]; + newrefs[refc] = store4; + refc++; + album4->SetReferences(refc,newrefs); + refc--; + for(DWORD i=0; i<refc; i++) refs[i]->Release(); + free(newrefs); + CoTaskMemFree(refs); + song->alb = album4; + album4->GetMetadata(&song->albmeta); + //album4->Release(); + + int w,h; + ARGB32 *bits; + if (AGAVE_API_ALBUMART->GetAlbumArt(t->file, L"cover", &w, &h, &bits) == ALBUMART_SUCCESS) + { + setArt((songid_t)song,bits,w,h); + WASABI_API_MEMMGR->sysFree(bits); + } + } + } + } + } + } + } + } + if(!*t->songid) t->callback(t->callbackContext,WASABI_API_LNGSTRINGW(IDS_UNSPECIFIED_ERROR)); + t->phase = PHASE_DONE; + //OutputDebugString(L"phase finish finished"); + break; + } +} + +int P4SDevice::transferTrackToDevice(const itemRecordW * track,void * callbackContext,void (*callback)(void * callbackContext, wchar_t * status),songid_t * songid,int * killswitch) { + wchar_t file[2048] = {0}; + StringCchCopy(file, ARRAYSIZE(file), track->filename); + bool deletefile = false; + if(transcoder) if(transcoder->ShouldTranscode(file)) { + wchar_t newfile[MAX_PATH] = {0}; + wchar_t ext[10] = {0}; + transcoder->CanTranscode(file,ext); + transcoder->GetTempFilePath(ext,newfile); + if(transcoder->TranscodeFile(file,newfile,killswitch,callback,callbackContext)) return -1; + StringCchCopy(file, ARRAYSIZE(file), newfile); + deletefile=true; + } + + callback(callbackContext,WASABI_API_LNGSTRINGW(IDS_WAITING_FOR_OTHER_TRANSFERS)); + EnterCriticalSection(&csTransfers); // only one transfer at once, globally :( + callback(callbackContext,WASABI_API_LNGSTRINGW(IDS_TRANSFERRING)); + TransferItem t; + t.file = file; + t.track = track; + t.callback = callback; + t.callbackContext = callbackContext; + t.killswitch = killswitch; + t.songid = songid; + t.dev = this; + t.phase = PHASE_START; + t.pc = 0; + *songid = NULL; + this->doTransfer(&t); // do the transfer + if(t.phase == PHASE_FINISH) this->doTransfer(&t); // finish it, if needs be. + + int ret = (*songid)?0:-1; + if(ret==0) callback(callbackContext,WASABI_API_LNGSTRINGW(IDS_DONE)); + trackRemovedFromTransferQueue(track); + LeaveCriticalSection(&csTransfers); + if(deletefile) _wunlink(file); + return ret; +} + +bool extentionSupported(IWMDMDevice3* WMDevice, wchar_t * ext,bool aac_and_m4a_support, bool video_supported) { + if(!ext) return false; + bool supported=false; + + if(!_wcsicmp(ext,L".mp3")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_MP3,WMDevice)); + else if(!_wcsicmp(ext,L".wma")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_WMA,WMDevice)); + else if(!_wcsicmp(ext,L".wav")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_WAVE,WMDevice)); + else if(!_wcsicmp(ext,L".aa")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_AUDIBLE,WMDevice)); + else if(!_wcsicmp(ext,L".m4a") || !_wcsicmp(ext,L".aac")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_AAC,WMDevice)) || SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_MP4,WMDevice)); + else if(!_wcsicmp(ext,L".ogg")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_OGG,WMDevice)); + else if(!_wcsicmp(ext,L".flac") || !_wcsicmp(ext,L".fla")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_FLAC,WMDevice)); + else if(!_wcsicmp(ext,L".avi")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_AVI,WMDevice)); + else if(!_wcsicmp(ext,L".mpg") || !_wcsicmp(ext,L".mpeg")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_MPEG,WMDevice)); + else if(!_wcsicmp(ext,L".asf")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_ASF,WMDevice)); + else if(!_wcsicmp(ext,L".wmv")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_WMV,WMDevice)); + else if(!_wcsicmp(ext,L".mp4")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_MP4,WMDevice)) || SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_AAC,WMDevice)); + else if(!_wcsicmp(ext,L".m4v")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_MP4,WMDevice)); + else if(!_wcsicmp(ext,L".mp2")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_MP2,WMDevice)); + else if(!_wcsicmp(ext,L".3gp")) supported = SUCCEEDED(GetFormatCaps(WMDM_FORMATCODE_3GP,WMDevice)); + else return false; + + if(!supported) { + if(!_wcsicmp(ext,L".mp3") || !_wcsicmp(ext,L".wma") || !_wcsicmp(ext,L".wav")) supported=true; + if(aac_and_m4a_support && (!_wcsicmp(ext,L".m4a") || !_wcsicmp(ext,L".aac"))) supported=true; + if(video_supported && (!_wcsicmp(ext,L".asf") || !_wcsicmp(ext,L".avi") || !_wcsicmp(ext,L".mpeg") || !_wcsicmp(ext,L".mpg") || !_wcsicmp(ext,L".wmv"))) supported=true; + } + return supported; +} +/* +bool extentionSupported(wchar_t * ext,bool aac_and_m4a_support) { + if(!ext) return false; + if(_wcsicmp(ext,L".mp3") && _wcsicmp(ext,L".wma") && _wcsicmp(ext,L".wav") + && (aac_and_m4a_support || (_wcsicmp(ext,L".m4a") && _wcsicmp(ext,L".aac"))) + ) return false; + return true; +} +*/ +static __int64 fileSize(wchar_t * filename) +{ + WIN32_FIND_DATA f={0}; + HANDLE h = FindFirstFileW(filename,&f); + if(h == INVALID_HANDLE_VALUE) return -1; + FindClose(h); + ULARGE_INTEGER i; + i.HighPart = f.nFileSizeHigh; + i.LowPart = f.nFileSizeLow; + return i.QuadPart; +} + +int P4SDevice::trackAddedToTransferQueue(const itemRecordW * track) { + __int64 l; + if(transcoder && transcoder->ShouldTranscode(track->filename)) { + int k = transcoder->CanTranscode(track->filename); + if(k == -1) return -2; + if(k == 0) l = (__int64)fileSize(track->filename); + else l = (__int64)k; + } else { + wchar_t * ext = wcsrchr(track->filename,'.'); + if(!extentionSupported(WMDevice,ext,noMetadata,supportsVideo)) return -2; // fucko: assumes all noMetadata devices are nokia (which is true for now) + l = (__int64)fileSize(track->filename); + } + __int64 test = l; + __int64 avail = getDeviceCapacityAvailable(); + test += transferQueueSize; + //test += (__int64)3000000; + if(test > avail) return -1; + transferQueueSize += l; + return 0; +} + +void P4SDevice::trackRemovedFromTransferQueue(const itemRecordW * track) { + __int64 l = (__int64)fileSize(track->filename); + if(transcoder && transcoder->ShouldTranscode(track->filename)) { + int k = transcoder->CanTranscode(track->filename); + if(k != -1 && k != 0) l = (__int64)k; + } + transferQueueSize -= l; +} + +__int64 P4SDevice::getTrackSizeOnDevice(const itemRecordW * track) { + if(transcoder && transcoder->ShouldTranscode(track->filename)) { + int k = transcoder->CanTranscode(track->filename); + if(k != -1 && k != 0) return k; + } + wchar_t * ext = wcsrchr(track->filename,'.'); + if(!extentionSupported(WMDevice,ext,noMetadata,supportsVideo)) return 0; // fucko: assumes all noMetadata devices are nokia (which is true for now) + return fileSize(track->filename); +} + +int P4SDevice::getPlaylistCount() { + return playlists.GetSize(); +} + +static BYTE* GetMetadataItem(IWMDMMetaData *meta, const WCHAR * name) { + WMDM_TAG_DATATYPE type; + BYTE * value=NULL; + UINT len; + if(!meta) { return (BYTE*)""; } // OutputDebugString(L"no meta"); + if((meta->QueryByName(name,&type,&value,&len)) != S_OK) { return NULL; /*value;*/ } //wchar_t buf[100]; wsprintf(buf,L"meta fail: %x %s",hr,name); OutputDebugString(buf); + return value; +} + +static BYTE* GetMetadataItem(Song * song, const WCHAR * name) { + WMDM_TAG_DATATYPE type; + BYTE * value=NULL; + UINT len; + if(!song || !(song->meta)) { return (BYTE*)""; } // OutputDebugString(L"no meta"); + if((song->meta->QueryByName(name,&type,&value,&len)) != S_OK) { return NULL; /*value;*/ } //wchar_t buf[100]; wsprintf(buf,L"meta fail: %x %s",hr,name); OutputDebugString(buf); + return value; +} + +void P4SDevice::getPlaylistName(int playlistnumber, wchar_t * buf, int len) +{ + if (NULL == buf) + return; + + if(playlistnumber == 0) + { + if (NULL == WMDevice) + buf[0] = L'\0'; + else + { + HRESULT hr; + hr = WMDevice->GetName(buf, len); + if (FAILED(hr)) + { + buf[0] = L'\0'; + } + } + } + else + { + StringCchCopy(buf, len, ((Playlist *)playlists.Get(playlistnumber))->name); + } +} + +int P4SDevice::getPlaylistLength(int playlistnumber) { + if(playlistnumber == -1) return 0; + return ((Playlist*)playlists.Get(playlistnumber))->songs.GetSize(); +} + +songid_t P4SDevice::getPlaylistTrack(int playlistnumber,int songnum) { + if(playlistnumber == -1) return NULL; + return (songid_t)((Playlist*)playlists.Get(playlistnumber))->songs.Get(songnum); +} + +void P4SDevice::setPlaylistName(int playlistnumber, const wchar_t *buf) { + if(playlistnumber == -1) return; + IWMDMStorageControl3 * storeControl=NULL; + Playlist * pl = (Playlist *)playlists.Get(playlistnumber); + lstrcpyn(pl->name,buf,128); + pl->storage->QueryInterface(&storeControl); + pl->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMTitle,(BYTE*)buf,(wcslen(buf)*2)+2); + pl->storage->SetMetadata(pl->meta); + wchar_t buffer[256] = {0}; + wsprintf(buffer,L"%s.%s",buf,plext); + if(storeControl) { + storeControl->Rename(WMDM_MODE_BLOCK,buffer,NULL); + storeControl->Release(); + } +} + +int sortby; +//Device * sortDev; + +#define SKIP_THE_AND_WHITESPACE(x) { while (!iswalnum(*x) && *x) x++; if (!_wcsnicmp(x,L"the ",4)) x+=4; while (*x == L' ') x++; } +int STRCMP_NULLOK(const wchar_t *pa, const wchar_t *pb) { + if (!pa) pa=L""; + else SKIP_THE_AND_WHITESPACE(pa) + if (!pb) pb=L""; + else SKIP_THE_AND_WHITESPACE(pb) + return lstrcmpi(pa,pb); +} +#undef SKIP_THE_AND_WHITESPACE + +static int sortFunc(const void *elem1, const void *elem2) +{ + int use_by = sortby; + songid_t a=(songid_t)*(songid_t *)elem1; + songid_t b=(songid_t)*(songid_t *)elem2; + +#define RETIFNZ(v) if ((v)!=0) return v; + + // this might be too slow, but it'd be nice + int x; + for (x = 0; x < 5; x ++) + { + if (use_by == SORTBY_TITLE) // title -> artist -> album -> disc -> track + { + wchar_t bufa[2048] = {0}; + wchar_t bufb[2048] = {0}; + sortDev->getTrackTitle(a,bufa,2048); + sortDev->getTrackTitle(b,bufb,2048); + int v=STRCMP_NULLOK(bufa,bufb); + RETIFNZ(v) + use_by=SORTBY_ARTIST; + } + else if (use_by == SORTBY_ARTIST) // artist -> album -> disc -> track -> title + { + wchar_t bufa[2048] = {0}; + wchar_t bufb[2048] = {0}; + sortDev->getTrackArtist(a,bufa,2048); + sortDev->getTrackArtist(b,bufb,2048); + int v=STRCMP_NULLOK(bufa,bufb); + RETIFNZ(v) + use_by=SORTBY_ALBUM; + } + else if (use_by == SORTBY_ALBUM) // album -> disc -> track -> title -> artist + { + wchar_t bufa[2048] = {0}; + wchar_t bufb[2048] = {0}; + sortDev->getTrackAlbum(a,bufa,2048); + sortDev->getTrackAlbum(b,bufb,2048); + int v=STRCMP_NULLOK(bufa,bufb); + RETIFNZ(v) + use_by=SORTBY_DISCNUM; + } + else if (use_by == SORTBY_DISCNUM) // disc -> track -> title -> artist -> album + { + int v1=sortDev->getTrackDiscNum(a); + int v2=sortDev->getTrackDiscNum(b); + if (v1<0)v1=0; + if (v2<0)v2=0; + RETIFNZ(v1-v2) + use_by=SORTBY_TRACKNUM; + } + else if (use_by == SORTBY_TRACKNUM) // track -> title -> artist -> album -> disc + { + int v1=sortDev->getTrackTrackNum(a); + int v2=sortDev->getTrackTrackNum(b); + if (v1<0)v1=0; + if (v2<0)v2=0; + RETIFNZ(v1-v2) + use_by=SORTBY_TITLE; + } + else if (use_by == SORTBY_GENRE) // genre -> artist -> album -> disc -> track + { + wchar_t bufa[2048] = {0}; + wchar_t bufb[2048] = {0}; + sortDev->getTrackGenre(a,bufa,2048); + sortDev->getTrackGenre(b,bufb,2048); + int v=STRCMP_NULLOK(bufa,bufb); + RETIFNZ(v) + use_by=SORTBY_ARTIST; + } + else if (use_by == SORTBY_PLAYCOUNT) // size -> artist -> album -> disc -> track + { + int v1=sortDev->getTrackPlayCount(a); + int v2=sortDev->getTrackPlayCount(b); + if (v1<0)v1=0; + if (v2<0)v2=0; + RETIFNZ(v1-v2) + use_by=SORTBY_ARTIST; + } + else if (use_by == SORTBY_RATING) // size -> artist -> album -> disc -> track + { + int v1=sortDev->getTrackRating(a); + int v2=sortDev->getTrackRating(b); + if (v1<0)v1=0; + if (v2<0)v2=0; + RETIFNZ(v1-v2) + use_by=SORTBY_ARTIST; + } + else if (use_by == SORTBY_LASTPLAYED) + { + __time64_t la = sortDev->getTrackLastPlayed(a); + __time64_t lb = sortDev->getTrackLastPlayed(b); + double t = difftime((time_t)la,(time_t)lb); + int v = t>0?1:(t<0?-1:0); + RETIFNZ(v) + use_by=SORTBY_ARTIST; + } + else break; // no sort order? + } + + return 0; +} + +void P4SDevice::sortPlaylist(int playlistnumber, int sortBy) { + if(playlistnumber == -1) return; + sortby = sortBy; + sortDev = this; + Playlist * pl = (Playlist *)playlists.Get(playlistnumber); + qsort(pl->songs.GetAll(),pl->songs.GetSize(),sizeof(void*),sortFunc); + pl->modified = true; +} + +void P4SDevice::playlistSwapItems(int playlistnumber, int posA, int posB) { + if(playlistnumber == -1) return; + Playlist * pl = (Playlist*)playlists.Get(playlistnumber); + if(posA >= pl->songs.GetSize() || posB >= pl->songs.GetSize()) return; + void * a = pl->songs.Get(posA); + void * b = pl->songs.Get(posB); + pl->songs.Set(posA,b); + pl->songs.Set(posB,a); + pl->modified=true; +} + +void P4SDevice::addTrackToPlaylist(int playlistnumber, songid_t songid) { + if(playlistnumber == -1) return; + Playlist * pl = (Playlist*)playlists.Get(playlistnumber); + pl->songs.Add((void*)songid); + pl->modified=true; +} + +void P4SDevice::removeTrackFromPlaylist(int playlistnumber, int songnum) { + if(playlistnumber == -1) return; + Playlist * pl = (Playlist*)playlists.Get(playlistnumber); + pl->songs.Del(songnum); + pl->modified=true; +} + +void P4SDevice::deletePlaylist(int playlistnumber) { + if(playlistnumber == -1) return; + IWMDMStorageControl3 * storeControl; + Playlist * pl = (Playlist *)playlists.Get(playlistnumber); + pl->storage->QueryInterface(&storeControl); + + storeControl->Delete(WMDM_MODE_BLOCK,NULL); + pl->meta->Release(); + pl->storage->Release(); + playlists.Del(playlistnumber); + + storeControl->Release(); +} + +int P4SDevice::newPlaylist(const wchar_t *name) { + IWMDMStorageControl3 * storeControl; + if(!playlistsDir) return -1; + playlistsDir->QueryInterface(&storeControl); + DWORD dw=WMDM_FORMATCODE_ABSTRACTAUDIOVIDEOPLAYLIST; + IWMDMMetaData* meta = NULL; + int ret = -1; + if (SUCCEEDED(playlistsDir->CreateEmptyMetadataObject(&meta)) && meta) + { + meta->AddItem(WMDM_TYPE_DWORD, g_wszWMDMFormatCode, (BYTE *)&dw, sizeof(dw)); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMTitle,(BYTE*)name,(wcslen(name)*2)+2); + IWMDMStorage * newpl=NULL; + wchar_t buffer[MAX_PATH] = {0}; + wsprintf(buffer,L"%s.%s",name,plext); + storeControl->Insert3(WMDM_MODE_BLOCK | WMDM_CONTENT_FILE,0,NULL,buffer,NULL,NULL,meta,NULL,&newpl); + + if(newpl) { + IWMDMStorage4 * newpl4=NULL; + newpl->QueryInterface(&newpl4); + Playlist * pl = new Playlist; + lstrcpyn(pl->name,name,128); + pl->storage = newpl4; + pl->modified = false; + pl->meta = meta; + playlists.Add(pl); + ret = playlists.GetSize() - 1; + newpl->Release(); + } + } + storeControl->Release(); + + return ret; +} + +void P4SDevice::getTrackArtist(songid_t songid, wchar_t * buf, int len) { + buf[0]=0; + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMAuthor); + if(b) { lstrcpyn(buf,(wchar_t*)b,len); CoTaskMemFree(b); } + if(noMetadata || !b) { + if(!buf[0]) { // guess based upon file path + Song *s = (Song *)songid; + if(s->artist) {lstrcpyn(buf,s->artist,len); + return; + } + IWMDMStorage * p = NULL; + if(s->storage->GetParent(&p) == S_OK) { + IWMDMStorage * p2 = NULL; + IWMDMStorage4 * p3 = NULL; + if (SUCCEEDED(p->QueryInterface(&p3))) { + if(p3->GetParent(&p2) == S_OK) { + p2->GetName(buf,len); + p2->Release(); + } + p3->Release(); + } + p->Release(); + } + } +} +} + +void P4SDevice::getTrackAlbum(songid_t songid, wchar_t * buf, int len) { + buf[0]=0; + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMAlbumTitle); + if(b) { lstrcpyn(buf,(wchar_t*)b,len); CoTaskMemFree(b); } + if(!b || noMetadata || ((Song*)songid)->video) { + if(!buf[0]) { // guess based upon file path + Song *s = (Song *)songid; + if(s->album) {lstrcpyn(buf,s->album,len); return;} + IWMDMStorage * p = NULL; + if(s->storage->GetParent(&p) == S_OK) { + p->GetName(buf,len); + p->Release(); + } + } + } + if(buf[0] == L'~' && buf[1] == 0) buf[0]=0; +} +void P4SDevice::getTrackTitle(songid_t songid, wchar_t * buf, int len) { + buf[0]=0; + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMTitle); + if(b) { lstrcpyn(buf,(wchar_t*)b,len); CoTaskMemFree(b); } + if(!b || noMetadata || ((Song*)songid)->video) { + if(!buf[0]) { // guess based upon file name + Song *s = (Song *)songid; + wchar_t buf2[256]=L""; + s->storage->GetName(buf2,256); + wchar_t * n = wcsrchr(buf2,L'-'); + if(n) { + while(n && (*n == L'-' || *n == L' ' || *n == L'_' || *n == L'.')) n++; + lstrcpyn(buf,n,len); + } else lstrcpyn(buf,buf2,len); + } + wchar_t * ext = wcsrchr(buf,L'.'); + if(ext) *ext=0; +} +} +void P4SDevice::getTrackGenre(songid_t songid, wchar_t * buf, int len) { + buf[0]=0; + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMGenre); + if(b) { lstrcpyn(buf,(wchar_t*)b,len); CoTaskMemFree(b); } +} + +int P4SDevice::getTrackTrackNum(songid_t songid) { + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMTrack); + int r = b?(int)*((DWORD*)b):0; if(b) CoTaskMemFree(b); + if(r) return r; + if(!b || noMetadata) { // guess based upon file name + Song *s = (Song *)songid; + wchar_t buf2[256]=L""; + s->storage->GetName(buf2,256); + + wchar_t * n = buf2; //wcschr(buf2,L'-'); + while(n) { + while((*n == L'-' || *n == L' ' || *n == L'_' || *n == L'.') && *n) n++; + if(!n) break; + int m=0; while(*(n+m)>=L'0' && *(n+m)<=L'9') m++; + if(m == 2) { *(n+m)=0; return _wtoi(n); } + n = wcschr(n,L'-'); + } + /* + wchar_t * n = wcschr(buf2,L'-'); + if(n) { + *(n--)=0; + while((*n == L'-' || *n == L' ' || *n == L'_' || *n == L'.') && n > buf2) *(n--)=0; + return _wtoi(buf2); + } + */ + } + return 0; +} + +int P4SDevice::getTrackYear(songid_t songid) { + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMYear); + int r = b?_wtoi((wchar_t*)b):0; if(b) CoTaskMemFree(b); return r; +} +__int64 P4SDevice::getTrackSize(songid_t songid) { + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMFileSize); + int r = b?(int)*((__int64*)b):0; if(b) CoTaskMemFree(b); + if(r) return r; + DWORD high, low; + ((Song *)songid)->storage->GetSize(&low,&high); + ULARGE_INTEGER u; + u.HighPart = high; + u.LowPart = low; + return u.QuadPart; +} + +int P4SDevice::getTrackLength(songid_t songid) { + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMDuration); + int r = b?(int)(*((__int64*)b)/10000):0; if(b) CoTaskMemFree(b); return r; +} + +int P4SDevice::getTrackBitrate(songid_t songid) { + int len = getTrackLength(songid) / 8000; + return len?(int)(getTrackSize(songid)/1024) / len:0; +} + +int P4SDevice::getTrackPlayCount(songid_t songid) { + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMPlayCount); + int r = b?(int)*((DWORD*)b):0; if(b) CoTaskMemFree(b); return r; +} + +int P4SDevice::getTrackRating(songid_t songid) { + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMUserRating); + int r = b?(int)*((DWORD*)b):0; if(b) CoTaskMemFree(b); return r; +} + +__time64_t P4SDevice::getTrackLastPlayed(songid_t songid) { + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMUserLastPlayTime); + __time64_t r = b?wmdmDateTimeToUnixTime((_WMDMDATETIME *)b):0; if(b) CoTaskMemFree(b); return r; +} + +__time64_t P4SDevice::getTrackLastUpdated(songid_t songid) { + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMLastModifiedDate); + __time64_t r = b?wmdmDateTimeToUnixTime((_WMDMDATETIME *)b):0; if(b) CoTaskMemFree(b); return r; +} + +void P4SDevice::getTrackAlbumArtist(songid_t songid, wchar_t * buf, int len) { + buf[0]=0; + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMAlbumArtist); + if(b) { lstrcpyn(buf,(wchar_t*)b,len); CoTaskMemFree(b); } + if(!buf[0]) getTrackArtist(songid,buf,len); +} + +void P4SDevice::getTrackComposer(songid_t songid, wchar_t * buf, int len) { + buf[0]=0; + BYTE * b = GetMetadataItem((Song *)songid,g_wszWMDMComposer); + if(b) { lstrcpyn(buf,(wchar_t*)b,len); CoTaskMemFree(b); } +} + +int P4SDevice::getTrackType(songid_t songid) { + Song * s = (Song *)songid; + return s->video; +} + +void P4SDevice::getTrackExtraInfo(songid_t songid, const wchar_t * field, wchar_t * buf, int len) { + if(!wcscmp(field,FIELD_EXTENSION)) { + Song * s = (Song *)songid; + wchar_t buf2[2048] = {0}; + s->storage->GetName(buf2,2048); + wchar_t * ext = wcsrchr(buf2,L'.'); + if(ext) { ext++; lstrcpyn(buf,ext,len); } + } +} + +void P4SDevice::PreCommit(Song * s) { + if(!lastChange) lastChange = s; + else if(s != lastChange) { + if(lastChange->modified) { + lastChange->storage->SetMetadata(lastChange->meta); + lastChange->meta->Release(); + lastChange->storage->GetMetadata(&lastChange->meta); + lastChange->modified = false; + } + lastChange = s; + } +} + +void P4SDevice::setTrackArtist(songid_t songid, const wchar_t * value) { + ((Song*)songid)->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAuthor,(BYTE*)value,wcslen(value)*2+2); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackAlbum(songid_t songid, const wchar_t * value) { + ((Song*)songid)->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumTitle,(BYTE*)value,wcslen(value)*2+2); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackTitle(songid_t songid, const wchar_t * value) { + ((Song*)songid)->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMTitle,(BYTE*)value,wcslen(value)*2+2); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackGenre(songid_t songid, const wchar_t * value) { + ((Song*)songid)->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMGenre,(BYTE*)value,wcslen(value)*2+2); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackTrackNum(songid_t songid, int value) { + ((Song*)songid)->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMTrack,(BYTE*)&value,sizeof(DWORD)); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackYear(songid_t songid, int value) { + wchar_t buf[10] = {0}; wsprintf(buf,L"%d",value); + ((Song*)songid)->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMYear,(BYTE*)buf,wcslen(buf)*2+2); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackPlayCount(songid_t songid, int value) { + ((Song*)songid)->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMPlayCount,(BYTE*)&value,sizeof(DWORD)); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackRating(songid_t songid, int value) { + ((Song*)songid)->meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMUserRating,(BYTE*)&value,sizeof(DWORD)); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackLastPlayed(songid_t songid, __time64_t value) { + _WMDMDATETIME time={0}; + getTime(value,&time); + ((Song*)songid)->meta->AddItem(WMDM_TYPE_DATE,g_wszWMDMUserLastPlayTime,(BYTE*)&time,sizeof(_WMDMDATETIME)); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackLastUpdated(songid_t songid, __time64_t value) { + _WMDMDATETIME time={0}; + getTime(value,&time); + ((Song*)songid)->meta->AddItem(WMDM_TYPE_DATE,g_wszWMDMLastModifiedDate,(BYTE*)&time,sizeof(_WMDMDATETIME)); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackAlbumArtist(songid_t songid, const wchar_t * value) { + ((Song*)songid)->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumArtist,(BYTE*)value,wcslen(value)*2+2); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +void P4SDevice::setTrackComposer(songid_t songid, const wchar_t * value) { + ((Song*)songid)->meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMComposer,(BYTE*)value,wcslen(value)*2+2); + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +} + +int P4SDevice::copyToHardDrive(songid_t s,wchar_t * path,void * callbackContext,void (*callback)(void * callbackContext, wchar_t * status),int * killswitch) +{ + callback(callbackContext,WASABI_API_LNGSTRINGW(IDS_WAITING)); + EnterCriticalSection(&csTransfers); + Song * song = (Song*)s; + IWMDMStorageControl * control; + if (!SUCCEEDED(song->storage->QueryInterface(&control))) { + callback(callbackContext,WASABI_API_LNGSTRINGW(IDS_FAILED)); + return -1; + } + wchar_t fn[2084] = {0}; + wchar_t *ext = 0; + if(SUCCEEDED(song->storage->GetName(fn,2084)) && (ext=wcsrchr(fn,L'.'))!=0) + wcscat(path,ext); + int ret=-1; + callback(callbackContext,WASABI_API_LNGSTRINGW(IDS_TRANSFERRING)); + TransferItem t={0}; + t.callback = callback; + t.callbackContext = callbackContext; + t.killswitch = killswitch; + t.progress = new MyProgress(&t); + if(SUCCEEDED(control->Read(WMDM_MODE_BLOCK | WMDM_CONTENT_FILE,path,t.progress,NULL))) ret=0; + control->Release(); + t.progress->Release(); + callback(callbackContext,WASABI_API_LNGSTRINGW((ret==0?IDS_DONE:IDS_FAILED))); + LeaveCriticalSection(&csTransfers); + return ret; +} + +static IWMDMStorage4* getAlb(P4SDevice * dev, songid_t songid, bool create) { + wchar_t alb[1024] = {0}; + dev->getTrackAlbum(songid,alb,1020); + StringCchCat(alb, ARRAYSIZE(alb), L".alb"); + Song * song = (Song*)songid; + IWMDMStorage * album0=NULL; + IWMDMStorage * parent=NULL; + IWMDMStorage4 * parent4=NULL; + IWMDMStorage4 * album4=NULL; + song->storage->GetParent(&parent); + if (parent) + { + parent->QueryInterface(&parent4); + parent->Release(); + if (parent4) + { + parent4->GetStorage(alb,&album0); + //parent4->Release(); + if(album0) { + album0->QueryInterface(&album4); + album0->Release(); + } + } + } + if(album4 || !create) { parent4->Release(); return album4; } + if(!parent4) return NULL; + // create my own + album0=0; + IWMDMStorageControl3 * storeControl=0; + parent4->QueryInterface(&storeControl); + if(storeControl) { + IWMDMMetaData * meta=0; + parent4->CreateEmptyMetadataObject(&meta); + if(meta) { + DWORD formatCode = WMDM_FORMATCODE_ABSTRACTAUDIOALBUM; + wchar_t album[256]=L""; + wchar_t artist[256]=L""; + wchar_t genre[256]=L""; + dev->getTrackAlbumArtist(songid,artist,256); + dev->getTrackAlbum(songid,album,256); + dev->getTrackGenre(songid,genre,256); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMFormatCode,(BYTE*)&formatCode,sizeof(DWORD)); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumTitle,(BYTE*)album,(wcslen(album)*2)+2); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMAlbumArtist,(BYTE*)artist,(wcslen(artist)*2)+2); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMTitle,(BYTE*)album,(wcslen(album)*2)+2); + meta->AddItem(WMDM_TYPE_STRING,g_wszWMDMGenre,(BYTE*)genre,(wcslen(genre)*2)+2); + + storeControl->Insert3(WMDM_MODE_BLOCK | WMDM_CONTENT_FILE,0,NULL,alb,NULL,NULL,meta,NULL,&album0); + meta->Release(); + } + storeControl->Release(); + } + parent4->Release(); + if(album0) { + album0->QueryInterface(&album4); + album0->Release(); + return album4; + } + return NULL; +} + +void P4SDevice::setArt(songid_t songid, void *buf, int w, int h) { //buf is in format ARGB32* + if(!songid) return; + Song * s = (Song *)songid; + IWMDMStorage4 * album = s->alb; + if(!album) { + album = getAlb(this,songid,true); + if(!album) return; + s->alb = album; + s->albmeta = NULL; + s->alb->GetMetadata(&s->albmeta); + if(!s->albmeta) return; + } + + IWMDMMetaData *meta=s->albmeta; + if(!meta) return; + IWMDMMetaData *meta2 = ((Song*)songid)->meta; + + if(meta || meta2) { + if(buf) { + SkinBitmap art((ARGB32*)buf,w,h); + w=h=120; + BltCanvas artc(w,h); + art.stretch(&artc,0,0,w,h); + + const GUID JPEGwriteguid = { 0x7bc27468, 0x475, 0x4c0d, { 0xae, 0xed, 0xc, 0x51, 0x19, 0x5d, 0xc2, 0xea } }; + svc_imageWriter* jpgWrite=NULL; + waServiceFactory *sf = plugin.service->service_getServiceByGuid(JPEGwriteguid); + if(sf) jpgWrite = (svc_imageWriter*)sf->getInterface(); + if(jpgWrite) { + int length=0; + void *jpeg = jpgWrite->convert(artc.getBits(),32,w,h,&length); + if(jpeg) { + DWORD fmt = WMDM_FORMATCODE_IMAGE_EXIF; // this is the formatcode for jpeg, apparently. + if(meta) { + meta->AddItem(WMDM_TYPE_BINARY,g_wszWMDMAlbumCoverData,(BYTE*)jpeg,length); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverWidth,(BYTE*)&w,sizeof(DWORD)); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverHeight,(BYTE*)&h,sizeof(DWORD)); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverSize,(BYTE*)&length,sizeof(DWORD)); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverFormat,(BYTE*)&fmt,sizeof(DWORD)); + } + if(meta2) { + meta2->AddItem(WMDM_TYPE_BINARY,g_wszWMDMAlbumCoverData,(BYTE*)jpeg,length); + meta2->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverWidth,(BYTE*)&w,sizeof(DWORD)); + meta2->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverHeight,(BYTE*)&h,sizeof(DWORD)); + meta2->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverSize,(BYTE*)&length,sizeof(DWORD)); + meta2->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverFormat,(BYTE*)&fmt,sizeof(DWORD)); + } + WASABI_API_MEMMGR->sysFree(jpeg); + } + if (sf) sf->releaseInterface(jpgWrite); + } + } else { // remove art + if(meta) { + meta->AddItem(WMDM_TYPE_BINARY,g_wszWMDMAlbumCoverData,(BYTE*)0,0); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverWidth,(BYTE*)0,0); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverHeight,(BYTE*)0,0); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverSize,(BYTE*)0,0); + meta->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverFormat,(BYTE*)0,0); + } + if(meta2) { + meta2->AddItem(WMDM_TYPE_BINARY,g_wszWMDMAlbumCoverData,(BYTE*)0,0); + meta2->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverWidth,(BYTE*)0,0); + meta2->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverHeight,(BYTE*)0,0); + meta2->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverSize,(BYTE*)0,0); + meta2->AddItem(WMDM_TYPE_DWORD,g_wszWMDMAlbumCoverFormat,(BYTE*)0,0); + } + } + if(meta) { + album->SetMetadata(meta); + } + } + ((Song*)songid)->modified=true; + PreCommit((Song*)songid); +/* +g_wszWMDMAlbumCoverData Album art JPEG byte blob WMDM_TYPE_BINARY BYTE* +g_wszWMDMAlbumCoverDuration Album cover duration WMDM_TYPE_DWORD DWORD +g_wszWMDMAlbumCoverFormat Album art format WMDM_TYPE_DWORD DWORD +g_wszWMDMAlbumCoverHeight Album art height WMDM_TYPE_DWORD DWORD +g_wszWMDMAlbumCoverSize Album art size WMDM_TYPE_DWORD DWORD +g_wszWMDMAlbumCoverWidth Album art width WMDM_TYPE_DWORD DWORD +*/ +} + +class Art { +public: + Art(void * jpegData, int jpegDataLen, int w, int h) : jpegData(jpegData), jpegDataLen(jpegDataLen), w(w), h(h), data(0), resized(0) { + } + ~Art() { + CoTaskMemFree(jpegData); + if(data) WASABI_API_MEMMGR->sysFree(data); data=0; + } + ARGB32 * GetImage() { + if(data) return data; + const GUID JPEGguid = { 0xae04fb30, 0x53f5, 0x4032, { 0xbd, 0x29, 0x3, 0x2b, 0x87, 0xec, 0x34, 0x04 } }; + svc_imageLoader* jpgLoad=NULL; + waServiceFactory *sf = plugin.service->service_getServiceByGuid(JPEGguid); + if(sf) jpgLoad = (svc_imageLoader*)sf->getInterface(); + if(jpgLoad) { + data = jpgLoad->loadImage(jpegData,jpegDataLen,&w,&h); + if (sf) sf->releaseInterface(jpgLoad); + } + resized=0; + return data; + } + int resized; + void Resize(int width, int height) { + if(w == width && h == height) return; + if(resized) { + if(data) WASABI_API_MEMMGR->sysFree(data); + data=0; + resized=0; + } + GetImage(); + if(!data) return; + SkinBitmap temp(data,w,h); + BltCanvas newImage(width,height); + temp.stretch(&newImage,0,0,width,height); + w=width; + h=height; + WASABI_API_MEMMGR->sysFree(data); + data = (ARGB32*)WASABI_API_MEMMGR->sysMalloc(w*h*sizeof(ARGB32)); + memcpy(data,newImage.getBits(),w*h*sizeof(ARGB32)); + resized=1; + } + int getWidth() {return w;} + int getHeight() {return h;} + int cmp(Art * art) { + if(art->jpegDataLen != jpegDataLen) return art->jpegDataLen - jpegDataLen; + return memcmp(art->jpegData,jpegData,jpegDataLen); + } +protected: + void * jpegData; + int jpegDataLen; + int w,h; + ARGB32 *data; +}; + +pmpart_t P4SDevice::getArt(songid_t songid) { + if(!songid) return NULL; + Song* s = (Song*)songid; + WMDM_TAG_DATATYPE type; + BYTE * data=NULL; + UINT length=0; + IWMDMMetaData *meta = s->albmeta; + if(!meta) return NULL; + + HRESULT hr = meta->QueryByName(g_wszWMDMAlbumCoverData,&type,&data,&length); + + if(hr == S_OK && data && length) { + BYTE * b = GetMetadataItem(meta,g_wszWMDMAlbumCoverWidth); + int w = b?(int)*((DWORD*)b):0; + if(b) CoTaskMemFree(b); + + b = GetMetadataItem(meta,g_wszWMDMAlbumCoverHeight); + int h = b?(int)*((DWORD*)b):0; + if(b) CoTaskMemFree(b); + //meta->Release(); + if(!w) w=120; // this happens if the device doesn't store the w and h of the image. + if(!h) h=120; // but it's ok, cause the real values are in the jpeg data, and these can just be a guide. + return (pmpart_t) new Art(data,length,w,h); + } + //meta->Release(); + if(data) CoTaskMemFree(data); + return NULL; +} + +void P4SDevice::releaseArt(pmpart_t art) { + if(art) delete ((Art *)art); +} + +int P4SDevice::drawArt(pmpart_t art0, HDC dc, int x, int y, int w, int h) { + Art* art = (Art*)art0; + if(!art) return 0; + ARGB32 * d = art->GetImage(); + if(!d) return 0; + SkinBitmap(d, art->getWidth(), art->getHeight()).stretch(&DCCanvas(dc),x,y,w,h); // wrap into a SkinBitmap (no copying involved) + return 1; +} + +void P4SDevice::getArtNaturalSize(pmpart_t art0, int *w, int *h) { + Art* art = (Art*)art0; + *w=art->getWidth(); + *h=art->getWidth(); + if(*w==0 || *h==0) *w=*h=120; +} + +void P4SDevice::setArtNaturalSize(pmpart_t art0, int w, int h) { + Art* art = (Art*)art0; + art->Resize(w,h); +} + +void P4SDevice::getArtData(pmpart_t art0, void* data) { // data ARGB32* is at natural size + Art* art = (Art*)art0; + int w,h; + getArtNaturalSize(art0,&w,&h); + setArtNaturalSize(art0,w,h); + ARGB32 * d = art->GetImage(); + if(d) memcpy(data,d,w*h*sizeof(ARGB32)); +} + +bool P4SDevice::artIsEqual(pmpart_t a, pmpart_t b) { + if(!a || !b) return false; + return ((Art*)a)->cmp((Art*)b) == 0; +} + +extern void checkForDevices(); + +intptr_t P4SDevice::extraActions(intptr_t param1, intptr_t param2, intptr_t param3,intptr_t param4) { + switch(param1) { + case DEVICE_SET_ICON: // icons + { + MLTREEIMAGE * i = (MLTREEIMAGE*)param2; + if(wcsstr(name,L"Zen")) { + i->hinst = plugin.hDllInstance; + i->resourceId = IDR_CREATIVE_ZEN_ICON; + } else if (wcsstr(name,L"Nokia")) { + i->hinst = plugin.hDllInstance; + i->resourceId = IDR_NOKIA_ICON; + } + break; + } + case DEVICE_SUPPORTED_METADATA: + return noMetadata ? 0x8f : (0xffef | (requiresALB?SUPPORTS_ALBUMART:0)); + case DEVICE_DOES_NOT_SUPPORT_EDITING_METADATA: + return noMetadata ? 1 : 0; + case DEVICE_REFRESH: + { + bool nm = noMetadata; + IWMDMDevice3* d = WMDevice; + d->AddRef(); + Close(); + new P4SDevice(d,nm); + d->Release(); + } + return 0; + case DEVICE_SUPPORTS_VIDEO: + return 1; + case DEVICE_GET_ICON: + { + if (param2 <= 16 && param3 <= 16) + { + int resourceId; + wchar_t *buffer; + + if(wcsstr(name,L"Zen")) + resourceId = IDR_CREATIVE_ZEN_ICON; + else if (wcsstr(name,L"Nokia")) + resourceId = IDR_NOKIA_ICON; + else + resourceId = 0; + + buffer = (wchar_t *)param4; + if (NULL != buffer && + FALSE == FormatResProtocol(MAKEINTRESOURCE(resourceId), RT_RCDATA, buffer, 260)) + { + buffer[0] = L'\0'; + } + } + } + break; + } + return 0; +}
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/P4SDevice.h b/Src/Plugins/Portable/pmp_p4s/P4SDevice.h new file mode 100644 index 00000000..3c05cb8f --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/P4SDevice.h @@ -0,0 +1,243 @@ +#ifndef _P4SDEVICE_H_ +#define _P4SDEVICE_H_ + +#ifndef _UNICODE +#define _UNICODE +#endif + +#ifndef UNICODE +#define UNICODE +#endif + +#include <windows.h> +#include <windowsx.h> +#include <stdio.h> +#include <tchar.h> +#include <shlobj.h> +#include "..\..\General\gen_ml/itemlist.h" +#include "..\..\General\gen_ml/ml.h" +#include "..\..\Library\ml_pmp/pmp.h" +#include "..\..\Library\ml_pmp/transcoder.h" +#include "../winamp/wa_ipc.h" +#include "../winamp/ipc_pe.h" +#include "../Agave/Language/api_language.h" +#include <api/service/waServiceFactory.h> +#include "resource1.h" + +#include <tataki/bitmap/bitmap.h> +#include <tataki/canvas/bltcanvas.h> +#include <api/service/svcs/svc_imgload.h> +#include <api/service/svcs/svc_imgwrite.h> + +#include <api/memmgr/api_memmgr.h> +extern api_memmgr *memoryManager; +#define WASABI_API_MEMMGR memoryManager + +#include "../Agave/AlbumArt/api_albumart.h" +extern api_albumart *albumArtApi; +#define AGAVE_API_ALBUMART albumArtApi + +#include "../devices/api_devicemanager.h" +extern api_devicemanager *deviceManagerApi; +#define AGAVE_API_DEVICEMANAGER deviceManagerApi + + +class P4SDevice; +class MyProgress; +class TransferItem; + +#ifndef __RPC__in +#define __RPC__in +#define __RPC__in_opt +#define __RPC__in_ecount_full(x) +#define __RPC__in_ecount_full_opt(x) +#define __RPC__in_ecount_full_string(x) +#define __RPC__inout +#define __RPC__inout_opt +#define __RPC__deref_opt_inout_opt +#define __RPC__deref_inout_ecount_full_opt_string(x) +#define __RPC__inout_ecount_full(x) +#define __RPC__out +#define __RPC__out_ecount_full(x) +#define __RPC__out_ecount_full_string(x) +#define __RPC__out_ecount_part(x,y) +#define __RPC__deref_out_ecount_full_opt(x) +#define __RPC__deref_out_opt_string +#define __RPC__deref_out_opt +#endif + +#include "WMDRMDeviceApp.h" +#include "msWMDM.h" // Include headers for Windows Media Device Manager. +#include "Sac.h" // Include authentication headers. +#include "Scclient.h" // Include authentication client headers. +#include "MyProgress.h" +#include "resource1.h" + +extern PMPDevicePlugin plugin; + +class Playlist { +public: + wchar_t name[128]; + IWMDMStorage4 * storage; + C_ItemList songs; + IWMDMMetaData * meta; + bool modified; + Playlist() : storage(0),meta(0),modified(false){ name[0]=0; } +}; + +class Song { +public: + IWMDMStorage4 * storage; + IWMDMMetaData * meta; + bool video; + bool modified; + wchar_t * artist, * album; + IWMDMStorage4 * alb; + IWMDMMetaData * albmeta; + Song() {artist=album=NULL; storage=0; meta=0; video = 0; modified = 0; alb=0; albmeta=0;} + virtual ~Song() {if(artist) free(artist); if(album) free(album); if(alb) alb->Release(); if(albmeta) albmeta->Release();} +}; + +class TransferItem { +public: + int phase; + void * callbackContext; + void (*callback)(void * callbackContext, wchar_t * status); + wchar_t *file; + const itemRecordW * track; + songid_t * songid; + int * killswitch; + P4SDevice * dev; + IWMDMMetaData * meta; + IWMDMProgress * progress; + int pc; + bool video; +}; + +class P4SDevice : public Device { +public: + bool requiresALB; + int error; + Transcoder * transcoder; + wchar_t *musicDir, *videoDir; + bool noMetadata, supportsVideo; + __int64 transferQueueSize; + C_ItemList playlists; + C_ItemList albfiles; + IWMDMStorage4 * playlistsDir; + wchar_t name[100]; + IWMDMDevice3* WMDevice; + P4SDevice(IWMDMDevice3* pIDevice,bool noMetadata); + virtual void Load(); + virtual ~P4SDevice(); + + void traverseStorage(IWMDMStorage * store, int level=0, wchar_t * artist=0, wchar_t * album=0); + void foundSong(IWMDMStorage4 * store, IWMDMMetaData * meta, bool video, int pl=0,wchar_t * artist=0, wchar_t * album=0, IWMDMStorage4 * alb=0, IWMDMMetaData * albmeta=0); + void foundPlaylist(IWMDMStorage4 * store, IWMDMMetaData * meta); + bool songsEqual(songid_t a, songid_t b); + int songsCmp(songid_t a, songid_t b); + + virtual __int64 getDeviceCapacityAvailable(); // in bytes + virtual __int64 getDeviceCapacityTotal(); // in bytes + + virtual void Eject(){Close();}; // if you ejected successfully, you MUST call plugin.deviceDisconnected(this) and delete this; + virtual void Close(); // save any changes, and call plugin.deviceDisconnected(this) AND delete this; + + virtual void doTransfer(TransferItem * t); + + // return the songid when transfer is finished. + // call the callback with a percentage and the number of bytes copied so far every so often (to update the GUI) + // return 0 for success, -1 for failed or cancelled + virtual int transferTrackToDevice(const itemRecordW * track, // the track to transfer + void * callbackContext, //pass this to the callback + void (*callback)(void * callbackContext, wchar_t * status), // call this every so often so the GUI can be updated. Including when finished! + songid_t * songid, // fill in the songid when you are finished + int * killswitch // if this gets set to 1, the transfer has been cancelled by the user + ); + virtual int trackAddedToTransferQueue(const itemRecordW * track); // return 0 to accept, -1 for "not enough space", -2 for "incorrect format" + virtual void trackRemovedFromTransferQueue(const itemRecordW * track); + virtual __int64 getTrackSizeOnDevice(const itemRecordW * track); // return the amount of space taken up on the device by the track, or 0 for incompatable (usually the filesize, unless you are transcoding) + + virtual void deleteTrack(songid_t songid); // physically remove from device. Be sure to remove it from all the playlists! + + virtual void commitChanges(); // optional. Will be called at a good time to save changes + + virtual int getPlaylistCount(); // always at least 1. playlistnumber 0 is the Master Playlist containing all tracks. + // PlaylistName(0) should return the name of the device. + virtual void getPlaylistName(int playlistnumber, wchar_t * buf, int len); + virtual int getPlaylistLength(int playlistnumber); + virtual songid_t getPlaylistTrack(int playlistnumber,int songnum); // returns a songid + + virtual void setPlaylistName(int playlistnumber, const wchar_t *buf); // playlistnumber != 0!! + virtual void playlistSwapItems(int playlistnumber, int posA, int posB); // swap the songs at position posA and posB + virtual void sortPlaylist(int playlistnumber, int sortBy); + virtual void addTrackToPlaylist(int playlistnumber, songid_t songid); // adds songid to the end of the playlist + virtual void removeTrackFromPlaylist(int playlistnumber, int songnum); //where songnum is the position of the track in the playlist + + virtual void deletePlaylist(int playlistnumber); + virtual int newPlaylist(const wchar_t * name); // create empty playlist, returns playlistnumber + + virtual void getTrackArtist(songid_t songid, wchar_t * buf, int len); + virtual void getTrackAlbum(songid_t songid, wchar_t * buf, int len); + virtual void getTrackTitle(songid_t songid, wchar_t * buf, int len); + virtual int getTrackTrackNum(songid_t songid); + virtual int getTrackDiscNum(songid_t songid){return -1;} + virtual void getTrackGenre(songid_t songid, wchar_t * buf, int len); + virtual int getTrackYear(songid_t songid); + virtual __int64 getTrackSize(songid_t songid); // in bytes + virtual int getTrackLength(songid_t songid); // in millisecs + virtual int getTrackBitrate(songid_t songid); // in kbps + virtual int getTrackPlayCount(songid_t songid); + virtual int getTrackRating(songid_t songid); //0-5 + virtual __time64_t getTrackLastPlayed(songid_t songid); // in unix time format + virtual __time64_t getTrackLastUpdated(songid_t songid); // in unix time format + virtual void getTrackAlbumArtist(songid_t songid, wchar_t * buf, int len); + virtual void getTrackComposer(songid_t songid, wchar_t * buf, int len); + virtual int getTrackType(songid_t songid); + virtual void getTrackExtraInfo(songid_t songid, const wchar_t *field, wchar_t * buf, int len); + + Song * lastChange; + void PreCommit(Song * song); + + // feel free to ignore any you don't support + virtual void setTrackArtist(songid_t songid, const wchar_t * value); + virtual void setTrackAlbum(songid_t songid, const wchar_t * value); + virtual void setTrackTitle(songid_t songid, const wchar_t * value); + virtual void setTrackTrackNum(songid_t songid, int value); + virtual void setTrackDiscNum(songid_t songid, int value){}; + virtual void setTrackGenre(songid_t songid, const wchar_t * value); + virtual void setTrackYear(songid_t songid, int year); + virtual void setTrackPlayCount(songid_t songid, int value); + virtual void setTrackRating(songid_t songid, int value); + virtual void setTrackLastPlayed(songid_t songid, __time64_t value); // in unix time format + virtual void setTrackLastUpdated(songid_t songid, __time64_t value); // in unix time format + virtual void setTrackAlbumArtist(songid_t songid, const wchar_t * value); + virtual void setTrackComposer(songid_t songid, const wchar_t * value); + virtual void setTrackExtraInfo(songid_t songid, const wchar_t * field, const wchar_t * value) {}; //optional + + virtual bool playTracks(songid_t * songidList, int listLength, int startPlaybackAt, bool enqueue){return false;}; // return false if unsupported + + virtual intptr_t extraActions(intptr_t param1, intptr_t param2, intptr_t param3,intptr_t param4); + + virtual bool copyToHardDriveSupported() {return true;} + + virtual __int64 songSizeOnHardDrive(songid_t song) {return getTrackSize(song);} // how big a song will be when copied back. Return -1 for not supported. + + virtual int copyToHardDrive(songid_t song, // the song to copy + wchar_t * path, // path to copy to, in the form "c:\directory\song". The directory will already be created, you must append ".mp3" or whatever to this string! (there is space for at least 10 new characters). + void * callbackContext, //pass this to the callback + void (*callback)(void * callbackContext, wchar_t * status), // call this every so often so the GUI can be updated. Including when finished! + int * killswitch // if this gets set to anything other than zero, the transfer has been cancelled by the user + ); // -1 for failed/not supported. 0 for success. + + virtual void setArt(songid_t songid, void *buf, int w, int h); //buf is in format ARGB32* + virtual pmpart_t getArt(songid_t songid); + virtual void releaseArt(pmpart_t art); + virtual int drawArt(pmpart_t art, HDC dc, int x, int y, int w, int h); + virtual void getArtNaturalSize(pmpart_t art, int *w, int *h); + virtual void setArtNaturalSize(pmpart_t art, int w, int h); + virtual void getArtData(pmpart_t art, void* data); // data ARGB32* is at natural size + virtual bool artIsEqual(pmpart_t a, pmpart_t b); +}; + +#endif // _P4SDEVICE_H_
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/WMDRMDeviceApp.h b/Src/Plugins/Portable/pmp_p4s/WMDRMDeviceApp.h new file mode 100644 index 00000000..7f0968a4 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/WMDRMDeviceApp.h @@ -0,0 +1,502 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0361 */ +/* at Tue Jan 10 22:44:12 2006 + */ +/* Compiler settings for \Wmsdk\Wmfsdk95\Wmdm\idl\WMDRMDeviceApp.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + + +/* verify that the <rpcndr.h> version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of <rpcndr.h> +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __WMDRMDeviceApp_h__ +#define __WMDRMDeviceApp_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IWMDRMDeviceApp_FWD_DEFINED__ +#define __IWMDRMDeviceApp_FWD_DEFINED__ +typedef interface IWMDRMDeviceApp IWMDRMDeviceApp; +#endif /* __IWMDRMDeviceApp_FWD_DEFINED__ */ + + +#ifndef __IWMDRMDeviceApp2_FWD_DEFINED__ +#define __IWMDRMDeviceApp2_FWD_DEFINED__ +typedef interface IWMDRMDeviceApp2 IWMDRMDeviceApp2; +#endif /* __IWMDRMDeviceApp2_FWD_DEFINED__ */ + + +#ifndef __WMDRMDeviceApp_FWD_DEFINED__ +#define __WMDRMDeviceApp_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class WMDRMDeviceApp WMDRMDeviceApp; +#else +typedef struct WMDRMDeviceApp WMDRMDeviceApp; +#endif /* __cplusplus */ + +#endif /* __WMDRMDeviceApp_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "mswmdm.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_WMDRMDeviceApp_0000 */ +/* [local] */ + +// WMDRM Device status flags +#define WMDRM_DEVICE_ISWMDRM 0x00000001L +#define WMDRM_DEVICE_NEEDCLOCK 0x00000002L +#define WMDRM_DEVICE_REVOKED 0x00000004L +#define WMDRM_CLIENT_NEEDINDIV 0x00000008L +#define WMDRM_DEVICE_REFRESHCLOCK 0x00000010L +// WMDRM Query Device flags +#define WMDRM_QUERY_DEVICE_ISWMDRM 0x00000001L +#define WMDRM_QUERY_DEVICE_CLOCKSTATUS 0x00000002L +#define WMDRM_QUERY_DEVICE_ISREVOKED 0x00000004L +#define WMDRM_QUERY_CLIENT_INDIVSTATUS 0x00000008L +// ProcessMeterResponse flags +#define WMDRM_METER_RESPONSE_ALL 0x00000000L +#define WMDRM_METER_RESPONSE_PARTIAL 0x00000001L + + +extern RPC_IF_HANDLE __MIDL_itf_WMDRMDeviceApp_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_WMDRMDeviceApp_0000_v0_0_s_ifspec; + +#ifndef __IWMDRMDeviceApp_INTERFACE_DEFINED__ +#define __IWMDRMDeviceApp_INTERFACE_DEFINED__ + +/* interface IWMDRMDeviceApp */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDRMDeviceApp; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("93AFDB44-B1E1-411d-B89B-75AD4F97882B") + IWMDRMDeviceApp : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GenerateMeterChallenge( + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ BSTR bstrMeterCert, + /* [out] */ BSTR *pbstrMeterURL, + /* [out] */ BSTR *pbstrMeterData) = 0; + + virtual HRESULT STDMETHODCALLTYPE ProcessMeterResponse( + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ BYTE *pbResponse, + /* [in] */ DWORD cbResponse, + /* [out] */ DWORD *pdwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryDeviceStatus( + /* [in] */ IWMDMDevice *pDevice, + /* [out] */ DWORD *pdwStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE AcquireDeviceData( + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ IWMDMProgress3 *pProgressCallback, + /* [in] */ DWORD dwFlags, + /* [out] */ DWORD *pdwStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE SynchronizeLicenses( + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ IWMDMProgress3 *pProgressCallback, + /* [in] */ DWORD cMinCountThreshold, + /* [in] */ DWORD cMinHoursThreshold) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDRMDeviceAppVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDRMDeviceApp * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDRMDeviceApp * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDRMDeviceApp * This); + + HRESULT ( STDMETHODCALLTYPE *GenerateMeterChallenge )( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ BSTR bstrMeterCert, + /* [out] */ BSTR *pbstrMeterURL, + /* [out] */ BSTR *pbstrMeterData); + + HRESULT ( STDMETHODCALLTYPE *ProcessMeterResponse )( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ BYTE *pbResponse, + /* [in] */ DWORD cbResponse, + /* [out] */ DWORD *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE *QueryDeviceStatus )( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [out] */ DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *AcquireDeviceData )( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ IWMDMProgress3 *pProgressCallback, + /* [in] */ DWORD dwFlags, + /* [out] */ DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *SynchronizeLicenses )( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ IWMDMProgress3 *pProgressCallback, + /* [in] */ DWORD cMinCountThreshold, + /* [in] */ DWORD cMinHoursThreshold); + + END_INTERFACE + } IWMDRMDeviceAppVtbl; + + interface IWMDRMDeviceApp + { + CONST_VTBL struct IWMDRMDeviceAppVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDRMDeviceApp_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IWMDRMDeviceApp_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IWMDRMDeviceApp_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IWMDRMDeviceApp_GenerateMeterChallenge(This,pDevice,bstrMeterCert,pbstrMeterURL,pbstrMeterData) \ + (This)->lpVtbl -> GenerateMeterChallenge(This,pDevice,bstrMeterCert,pbstrMeterURL,pbstrMeterData) + +#define IWMDRMDeviceApp_ProcessMeterResponse(This,pDevice,pbResponse,cbResponse,pdwFlags) \ + (This)->lpVtbl -> ProcessMeterResponse(This,pDevice,pbResponse,cbResponse,pdwFlags) + +#define IWMDRMDeviceApp_QueryDeviceStatus(This,pDevice,pdwStatus) \ + (This)->lpVtbl -> QueryDeviceStatus(This,pDevice,pdwStatus) + +#define IWMDRMDeviceApp_AcquireDeviceData(This,pDevice,pProgressCallback,dwFlags,pdwStatus) \ + (This)->lpVtbl -> AcquireDeviceData(This,pDevice,pProgressCallback,dwFlags,pdwStatus) + +#define IWMDRMDeviceApp_SynchronizeLicenses(This,pDevice,pProgressCallback,cMinCountThreshold,cMinHoursThreshold) \ + (This)->lpVtbl -> SynchronizeLicenses(This,pDevice,pProgressCallback,cMinCountThreshold,cMinHoursThreshold) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IWMDRMDeviceApp_GenerateMeterChallenge_Proxy( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ BSTR bstrMeterCert, + /* [out] */ BSTR *pbstrMeterURL, + /* [out] */ BSTR *pbstrMeterData); + + +void __RPC_STUB IWMDRMDeviceApp_GenerateMeterChallenge_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IWMDRMDeviceApp_ProcessMeterResponse_Proxy( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ BYTE *pbResponse, + /* [in] */ DWORD cbResponse, + /* [out] */ DWORD *pdwFlags); + + +void __RPC_STUB IWMDRMDeviceApp_ProcessMeterResponse_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IWMDRMDeviceApp_QueryDeviceStatus_Proxy( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [out] */ DWORD *pdwStatus); + + +void __RPC_STUB IWMDRMDeviceApp_QueryDeviceStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IWMDRMDeviceApp_AcquireDeviceData_Proxy( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ IWMDMProgress3 *pProgressCallback, + /* [in] */ DWORD dwFlags, + /* [out] */ DWORD *pdwStatus); + + +void __RPC_STUB IWMDRMDeviceApp_AcquireDeviceData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IWMDRMDeviceApp_SynchronizeLicenses_Proxy( + IWMDRMDeviceApp * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ IWMDMProgress3 *pProgressCallback, + /* [in] */ DWORD cMinCountThreshold, + /* [in] */ DWORD cMinHoursThreshold); + + +void __RPC_STUB IWMDRMDeviceApp_SynchronizeLicenses_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IWMDRMDeviceApp_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDRMDeviceApp2_INTERFACE_DEFINED__ +#define __IWMDRMDeviceApp2_INTERFACE_DEFINED__ + +/* interface IWMDRMDeviceApp2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDRMDeviceApp2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("600D6E55-DEA5-4e4c-9C3A-6BD642A45B9D") + IWMDRMDeviceApp2 : public IWMDRMDeviceApp + { + public: + virtual HRESULT STDMETHODCALLTYPE QueryDeviceStatus2( + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ DWORD dwFlags, + /* [out] */ DWORD *pdwStatus) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDRMDeviceApp2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDRMDeviceApp2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDRMDeviceApp2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDRMDeviceApp2 * This); + + HRESULT ( STDMETHODCALLTYPE *GenerateMeterChallenge )( + IWMDRMDeviceApp2 * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ BSTR bstrMeterCert, + /* [out] */ BSTR *pbstrMeterURL, + /* [out] */ BSTR *pbstrMeterData); + + HRESULT ( STDMETHODCALLTYPE *ProcessMeterResponse )( + IWMDRMDeviceApp2 * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ BYTE *pbResponse, + /* [in] */ DWORD cbResponse, + /* [out] */ DWORD *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE *QueryDeviceStatus )( + IWMDRMDeviceApp2 * This, + /* [in] */ IWMDMDevice *pDevice, + /* [out] */ DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *AcquireDeviceData )( + IWMDRMDeviceApp2 * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ IWMDMProgress3 *pProgressCallback, + /* [in] */ DWORD dwFlags, + /* [out] */ DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *SynchronizeLicenses )( + IWMDRMDeviceApp2 * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ IWMDMProgress3 *pProgressCallback, + /* [in] */ DWORD cMinCountThreshold, + /* [in] */ DWORD cMinHoursThreshold); + + HRESULT ( STDMETHODCALLTYPE *QueryDeviceStatus2 )( + IWMDRMDeviceApp2 * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ DWORD dwFlags, + /* [out] */ DWORD *pdwStatus); + + END_INTERFACE + } IWMDRMDeviceApp2Vtbl; + + interface IWMDRMDeviceApp2 + { + CONST_VTBL struct IWMDRMDeviceApp2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDRMDeviceApp2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IWMDRMDeviceApp2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IWMDRMDeviceApp2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IWMDRMDeviceApp2_GenerateMeterChallenge(This,pDevice,bstrMeterCert,pbstrMeterURL,pbstrMeterData) \ + (This)->lpVtbl -> GenerateMeterChallenge(This,pDevice,bstrMeterCert,pbstrMeterURL,pbstrMeterData) + +#define IWMDRMDeviceApp2_ProcessMeterResponse(This,pDevice,pbResponse,cbResponse,pdwFlags) \ + (This)->lpVtbl -> ProcessMeterResponse(This,pDevice,pbResponse,cbResponse,pdwFlags) + +#define IWMDRMDeviceApp2_QueryDeviceStatus(This,pDevice,pdwStatus) \ + (This)->lpVtbl -> QueryDeviceStatus(This,pDevice,pdwStatus) + +#define IWMDRMDeviceApp2_AcquireDeviceData(This,pDevice,pProgressCallback,dwFlags,pdwStatus) \ + (This)->lpVtbl -> AcquireDeviceData(This,pDevice,pProgressCallback,dwFlags,pdwStatus) + +#define IWMDRMDeviceApp2_SynchronizeLicenses(This,pDevice,pProgressCallback,cMinCountThreshold,cMinHoursThreshold) \ + (This)->lpVtbl -> SynchronizeLicenses(This,pDevice,pProgressCallback,cMinCountThreshold,cMinHoursThreshold) + + +#define IWMDRMDeviceApp2_QueryDeviceStatus2(This,pDevice,dwFlags,pdwStatus) \ + (This)->lpVtbl -> QueryDeviceStatus2(This,pDevice,dwFlags,pdwStatus) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IWMDRMDeviceApp2_QueryDeviceStatus2_Proxy( + IWMDRMDeviceApp2 * This, + /* [in] */ IWMDMDevice *pDevice, + /* [in] */ DWORD dwFlags, + /* [out] */ DWORD *pdwStatus); + + +void __RPC_STUB IWMDRMDeviceApp2_QueryDeviceStatus2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IWMDRMDeviceApp2_INTERFACE_DEFINED__ */ + + + +#ifndef __WMDRMDeviceAppLib_LIBRARY_DEFINED__ +#define __WMDRMDeviceAppLib_LIBRARY_DEFINED__ + +/* library WMDRMDeviceAppLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_WMDRMDeviceAppLib; + +EXTERN_C const CLSID CLSID_WMDRMDeviceApp; + +#ifdef __cplusplus + +class DECLSPEC_UUID("5C140836-43DE-11d3-847D-00C04F79DBC0") +WMDRMDeviceApp; +#endif +#endif /* __WMDRMDeviceAppLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); +unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); +unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); +void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/Src/Plugins/Portable/pmp_p4s/WMDRMDeviceApp_i.c b/Src/Plugins/Portable/pmp_p4s/WMDRMDeviceApp_i.c new file mode 100644 index 00000000..8dddbc1e --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/WMDRMDeviceApp_i.c @@ -0,0 +1,93 @@ + + +/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ + +/* link this file in with the server and any clients */ + + + /* File created by MIDL compiler version 6.00.0361 */ +/* at Tue Jan 10 22:44:12 2006 + */ +/* Compiler settings for \Wmsdk\Wmfsdk95\Wmdm\idl\WMDRMDeviceApp.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + +#if !defined(_M_IA64) && !defined(_M_AMD64) + + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + + +#ifdef __cplusplus +extern "C"{ +#endif + + +#include <rpc.h> +#include <rpcndr.h> + +#ifdef _MIDL_USE_GUIDDEF_ + +#ifndef INITGUID +#define INITGUID +#include <guiddef.h> +#undef INITGUID +#else +#include <guiddef.h> +#endif + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) + +#else // !_MIDL_USE_GUIDDEF_ + +#ifndef __IID_DEFINED__ +#define __IID_DEFINED__ + +typedef struct _IID +{ + unsigned long x; + unsigned short s1; + unsigned short s2; + unsigned char c[8]; +} IID; + +#endif // __IID_DEFINED__ + +#ifndef CLSID_DEFINED +#define CLSID_DEFINED +typedef IID CLSID; +#endif // CLSID_DEFINED + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} + +#endif !_MIDL_USE_GUIDDEF_ + +MIDL_DEFINE_GUID(IID, IID_IWMDRMDeviceApp,0x93AFDB44,0xB1E1,0x411d,0xB8,0x9B,0x75,0xAD,0x4F,0x97,0x88,0x2B); + + +MIDL_DEFINE_GUID(IID, IID_IWMDRMDeviceApp2,0x600D6E55,0xDEA5,0x4e4c,0x9C,0x3A,0x6B,0xD6,0x42,0xA4,0x5B,0x9D); + + +MIDL_DEFINE_GUID(IID, LIBID_WMDRMDeviceAppLib,0x50BB7AB2,0x0498,0x450D,0xA2,0xC3,0x81,0xCC,0x17,0xFD,0x15,0x4D); + + +MIDL_DEFINE_GUID(CLSID, CLSID_WMDRMDeviceApp,0x5C140836,0x43DE,0x11d3,0x84,0x7D,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + +#undef MIDL_DEFINE_GUID + +#ifdef __cplusplus +} +#endif + + + +#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/ + diff --git a/Src/Plugins/Portable/pmp_p4s/deviceprovider.cpp b/Src/Plugins/Portable/pmp_p4s/deviceprovider.cpp new file mode 100644 index 00000000..d85c5205 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/deviceprovider.cpp @@ -0,0 +1,285 @@ +#include "P4SDevice.h" +#include "./deviceprovider.h" +#include "../devices/api_devicemanager.h" +#include "../nu/threadpool/api_threadpool.h" + +void checkForDevices(BOOL *killSwitch); +BOOL +QueueThreadFunction(api_threadpool::ThreadPoolFunc func, void *user, intptr_t id); + +DeviceProvider::DeviceProvider() + : ref(1), activity(0), manager(NULL), readyEvent(NULL), cancelDiscovery(FALSE) +{ + InitializeCriticalSection(&lock); +} + +DeviceProvider::~DeviceProvider() +{ + CancelDiscovery(); + + if (NULL != readyEvent) + CloseHandle(readyEvent); + + DeleteCriticalSection(&lock); +} + +HRESULT DeviceProvider::CreateInstance(DeviceProvider **instance) +{ + if (NULL == instance) + return E_POINTER; + + *instance = new DeviceProvider(); + + if (NULL == *instance) + return E_OUTOFMEMORY; + + return S_OK; +} + +size_t DeviceProvider::AddRef() +{ + return InterlockedIncrement((LONG*)&ref); +} + +size_t DeviceProvider::Release() +{ + if (0 == ref) + return ref; + + LONG r = InterlockedDecrement((LONG*)&ref); + if (0 == r) + delete(this); + + return r; +} + +int DeviceProvider::QueryInterface(GUID interface_guid, void **object) +{ + if (NULL == object) + return E_POINTER; + + if (IsEqualIID(interface_guid, IFC_DeviceProvider)) + *object = static_cast<ifc_deviceprovider*>(this); + else + { + *object = NULL; + return E_NOINTERFACE; + } + + if (NULL == *object) + return E_UNEXPECTED; + + AddRef(); + return S_OK; +} + +void DeviceProvider::Lock() +{ + EnterCriticalSection(&lock); +} + +void DeviceProvider::Unlock() +{ + LeaveCriticalSection(&lock); +} + +DWORD DeviceProvider::DiscoveryThread() +{ + IncrementActivity(); + + if (FALSE == cancelDiscovery) + { + checkForDevices(&cancelDiscovery); + } + + DecrementActivity(); + + Lock(); + + if (NULL != readyEvent) + SetEvent(readyEvent); + + Unlock(); + + return 0; +} + +static int DeviceProvider_DiscoveryThreadStarter(HANDLE handle, void *user, intptr_t id) +{ + DeviceProvider *self; + DWORD result; + + self = (DeviceProvider*)user; + + if (NULL != self) + result = self->DiscoveryThread(); + else + result = -2; + + return result; +} + +HRESULT DeviceProvider::BeginDiscovery(api_devicemanager *manager) +{ + HRESULT hr; + + Lock(); + + if (NULL != readyEvent && + WAIT_TIMEOUT == WaitForSingleObject(readyEvent, 0)) + { + hr = E_PENDING; + } + else + { + hr = S_OK; + + if (NULL == readyEvent) + { + readyEvent = CreateEvent(NULL, TRUE, TRUE, NULL); + if (NULL == readyEvent) + hr = E_FAIL; + } + + if (SUCCEEDED(hr)) + { + cancelDiscovery = FALSE; + ResetEvent(readyEvent); + + if (FALSE == QueueThreadFunction(DeviceProvider_DiscoveryThreadStarter, + this, 0)) + { + SetEvent(readyEvent); + hr = E_FAIL; + } + } + } + + Unlock(); + + return hr; +} + +HRESULT DeviceProvider::CancelDiscovery() +{ + HRESULT hr; + + hr = S_FALSE; + + Lock(); + + if (NULL != readyEvent) + { + cancelDiscovery = TRUE; + if (WAIT_OBJECT_0 == WaitForSingleObject(readyEvent, 0)) + hr = S_OK; + + cancelDiscovery = FALSE; + } + + Unlock(); + + return hr; +} + +HRESULT DeviceProvider::GetActive() +{ + HRESULT hr; + + Lock(); + + if (0 != activity) + hr = S_OK; + else + hr = S_FALSE; + + Unlock(); + + return hr; +} + +HRESULT DeviceProvider::Register(api_devicemanager *manager) +{ + HRESULT hr; + + if (NULL != this->manager) + return E_UNEXPECTED; + + if (NULL == manager) + return E_POINTER; + + hr = manager->RegisterProvider(this); + if (SUCCEEDED(hr)) + { + this->manager = manager; + manager->AddRef(); + } + return hr; +} + +HRESULT DeviceProvider::Unregister() +{ + HRESULT hr; + + if (NULL == manager) + return E_UNEXPECTED; + + hr = manager->UnregisterProvider(this); + manager->Release(); + manager = NULL; + return hr; +} + +size_t DeviceProvider::IncrementActivity() +{ + size_t a; + + Lock(); + + activity++; + if (1 == activity && + NULL != manager) + { + manager->SetProviderActive(this, TRUE); + } + + a = activity; + + Unlock(); + + return a; +} + +size_t DeviceProvider::DecrementActivity() +{ + size_t a; + + Lock(); + + if (0 != activity) + { + activity--; + if (0 == activity && + NULL != manager) + { + manager->SetProviderActive(this, FALSE); + } + } + + a = activity; + + Unlock(); + + return a; +} + +#define CBCLASS DeviceProvider +START_DISPATCH; +CB(ADDREF, AddRef) +CB(RELEASE, Release) +CB(QUERYINTERFACE, QueryInterface) +CB(API_BEGINDISCOVERY, BeginDiscovery) +CB(API_CANCELDISCOVERY, CancelDiscovery) +CB(API_GETACTIVE, GetActive) +END_DISPATCH; +#undef CBCLASS
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/deviceprovider.h b/Src/Plugins/Portable/pmp_p4s/deviceprovider.h new file mode 100644 index 00000000..af40a40d --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/deviceprovider.h @@ -0,0 +1,49 @@ +#pragma once + +#include <wtypes.h> +#include "../devices/ifc_deviceprovider.h" +#include "..\..\Library\ml_pmp/pmp.h" + +class DeviceProvider : public ifc_deviceprovider +{ +protected: + DeviceProvider(); + ~DeviceProvider(); + +public: + static HRESULT CreateInstance(DeviceProvider **instance); + +public: + /* Dispatchable */ + size_t AddRef(); + size_t Release(); + int QueryInterface(GUID interface_guid, void **object); + + /* ifc_deviceprovider */ + HRESULT BeginDiscovery(api_devicemanager *manager); + HRESULT CancelDiscovery(); + HRESULT GetActive(); + +public: + HRESULT Register(api_devicemanager *manager); + HRESULT Unregister(); + size_t IncrementActivity(); + size_t DecrementActivity(); + +private: + void Lock(); + void Unlock(); + DWORD DiscoveryThread(); + friend static int DeviceProvider_DiscoveryThreadStarter(HANDLE handle, void *user_data, intptr_t id); + +protected: + size_t ref; + size_t activity; + CRITICAL_SECTION lock; + api_devicemanager *manager; + HANDLE readyEvent; + BOOL cancelDiscovery; + +protected: + RECVS_DISPATCH; +};
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/key-sub-523.c b/Src/Plugins/Portable/pmp_p4s/key-sub-523.c new file mode 100644 index 00000000..9e74d107 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/key-sub-523.c @@ -0,0 +1,531 @@ +#include "wtypes.h" +BYTE abPVK[4096] = { + 0x3E, 0x45, 0xEB, 0x7B, 0xC8, 0xE7, 0x19, 0x8D, + 0xFA, 0x55, 0xBF, 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, + 0xBF, 0xD1, 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, + 0x03, 0x59, 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, + 0xCD, 0x58, 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, + 0xBE, 0xF4, 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, + 0x47, 0xEE, 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, + 0xB9, 0x9E, 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, + 0x1A, 0x0A, 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, + 0xE3, 0xC1, 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, + 0xB8, 0x85, 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, + 0x62, 0xDE, 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, + 0x7A, 0x98, 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, + 0x5D, 0x07, 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, + 0x3A, 0x05, 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, + 0x4C, 0x8E, 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, + 0x96, 0xD3, 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, + 0x45, 0xEB, 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, + 0x55, 0xBF, 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, + 0xD1, 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, + 0x59, 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, + 0x58, 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, + 0xF4, 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, + 0xEE, 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, + 0x9E, 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, + 0x0A, 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, + 0xC1, 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, + 0x85, 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, + 0xDE, 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, + 0x98, 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, + 0x07, 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, + 0x05, 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, + 0x8E, 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, + 0xD3, 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, + 0xEB, 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, + 0xBF, 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, + 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, + 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, + 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, + 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, + 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, + 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, + 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, + 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, + 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, + 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, + 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, + 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, + 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, + 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, + 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, + 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, + 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, + 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, + 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, + 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, 0xE5, + 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, + 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, + 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, + 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, + 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, 0x9C, + 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, 0x5C, + 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, + 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, 0x81, + 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, 0x7B, + 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, 0x7B, + 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, 0xA5, + 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, 0x15, + 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, 0x29, + 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, 0xA3, + 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, 0x99, + 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, 0xC5, + 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, 0xE5, 0xCF, + 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, 0xB5, + 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, 0x70, + 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, 0xAA, + 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, 0x0B, + 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, 0x9C, 0x17, + 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, 0x5C, 0x8B, + 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, 0x75, + 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, 0x81, 0xEA, + 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, 0x7B, 0xC8, + 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, 0x7B, 0xE8, + 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, 0xA5, 0xEA, + 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, 0x15, 0x78, + 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, 0x29, 0x01, + 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, 0xA3, 0xFE, + 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, 0x99, 0xFF, + 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, 0xC5, 0xD5, + 0xC3, 0xDC, 0x22, 0x1A, 0x0A, 0xE5, 0xCF, 0xD8, + 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, 0xB5, 0xFA, + 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, 0x70, 0x90, + 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, 0xAA, 0xFB, + 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, 0x0B, 0x91, + 0x57, 0xC8, 0x3E, 0x5D, 0x07, 0x9C, 0x17, 0x3E, + 0x7D, 0x4C, 0x63, 0x3A, 0x05, 0x5C, 0x8B, 0x49, + 0x05, 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, 0x75, 0xE5, + 0xFA, 0x45, 0xCF, 0x96, 0xD3, 0x81, 0xEA, 0x61, + 0x48, 0x8F, 0x3E, 0x45, 0xEB, 0x7B, 0xC8, 0xE7, + 0x19, 0x8D, 0xFA, 0x55, 0xBF, 0x7B, 0xE8, 0x2E, + 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, 0xA5, 0xEA, 0x0A, + 0x04, 0xB0, 0x03, 0x59, 0x26, 0x15, 0x78, 0xDC, + 0xD1, 0x9F, 0xCD, 0x58, 0xAC, 0x29, 0x01, 0x27, + 0x24, 0x02, 0xBE, 0xF4, 0xD6, 0xA3, 0xFE, 0x8D, + 0xEF, 0xC8, 0x47, 0xEE, 0x45, 0x99, 0xFF, 0xBC, + 0x27, 0xA1, 0xB9, 0x9E, 0xC4, 0xC5, 0xD5, 0xC3, + 0xDC, 0x22, 0x1A, 0x0A, 0xE5, 0xCF, 0xD8, 0x5F, + 0x76, 0x62, 0xE3, 0xC1, 0x7D, 0xB5, 0xFA, 0x66, + 0x7C, 0x5E, 0xB8, 0x85, 0x43, 0x70, 0x90, 0x4E, + 0x37, 0x65, 0x62, 0xDE, 0x60, 0xAA, 0xFB, 0x61, + 0x4D, 0xF0, 0x7A, 0x98, 0x49, 0x0B, 0x91, 0x57, + 0xC8, 0x3E, 0x5D, 0x07, 0x9C, 0x17, 0x3E, 0x7D, + 0x4C, 0x63, 0x3A, 0x05, 0x5C, 0x8B, 0x49, 0x05, + 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, 0x75, 0xE5, 0xFA, + 0x45, 0xCF, 0x96, 0xD3, 0x81, 0xEA, 0x61, 0x48, + 0x8F, 0x3E, 0x45, 0xEB, 0x7B, 0xC8, 0xE7, 0x19, + 0x8D, 0xFA, 0x55, 0xBF, 0x7B, 0xE8, 0x2E, 0xDE, + 0xB2, 0xBF, 0xD1, 0x2D, 0xA5, 0xEA, 0x0A, 0x04, + 0xB0, 0x03, 0x59, 0x26, 0x15, 0x78, 0xDC, 0xD1, + 0x9F, 0xCD, 0x58, 0xAC, 0x29, 0x01, 0x27, 0x24, + 0x02, 0xBE, 0xF4, 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, + 0xC8, 0x47, 0xEE, 0x45, 0x99, 0xFF, 0xBC, 0x27, + 0xA1, 0xB9, 0x9E, 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, + 0x22, 0x1A, 0x0A, 0xE5, 0xCF, 0xD8, 0x5F, 0x76, + 0x62, 0xE3, 0xC1, 0x7D, 0xB5, 0xFA, 0x66, 0x7C, + 0x5E, 0xB8, 0x85, 0x43, 0x70, 0x90, 0x4E, 0x37, + 0x65, 0x62, 0xDE, 0x60, 0xAA, 0xFB, 0x61, 0x4D, + 0xF0, 0x7A, 0x98, 0x49, 0x0B, 0x91, 0x57, 0xC8, + 0x3E, 0x5D, 0x07, 0x9C, 0x17, 0x3E, 0x7D, 0x4C, + 0x63, 0x3A, 0x05, 0x5C, 0x8B, 0x49, 0x05, 0xCA, + 0xEA, 0x4C, 0x8E, 0xA7, 0x75, 0xE5, 0xFA, 0x45, + 0xCF, 0x96, 0xD3, 0x81, 0xEA, 0x61, 0x48, 0x8F, + 0x3E, 0x45, 0xEB, 0x7B, 0xC8, 0xE7, 0x19, 0x8D, + 0xFA, 0x55, 0xBF, 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, + 0xBF, 0xD1, 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, + 0x03, 0x59, 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, + 0xCD, 0x58, 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, + 0xBE, 0xF4, 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, + 0x47, 0xEE, 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, + 0xB9, 0x9E, 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, + 0x1A, 0x0A, 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, + 0xE3, 0xC1, 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, + 0xB8, 0x85, 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, + 0x62, 0xDE, 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, + 0x7A, 0x98, 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, + 0x5D, 0x07, 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, + 0x3A, 0x05, 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, + 0x4C, 0x8E, 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, + 0x96, 0xD3, 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, + 0x45, 0xEB, 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, + 0x55, 0xBF, 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, + 0xD1, 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, + 0x59, 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, + 0x58, 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, + 0xF4, 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, + 0xEE, 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, + 0x9E, 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, + 0x0A, 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, + 0xC1, 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, + 0x85, 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, + 0xDE, 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, + 0x98, 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, + 0x07, 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, + 0x05, 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, + 0x8E, 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, + 0xD3, 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, + 0xEB, 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, + 0xBF, 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, + 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, + 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, + 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, + 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, + 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, + 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, + 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, + 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, + 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, + 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, + 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, + 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, + 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, + 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, + 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, + 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, + 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, + 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, + 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, + 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, 0xE5, + 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, + 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, + 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, + 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, + 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, 0x9C, + 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, 0x5C, + 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, + 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, 0x81, + 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, 0x7B, + 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, 0x7B, + 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, 0xA5, + 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, 0x15, + 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, 0x29, + 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, 0xA3, + 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, 0x99, + 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, 0xC5, + 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, 0xE5, 0xCF, + 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, 0xB5, + 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, 0x70, + 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, 0xAA, + 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, 0x0B, + 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, 0x9C, 0x17, + 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, 0x5C, 0x8B, + 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, 0x75, + 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, 0x81, 0xEA, + 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, 0x7B, 0xC8, + 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, 0x7B, 0xE8, + 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, 0xA5, 0xEA, + 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, 0x15, 0x78, + 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, 0x29, 0x01, + 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, 0xA3, 0xFE, + 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, 0x99, 0xFF, + 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, 0xC5, 0xD5, + 0x7D, 0xC3, 0xEB, 0x22, 0x1A, 0x0A, 0xE5, 0x57, + 0xCF, 0xA2, 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, + 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, + 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, + 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, + 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x1A, 0x5D, 0xAF, + 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, + 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, + 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, + 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, + 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, + 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, + 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, + 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, + 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, 0xE5, + 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, + 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, + 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, + 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, + 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, 0x9C, + 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, 0x5C, + 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, + 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, 0x81, + 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, 0x7B, + 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, 0x7B, + 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, 0xA5, + 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, 0x15, + 0x78, 0xDC, 0xD1, 0x9F, 0x07, 0xCD, 0xD5, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, + 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x65, 0x0A, + 0x63, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, + 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, + 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, + 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, + 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, + 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, + 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, + 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, + 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, + 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, + 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, + 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, + 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, + 0xC5, 0xD5, 0xC3, 0x74, 0xDC, 0x10, 0x1A, 0x0A, + 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, + 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, + 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, + 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, + 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, + 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, + 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, + 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, + 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, + 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, + 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, + 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, + 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, + 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, 0xE5, + 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, + 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, + 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, + 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, + 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, 0x9C, + 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, 0x5C, + 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, + 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x70, 0x96, 0x57, + 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, + 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, + 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, + 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, + 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, + 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, 0xE5, + 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, + 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, + 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, + 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, + 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, 0x9C, + 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, 0x5C, + 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, + 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, 0x81, + 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, 0x7B, + 0xC8, 0x2C, 0xE7, 0xFA, 0x8D, 0xFA, 0x55, 0xBF, + 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, + 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, + 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, + 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, 0xE5, + 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, 0x7D, + 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, 0x43, + 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, 0x60, + 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, 0x49, + 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, 0x9C, + 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, 0x5C, + 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, 0xA7, + 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, 0x81, + 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, 0x7B, + 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, 0x7B, + 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, 0xA5, + 0x51, 0xEA, 0xEA, 0x04, 0xB0, 0x03, 0x59, 0x26, + 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0x6D, 0xA1, 0xA1, 0x9E, + 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, + 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, + 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, + 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, + 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, + 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, + 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, + 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, + 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, + 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, + 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, + 0x7B, 0x58, 0xE8, 0x8A, 0xDE, 0xB2, 0xBF, 0xD1, + 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, + 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, + 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, + 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, + 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, + 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, + 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, + 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, + 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, + 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, + 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, + 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, + 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, + 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, + 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, + 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, 0xBF, + 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, 0x2D, + 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, 0x26, + 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, 0xAC, + 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, 0xD6, + 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, 0x45, + 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, 0xC4, + 0xC5, 0xD5, 0xC3, 0xDC, 0x72, 0x22, 0x0D, 0x0A, + 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, + 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, + 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, + 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, + 0x51, 0x49, 0xC9, 0x91, 0x57, 0xC8, 0x3E, 0x5D, + 0x07, 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, + 0x05, 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, + 0x8E, 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, + 0xD3, 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, + 0xEB, 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x55, + 0xBF, 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, + 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, + 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, + 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, + 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, + 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, + 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, 0x0A, + 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, 0xC1, + 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, 0x85, + 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, 0xDE, + 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, 0x98, + 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, 0x07, + 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, 0x05, + 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, 0x8E, + 0xA7, 0x75, 0xE5, 0xFA, 0x45, 0xCF, 0x96, 0xD3, + 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, 0x45, 0xEB, + 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, 0x70, 0x55, + 0x70, 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, 0xD1, + 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, 0x59, + 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, 0x58, + 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, 0xF4, + 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, 0xEE, + 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, 0x9E, + 0x1E, 0xC4, 0xDA, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, + 0x0A, 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, + 0xC1, 0x7D, 0xB5, 0xFA, 0x66, 0x7C, 0x5E, 0xB8, + 0x85, 0x43, 0x70, 0x90, 0x4E, 0x37, 0x65, 0x62, + 0xDE, 0x60, 0xAA, 0xFB, 0x61, 0x4D, 0xF0, 0x7A, + 0x98, 0x49, 0x0B, 0x91, 0x57, 0xC8, 0x3E, 0x5D, + 0x07, 0x9C, 0x17, 0x3E, 0x7D, 0x4C, 0x63, 0x3A, + 0x05, 0x5C, 0x8B, 0x49, 0x05, 0xCA, 0xEA, 0x4C, + 0x76, 0x8E, 0x12, 0x75, 0xE5, 0xFA, 0x45, 0xCF, + 0x96, 0xD3, 0x81, 0xEA, 0x61, 0x48, 0x8F, 0x3E, + 0x45, 0xEB, 0x7B, 0xC8, 0xE7, 0x19, 0x8D, 0xFA, + 0x55, 0xBF, 0x7B, 0xE8, 0x2E, 0xDE, 0xB2, 0xBF, + 0xD1, 0x2D, 0xA5, 0xEA, 0x0A, 0x04, 0xB0, 0x03, + 0x59, 0x26, 0x15, 0x78, 0xDC, 0xD1, 0x9F, 0xCD, + 0x58, 0xAC, 0x29, 0x01, 0x27, 0x24, 0x02, 0xBE, + 0xF4, 0xD6, 0xA3, 0xFE, 0x8D, 0xEF, 0xC8, 0x47, + 0xEE, 0x45, 0x99, 0xFF, 0xBC, 0x27, 0xA1, 0xB9, + 0x9E, 0xC4, 0xC5, 0xD5, 0xC3, 0xDC, 0x22, 0x1A, + 0x0A, 0xE5, 0xCF, 0xD8, 0x5F, 0x76, 0x62, 0xE3, + 0xC1, 0x7D, 0xB5, 0x95, 0x32, 0x86, 0x72, 0x41, + 0x37, 0xC8, 0xCB, 0x9D, 0x31, 0xBE, 0x6C, 0xF7, + 0xB1, 0xCA, 0x62, 0x6B, 0x39, 0x3D, 0xF1, 0xA4, + 0x06, 0x1F, 0x2E, 0xC2, 0xCF, 0x96, 0xD5, 0x7F, + 0xEC, 0x5F, 0x4A, 0x8D, 0xDB, 0x0F, 0x60, 0x8B, + 0x1A, 0x36, 0xB8, 0x74, 0x54, 0xF1, 0x47, 0x96, + 0x04, 0xB5, 0xCB, 0xC7, 0x08, 0x5F, 0x55, 0xB5, + 0x84, 0x75, 0xA3, 0x70, 0x4E, 0xC2, 0xA7, 0x8A, + 0x9D, 0x7F, 0x6F, 0x0F, 0x9C, 0xE7, 0x09, 0x9F, + 0xE1, 0xAA, 0x61, 0x94, 0xAB, 0x0F, 0x81, 0xCF, + 0x7B, 0x56, 0x8D, 0xE1, 0x6D, 0x38, 0x3E, 0x57, + 0xA7, 0x61, 0xC5, 0x78, 0x6D, 0xBA, 0x53, 0xA1, + 0xA4, 0xE6, 0xDA, 0xFE, 0x0A, 0xDA, 0xA7, 0x2F, + 0xF9, 0xCA, 0xE4, 0x85, 0x21, 0x2B, 0x60, 0x96, + 0x42, 0xDF, 0x1E, 0x20, 0x69, 0x88, 0x54, 0xC5, + 0xDB, 0x8C, 0xB0, 0x39, 0x57, 0xD8, 0xFC, 0xA6, + 0xA3, 0xB6, 0x0A, 0xEF, 0xF8, 0x7E, 0x2F, 0x81, + 0xA9, 0xD6, 0x50, 0x1C, 0xB5, 0xD5, 0x57, 0x7B, + 0xF3, 0xBD, 0x22, 0x40, 0x18, 0x80, 0xA0, 0x43, + 0x14, 0x1D, 0xCF, 0x55, 0xAF, 0x24, 0x9F, 0xEE, + 0x35, 0xDB, 0x1F, 0x50, 0x07, 0x96, 0x50, 0xD1, + 0x01, 0x37, 0x14, 0xE7, 0xD3, 0xA1, 0xCA, 0xF4, + 0x75, 0xCF, 0xDE, 0x8D, 0x15, 0x6D, 0x4D, 0xF6, + 0x41, 0xA0, 0xF6, 0x62, 0x32, 0x4B, 0x78, 0xA8, + 0xC6, 0x62, 0x03, 0xA1, 0x10, 0xE2, 0xA3, 0x9B, + 0x24, 0xCB, 0x5A, 0xA8, 0x2D, 0x94, 0x96, 0x57, + 0x97, 0x71, 0xAE, 0x30, 0x2D, 0x31, 0x2B, 0xCC, + 0xF7, 0x3F, 0x09, 0x8F, 0x8C, 0x5F, 0xBE, 0x4C, + 0xB0, 0xEC, 0xA5, 0x38, 0xBB, 0xA7, 0x55, 0x9E, + 0x35, 0x89, 0xA3, 0x44, 0xE2, 0xEA, 0xEF, 0x1E, + 0x8C, 0x65, 0x83, 0x24, 0x28, 0x65, 0x8F, 0x4B, + 0x6B, 0x96, 0xDF, 0x0D, 0xCA, 0xB8, 0xB0, 0xB0, + 0xE0, 0xB0, 0x28, 0x6A, 0x57, 0x1E, 0xEA, 0xD4, + 0x06, 0x67, 0x1A, 0x8D, 0xFC, 0x53, 0x2A, 0xA9, + 0xE4, 0xAB, 0x2F, 0x61, 0x62, 0xA8, 0x64, 0xF6, + 0xE4, 0x95, 0xAA, 0x10, 0x19, 0x37, 0xB7, 0xDC, + 0xEC, 0xB5, 0x26, 0xD4, 0xED, 0xE4, 0x5E, 0xAD, + 0xF6, 0xFF, 0x14, 0x6A, 0x1A, 0xF5, 0x94, 0x80, + 0x39, 0x78, 0x1C, 0xC6, 0xC4, 0xD6, 0xC4, 0xDD, + 0x88, 0x4F, 0x66, 0x9D, 0xA4, 0x80, 0xA5, 0x0B, + 0xE7, 0x9C, 0x3F, 0x4A, 0x1A, 0x1B, 0x39, 0x82, + 0x45, 0x07, 0xF7, 0x24, 0x23, 0x9D, 0x21, 0x69, + 0x21, 0xB9, 0x06, 0xF5, 0x57, 0xBC, 0x17, 0xB1, + 0x3D, 0xB9, 0x11, 0xEB, 0xCD, 0x42, 0xF5, 0x3C, + 0xD6, 0x25, 0xAF, 0xDC, 0x4E, 0xEF, 0x7B, 0x30, + 0x7F, 0xAB, 0x39, 0xEF, 0x40, 0x6A, 0xFA, 0xAE, + 0x66, 0x2B, 0xE3, 0xAD, 0xC6, 0x31, 0x68, 0xF7, + 0x4B, 0x30, 0x37, 0x5A, 0x6C, 0x68, 0x75, 0x33, + 0xAB, 0xE8, 0x74, 0x9A, 0x37, 0xDF, 0x74, 0x62, + 0xE5, 0xBF, 0xE8, 0x48, 0xC5, 0x3C, 0xF7, 0xD2, + 0xA9, 0xF4, 0x9B, 0xDD, 0x79, 0x5E, 0xE9, 0xBB, + 0x87, 0xA7, 0xA7, 0x81, 0x73, 0xD8, 0x07, 0xCE, + 0x4C, 0x85, 0x7D, 0x37, 0x44, 0xB5, 0x16, 0x22, + 0xE4, 0x6B, 0x9C, 0xD1, 0xEB, 0x80, 0x90, 0x55, + 0xFB, 0xD7, 0xD7, 0x97, 0x70, 0x18, 0xC6, 0x5C, + 0x3E, 0x97, 0x65, 0x89, 0xEB, 0x95, 0x46, 0x41, + 0xC0, 0x3F, 0x8A, 0x41, 0x73, 0x8B, 0x55, 0x93, + 0x3F, 0x13, 0xB8, 0x32, 0x61, 0xCA, 0x40, 0x28, + 0x70, 0x1C, 0x28, 0x95, 0x2D, 0x27, 0x34, 0x59, + 0x07, 0x34, 0x7F, 0xAC, 0xD1, 0x57, 0x13, 0x5B, + 0x90, 0x13, 0x71, 0xE0, 0x65, 0x0B, 0x9C, 0x7F, + 0x71, 0x72, 0x6D, 0xA3, 0xD2, 0x1F, 0x19, 0xA5, + 0x16, 0x76, 0x77, 0x02, 0x46, 0x6C, 0x2D, 0xAF, + 0x13, 0x4B, 0x3B, 0xC8, 0x33, 0x35, 0xF5, 0x38, + 0x0D, 0xBA, 0xC8, 0x99, 0x68, 0x53, 0xEE, 0xE4, + 0xC5, 0x48, 0x1E, 0x15, 0xDA, 0xDF, 0x29, 0xAF, + 0xAD, 0x16, 0xAD, 0x74, 0x4E, 0x2A, 0xDA, 0x1A, + 0xEF, 0x66, 0x78, 0x95, 0x4D, 0x07, 0x30, 0xB6, + 0x41, 0x53, 0x44, 0x27, 0x3E, 0xE9, 0x48, 0xC7, + 0x3A, 0xF9, 0xD0, 0xAB, 0xF2, 0x9D, 0xDB, 0x7B, + 0xF3, 0x56, 0xF0, 0x48, 0xFC, 0x39, 0xA8, 0x53, + 0xA2, 0xC8, 0x8F, 0xD8, 0x12, 0x5B, 0x29, 0x78, + 0x49, 0xCA, 0x04, 0x65, 0xB4, 0xF3, 0xD1, 0x42, + 0x5D, 0x6F, 0x34, 0x44, 0x4D, 0x4C, 0x84, 0x7E, + 0xCF, 0x15, 0x21, 0x31, 0x8E, 0x35, 0x1B, 0x44, + 0xAA, 0xEE, 0x3B, 0xA2, 0x8C, 0xCC, 0x1C, 0x4E, + 0xD3, 0xFD, 0xD6, 0x41, 0x2D, 0x9F, 0xBC, 0x02, + 0xFB, 0x51, 0x5D, 0x42, 0x62, 0x37, 0x39, 0x8D, + 0x6D, 0x15, 0xFA, 0x8D, 0x0A, 0x89, 0x00, 0x14 +}; +BYTE abCert[100] = { + 0x00, 0x01, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0xFB, 0x05, 0xF0, 0xAC, 0x1C, 0x41, 0x84, 0xEC, + 0x64, 0xE5, 0xDB, 0x29, 0x03, 0x2C, 0xFA, 0x4D, + 0xA8, 0x95, 0xB7, 0x75, 0x9A, 0xA5, 0x31, 0xEE, + 0x2E, 0x5B, 0xF0, 0x49, 0x1B, 0x11, 0xD8, 0x27, + 0x8C, 0x82, 0x76, 0xF7, 0x61, 0x15, 0xB6, 0x2C, + 0xE7, 0xDB, 0x52, 0x12, 0x88, 0x64, 0xB9, 0x8F, + 0xB2, 0x13, 0x9C, 0x7C, 0xFE, 0x7C, 0xF4, 0x71, + 0x1F, 0x1E, 0xFA, 0x67, 0x03, 0x91, 0x43, 0xFC, + 0x7F, 0x96, 0x8E, 0xD2, 0xEE, 0xF4, 0xA2, 0x8A, + 0x89, 0xAA, 0xAA, 0x91, 0xA8, 0x19, 0xC3, 0x0A, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, 0xE8, + 0x00, 0x00, 0x02, 0x0B +}; +//======================================================= diff --git a/Src/Plugins/Portable/pmp_p4s/main.cpp b/Src/Plugins/Portable/pmp_p4s/main.cpp new file mode 100644 index 00000000..0f467422 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/main.cpp @@ -0,0 +1,571 @@ +//#define PLUGIN_NAME "Nullsoft PlaysForSure Plug-in" +#define PLUGIN_VERSION L"0.99.1" + +//#define _WIN32_WINNT 0x0400 +#define _WIN32_DCOM +#define INITGUID +#include "P4SDevice.h" +#include "..\..\General\gen_ml/itemlist.h" +#include "key-sub-523.c" // This key is the authentication key. +#include "mswmdm.h" +#include "deviceprovider.h" +#include "../nu/threadpool/api_threadpool.h" +//#include "key.c" + +C_ItemList devices; + +// wasabi based services for localisation support +api_language *WASABI_API_LNG = 0; +HINSTANCE WASABI_API_LNG_HINST = 0, WASABI_API_ORIG_HINST = 0; +api_memmgr *memoryManager=0; +api_albumart *AGAVE_API_ALBUMART=0; +api_threadpool *WASABI_API_THREADPOOL = 0; +api_devicemanager *AGAVE_API_DEVICEMANAGER = 0; + +int init(); +void quit(); +intptr_t MessageProc(int msg, intptr_t param1, intptr_t param2, intptr_t param3); + +PMPDevicePlugin plugin = {PMPHDR_VER,0,init,quit,MessageProc}; + +void checkForDevices(BOOL *killSwitch); +void gotDevice(IWMDMDevice* pIDevice); + +CRITICAL_SECTION csTransfers; + +static DeviceProvider *deviceProvider = NULL; + +static IWMDeviceManager3* pIdvMgr=NULL; +static DWORD ConnectionNotificationCookie = 0; +CSecureChannelClient SAC; +IWMDRMDeviceApp * DRMDeviceApp = NULL; + +HANDLE killEvent = 0; + +static int ThreadInitFunc(HANDLE handle, void *user_data, intptr_t param); +static int ThreadQuitFunc(HANDLE handle, void *user_data, intptr_t param); + +HANDLE hWinampThread=NULL; + +class MyNotification : public IWMDMNotification { +public: + virtual HRESULT STDMETHODCALLTYPE WMDMMessage(DWORD dwMessageType, LPCWSTR pwszCanonicalName) { + switch(dwMessageType) { + case WMDM_MSG_DEVICE_ARRIVAL: // WMDM device has been plugged in + //OutputDebugString(L"Device arrived (IWMN)"); + if (NULL == deviceProvider || + FAILED(deviceProvider->BeginDiscovery(AGAVE_API_DEVICEMANAGER))) + { + checkForDevices(NULL); + } + break; + case WMDM_MSG_DEVICE_REMOVAL: // WMDM device has been removed + //OutputDebugString(L"Device removed (IWMN)"); + for(int i=0; i<devices.GetSize(); i++) { + wchar_t devName[256] = {0}; + ((P4SDevice *)devices.Get(i))->WMDevice->GetCanonicalName(devName,256); + if(wcscmp(pwszCanonicalName,devName) == 0) { + ((P4SDevice *)devices.Get(i))->Close(); + } + } + break; + case WMDM_MSG_MEDIA_ARRIVAL: // Media has been inserted in WMDM device + WMDMMessage(WMDM_MSG_DEVICE_REMOVAL,pwszCanonicalName); + WMDMMessage(WMDM_MSG_DEVICE_ARRIVAL,pwszCanonicalName); + break; + case WMDM_MSG_MEDIA_REMOVAL: // Media is removed from WMDM device + WMDMMessage(WMDM_MSG_DEVICE_REMOVAL,pwszCanonicalName); + WMDMMessage(WMDM_MSG_DEVICE_ARRIVAL,pwszCanonicalName); + break; + } + return S_OK; + } + // COM shit + ULONG refs; + MyNotification() {refs=1;} + #define IMPLEMENTS(ifc) if (riid == IID_ ## ifc) { ++refs; *ppvObject = static_cast<ifc *>(this); return S_OK; } + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid,void __RPC_FAR *__RPC_FAR *ppvObject) { + IMPLEMENTS(IWMDMNotification); + IMPLEMENTS(IUnknown); + *ppvObject = NULL; + return E_NOINTERFACE; + } + virtual ULONG STDMETHODCALLTYPE AddRef() { return ++refs; } + virtual ULONG STDMETHODCALLTYPE Release() { int x = --refs; if(!x) delete this; return x; } + #undef IMPLEMENTS +}; + +IWMDMNotification * myNotify=NULL; + + +template <class api_T> +void ServiceBuild(api_T *&api_t, GUID factoryGUID_t) +{ + if (plugin.service) + { + waServiceFactory *factory = plugin.service->service_getServiceByGuid(factoryGUID_t); + if (factory) + api_t = reinterpret_cast<api_T *>( factory->getInterface() ); + } +} + +template <class api_T> +void ServiceRelease(api_T *api_t, GUID factoryGUID_t) +{ + if (plugin.service && api_t) + { + waServiceFactory *factory = plugin.service->service_getServiceByGuid(factoryGUID_t); + if (factory) + factory->releaseInterface(api_t); + } + api_t = NULL; +} + +BOOL +QueueThreadFunction(api_threadpool::ThreadPoolFunc func, void *user, intptr_t id) +{ + BOOL result; + ThreadID *thread; + + if (NULL == WASABI_API_THREADPOOL) + return FALSE; + + thread = WASABI_API_THREADPOOL->ReserveThread(api_threadpool::FLAG_REQUIRE_COM_MT); + if (NULL == thread) + return FALSE; + + result = (0 == WASABI_API_THREADPOOL->RunFunction(thread, func, user, id, + api_threadpool::FLAG_REQUIRE_COM_MT)); + + WASABI_API_THREADPOOL->ReleaseThread(thread); + + return result; +} + +static int init2(BOOL runCheck) +{ + HRESULT hr; + IComponentAuthenticate* pICompAuth; + + DWORD dwNumProtCount; + DWORD* pdwProt=NULL; // This will always be SAC_PROTOCOL_V1. + + hr = CoCreateInstance(CLSID_MediaDevMgr, NULL, CLSCTX_ALL, IID_IComponentAuthenticate, (void **)&pICompAuth); + + // After getting IComponentAuthenticate, the authentication progression follows. + if (SUCCEEDED(hr)) + { + hr = SAC.SetCertificate(SAC_CERT_V1, (BYTE*) abCert, sizeof(abCert), (BYTE*) abPVK, sizeof(abPVK)); + if (SUCCEEDED(hr)) + { + // Set interface for Secure Authenticated Channel + // operations. The return value of this function is void. + + SAC.SetInterface(pICompAuth); + hr = pICompAuth->SACGetProtocols(&pdwProt, &dwNumProtCount); + if (SUCCEEDED(hr)) + SAC.Authenticate(*pdwProt); //SAC_PROTOCOL_V1 + //if (SUCCEEDED(hr)) OutputDebugString(L"CSecureChannelClient.Authenticate succeeded\n"); + } + if(pdwProt) + CoTaskMemFree(pdwProt); + // After authentication has succeeded, call QueryInterface to + // get IID_IWMDeviceManager. + + if (FAILED(pICompAuth->QueryInterface(IID_IWMDeviceManager3, (void**)&pIdvMgr))) + pIdvMgr = NULL; + + pICompAuth->Release(); + pICompAuth = NULL; + + if (NULL != pIdvMgr) + { + pIdvMgr->SetDeviceEnumPreference(ALLOW_OUTOFBAND_NOTIFICATION); + IConnectionPointContainer *pIcpc = NULL; + if (SUCCEEDED(pIdvMgr->QueryInterface(IID_IConnectionPointContainer,(void**)&pIcpc))) + { + IConnectionPoint * pICP=NULL; + if (SUCCEEDED(pIcpc->FindConnectionPoint(IID_IWMDMNotification,&pICP))) + { + myNotify = new MyNotification; + + if (FAILED(pICP->Advise(myNotify, &ConnectionNotificationCookie))) + ConnectionNotificationCookie = 0; + + pICP->Release(); + } + pIcpc->Release(); + pIcpc=0; + } + } + } + + if (FALSE != runCheck) + checkForDevices(NULL); + + return 0; +} + +static void quit2() +{ + if(pIdvMgr) + { + if (0 != ConnectionNotificationCookie) + { + IConnectionPointContainer *pIcpc; + if (SUCCEEDED(pIdvMgr->QueryInterface(IID_IConnectionPointContainer,(void**)&pIcpc))) + { + IConnectionPoint * pICP; + if (SUCCEEDED(pIcpc->FindConnectionPoint(IID_IWMDMNotification,&pICP))) + { + pICP->Unadvise(ConnectionNotificationCookie); + ConnectionNotificationCookie = 0; + pICP->Release(); + } + pIcpc->Release(); + } + } + pIdvMgr->Release(); + pIdvMgr = NULL; + } + + if(myNotify) + { + myNotify->Release(); + myNotify=0; + } + + if(DRMDeviceApp) + { + DRMDeviceApp->Release(); + DRMDeviceApp=0; + } +} + + +int init() +{ + CoInitialize(0); + // check OS version + OSVERSIONINFO osvi = {0}; + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&osvi); + if(osvi.dwMajorVersion < 5) return -1; + if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion < 1) return -1; + hWinampThread = GetCurrentThread(); + InitializeCriticalSection(&csTransfers); + + Tataki::Init(plugin.service); + + ServiceBuild(WASABI_API_LNG, languageApiGUID); + ServiceBuild(WASABI_API_MEMMGR, memMgrApiServiceGuid); + ServiceBuild(WASABI_API_THREADPOOL, ThreadPoolGUID); + ServiceBuild(AGAVE_API_ALBUMART, albumArtGUID); + ServiceBuild(AGAVE_API_DEVICEMANAGER, DeviceManagerGUID); + + // need to have this initialised before we try to do anything with localisation features + WASABI_API_START_LANG(plugin.hDllInstance,PmpP4SLangGUID); + + static wchar_t szDescription[256]; + StringCchPrintfW(szDescription, ARRAYSIZE(szDescription), + WASABI_API_LNGSTRINGW(IDS_NULLSOFT_P4S_PLUGIN), PLUGIN_VERSION); + plugin.description = szDescription; + + if (NULL != AGAVE_API_DEVICEMANAGER && + NULL == deviceProvider) + { + if (SUCCEEDED(DeviceProvider::CreateInstance(&deviceProvider)) && + FAILED(deviceProvider->Register(AGAVE_API_DEVICEMANAGER))) + { + deviceProvider->Release(); + deviceProvider = NULL; + } + } + + // set up thread + killEvent = CreateEvent(NULL,TRUE,FALSE,NULL); + + if (FALSE == QueueThreadFunction(ThreadInitFunc, NULL, (NULL == deviceProvider))) + init2(NULL == deviceProvider); + + if (NULL != deviceProvider && + FAILED(deviceProvider->BeginDiscovery(AGAVE_API_DEVICEMANAGER))) + { + checkForDevices(NULL); + } + return 0; +} + +void quit() +{ + SetEvent(killEvent); + + if (NULL != deviceProvider) + { + deviceProvider->Unregister(); + deviceProvider->Release(); + deviceProvider = NULL; + } + + HANDLE doneEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + + if (FALSE != QueueThreadFunction(ThreadQuitFunc, doneEvent, 0)) + WaitForSingleObject(doneEvent, INFINITE); + else + quit2(); + + CloseHandle(doneEvent); + + CloseHandle(killEvent); + DeleteCriticalSection(&csTransfers); + Tataki::Quit(); + + ServiceRelease(WASABI_API_LNG, languageApiGUID); + ServiceRelease(WASABI_API_MEMMGR, memMgrApiServiceGuid); + ServiceRelease(WASABI_API_THREADPOOL, ThreadPoolGUID); + ServiceRelease(AGAVE_API_ALBUMART, albumArtGUID); + ServiceRelease(AGAVE_API_DEVICEMANAGER, DeviceManagerGUID); + + CoUninitialize(); +} + + + +void newDeviceAvaliable(IWMDMDevice3* pIDevice) +{ + HRESULT hr; + DWORD dwTypeDev = 0; + wchar_t buffer[1024] = {0}; + + hr = pIDevice->GetType(&dwTypeDev); + if (SUCCEEDED(hr)) + { + if(0 == (WMDM_DEVICE_TYPE_PLAYBACK & dwTypeDev)) + { + return; + + if (FAILED(pIDevice->GetName(buffer,ARRAYSIZE(buffer)))) + buffer[0] = L'\0'; + + int l = wcslen(buffer); + + if(l > 5 && + buffer[l-5] == L' ' && + buffer[l-4] == L'(' && + buffer[l-2] == L':' && + buffer[l-1] == L')') + { + return; + } + } + + if(0 == (WMDM_DEVICE_TYPE_STORAGE & dwTypeDev)) + return; + } + else + return; + + // make sure it's not just a simple mass storage device (we have a separate plugin for this!) + PROPVARIANT protocol; // VARIANTs can kiss my ass + hr = pIDevice->GetProperty(g_wszWMDMDeviceProtocol, &protocol); + if (SUCCEEDED(hr)) + { + bool isUsb = !!(*protocol.puuid == WMDM_DEVICE_PROTOCOL_MSC); + PropVariantClear(&protocol); + if (isUsb) + return; + } + + if (SUCCEEDED(pIDevice->GetCanonicalName(buffer, ARRAYSIZE(buffer)))) + { + wchar_t buffer2[ARRAYSIZE(buffer)] = {0}; + + for(int i=0; i < devices.GetSize(); i++) + { + P4SDevice *device = (P4SDevice*)devices.Get(i); + if (NULL != device && + NULL != device->WMDevice && + SUCCEEDED(device->WMDevice->GetCanonicalName(buffer2, ARRAYSIZE(buffer2)))) + { + if(wcscmp(buffer, buffer2) == 0) + return; + } + } + } + + if(!DRMDeviceApp) + CoCreateInstance(CLSID_WMDRMDeviceApp, NULL, CLSCTX_ALL, IID_IWMDRMDeviceApp, (void **)&DRMDeviceApp); + + bool noMetadata; + + if (0 == (WMDM_DEVICE_TYPE_PLAYBACK & dwTypeDev)) + { + noMetadata = true; + } + else if (SUCCEEDED(pIDevice->GetManufacturer(buffer, ARRAYSIZE(buffer))) && + NULL != wcsstr(buffer, L"Nokia")) + { + noMetadata = true; + } + else + noMetadata = false; + + P4SDevice *dev = new P4SDevice(pIDevice,noMetadata); + + //return dev; +} + +void checkForDevices(BOOL *killSwitch) +{ + HRESULT hr = S_OK; + IWMDMEnumDevice* pIEnumDev; + IWMDMDevice* pIDeviceOld; + IWMDMDevice3* pIDevice = NULL; + unsigned long fetched; + if (!pIdvMgr) + return; + + hr = pIdvMgr->EnumDevices2(&pIEnumDev); // Query for device enumerator. + if (SUCCEEDED(hr)) + { + // If no device is found, S_FALSE is returned, which is still + // a success case. Do not use the SUCCEEDED macro. + while ((NULL == killSwitch || FALSE == *killSwitch) && + S_OK == pIEnumDev->Next(1, &pIDeviceOld, &fetched)) + { + if(SUCCEEDED(pIDeviceOld->QueryInterface(IID_IWMDMDevice3,(void**)&pIDevice))) + { + newDeviceAvaliable(pIDevice); + pIDevice->Release(); + } + pIDeviceOld->Release(); + } + // We should release this pointer but it appears to make winamp not shut down properly if we do. + // This function will only be called a small number of times, so I propose that we don't free it + // until this error can be better investigated. --will + pIEnumDev->Release(); + } +} + + +static int ThreadInitFunc(HANDLE handle, void *user_data, intptr_t param) +{ + init2((BOOL)param); + return 0; +} + +static int ThreadQuitFunc(HANDLE handle, void *user_data, intptr_t param) +{ + quit2(); + + if (NULL != user_data) + SetEvent((HANDLE)user_data); + + return 0; +} + + +intptr_t MessageProc(int msg, intptr_t param1, intptr_t param2, intptr_t param3) { + switch(msg) { + case PMP_DEVICECHANGE: + return 0; + case PMP_NO_CONFIG: + return TRUE; + case PMP_CONFIG: + return 0; + } + return 0; +} + +typedef struct { ULONG_PTR param; void * proc; int state; CRITICAL_SECTION lock;} spc ; + +static VOID CALLBACK spc_caller(ULONG_PTR dwParam) { + spc * s = (spc*)dwParam; + if(!s) return; + EnterCriticalSection(&s->lock); + if(s->state == -1) { LeaveCriticalSection(&s->lock); DeleteCriticalSection(&s->lock); free(s); return; } + s->state = 2; + void (CALLBACK *p)(ULONG_PTR dwParam); + p = (void (CALLBACK *)(ULONG_PTR dwParam))s->proc; + if(p) p(s->param); + s->state=1; + LeaveCriticalSection(&s->lock); +} + +// p must be of type void (CALLBACK *)(ULONG_PTR dwParam). Returns 0 for success. +int SynchronousProcedureCall(void * p, ULONG_PTR dwParam) { + if(!p) return 1; + spc * s = (spc*)calloc(1, sizeof(spc)); + InitializeCriticalSection(&s->lock); + s->param = dwParam; + s->proc = p; + s->state = 0; + if(!QueueUserAPC(spc_caller,hWinampThread,(ULONG_PTR)s)) { DeleteCriticalSection(&s->lock); free(s); return 1; } //failed + int i=0, state; + do { + SleepEx(10,true); + EnterCriticalSection(&s->lock); + state = s->state; + if(i++ == 100) {s->state = -1; return 1;} + LeaveCriticalSection(&s->lock); + } + while(state!=1); + DeleteCriticalSection(&s->lock); + free(s); + return 0; +} + + +BOOL FormatResProtocol(const wchar_t *resourceName, const wchar_t *resourceType, wchar_t *buffer, size_t bufferMax) +{ + unsigned long filenameLength; + + if (NULL == resourceName) + return FALSE; + + if (FAILED(StringCchCopyExW(buffer, bufferMax, L"res://", &buffer, &bufferMax, 0))) + return FALSE; + + filenameLength = GetModuleFileNameW(plugin.hDllInstance, buffer, bufferMax); + if (0 == filenameLength || bufferMax == filenameLength) + return FALSE; + + buffer += filenameLength; + bufferMax -= filenameLength; + + if (NULL != resourceType) + { + if (FALSE != IS_INTRESOURCE(resourceType)) + { + if (FAILED(StringCchPrintfExW(buffer, bufferMax, &buffer, &bufferMax, 0, L"/#%d", (int)(INT_PTR)resourceType))) + return FALSE; + } + else + { + if (FAILED(StringCchPrintfExW(buffer, bufferMax, &buffer, &bufferMax, 0, L"/%s", resourceType))) + return FALSE; + } + } + + if (FALSE != IS_INTRESOURCE(resourceName)) + { + if (FAILED(StringCchPrintfExW(buffer, bufferMax, &buffer, &bufferMax, 0, L"/#%d", (int)(INT_PTR)resourceName))) + return FALSE; + } + else + { + if (FAILED(StringCchPrintfExW(buffer, bufferMax, &buffer, &bufferMax, 0, L"/%s", resourceName))) + return FALSE; + } + + return TRUE; +} + +extern "C" { + __declspec( dllexport ) PMPDevicePlugin * winampGetPMPDevicePlugin(){return &plugin;} + __declspec( dllexport ) int winampUninstallPlugin(HINSTANCE hDllInst, HWND hwndDlg, int param) { + int i = devices.GetSize(); + while(i-- > 0) ((Device*)devices.Get(i))->Close(); + return PMP_PLUGIN_UNINSTALL_NOW; + } +};
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/mssachlp.lib b/Src/Plugins/Portable/pmp_p4s/mssachlp.lib Binary files differnew file mode 100644 index 00000000..041f12c3 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/mssachlp.lib diff --git a/Src/Plugins/Portable/pmp_p4s/mswmdm.h b/Src/Plugins/Portable/pmp_p4s/mswmdm.h new file mode 100644 index 00000000..a2b72f4d --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/mswmdm.h @@ -0,0 +1,9913 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 7.00.0498 */ +/* Compiler settings for mswmdm.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + + +/* verify that the <rpcndr.h> version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +/* verify that the <rpcsal.h> version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCSAL_H_VERSION__ +#define __REQUIRED_RPCSAL_H_VERSION__ 100 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of <rpcndr.h> +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __mswmdm_h__ +#define __mswmdm_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IWMDMMetaData_FWD_DEFINED__ +#define __IWMDMMetaData_FWD_DEFINED__ +typedef interface IWMDMMetaData IWMDMMetaData; +#endif /* __IWMDMMetaData_FWD_DEFINED__ */ + + +#ifndef __IWMDeviceManager_FWD_DEFINED__ +#define __IWMDeviceManager_FWD_DEFINED__ +typedef interface IWMDeviceManager IWMDeviceManager; +#endif /* __IWMDeviceManager_FWD_DEFINED__ */ + + +#ifndef __IWMDeviceManager2_FWD_DEFINED__ +#define __IWMDeviceManager2_FWD_DEFINED__ +typedef interface IWMDeviceManager2 IWMDeviceManager2; +#endif /* __IWMDeviceManager2_FWD_DEFINED__ */ + + +#ifndef __IWMDeviceManager3_FWD_DEFINED__ +#define __IWMDeviceManager3_FWD_DEFINED__ +typedef interface IWMDeviceManager3 IWMDeviceManager3; +#endif /* __IWMDeviceManager3_FWD_DEFINED__ */ + + +#ifndef __IWMDMStorageGlobals_FWD_DEFINED__ +#define __IWMDMStorageGlobals_FWD_DEFINED__ +typedef interface IWMDMStorageGlobals IWMDMStorageGlobals; +#endif /* __IWMDMStorageGlobals_FWD_DEFINED__ */ + + +#ifndef __IWMDMStorage_FWD_DEFINED__ +#define __IWMDMStorage_FWD_DEFINED__ +typedef interface IWMDMStorage IWMDMStorage; +#endif /* __IWMDMStorage_FWD_DEFINED__ */ + + +#ifndef __IWMDMStorage2_FWD_DEFINED__ +#define __IWMDMStorage2_FWD_DEFINED__ +typedef interface IWMDMStorage2 IWMDMStorage2; +#endif /* __IWMDMStorage2_FWD_DEFINED__ */ + + +#ifndef __IWMDMStorage3_FWD_DEFINED__ +#define __IWMDMStorage3_FWD_DEFINED__ +typedef interface IWMDMStorage3 IWMDMStorage3; +#endif /* __IWMDMStorage3_FWD_DEFINED__ */ + + +#ifndef __IWMDMStorage4_FWD_DEFINED__ +#define __IWMDMStorage4_FWD_DEFINED__ +typedef interface IWMDMStorage4 IWMDMStorage4; +#endif /* __IWMDMStorage4_FWD_DEFINED__ */ + + +#ifndef __IWMDMOperation_FWD_DEFINED__ +#define __IWMDMOperation_FWD_DEFINED__ +typedef interface IWMDMOperation IWMDMOperation; +#endif /* __IWMDMOperation_FWD_DEFINED__ */ + + +#ifndef __IWMDMOperation2_FWD_DEFINED__ +#define __IWMDMOperation2_FWD_DEFINED__ +typedef interface IWMDMOperation2 IWMDMOperation2; +#endif /* __IWMDMOperation2_FWD_DEFINED__ */ + + +#ifndef __IWMDMOperation3_FWD_DEFINED__ +#define __IWMDMOperation3_FWD_DEFINED__ +typedef interface IWMDMOperation3 IWMDMOperation3; +#endif /* __IWMDMOperation3_FWD_DEFINED__ */ + + +#ifndef __IWMDMProgress_FWD_DEFINED__ +#define __IWMDMProgress_FWD_DEFINED__ +typedef interface IWMDMProgress IWMDMProgress; +#endif /* __IWMDMProgress_FWD_DEFINED__ */ + + +#ifndef __IWMDMProgress2_FWD_DEFINED__ +#define __IWMDMProgress2_FWD_DEFINED__ +typedef interface IWMDMProgress2 IWMDMProgress2; +#endif /* __IWMDMProgress2_FWD_DEFINED__ */ + + +#ifndef __IWMDMProgress3_FWD_DEFINED__ +#define __IWMDMProgress3_FWD_DEFINED__ +typedef interface IWMDMProgress3 IWMDMProgress3; +#endif /* __IWMDMProgress3_FWD_DEFINED__ */ + + +#ifndef __IWMDMDevice_FWD_DEFINED__ +#define __IWMDMDevice_FWD_DEFINED__ +typedef interface IWMDMDevice IWMDMDevice; +#endif /* __IWMDMDevice_FWD_DEFINED__ */ + + +#ifndef __IWMDMDevice2_FWD_DEFINED__ +#define __IWMDMDevice2_FWD_DEFINED__ +typedef interface IWMDMDevice2 IWMDMDevice2; +#endif /* __IWMDMDevice2_FWD_DEFINED__ */ + + +#ifndef __IWMDMDevice3_FWD_DEFINED__ +#define __IWMDMDevice3_FWD_DEFINED__ +typedef interface IWMDMDevice3 IWMDMDevice3; +#endif /* __IWMDMDevice3_FWD_DEFINED__ */ + + +#ifndef __IWMDMDeviceSession_FWD_DEFINED__ +#define __IWMDMDeviceSession_FWD_DEFINED__ +typedef interface IWMDMDeviceSession IWMDMDeviceSession; +#endif /* __IWMDMDeviceSession_FWD_DEFINED__ */ + + +#ifndef __IWMDMEnumDevice_FWD_DEFINED__ +#define __IWMDMEnumDevice_FWD_DEFINED__ +typedef interface IWMDMEnumDevice IWMDMEnumDevice; +#endif /* __IWMDMEnumDevice_FWD_DEFINED__ */ + + +#ifndef __IWMDMDeviceControl_FWD_DEFINED__ +#define __IWMDMDeviceControl_FWD_DEFINED__ +typedef interface IWMDMDeviceControl IWMDMDeviceControl; +#endif /* __IWMDMDeviceControl_FWD_DEFINED__ */ + + +#ifndef __IWMDMEnumStorage_FWD_DEFINED__ +#define __IWMDMEnumStorage_FWD_DEFINED__ +typedef interface IWMDMEnumStorage IWMDMEnumStorage; +#endif /* __IWMDMEnumStorage_FWD_DEFINED__ */ + + +#ifndef __IWMDMStorageControl_FWD_DEFINED__ +#define __IWMDMStorageControl_FWD_DEFINED__ +typedef interface IWMDMStorageControl IWMDMStorageControl; +#endif /* __IWMDMStorageControl_FWD_DEFINED__ */ + + +#ifndef __IWMDMStorageControl2_FWD_DEFINED__ +#define __IWMDMStorageControl2_FWD_DEFINED__ +typedef interface IWMDMStorageControl2 IWMDMStorageControl2; +#endif /* __IWMDMStorageControl2_FWD_DEFINED__ */ + + +#ifndef __IWMDMStorageControl3_FWD_DEFINED__ +#define __IWMDMStorageControl3_FWD_DEFINED__ +typedef interface IWMDMStorageControl3 IWMDMStorageControl3; +#endif /* __IWMDMStorageControl3_FWD_DEFINED__ */ + + +#ifndef __IWMDMObjectInfo_FWD_DEFINED__ +#define __IWMDMObjectInfo_FWD_DEFINED__ +typedef interface IWMDMObjectInfo IWMDMObjectInfo; +#endif /* __IWMDMObjectInfo_FWD_DEFINED__ */ + + +#ifndef __IWMDMRevoked_FWD_DEFINED__ +#define __IWMDMRevoked_FWD_DEFINED__ +typedef interface IWMDMRevoked IWMDMRevoked; +#endif /* __IWMDMRevoked_FWD_DEFINED__ */ + + +#ifndef __IWMDMNotification_FWD_DEFINED__ +#define __IWMDMNotification_FWD_DEFINED__ +typedef interface IWMDMNotification IWMDMNotification; +#endif /* __IWMDMNotification_FWD_DEFINED__ */ + + +#ifndef __IMDServiceProvider_FWD_DEFINED__ +#define __IMDServiceProvider_FWD_DEFINED__ +typedef interface IMDServiceProvider IMDServiceProvider; +#endif /* __IMDServiceProvider_FWD_DEFINED__ */ + + +#ifndef __IMDServiceProvider2_FWD_DEFINED__ +#define __IMDServiceProvider2_FWD_DEFINED__ +typedef interface IMDServiceProvider2 IMDServiceProvider2; +#endif /* __IMDServiceProvider2_FWD_DEFINED__ */ + + +#ifndef __IMDServiceProvider3_FWD_DEFINED__ +#define __IMDServiceProvider3_FWD_DEFINED__ +typedef interface IMDServiceProvider3 IMDServiceProvider3; +#endif /* __IMDServiceProvider3_FWD_DEFINED__ */ + + +#ifndef __IMDSPEnumDevice_FWD_DEFINED__ +#define __IMDSPEnumDevice_FWD_DEFINED__ +typedef interface IMDSPEnumDevice IMDSPEnumDevice; +#endif /* __IMDSPEnumDevice_FWD_DEFINED__ */ + + +#ifndef __IMDSPDevice_FWD_DEFINED__ +#define __IMDSPDevice_FWD_DEFINED__ +typedef interface IMDSPDevice IMDSPDevice; +#endif /* __IMDSPDevice_FWD_DEFINED__ */ + + +#ifndef __IMDSPDevice2_FWD_DEFINED__ +#define __IMDSPDevice2_FWD_DEFINED__ +typedef interface IMDSPDevice2 IMDSPDevice2; +#endif /* __IMDSPDevice2_FWD_DEFINED__ */ + + +#ifndef __IMDSPDevice3_FWD_DEFINED__ +#define __IMDSPDevice3_FWD_DEFINED__ +typedef interface IMDSPDevice3 IMDSPDevice3; +#endif /* __IMDSPDevice3_FWD_DEFINED__ */ + + +#ifndef __IMDSPDeviceControl_FWD_DEFINED__ +#define __IMDSPDeviceControl_FWD_DEFINED__ +typedef interface IMDSPDeviceControl IMDSPDeviceControl; +#endif /* __IMDSPDeviceControl_FWD_DEFINED__ */ + + +#ifndef __IMDSPEnumStorage_FWD_DEFINED__ +#define __IMDSPEnumStorage_FWD_DEFINED__ +typedef interface IMDSPEnumStorage IMDSPEnumStorage; +#endif /* __IMDSPEnumStorage_FWD_DEFINED__ */ + + +#ifndef __IMDSPStorage_FWD_DEFINED__ +#define __IMDSPStorage_FWD_DEFINED__ +typedef interface IMDSPStorage IMDSPStorage; +#endif /* __IMDSPStorage_FWD_DEFINED__ */ + + +#ifndef __IMDSPStorage2_FWD_DEFINED__ +#define __IMDSPStorage2_FWD_DEFINED__ +typedef interface IMDSPStorage2 IMDSPStorage2; +#endif /* __IMDSPStorage2_FWD_DEFINED__ */ + + +#ifndef __IMDSPStorage3_FWD_DEFINED__ +#define __IMDSPStorage3_FWD_DEFINED__ +typedef interface IMDSPStorage3 IMDSPStorage3; +#endif /* __IMDSPStorage3_FWD_DEFINED__ */ + + +#ifndef __IMDSPStorage4_FWD_DEFINED__ +#define __IMDSPStorage4_FWD_DEFINED__ +typedef interface IMDSPStorage4 IMDSPStorage4; +#endif /* __IMDSPStorage4_FWD_DEFINED__ */ + + +#ifndef __IMDSPStorageGlobals_FWD_DEFINED__ +#define __IMDSPStorageGlobals_FWD_DEFINED__ +typedef interface IMDSPStorageGlobals IMDSPStorageGlobals; +#endif /* __IMDSPStorageGlobals_FWD_DEFINED__ */ + + +#ifndef __IMDSPObjectInfo_FWD_DEFINED__ +#define __IMDSPObjectInfo_FWD_DEFINED__ +typedef interface IMDSPObjectInfo IMDSPObjectInfo; +#endif /* __IMDSPObjectInfo_FWD_DEFINED__ */ + + +#ifndef __IMDSPObject_FWD_DEFINED__ +#define __IMDSPObject_FWD_DEFINED__ +typedef interface IMDSPObject IMDSPObject; +#endif /* __IMDSPObject_FWD_DEFINED__ */ + + +#ifndef __IMDSPObject2_FWD_DEFINED__ +#define __IMDSPObject2_FWD_DEFINED__ +typedef interface IMDSPObject2 IMDSPObject2; +#endif /* __IMDSPObject2_FWD_DEFINED__ */ + + +#ifndef __IMDSPDirectTransfer_FWD_DEFINED__ +#define __IMDSPDirectTransfer_FWD_DEFINED__ +typedef interface IMDSPDirectTransfer IMDSPDirectTransfer; +#endif /* __IMDSPDirectTransfer_FWD_DEFINED__ */ + + +#ifndef __IMDSPRevoked_FWD_DEFINED__ +#define __IMDSPRevoked_FWD_DEFINED__ +typedef interface IMDSPRevoked IMDSPRevoked; +#endif /* __IMDSPRevoked_FWD_DEFINED__ */ + + +#ifndef __ISCPSecureAuthenticate_FWD_DEFINED__ +#define __ISCPSecureAuthenticate_FWD_DEFINED__ +typedef interface ISCPSecureAuthenticate ISCPSecureAuthenticate; +#endif /* __ISCPSecureAuthenticate_FWD_DEFINED__ */ + + +#ifndef __ISCPSecureAuthenticate2_FWD_DEFINED__ +#define __ISCPSecureAuthenticate2_FWD_DEFINED__ +typedef interface ISCPSecureAuthenticate2 ISCPSecureAuthenticate2; +#endif /* __ISCPSecureAuthenticate2_FWD_DEFINED__ */ + + +#ifndef __ISCPSecureQuery_FWD_DEFINED__ +#define __ISCPSecureQuery_FWD_DEFINED__ +typedef interface ISCPSecureQuery ISCPSecureQuery; +#endif /* __ISCPSecureQuery_FWD_DEFINED__ */ + + +#ifndef __ISCPSecureQuery2_FWD_DEFINED__ +#define __ISCPSecureQuery2_FWD_DEFINED__ +typedef interface ISCPSecureQuery2 ISCPSecureQuery2; +#endif /* __ISCPSecureQuery2_FWD_DEFINED__ */ + + +#ifndef __ISCPSecureExchange_FWD_DEFINED__ +#define __ISCPSecureExchange_FWD_DEFINED__ +typedef interface ISCPSecureExchange ISCPSecureExchange; +#endif /* __ISCPSecureExchange_FWD_DEFINED__ */ + + +#ifndef __ISCPSecureExchange2_FWD_DEFINED__ +#define __ISCPSecureExchange2_FWD_DEFINED__ +typedef interface ISCPSecureExchange2 ISCPSecureExchange2; +#endif /* __ISCPSecureExchange2_FWD_DEFINED__ */ + + +#ifndef __ISCPSecureExchange3_FWD_DEFINED__ +#define __ISCPSecureExchange3_FWD_DEFINED__ +typedef interface ISCPSecureExchange3 ISCPSecureExchange3; +#endif /* __ISCPSecureExchange3_FWD_DEFINED__ */ + + +#ifndef __ISCPSession_FWD_DEFINED__ +#define __ISCPSession_FWD_DEFINED__ +typedef interface ISCPSession ISCPSession; +#endif /* __ISCPSession_FWD_DEFINED__ */ + + +#ifndef __ISCPSecureQuery3_FWD_DEFINED__ +#define __ISCPSecureQuery3_FWD_DEFINED__ +typedef interface ISCPSecureQuery3 ISCPSecureQuery3; +#endif /* __ISCPSecureQuery3_FWD_DEFINED__ */ + + +#ifndef __IComponentAuthenticate_FWD_DEFINED__ +#define __IComponentAuthenticate_FWD_DEFINED__ +typedef interface IComponentAuthenticate IComponentAuthenticate; +#endif /* __IComponentAuthenticate_FWD_DEFINED__ */ + + +#ifndef __MediaDevMgrClassFactory_FWD_DEFINED__ +#define __MediaDevMgrClassFactory_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class MediaDevMgrClassFactory MediaDevMgrClassFactory; +#else +typedef struct MediaDevMgrClassFactory MediaDevMgrClassFactory; +#endif /* __cplusplus */ + +#endif /* __MediaDevMgrClassFactory_FWD_DEFINED__ */ + + +#ifndef __MediaDevMgr_FWD_DEFINED__ +#define __MediaDevMgr_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class MediaDevMgr MediaDevMgr; +#else +typedef struct MediaDevMgr MediaDevMgr; +#endif /* __cplusplus */ + +#endif /* __MediaDevMgr_FWD_DEFINED__ */ + + +#ifndef __WMDMDevice_FWD_DEFINED__ +#define __WMDMDevice_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class WMDMDevice WMDMDevice; +#else +typedef struct WMDMDevice WMDMDevice; +#endif /* __cplusplus */ + +#endif /* __WMDMDevice_FWD_DEFINED__ */ + + +#ifndef __WMDMStorage_FWD_DEFINED__ +#define __WMDMStorage_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class WMDMStorage WMDMStorage; +#else +typedef struct WMDMStorage WMDMStorage; +#endif /* __cplusplus */ + +#endif /* __WMDMStorage_FWD_DEFINED__ */ + + +#ifndef __WMDMStorageGlobal_FWD_DEFINED__ +#define __WMDMStorageGlobal_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class WMDMStorageGlobal WMDMStorageGlobal; +#else +typedef struct WMDMStorageGlobal WMDMStorageGlobal; +#endif /* __cplusplus */ + +#endif /* __WMDMStorageGlobal_FWD_DEFINED__ */ + + +#ifndef __WMDMDeviceEnum_FWD_DEFINED__ +#define __WMDMDeviceEnum_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class WMDMDeviceEnum WMDMDeviceEnum; +#else +typedef struct WMDMDeviceEnum WMDMDeviceEnum; +#endif /* __cplusplus */ + +#endif /* __WMDMDeviceEnum_FWD_DEFINED__ */ + + +#ifndef __WMDMStorageEnum_FWD_DEFINED__ +#define __WMDMStorageEnum_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class WMDMStorageEnum WMDMStorageEnum; +#else +typedef struct WMDMStorageEnum WMDMStorageEnum; +#endif /* __cplusplus */ + +#endif /* __WMDMStorageEnum_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "propidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +/* interface __MIDL_itf_mswmdm_0000_0000 */ +/* [local] */ + +#ifndef _DEFINE_WMDM_DEVICE_PROTOCOL_MTP +#define _DEFINE_WMDM_DEVICE_PROTOCOL_MTP +// {979E54E5-0AFC-4604-8D93-DC798A4BCF45} +DEFINE_GUID(WMDM_DEVICE_PROTOCOL_MTP, +0x979e54e5, 0xafc, 0x4604, 0x8d, 0x93, 0xdc, 0x79, 0x8a, 0x4b, 0xcf, 0x45); +#endif +#ifndef _DEFINE_WMDM_DEVICE_PROTOCOL_RAPI +#define _DEFINE_WMDM_DEVICE_PROTOCOL_RAPI +// {2A11ED91-8C8F-41e4-82D1-8386E003561C} +DEFINE_GUID(WMDM_DEVICE_PROTOCOL_RAPI, +0x2a11ed91, 0x8c8f, 0x41e4, 0x82, 0xd1, 0x83, 0x86, 0xe0, 0x3, 0x56, 0x1c); +#endif +#ifndef _DEFINE_WMDM_DEVICE_PROTOCOL_MSC +#define _DEFINE_WMDM_DEVICE_PROTOCOL_MSC +// {A4D2C26C-A881-44bb-BD5D-1F703C71F7A9} +DEFINE_GUID(WMDM_DEVICE_PROTOCOL_MSC, +0xa4d2c26c, 0xa881, 0x44bb, 0xbd, 0x5d, 0x1f, 0x70, 0x3c, 0x71, 0xf7, 0xa9); +#endif +#ifndef _DEFINE_WMDM_SERVICE_PROVIDER_VENDOR_MICROSOFT +#define _DEFINE_WMDM_SERVICE_PROVIDER_VENDOR_MICROSOFT +// {7DE8686D-78EE-43ea-A496-C625AC91CC5D} +DEFINE_GUID(WMDM_SERVICE_PROVIDER_VENDOR_MICROSOFT, +0x7de8686d, 0x78ee, 0x43ea, 0xa4, 0x96, 0xc6, 0x25, 0xac, 0x91, 0xcc, 0x5d); +#endif +typedef +enum tagWMDM_TAG_DATATYPE + { WMDM_TYPE_DWORD = 0, + WMDM_TYPE_STRING = 1, + WMDM_TYPE_BINARY = 2, + WMDM_TYPE_BOOL = 3, + WMDM_TYPE_QWORD = 4, + WMDM_TYPE_WORD = 5, + WMDM_TYPE_GUID = 6, + WMDM_TYPE_DATE = 7 + } WMDM_TAG_DATATYPE; + +typedef +enum tagWMDM_SESSION_TYPE + { WMDM_SESSION_NONE = 0, + WMDM_SESSION_TRANSFER_TO_DEVICE = 0x1, + WMDM_SESSION_TRANSFER_FROM_DEVICE = 0x10, + WMDM_SESSION_DELETE = 0x100, + WMDM_SESSION_CUSTOM = 0x1000 + } WMDM_SESSION_TYPE; + +typedef struct _tWAVEFORMATEX + { + WORD wFormatTag; + WORD nChannels; + DWORD nSamplesPerSec; + DWORD nAvgBytesPerSec; + WORD nBlockAlign; + WORD wBitsPerSample; + WORD cbSize; + } _WAVEFORMATEX; + +typedef struct _tagBITMAPINFOHEADER + { + DWORD biSize; + LONG biWidth; + LONG biHeight; + WORD biPlanes; + WORD biBitCount; + DWORD biCompression; + DWORD biSizeImage; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; + DWORD biClrUsed; + DWORD biClrImportant; + } _BITMAPINFOHEADER; + +typedef struct _tagVIDEOINFOHEADER + { + RECT rcSource; + RECT rcTarget; + DWORD dwBitRate; + DWORD dwBitErrorRate; + LONGLONG AvgTimePerFrame; + _BITMAPINFOHEADER bmiHeader; + } _VIDEOINFOHEADER; + +typedef struct _tagWMFILECAPABILITIES + { + LPWSTR pwszMimeType; + DWORD dwReserved; + } WMFILECAPABILITIES; + +typedef struct __OPAQUECOMMAND + { + GUID guidCommand; + DWORD dwDataLen; + BYTE *pData; + BYTE abMAC[ 20 ]; + } OPAQUECOMMAND; + +#define WMDMID_LENGTH ( 128 ) + +typedef struct __WMDMID + { + UINT cbSize; + DWORD dwVendorID; + BYTE pID[ 128 ]; + UINT SerialNumberLength; + } WMDMID; + +typedef struct __WMDMID *PWMDMID; + +typedef struct _WMDMDATETIME + { + WORD wYear; + WORD wMonth; + WORD wDay; + WORD wHour; + WORD wMinute; + WORD wSecond; + } WMDMDATETIME; + +typedef struct _WMDMDATETIME *PWMDMDATETIME; + +typedef struct __WMDMRIGHTS + { + UINT cbSize; + DWORD dwContentType; + DWORD fuFlags; + DWORD fuRights; + DWORD dwAppSec; + DWORD dwPlaybackCount; + WMDMDATETIME ExpirationDate; + } WMDMRIGHTS; + +typedef struct __WMDMRIGHTS *PWMDMRIGHTS; + +typedef struct __WMDMMetadataView + { + WCHAR *pwszViewName; + UINT nDepth; + WCHAR **ppwszTags; + } WMDMMetadataView; + +typedef +enum tagWMDM_STORAGE_ENUM_MODE + { ENUM_MODE_RAW = 0, + ENUM_MODE_USE_DEVICE_PREF = ( ENUM_MODE_RAW + 1 ) , + ENUM_MODE_METADATA_VIEWS = ( ENUM_MODE_USE_DEVICE_PREF + 1 ) + } WMDM_STORAGE_ENUM_MODE; + +typedef /* [v1_enum] */ +enum tagWMDM_FORMATCODE + { WMDM_FORMATCODE_NOTUSED = 0, + WMDM_FORMATCODE_ALLIMAGES = 0xffffffff, + WMDM_FORMATCODE_UNDEFINED = 0x3000, + WMDM_FORMATCODE_ASSOCIATION = 0x3001, + WMDM_FORMATCODE_SCRIPT = 0x3002, + WMDM_FORMATCODE_EXECUTABLE = 0x3003, + WMDM_FORMATCODE_TEXT = 0x3004, + WMDM_FORMATCODE_HTML = 0x3005, + WMDM_FORMATCODE_DPOF = 0x3006, + WMDM_FORMATCODE_AIFF = 0x3007, + WMDM_FORMATCODE_WAVE = 0x3008, + WMDM_FORMATCODE_MP3 = 0x3009, + WMDM_FORMATCODE_AVI = 0x300a, + WMDM_FORMATCODE_MPEG = 0x300b, + WMDM_FORMATCODE_ASF = 0x300c, + WMDM_FORMATCODE_RESERVED_FIRST = 0x300d, + WMDM_FORMATCODE_RESERVED_LAST = 0x37ff, + WMDM_FORMATCODE_IMAGE_UNDEFINED = 0x3800, + WMDM_FORMATCODE_IMAGE_EXIF = 0x3801, + WMDM_FORMATCODE_IMAGE_TIFFEP = 0x3802, + WMDM_FORMATCODE_IMAGE_FLASHPIX = 0x3803, + WMDM_FORMATCODE_IMAGE_BMP = 0x3804, + WMDM_FORMATCODE_IMAGE_CIFF = 0x3805, + WMDM_FORMATCODE_IMAGE_GIF = 0x3807, + WMDM_FORMATCODE_IMAGE_JFIF = 0x3808, + WMDM_FORMATCODE_IMAGE_PCD = 0x3809, + WMDM_FORMATCODE_IMAGE_PICT = 0x380a, + WMDM_FORMATCODE_IMAGE_PNG = 0x380b, + WMDM_FORMATCODE_IMAGE_TIFF = 0x380d, + WMDM_FORMATCODE_IMAGE_TIFFIT = 0x380e, + WMDM_FORMATCODE_IMAGE_JP2 = 0x380f, + WMDM_FORMATCODE_IMAGE_JPX = 0x3810, + WMDM_FORMATCODE_IMAGE_RESERVED_FIRST = 0x3811, + WMDM_FORMATCODE_IMAGE_RESERVED_LAST = 0x3fff, + WMDM_FORMATCODE_UNDEFINEDFIRMWARE = 0xb802, + WMDM_FORMATCODE_WINDOWSIMAGEFORMAT = 0xb881, + WMDM_FORMATCODE_UNDEFINEDAUDIO = 0xb900, + WMDM_FORMATCODE_WMA = 0xb901, + WMDM_FORMATCODE_OGG = 0xb902, + WMDM_FORMATCODE_AAC = 0xb903, + WMDM_FORMATCODE_AUDIBLE = 0xb904, + WMDM_FORMATCODE_FLAC = 0xb906, + WMDM_FORMATCODE_UNDEFINEDVIDEO = 0xb980, + WMDM_FORMATCODE_WMV = 0xb981, + WMDM_FORMATCODE_MP4 = 0xb982, + WMDM_FORMATCODE_MP2 = 0xb983, + WMDM_FORMATCODE_3GP = 0xb984, + WMDM_FORMATCODE_UNDEFINEDCOLLECTION = 0xba00, + WMDM_FORMATCODE_ABSTRACTMULTIMEDIAALBUM = 0xba01, + WMDM_FORMATCODE_ABSTRACTIMAGEALBUM = 0xba02, + WMDM_FORMATCODE_ABSTRACTAUDIOALBUM = 0xba03, + WMDM_FORMATCODE_ABSTRACTVIDEOALBUM = 0xba04, + WMDM_FORMATCODE_ABSTRACTAUDIOVIDEOPLAYLIST = 0xba05, + WMDM_FORMATCODE_ABSTRACTCONTACTGROUP = 0xba06, + WMDM_FORMATCODE_ABSTRACTMESSAGEFOLDER = 0xba07, + WMDM_FORMATCODE_ABSTRACTCHAPTEREDPRODUCTION = 0xba08, + WMDM_FORMATCODE_MEDIA_CAST = 0xba0b, + WMDM_FORMATCODE_WPLPLAYLIST = 0xba10, + WMDM_FORMATCODE_M3UPLAYLIST = 0xba11, + WMDM_FORMATCODE_MPLPLAYLIST = 0xba12, + WMDM_FORMATCODE_ASXPLAYLIST = 0xba13, + WMDM_FORMATCODE_PLSPLAYLIST = 0xba14, + WMDM_FORMATCODE_UNDEFINEDDOCUMENT = 0xba80, + WMDM_FORMATCODE_ABSTRACTDOCUMENT = 0xba81, + WMDM_FORMATCODE_XMLDOCUMENT = 0xba82, + WMDM_FORMATCODE_MICROSOFTWORDDOCUMENT = 0xba83, + WMDM_FORMATCODE_MHTCOMPILEDHTMLDOCUMENT = 0xba84, + WMDM_FORMATCODE_MICROSOFTEXCELSPREADSHEET = 0xba85, + WMDM_FORMATCODE_MICROSOFTPOWERPOINTDOCUMENT = 0xba86, + WMDM_FORMATCODE_UNDEFINEDMESSAGE = 0xbb00, + WMDM_FORMATCODE_ABSTRACTMESSAGE = 0xbb01, + WMDM_FORMATCODE_UNDEFINEDCONTACT = 0xbb80, + WMDM_FORMATCODE_ABSTRACTCONTACT = 0xbb81, + WMDM_FORMATCODE_VCARD2 = 0xbb82, + WMDM_FORMATCODE_VCARD3 = 0xbb83, + WMDM_FORMATCODE_UNDEFINEDCALENDARITEM = 0xbe00, + WMDM_FORMATCODE_ABSTRACTCALENDARITEM = 0xbe01, + WMDM_FORMATCODE_VCALENDAR1 = 0xbe02, + WMDM_FORMATCODE_VCALENDAR2 = 0xbe03, + WMDM_FORMATCODE_UNDEFINEDWINDOWSEXECUTABLE = 0xbe80, + WMDM_FORMATCODE_SECTION = 0xbe82 + } WMDM_FORMATCODE; + +typedef /* [v1_enum] */ +enum _WMDM_ENUM_PROP_VALID_VALUES_FORM + { WMDM_ENUM_PROP_VALID_VALUES_ANY = 0, + WMDM_ENUM_PROP_VALID_VALUES_RANGE = ( WMDM_ENUM_PROP_VALID_VALUES_ANY + 1 ) , + WMDM_ENUM_PROP_VALID_VALUES_ENUM = ( WMDM_ENUM_PROP_VALID_VALUES_RANGE + 1 ) + } WMDM_ENUM_PROP_VALID_VALUES_FORM; + +typedef struct _WMDM_PROP_VALUES_RANGE + { + PROPVARIANT rangeMin; + PROPVARIANT rangeMax; + PROPVARIANT rangeStep; + } WMDM_PROP_VALUES_RANGE; + +typedef struct _WMDM_PROP_VALUES_ENUM + { + UINT cEnumValues; + PROPVARIANT *pValues; + } WMDM_PROP_VALUES_ENUM; + +typedef struct _WMDM_PROP_DESC + { + LPWSTR pwszPropName; + WMDM_ENUM_PROP_VALID_VALUES_FORM ValidValuesForm; + union + { + /* Empty union arm */ + WMDM_PROP_VALUES_RANGE ValidValuesRange; + WMDM_PROP_VALUES_ENUM EnumeratedValidValues; + } ValidValues; + } WMDM_PROP_DESC; + +typedef struct _WMDM_PROP_CONFIG + { + UINT nPreference; + UINT nPropDesc; + WMDM_PROP_DESC *pPropDesc; + } WMDM_PROP_CONFIG; + +typedef struct _WMDM_FORMAT_CAPABILITY + { + UINT nPropConfig; + WMDM_PROP_CONFIG *pConfigs; + } WMDM_FORMAT_CAPABILITY; + +#define WMDM_MAC_LENGTH ( 8 ) + +typedef +enum tagWMDM_FIND_SCOPE + { WMDM_FIND_SCOPE_GLOBAL = 0, + WMDM_FIND_SCOPE_IMMEDIATE_CHILDREN = ( WMDM_FIND_SCOPE_GLOBAL + 1 ) + } WMDM_FIND_SCOPE; + +// WMDM HRESULTS +// +//Success codes +// +#define WMDM_S_NOT_ALL_PROPERTIES_APPLIED 0x00045001L +#define WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED 0x00045002L +// +//Error codes +// +#define WMDM_E_BUSY 0x80045000L +#define WMDM_E_INTERFACEDEAD 0x80045001L +#define WMDM_E_INVALIDTYPE 0x80045002L +#define WMDM_E_PROCESSFAILED 0x80045003L +#define WMDM_E_NOTSUPPORTED 0x80045004L +#define WMDM_E_NOTCERTIFIED 0x80045005L +#define WMDM_E_NORIGHTS 0x80045006L +#define WMDM_E_CALL_OUT_OF_SEQUENCE 0x80045007L +#define WMDM_E_BUFFERTOOSMALL 0x80045008L +#define WMDM_E_MOREDATA 0x80045009L +#define WMDM_E_MAC_CHECK_FAILED 0x8004500AL +#define WMDM_E_USER_CANCELLED 0x8004500BL +#define WMDM_E_SDMI_TRIGGER 0x8004500CL +#define WMDM_E_SDMI_NOMORECOPIES 0x8004500DL +#define WMDM_E_REVOKED 0x8004500EL +#define WMDM_E_LICENSE_NOTEXIST 0x8004500FL +#define WMDM_E_INCORRECT_APPSEC 0x80045010L +#define WMDM_E_INCORRECT_RIGHTS 0x80045011L +#define WMDM_E_LICENSE_EXPIRED 0x80045012L +#define WMDM_E_CANTOPEN_PMSN_SERVICE_PIPE 0x80045013L +#define WMDM_E_TOO_MANY_SESSIONS 0x80045013L +// Revocation Flags +#define WMDM_WMDM_REVOKED 0x00000001 +#define WMDM_APP_REVOKED 0x00000002 +#define WMDM_SP_REVOKED 0x00000004 +#define WMDM_SCP_REVOKED 0x00000008 +// GetFormatSupport2 Flags +#define WMDM_GET_FORMAT_SUPPORT_AUDIO 0x00000001 +#define WMDM_GET_FORMAT_SUPPORT_VIDEO 0x00000002 +#define WMDM_GET_FORMAT_SUPPORT_FILE 0x00000004 +// MDMRIGHTS Flags +#define WMDM_RIGHTS_PLAYBACKCOUNT 0x00000001 +#define WMDM_RIGHTS_EXPIRATIONDATE 0x00000002 +#define WMDM_RIGHTS_GROUPID 0x00000004 +#define WMDM_RIGHTS_FREESERIALIDS 0x00000008 +#define WMDM_RIGHTS_NAMEDSERIALIDS 0x00000010 +// Device Type Flags +#define WMDM_DEVICE_TYPE_PLAYBACK 0x00000001 +#define WMDM_DEVICE_TYPE_RECORD 0x00000002 +#define WMDM_DEVICE_TYPE_DECODE 0x00000004 +#define WMDM_DEVICE_TYPE_ENCODE 0x00000008 +#define WMDM_DEVICE_TYPE_STORAGE 0x00000010 +#define WMDM_DEVICE_TYPE_VIRTUAL 0x00000020 +#define WMDM_DEVICE_TYPE_SDMI 0x00000040 +#define WMDM_DEVICE_TYPE_NONSDMI 0x00000080 +#define WMDM_DEVICE_TYPE_NONREENTRANT 0x00000100 +#define WMDM_DEVICE_TYPE_FILELISTRESYNC 0x00000200 +#define WMDM_DEVICE_TYPE_VIEW_PREF_METADATAVIEW 0x00000400 +// Device Power Source Flags +#define WMDM_POWER_CAP_BATTERY 0x00000001 +#define WMDM_POWER_CAP_EXTERNAL 0x00000002 +#define WMDM_POWER_IS_BATTERY 0x00000004 +#define WMDM_POWER_IS_EXTERNAL 0x00000008 +#define WMDM_POWER_PERCENT_AVAILABLE 0x00000010 +// Device Status Flags +#define WMDM_STATUS_READY 0x00000001 +#define WMDM_STATUS_BUSY 0x00000002 +#define WMDM_STATUS_DEVICE_NOTPRESENT 0x00000004 +#define WMDM_STATUS_DEVICECONTROL_PLAYING 0x00000008 +#define WMDM_STATUS_DEVICECONTROL_RECORDING 0x00000010 +#define WMDM_STATUS_DEVICECONTROL_PAUSED 0x00000020 +#define WMDM_STATUS_DEVICECONTROL_REMOTE 0x00000040 +#define WMDM_STATUS_DEVICECONTROL_STREAM 0x00000080 +#define WMDM_STATUS_STORAGE_NOTPRESENT 0x00000100 +#define WMDM_STATUS_STORAGE_INITIALIZING 0x00000200 +#define WMDM_STATUS_STORAGE_BROKEN 0x00000400 +#define WMDM_STATUS_STORAGE_NOTSUPPORTED 0x00000800 +#define WMDM_STATUS_STORAGE_UNFORMATTED 0x00001000 +#define WMDM_STATUS_STORAGECONTROL_INSERTING 0x00002000 +#define WMDM_STATUS_STORAGECONTROL_DELETING 0x00004000 +#define WMDM_STATUS_STORAGECONTROL_APPENDING 0x00008000 +#define WMDM_STATUS_STORAGECONTROL_MOVING 0x00010000 +#define WMDM_STATUS_STORAGECONTROL_READING 0x00020000 +// Device Capabilities Flags +#define WMDM_DEVICECAP_CANPLAY 0x00000001 +#define WMDM_DEVICECAP_CANSTREAMPLAY 0x00000002 +#define WMDM_DEVICECAP_CANRECORD 0x00000004 +#define WMDM_DEVICECAP_CANSTREAMRECORD 0x00000008 +#define WMDM_DEVICECAP_CANPAUSE 0x00000010 +#define WMDM_DEVICECAP_CANRESUME 0x00000020 +#define WMDM_DEVICECAP_CANSTOP 0x00000040 +#define WMDM_DEVICECAP_CANSEEK 0x00000080 +#define WMDM_DEVICECAP_HASSECURECLOCK 0x00000100 +// WMDM Seek Flags +#define WMDM_SEEK_REMOTECONTROL 0x00000001 +#define WMDM_SEEK_STREAMINGAUDIO 0x00000002 +// Storage Attributes Flags +#define WMDM_STORAGE_ATTR_FILESYSTEM 0x00000001 +#define WMDM_STORAGE_ATTR_REMOVABLE 0x00000002 +#define WMDM_STORAGE_ATTR_NONREMOVABLE 0x00000004 +#define WMDM_FILE_ATTR_FOLDER 0x00000008 +#define WMDM_FILE_ATTR_LINK 0x00000010 +#define WMDM_FILE_ATTR_FILE 0x00000020 +#define WMDM_FILE_ATTR_VIDEO 0x00000040 +#define WMDM_STORAGE_ATTR_CANEDITMETADATA 0x00000080 +#define WMDM_STORAGE_ATTR_FOLDERS 0x00000100 +#define WMDM_FILE_ATTR_AUDIO 0x00001000 +#define WMDM_FILE_ATTR_DATA 0x00002000 +#define WMDM_FILE_ATTR_CANPLAY 0x00004000 +#define WMDM_FILE_ATTR_CANDELETE 0x00008000 +#define WMDM_FILE_ATTR_CANMOVE 0x00010000 +#define WMDM_FILE_ATTR_CANRENAME 0x00020000 +#define WMDM_FILE_ATTR_CANREAD 0x00040000 +#define WMDM_FILE_ATTR_MUSIC 0x00080000 +#define WMDM_FILE_CREATE_OVERWRITE 0x00100000 +#define WMDM_FILE_ATTR_AUDIOBOOK 0x00200000 +#define WMDM_FILE_ATTR_HIDDEN 0x00400000 +#define WMDM_FILE_ATTR_SYSTEM 0x00800000 +#define WMDM_FILE_ATTR_READONLY 0x01000000 +#define WMDM_STORAGE_ATTR_HAS_FOLDERS 0x02000000 +#define WMDM_STORAGE_ATTR_HAS_FILES 0x04000000 +#define WMDM_STORAGE_IS_DEFAULT 0x08000000 +#define WMDM_STORAGE_CONTAINS_DEFAULT 0x10000000 +#define WMDM_STORAGE_ATTR_VIRTUAL 0x20000000 +// Storage Capabilities Flags +#define WMDM_STORAGECAP_FOLDERSINROOT 0x00000001 +#define WMDM_STORAGECAP_FILESINROOT 0x00000002 +#define WMDM_STORAGECAP_FOLDERSINFOLDERS 0x00000004 +#define WMDM_STORAGECAP_FILESINFOLDERS 0x00000008 +#define WMDM_STORAGECAP_FOLDERLIMITEXISTS 0x00000010 +#define WMDM_STORAGECAP_FILELIMITEXISTS 0x00000020 +#define WMDM_STORAGECAP_NOT_INITIALIZABLE 0x00000040 +// WMDM Mode Flags +#define WMDM_MODE_BLOCK 0x00000001 +#define WMDM_MODE_THREAD 0x00000002 +#define WMDM_CONTENT_FILE 0x00000004 +#define WMDM_CONTENT_FOLDER 0x00000008 +#define WMDM_CONTENT_OPERATIONINTERFACE 0x00000010 +#define WMDM_MODE_QUERY 0x00000020 +#define WMDM_MODE_PROGRESS 0x00000040 +#define WMDM_MODE_TRANSFER_PROTECTED 0x00000080 +#define WMDM_MODE_TRANSFER_UNPROTECTED 0x00000100 +#define WMDM_STORAGECONTROL_INSERTBEFORE 0x00000200 +#define WMDM_STORAGECONTROL_INSERTAFTER 0x00000400 +#define WMDM_STORAGECONTROL_INSERTINTO 0x00000800 +#define WMDM_MODE_RECURSIVE 0x00001000 +// WMDM Rights Flags +// NON_SDMI = !SDMI_PROTECTED +// SDMI = SDMI_VALIDATED +#define WMDM_RIGHTS_PLAY_ON_PC 0x00000001 +#define WMDM_RIGHTS_COPY_TO_NON_SDMI_DEVICE 0x00000002 +#define WMDM_RIGHTS_COPY_TO_CD 0x00000008 +#define WMDM_RIGHTS_COPY_TO_SDMI_DEVICE 0x00000010 +// WMDM Seek Flags +#define WMDM_SEEK_BEGIN 0x00000001 +#define WMDM_SEEK_CURRENT 0x00000002 +#define WMDM_SEEK_END 0x00000008 +// WMDM Device Enumeration Flags +#define DO_NOT_VIRTUALIZE_STORAGES_AS_DEVICES 0x00000001 +#define ALLOW_OUTOFBAND_NOTIFICATION 0x00000002 + +enum WMDMMessage + { WMDM_MSG_DEVICE_ARRIVAL = 0, + WMDM_MSG_DEVICE_REMOVAL = ( WMDM_MSG_DEVICE_ARRIVAL + 1 ) , + WMDM_MSG_MEDIA_ARRIVAL = ( WMDM_MSG_DEVICE_REMOVAL + 1 ) , + WMDM_MSG_MEDIA_REMOVAL = ( WMDM_MSG_MEDIA_ARRIVAL + 1 ) + } ; + + + + + + + + + + + + + + +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0000_v0_0_s_ifspec; + +#ifndef __IWMDMMetaData_INTERFACE_DEFINED__ +#define __IWMDMMetaData_INTERFACE_DEFINED__ + +/* interface IWMDMMetaData */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMMetaData; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EC3B0663-0951-460a-9A80-0DCEED3C043C") + IWMDMMetaData : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE AddItem( + /* [in] */ WMDM_TAG_DATATYPE Type, + /* [string][in] */ __RPC__in LPCWSTR pwszTagName, + /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(iLength) BYTE *pValue, + /* [in] */ UINT iLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryByName( + /* [string][in] */ __RPC__in LPCWSTR pwszTagName, + /* [out] */ __RPC__out WMDM_TAG_DATATYPE *pType, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcbLength) BYTE **pValue, + /* [out] */ __RPC__out UINT *pcbLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryByIndex( + /* [in] */ UINT iIndex, + /* [string][out] */ __RPC__deref_out_opt_string WCHAR **ppwszName, + /* [out] */ __RPC__out WMDM_TAG_DATATYPE *pType, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcbLength) BYTE **ppValue, + /* [out] */ __RPC__out UINT *pcbLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetItemCount( + /* [out] */ __RPC__out UINT *iCount) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMMetaDataVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMMetaData * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMMetaData * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMMetaData * This); + + HRESULT ( STDMETHODCALLTYPE *AddItem )( + IWMDMMetaData * This, + /* [in] */ WMDM_TAG_DATATYPE Type, + /* [string][in] */ __RPC__in LPCWSTR pwszTagName, + /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(iLength) BYTE *pValue, + /* [in] */ UINT iLength); + + HRESULT ( STDMETHODCALLTYPE *QueryByName )( + IWMDMMetaData * This, + /* [string][in] */ __RPC__in LPCWSTR pwszTagName, + /* [out] */ __RPC__out WMDM_TAG_DATATYPE *pType, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcbLength) BYTE **pValue, + /* [out] */ __RPC__out UINT *pcbLength); + + HRESULT ( STDMETHODCALLTYPE *QueryByIndex )( + IWMDMMetaData * This, + /* [in] */ UINT iIndex, + /* [string][out] */ __RPC__deref_out_opt_string WCHAR **ppwszName, + /* [out] */ __RPC__out WMDM_TAG_DATATYPE *pType, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcbLength) BYTE **ppValue, + /* [out] */ __RPC__out UINT *pcbLength); + + HRESULT ( STDMETHODCALLTYPE *GetItemCount )( + IWMDMMetaData * This, + /* [out] */ __RPC__out UINT *iCount); + + END_INTERFACE + } IWMDMMetaDataVtbl; + + interface IWMDMMetaData + { + CONST_VTBL struct IWMDMMetaDataVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMMetaData_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMMetaData_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMMetaData_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMMetaData_AddItem(This,Type,pwszTagName,pValue,iLength) \ + ( (This)->lpVtbl -> AddItem(This,Type,pwszTagName,pValue,iLength) ) + +#define IWMDMMetaData_QueryByName(This,pwszTagName,pType,pValue,pcbLength) \ + ( (This)->lpVtbl -> QueryByName(This,pwszTagName,pType,pValue,pcbLength) ) + +#define IWMDMMetaData_QueryByIndex(This,iIndex,ppwszName,pType,ppValue,pcbLength) \ + ( (This)->lpVtbl -> QueryByIndex(This,iIndex,ppwszName,pType,ppValue,pcbLength) ) + +#define IWMDMMetaData_GetItemCount(This,iCount) \ + ( (This)->lpVtbl -> GetItemCount(This,iCount) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMMetaData_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDeviceManager_INTERFACE_DEFINED__ +#define __IWMDeviceManager_INTERFACE_DEFINED__ + +/* interface IWMDeviceManager */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDeviceManager; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A00-33ED-11d3-8470-00C04F79DBC0") + IWMDeviceManager : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetRevision( + /* [out] */ __RPC__out DWORD *pdwRevision) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceCount( + /* [out] */ __RPC__out DWORD *pdwCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumDevices( + /* [out] */ __RPC__deref_out_opt IWMDMEnumDevice **ppEnumDevice) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDeviceManagerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDeviceManager * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDeviceManager * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDeviceManager * This); + + HRESULT ( STDMETHODCALLTYPE *GetRevision )( + IWMDeviceManager * This, + /* [out] */ __RPC__out DWORD *pdwRevision); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceCount )( + IWMDeviceManager * This, + /* [out] */ __RPC__out DWORD *pdwCount); + + HRESULT ( STDMETHODCALLTYPE *EnumDevices )( + IWMDeviceManager * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumDevice **ppEnumDevice); + + END_INTERFACE + } IWMDeviceManagerVtbl; + + interface IWMDeviceManager + { + CONST_VTBL struct IWMDeviceManagerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDeviceManager_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDeviceManager_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDeviceManager_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDeviceManager_GetRevision(This,pdwRevision) \ + ( (This)->lpVtbl -> GetRevision(This,pdwRevision) ) + +#define IWMDeviceManager_GetDeviceCount(This,pdwCount) \ + ( (This)->lpVtbl -> GetDeviceCount(This,pdwCount) ) + +#define IWMDeviceManager_EnumDevices(This,ppEnumDevice) \ + ( (This)->lpVtbl -> EnumDevices(This,ppEnumDevice) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDeviceManager_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDeviceManager2_INTERFACE_DEFINED__ +#define __IWMDeviceManager2_INTERFACE_DEFINED__ + +/* interface IWMDeviceManager2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDeviceManager2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("923E5249-8731-4c5b-9B1C-B8B60B6E46AF") + IWMDeviceManager2 : public IWMDeviceManager + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDeviceFromCanonicalName( + /* [string][in] */ __RPC__in LPCWSTR pwszCanonicalName, + /* [out] */ __RPC__deref_out_opt IWMDMDevice **ppDevice) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumDevices2( + /* [out] */ __RPC__deref_out_opt IWMDMEnumDevice **ppEnumDevice) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reinitialize( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDeviceManager2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDeviceManager2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDeviceManager2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDeviceManager2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetRevision )( + IWMDeviceManager2 * This, + /* [out] */ __RPC__out DWORD *pdwRevision); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceCount )( + IWMDeviceManager2 * This, + /* [out] */ __RPC__out DWORD *pdwCount); + + HRESULT ( STDMETHODCALLTYPE *EnumDevices )( + IWMDeviceManager2 * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumDevice **ppEnumDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceFromCanonicalName )( + IWMDeviceManager2 * This, + /* [string][in] */ __RPC__in LPCWSTR pwszCanonicalName, + /* [out] */ __RPC__deref_out_opt IWMDMDevice **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *EnumDevices2 )( + IWMDeviceManager2 * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumDevice **ppEnumDevice); + + HRESULT ( STDMETHODCALLTYPE *Reinitialize )( + IWMDeviceManager2 * This); + + END_INTERFACE + } IWMDeviceManager2Vtbl; + + interface IWMDeviceManager2 + { + CONST_VTBL struct IWMDeviceManager2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDeviceManager2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDeviceManager2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDeviceManager2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDeviceManager2_GetRevision(This,pdwRevision) \ + ( (This)->lpVtbl -> GetRevision(This,pdwRevision) ) + +#define IWMDeviceManager2_GetDeviceCount(This,pdwCount) \ + ( (This)->lpVtbl -> GetDeviceCount(This,pdwCount) ) + +#define IWMDeviceManager2_EnumDevices(This,ppEnumDevice) \ + ( (This)->lpVtbl -> EnumDevices(This,ppEnumDevice) ) + + +#define IWMDeviceManager2_GetDeviceFromCanonicalName(This,pwszCanonicalName,ppDevice) \ + ( (This)->lpVtbl -> GetDeviceFromCanonicalName(This,pwszCanonicalName,ppDevice) ) + +#define IWMDeviceManager2_EnumDevices2(This,ppEnumDevice) \ + ( (This)->lpVtbl -> EnumDevices2(This,ppEnumDevice) ) + +#define IWMDeviceManager2_Reinitialize(This) \ + ( (This)->lpVtbl -> Reinitialize(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDeviceManager2_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDeviceManager3_INTERFACE_DEFINED__ +#define __IWMDeviceManager3_INTERFACE_DEFINED__ + +/* interface IWMDeviceManager3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDeviceManager3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("af185c41-100d-46ed-be2e-9ce8c44594ef") + IWMDeviceManager3 : public IWMDeviceManager2 + { + public: + virtual HRESULT STDMETHODCALLTYPE SetDeviceEnumPreference( + /* [in] */ DWORD dwEnumPref) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDeviceManager3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDeviceManager3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDeviceManager3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDeviceManager3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetRevision )( + IWMDeviceManager3 * This, + /* [out] */ __RPC__out DWORD *pdwRevision); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceCount )( + IWMDeviceManager3 * This, + /* [out] */ __RPC__out DWORD *pdwCount); + + HRESULT ( STDMETHODCALLTYPE *EnumDevices )( + IWMDeviceManager3 * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumDevice **ppEnumDevice); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceFromCanonicalName )( + IWMDeviceManager3 * This, + /* [string][in] */ __RPC__in LPCWSTR pwszCanonicalName, + /* [out] */ __RPC__deref_out_opt IWMDMDevice **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *EnumDevices2 )( + IWMDeviceManager3 * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumDevice **ppEnumDevice); + + HRESULT ( STDMETHODCALLTYPE *Reinitialize )( + IWMDeviceManager3 * This); + + HRESULT ( STDMETHODCALLTYPE *SetDeviceEnumPreference )( + IWMDeviceManager3 * This, + /* [in] */ DWORD dwEnumPref); + + END_INTERFACE + } IWMDeviceManager3Vtbl; + + interface IWMDeviceManager3 + { + CONST_VTBL struct IWMDeviceManager3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDeviceManager3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDeviceManager3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDeviceManager3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDeviceManager3_GetRevision(This,pdwRevision) \ + ( (This)->lpVtbl -> GetRevision(This,pdwRevision) ) + +#define IWMDeviceManager3_GetDeviceCount(This,pdwCount) \ + ( (This)->lpVtbl -> GetDeviceCount(This,pdwCount) ) + +#define IWMDeviceManager3_EnumDevices(This,ppEnumDevice) \ + ( (This)->lpVtbl -> EnumDevices(This,ppEnumDevice) ) + + +#define IWMDeviceManager3_GetDeviceFromCanonicalName(This,pwszCanonicalName,ppDevice) \ + ( (This)->lpVtbl -> GetDeviceFromCanonicalName(This,pwszCanonicalName,ppDevice) ) + +#define IWMDeviceManager3_EnumDevices2(This,ppEnumDevice) \ + ( (This)->lpVtbl -> EnumDevices2(This,ppEnumDevice) ) + +#define IWMDeviceManager3_Reinitialize(This) \ + ( (This)->lpVtbl -> Reinitialize(This) ) + + +#define IWMDeviceManager3_SetDeviceEnumPreference(This,dwEnumPref) \ + ( (This)->lpVtbl -> SetDeviceEnumPreference(This,dwEnumPref) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDeviceManager3_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMStorageGlobals_INTERFACE_DEFINED__ +#define __IWMDMStorageGlobals_INTERFACE_DEFINED__ + +/* interface IWMDMStorageGlobals */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMStorageGlobals; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A07-33ED-11d3-8470-00C04F79DBC0") + IWMDMStorageGlobals : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCapabilities( + /* [out] */ __RPC__out DWORD *pdwCapabilities) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSerialNumber( + /* [out] */ __RPC__out PWMDMID pSerialNum, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalSize( + /* [out] */ __RPC__out DWORD *pdwTotalSizeLow, + /* [out] */ __RPC__out DWORD *pdwTotalSizeHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalFree( + /* [out] */ __RPC__out DWORD *pdwFreeLow, + /* [out] */ __RPC__out DWORD *pdwFreeHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalBad( + /* [out] */ __RPC__out DWORD *pdwBadLow, + /* [out] */ __RPC__out DWORD *pdwBadHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ __RPC__out DWORD *pdwStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE Initialize( + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMStorageGlobalsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMStorageGlobals * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMStorageGlobals * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMStorageGlobals * This); + + HRESULT ( STDMETHODCALLTYPE *GetCapabilities )( + IWMDMStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwCapabilities); + + HRESULT ( STDMETHODCALLTYPE *GetSerialNumber )( + IWMDMStorageGlobals * This, + /* [out] */ __RPC__out PWMDMID pSerialNum, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetTotalSize )( + IWMDMStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwTotalSizeLow, + /* [out] */ __RPC__out DWORD *pdwTotalSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetTotalFree )( + IWMDMStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwFreeLow, + /* [out] */ __RPC__out DWORD *pdwFreeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetTotalBad )( + IWMDMStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwBadLow, + /* [out] */ __RPC__out DWORD *pdwBadHigh); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IWMDMStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *Initialize )( + IWMDMStorageGlobals * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + END_INTERFACE + } IWMDMStorageGlobalsVtbl; + + interface IWMDMStorageGlobals + { + CONST_VTBL struct IWMDMStorageGlobalsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMStorageGlobals_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMStorageGlobals_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMStorageGlobals_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMStorageGlobals_GetCapabilities(This,pdwCapabilities) \ + ( (This)->lpVtbl -> GetCapabilities(This,pdwCapabilities) ) + +#define IWMDMStorageGlobals_GetSerialNumber(This,pSerialNum,abMac) \ + ( (This)->lpVtbl -> GetSerialNumber(This,pSerialNum,abMac) ) + +#define IWMDMStorageGlobals_GetTotalSize(This,pdwTotalSizeLow,pdwTotalSizeHigh) \ + ( (This)->lpVtbl -> GetTotalSize(This,pdwTotalSizeLow,pdwTotalSizeHigh) ) + +#define IWMDMStorageGlobals_GetTotalFree(This,pdwFreeLow,pdwFreeHigh) \ + ( (This)->lpVtbl -> GetTotalFree(This,pdwFreeLow,pdwFreeHigh) ) + +#define IWMDMStorageGlobals_GetTotalBad(This,pdwBadLow,pdwBadHigh) \ + ( (This)->lpVtbl -> GetTotalBad(This,pdwBadLow,pdwBadHigh) ) + +#define IWMDMStorageGlobals_GetStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetStatus(This,pdwStatus) ) + +#define IWMDMStorageGlobals_Initialize(This,fuMode,pProgress) \ + ( (This)->lpVtbl -> Initialize(This,fuMode,pProgress) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMStorageGlobals_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMStorage_INTERFACE_DEFINED__ +#define __IWMDMStorage_INTERFACE_DEFINED__ + +/* interface IWMDMStorage */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMStorage; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A06-33ED-11d3-8470-00C04F79DBC0") + IWMDMStorage : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetAttributes( + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStorageGlobals( + /* [out] */ __RPC__deref_out_opt IWMDMStorageGlobals **ppStorageGlobals) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAttributes( + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetName( + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDate( + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSize( + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRights( + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumStorage( + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **pEnumStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE SendOpaqueCommand( + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMStorageVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMStorage * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMStorage * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMStorage * This); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes )( + IWMDMStorage * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetStorageGlobals )( + IWMDMStorage * This, + /* [out] */ __RPC__deref_out_opt IWMDMStorageGlobals **ppStorageGlobals); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes )( + IWMDMStorage * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IWMDMStorage * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetDate )( + IWMDMStorage * This, + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC); + + HRESULT ( STDMETHODCALLTYPE *GetSize )( + IWMDMStorage * This, + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + IWMDMStorage * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IWMDMStorage * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **pEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IWMDMStorage * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + END_INTERFACE + } IWMDMStorageVtbl; + + interface IWMDMStorage + { + CONST_VTBL struct IWMDMStorageVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMStorage_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMStorage_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMStorage_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMStorage_SetAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetAttributes(This,dwAttributes,pFormat) ) + +#define IWMDMStorage_GetStorageGlobals(This,ppStorageGlobals) \ + ( (This)->lpVtbl -> GetStorageGlobals(This,ppStorageGlobals) ) + +#define IWMDMStorage_GetAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetAttributes(This,pdwAttributes,pFormat) ) + +#define IWMDMStorage_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IWMDMStorage_GetDate(This,pDateTimeUTC) \ + ( (This)->lpVtbl -> GetDate(This,pDateTimeUTC) ) + +#define IWMDMStorage_GetSize(This,pdwSizeLow,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetSize(This,pdwSizeLow,pdwSizeHigh) ) + +#define IWMDMStorage_GetRights(This,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,ppRights,pnRightsCount,abMac) ) + +#define IWMDMStorage_EnumStorage(This,pEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,pEnumStorage) ) + +#define IWMDMStorage_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMStorage_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMStorage2_INTERFACE_DEFINED__ +#define __IWMDMStorage2_INTERFACE_DEFINED__ + +/* interface IWMDMStorage2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMStorage2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1ED5A144-5CD5-4683-9EFF-72CBDB2D9533") + IWMDMStorage2 : public IWMDMStorage + { + public: + virtual HRESULT STDMETHODCALLTYPE GetStorage( + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetAttributes2( + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAttributes2( + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMStorage2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMStorage2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMStorage2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMStorage2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes )( + IWMDMStorage2 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetStorageGlobals )( + IWMDMStorage2 * This, + /* [out] */ __RPC__deref_out_opt IWMDMStorageGlobals **ppStorageGlobals); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes )( + IWMDMStorage2 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IWMDMStorage2 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetDate )( + IWMDMStorage2 * This, + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC); + + HRESULT ( STDMETHODCALLTYPE *GetSize )( + IWMDMStorage2 * This, + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + IWMDMStorage2 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IWMDMStorage2 * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **pEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IWMDMStorage2 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IWMDMStorage2 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes2 )( + IWMDMStorage2 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes2 )( + IWMDMStorage2 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat); + + END_INTERFACE + } IWMDMStorage2Vtbl; + + interface IWMDMStorage2 + { + CONST_VTBL struct IWMDMStorage2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMStorage2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMStorage2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMStorage2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMStorage2_SetAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetAttributes(This,dwAttributes,pFormat) ) + +#define IWMDMStorage2_GetStorageGlobals(This,ppStorageGlobals) \ + ( (This)->lpVtbl -> GetStorageGlobals(This,ppStorageGlobals) ) + +#define IWMDMStorage2_GetAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetAttributes(This,pdwAttributes,pFormat) ) + +#define IWMDMStorage2_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IWMDMStorage2_GetDate(This,pDateTimeUTC) \ + ( (This)->lpVtbl -> GetDate(This,pDateTimeUTC) ) + +#define IWMDMStorage2_GetSize(This,pdwSizeLow,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetSize(This,pdwSizeLow,pdwSizeHigh) ) + +#define IWMDMStorage2_GetRights(This,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,ppRights,pnRightsCount,abMac) ) + +#define IWMDMStorage2_EnumStorage(This,pEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,pEnumStorage) ) + +#define IWMDMStorage2_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IWMDMStorage2_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IWMDMStorage2_SetAttributes2(This,dwAttributes,dwAttributesEx,pFormat,pVideoFormat) \ + ( (This)->lpVtbl -> SetAttributes2(This,dwAttributes,dwAttributesEx,pFormat,pVideoFormat) ) + +#define IWMDMStorage2_GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMStorage2_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMStorage3_INTERFACE_DEFINED__ +#define __IWMDMStorage3_INTERFACE_DEFINED__ + +/* interface IWMDMStorage3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMStorage3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("97717EEA-926A-464e-96A4-247B0216026E") + IWMDMStorage3 : public IWMDMStorage2 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetMetadata( + /* [out] */ __RPC__deref_out_opt IWMDMMetaData **ppMetadata) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMetadata( + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateEmptyMetadataObject( + /* [out] */ __RPC__deref_out_opt IWMDMMetaData **ppMetadata) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEnumPreference( + /* [out][in] */ __RPC__inout WMDM_STORAGE_ENUM_MODE *pMode, + /* [in] */ DWORD nViews, + /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(nViews) WMDMMetadataView *pViews) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMStorage3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMStorage3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMStorage3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMStorage3 * This); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes )( + IWMDMStorage3 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetStorageGlobals )( + IWMDMStorage3 * This, + /* [out] */ __RPC__deref_out_opt IWMDMStorageGlobals **ppStorageGlobals); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes )( + IWMDMStorage3 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IWMDMStorage3 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetDate )( + IWMDMStorage3 * This, + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC); + + HRESULT ( STDMETHODCALLTYPE *GetSize )( + IWMDMStorage3 * This, + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + IWMDMStorage3 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IWMDMStorage3 * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **pEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IWMDMStorage3 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IWMDMStorage3 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes2 )( + IWMDMStorage3 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes2 )( + IWMDMStorage3 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetMetadata )( + IWMDMStorage3 * This, + /* [out] */ __RPC__deref_out_opt IWMDMMetaData **ppMetadata); + + HRESULT ( STDMETHODCALLTYPE *SetMetadata )( + IWMDMStorage3 * This, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata); + + HRESULT ( STDMETHODCALLTYPE *CreateEmptyMetadataObject )( + IWMDMStorage3 * This, + /* [out] */ __RPC__deref_out_opt IWMDMMetaData **ppMetadata); + + HRESULT ( STDMETHODCALLTYPE *SetEnumPreference )( + IWMDMStorage3 * This, + /* [out][in] */ __RPC__inout WMDM_STORAGE_ENUM_MODE *pMode, + /* [in] */ DWORD nViews, + /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(nViews) WMDMMetadataView *pViews); + + END_INTERFACE + } IWMDMStorage3Vtbl; + + interface IWMDMStorage3 + { + CONST_VTBL struct IWMDMStorage3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMStorage3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMStorage3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMStorage3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMStorage3_SetAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetAttributes(This,dwAttributes,pFormat) ) + +#define IWMDMStorage3_GetStorageGlobals(This,ppStorageGlobals) \ + ( (This)->lpVtbl -> GetStorageGlobals(This,ppStorageGlobals) ) + +#define IWMDMStorage3_GetAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetAttributes(This,pdwAttributes,pFormat) ) + +#define IWMDMStorage3_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IWMDMStorage3_GetDate(This,pDateTimeUTC) \ + ( (This)->lpVtbl -> GetDate(This,pDateTimeUTC) ) + +#define IWMDMStorage3_GetSize(This,pdwSizeLow,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetSize(This,pdwSizeLow,pdwSizeHigh) ) + +#define IWMDMStorage3_GetRights(This,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,ppRights,pnRightsCount,abMac) ) + +#define IWMDMStorage3_EnumStorage(This,pEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,pEnumStorage) ) + +#define IWMDMStorage3_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IWMDMStorage3_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IWMDMStorage3_SetAttributes2(This,dwAttributes,dwAttributesEx,pFormat,pVideoFormat) \ + ( (This)->lpVtbl -> SetAttributes2(This,dwAttributes,dwAttributesEx,pFormat,pVideoFormat) ) + +#define IWMDMStorage3_GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) ) + + +#define IWMDMStorage3_GetMetadata(This,ppMetadata) \ + ( (This)->lpVtbl -> GetMetadata(This,ppMetadata) ) + +#define IWMDMStorage3_SetMetadata(This,pMetadata) \ + ( (This)->lpVtbl -> SetMetadata(This,pMetadata) ) + +#define IWMDMStorage3_CreateEmptyMetadataObject(This,ppMetadata) \ + ( (This)->lpVtbl -> CreateEmptyMetadataObject(This,ppMetadata) ) + +#define IWMDMStorage3_SetEnumPreference(This,pMode,nViews,pViews) \ + ( (This)->lpVtbl -> SetEnumPreference(This,pMode,nViews,pViews) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMStorage3_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMStorage4_INTERFACE_DEFINED__ +#define __IWMDMStorage4_INTERFACE_DEFINED__ + +/* interface IWMDMStorage4 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMStorage4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c225bac5-a03a-40b8-9a23-91cf478c64a6") + IWMDMStorage4 : public IWMDMStorage3 + { + public: + virtual HRESULT STDMETHODCALLTYPE SetReferences( + /* [in] */ DWORD dwRefs, + /* [size_is][unique][in] */ __RPC__in_ecount_full_opt(dwRefs) IWMDMStorage **ppIWMDMStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetReferences( + /* [out] */ __RPC__out DWORD *pdwRefs, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwRefs) IWMDMStorage ***pppIWMDMStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRightsWithProgress( + /* [in] */ __RPC__in_opt IWMDMProgress3 *pIProgressCallback, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSpecifiedMetadata( + /* [in] */ DWORD cProperties, + /* [size_is][in] */ __RPC__in_ecount_full(cProperties) LPCWSTR *ppwszPropNames, + /* [out] */ __RPC__deref_out_opt IWMDMMetaData **ppMetadata) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindStorage( + /* [in] */ WMDM_FIND_SCOPE findScope, + /* [in] */ __RPC__in LPCWSTR pwszUniqueID, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetParent( + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMStorage4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMStorage4 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMStorage4 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMStorage4 * This); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes )( + IWMDMStorage4 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetStorageGlobals )( + IWMDMStorage4 * This, + /* [out] */ __RPC__deref_out_opt IWMDMStorageGlobals **ppStorageGlobals); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes )( + IWMDMStorage4 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IWMDMStorage4 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetDate )( + IWMDMStorage4 * This, + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC); + + HRESULT ( STDMETHODCALLTYPE *GetSize )( + IWMDMStorage4 * This, + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + IWMDMStorage4 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IWMDMStorage4 * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **pEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IWMDMStorage4 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IWMDMStorage4 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes2 )( + IWMDMStorage4 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes2 )( + IWMDMStorage4 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetMetadata )( + IWMDMStorage4 * This, + /* [out] */ __RPC__deref_out_opt IWMDMMetaData **ppMetadata); + + HRESULT ( STDMETHODCALLTYPE *SetMetadata )( + IWMDMStorage4 * This, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata); + + HRESULT ( STDMETHODCALLTYPE *CreateEmptyMetadataObject )( + IWMDMStorage4 * This, + /* [out] */ __RPC__deref_out_opt IWMDMMetaData **ppMetadata); + + HRESULT ( STDMETHODCALLTYPE *SetEnumPreference )( + IWMDMStorage4 * This, + /* [out][in] */ __RPC__inout WMDM_STORAGE_ENUM_MODE *pMode, + /* [in] */ DWORD nViews, + /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(nViews) WMDMMetadataView *pViews); + + HRESULT ( STDMETHODCALLTYPE *SetReferences )( + IWMDMStorage4 * This, + /* [in] */ DWORD dwRefs, + /* [size_is][unique][in] */ __RPC__in_ecount_full_opt(dwRefs) IWMDMStorage **ppIWMDMStorage); + + HRESULT ( STDMETHODCALLTYPE *GetReferences )( + IWMDMStorage4 * This, + /* [out] */ __RPC__out DWORD *pdwRefs, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwRefs) IWMDMStorage ***pppIWMDMStorage); + + HRESULT ( STDMETHODCALLTYPE *GetRightsWithProgress )( + IWMDMStorage4 * This, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pIProgressCallback, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount); + + HRESULT ( STDMETHODCALLTYPE *GetSpecifiedMetadata )( + IWMDMStorage4 * This, + /* [in] */ DWORD cProperties, + /* [size_is][in] */ __RPC__in_ecount_full(cProperties) LPCWSTR *ppwszPropNames, + /* [out] */ __RPC__deref_out_opt IWMDMMetaData **ppMetadata); + + HRESULT ( STDMETHODCALLTYPE *FindStorage )( + IWMDMStorage4 * This, + /* [in] */ WMDM_FIND_SCOPE findScope, + /* [in] */ __RPC__in LPCWSTR pwszUniqueID, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IWMDMStorage4 * This, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage); + + END_INTERFACE + } IWMDMStorage4Vtbl; + + interface IWMDMStorage4 + { + CONST_VTBL struct IWMDMStorage4Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMStorage4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMStorage4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMStorage4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMStorage4_SetAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetAttributes(This,dwAttributes,pFormat) ) + +#define IWMDMStorage4_GetStorageGlobals(This,ppStorageGlobals) \ + ( (This)->lpVtbl -> GetStorageGlobals(This,ppStorageGlobals) ) + +#define IWMDMStorage4_GetAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetAttributes(This,pdwAttributes,pFormat) ) + +#define IWMDMStorage4_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IWMDMStorage4_GetDate(This,pDateTimeUTC) \ + ( (This)->lpVtbl -> GetDate(This,pDateTimeUTC) ) + +#define IWMDMStorage4_GetSize(This,pdwSizeLow,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetSize(This,pdwSizeLow,pdwSizeHigh) ) + +#define IWMDMStorage4_GetRights(This,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,ppRights,pnRightsCount,abMac) ) + +#define IWMDMStorage4_EnumStorage(This,pEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,pEnumStorage) ) + +#define IWMDMStorage4_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IWMDMStorage4_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IWMDMStorage4_SetAttributes2(This,dwAttributes,dwAttributesEx,pFormat,pVideoFormat) \ + ( (This)->lpVtbl -> SetAttributes2(This,dwAttributes,dwAttributesEx,pFormat,pVideoFormat) ) + +#define IWMDMStorage4_GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) ) + + +#define IWMDMStorage4_GetMetadata(This,ppMetadata) \ + ( (This)->lpVtbl -> GetMetadata(This,ppMetadata) ) + +#define IWMDMStorage4_SetMetadata(This,pMetadata) \ + ( (This)->lpVtbl -> SetMetadata(This,pMetadata) ) + +#define IWMDMStorage4_CreateEmptyMetadataObject(This,ppMetadata) \ + ( (This)->lpVtbl -> CreateEmptyMetadataObject(This,ppMetadata) ) + +#define IWMDMStorage4_SetEnumPreference(This,pMode,nViews,pViews) \ + ( (This)->lpVtbl -> SetEnumPreference(This,pMode,nViews,pViews) ) + + +#define IWMDMStorage4_SetReferences(This,dwRefs,ppIWMDMStorage) \ + ( (This)->lpVtbl -> SetReferences(This,dwRefs,ppIWMDMStorage) ) + +#define IWMDMStorage4_GetReferences(This,pdwRefs,pppIWMDMStorage) \ + ( (This)->lpVtbl -> GetReferences(This,pdwRefs,pppIWMDMStorage) ) + +#define IWMDMStorage4_GetRightsWithProgress(This,pIProgressCallback,ppRights,pnRightsCount) \ + ( (This)->lpVtbl -> GetRightsWithProgress(This,pIProgressCallback,ppRights,pnRightsCount) ) + +#define IWMDMStorage4_GetSpecifiedMetadata(This,cProperties,ppwszPropNames,ppMetadata) \ + ( (This)->lpVtbl -> GetSpecifiedMetadata(This,cProperties,ppwszPropNames,ppMetadata) ) + +#define IWMDMStorage4_FindStorage(This,findScope,pwszUniqueID,ppStorage) \ + ( (This)->lpVtbl -> FindStorage(This,findScope,pwszUniqueID,ppStorage) ) + +#define IWMDMStorage4_GetParent(This,ppStorage) \ + ( (This)->lpVtbl -> GetParent(This,ppStorage) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMStorage4_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMOperation_INTERFACE_DEFINED__ +#define __IWMDMOperation_INTERFACE_DEFINED__ + +/* interface IWMDMOperation */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMOperation; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A0B-33ED-11d3-8470-00C04F79DBC0") + IWMDMOperation : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE BeginRead( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE BeginWrite( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetObjectName( + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetObjectName( + /* [size_is][string][in] */ __RPC__in_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetObjectAttributes( + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetObjectAttributes( + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetObjectTotalSize( + /* [out] */ __RPC__out DWORD *pdwSize, + /* [out] */ __RPC__out DWORD *pdwSizeHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetObjectTotalSize( + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwSizeHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE TransferObjectData( + /* [size_is][out][in] */ __RPC__inout_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE End( + /* [in] */ __RPC__in HRESULT *phCompletionCode, + /* [in] */ __RPC__in_opt IUnknown *pNewObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMOperationVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMOperation * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMOperation * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMOperation * This); + + HRESULT ( STDMETHODCALLTYPE *BeginRead )( + IWMDMOperation * This); + + HRESULT ( STDMETHODCALLTYPE *BeginWrite )( + IWMDMOperation * This); + + HRESULT ( STDMETHODCALLTYPE *GetObjectName )( + IWMDMOperation * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *SetObjectName )( + IWMDMOperation * This, + /* [size_is][string][in] */ __RPC__in_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetObjectAttributes )( + IWMDMOperation * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *SetObjectAttributes )( + IWMDMOperation * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetObjectTotalSize )( + IWMDMOperation * This, + /* [out] */ __RPC__out DWORD *pdwSize, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *SetObjectTotalSize )( + IWMDMOperation * This, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *TransferObjectData )( + IWMDMOperation * This, + /* [size_is][out][in] */ __RPC__inout_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *End )( + IWMDMOperation * This, + /* [in] */ __RPC__in HRESULT *phCompletionCode, + /* [in] */ __RPC__in_opt IUnknown *pNewObject); + + END_INTERFACE + } IWMDMOperationVtbl; + + interface IWMDMOperation + { + CONST_VTBL struct IWMDMOperationVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMOperation_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMOperation_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMOperation_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMOperation_BeginRead(This) \ + ( (This)->lpVtbl -> BeginRead(This) ) + +#define IWMDMOperation_BeginWrite(This) \ + ( (This)->lpVtbl -> BeginWrite(This) ) + +#define IWMDMOperation_GetObjectName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetObjectName(This,pwszName,nMaxChars) ) + +#define IWMDMOperation_SetObjectName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> SetObjectName(This,pwszName,nMaxChars) ) + +#define IWMDMOperation_GetObjectAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetObjectAttributes(This,pdwAttributes,pFormat) ) + +#define IWMDMOperation_SetObjectAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetObjectAttributes(This,dwAttributes,pFormat) ) + +#define IWMDMOperation_GetObjectTotalSize(This,pdwSize,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetObjectTotalSize(This,pdwSize,pdwSizeHigh) ) + +#define IWMDMOperation_SetObjectTotalSize(This,dwSize,dwSizeHigh) \ + ( (This)->lpVtbl -> SetObjectTotalSize(This,dwSize,dwSizeHigh) ) + +#define IWMDMOperation_TransferObjectData(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> TransferObjectData(This,pData,pdwSize,abMac) ) + +#define IWMDMOperation_End(This,phCompletionCode,pNewObject) \ + ( (This)->lpVtbl -> End(This,phCompletionCode,pNewObject) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMOperation_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMOperation2_INTERFACE_DEFINED__ +#define __IWMDMOperation2_INTERFACE_DEFINED__ + +/* interface IWMDMOperation2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMOperation2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("33445B48-7DF7-425c-AD8F-0FC6D82F9F75") + IWMDMOperation2 : public IWMDMOperation + { + public: + virtual HRESULT STDMETHODCALLTYPE SetObjectAttributes2( + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetObjectAttributes2( + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMOperation2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMOperation2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMOperation2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMOperation2 * This); + + HRESULT ( STDMETHODCALLTYPE *BeginRead )( + IWMDMOperation2 * This); + + HRESULT ( STDMETHODCALLTYPE *BeginWrite )( + IWMDMOperation2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetObjectName )( + IWMDMOperation2 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *SetObjectName )( + IWMDMOperation2 * This, + /* [size_is][string][in] */ __RPC__in_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetObjectAttributes )( + IWMDMOperation2 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *SetObjectAttributes )( + IWMDMOperation2 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetObjectTotalSize )( + IWMDMOperation2 * This, + /* [out] */ __RPC__out DWORD *pdwSize, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *SetObjectTotalSize )( + IWMDMOperation2 * This, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *TransferObjectData )( + IWMDMOperation2 * This, + /* [size_is][out][in] */ __RPC__inout_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *End )( + IWMDMOperation2 * This, + /* [in] */ __RPC__in HRESULT *phCompletionCode, + /* [in] */ __RPC__in_opt IUnknown *pNewObject); + + HRESULT ( STDMETHODCALLTYPE *SetObjectAttributes2 )( + IWMDMOperation2 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetObjectAttributes2 )( + IWMDMOperation2 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat); + + END_INTERFACE + } IWMDMOperation2Vtbl; + + interface IWMDMOperation2 + { + CONST_VTBL struct IWMDMOperation2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMOperation2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMOperation2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMOperation2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMOperation2_BeginRead(This) \ + ( (This)->lpVtbl -> BeginRead(This) ) + +#define IWMDMOperation2_BeginWrite(This) \ + ( (This)->lpVtbl -> BeginWrite(This) ) + +#define IWMDMOperation2_GetObjectName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetObjectName(This,pwszName,nMaxChars) ) + +#define IWMDMOperation2_SetObjectName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> SetObjectName(This,pwszName,nMaxChars) ) + +#define IWMDMOperation2_GetObjectAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetObjectAttributes(This,pdwAttributes,pFormat) ) + +#define IWMDMOperation2_SetObjectAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetObjectAttributes(This,dwAttributes,pFormat) ) + +#define IWMDMOperation2_GetObjectTotalSize(This,pdwSize,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetObjectTotalSize(This,pdwSize,pdwSizeHigh) ) + +#define IWMDMOperation2_SetObjectTotalSize(This,dwSize,dwSizeHigh) \ + ( (This)->lpVtbl -> SetObjectTotalSize(This,dwSize,dwSizeHigh) ) + +#define IWMDMOperation2_TransferObjectData(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> TransferObjectData(This,pData,pdwSize,abMac) ) + +#define IWMDMOperation2_End(This,phCompletionCode,pNewObject) \ + ( (This)->lpVtbl -> End(This,phCompletionCode,pNewObject) ) + + +#define IWMDMOperation2_SetObjectAttributes2(This,dwAttributes,dwAttributesEx,pFormat,pVideoFormat) \ + ( (This)->lpVtbl -> SetObjectAttributes2(This,dwAttributes,dwAttributesEx,pFormat,pVideoFormat) ) + +#define IWMDMOperation2_GetObjectAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> GetObjectAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMOperation2_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMOperation3_INTERFACE_DEFINED__ +#define __IWMDMOperation3_INTERFACE_DEFINED__ + +/* interface IWMDMOperation3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMOperation3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("d1f9b46a-9ca8-46d8-9d0f-1ec9bae54919") + IWMDMOperation3 : public IWMDMOperation + { + public: + virtual HRESULT STDMETHODCALLTYPE TransferObjectDataOnClearChannel( + /* [size_is][out][in] */ __RPC__inout_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMOperation3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMOperation3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMOperation3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMOperation3 * This); + + HRESULT ( STDMETHODCALLTYPE *BeginRead )( + IWMDMOperation3 * This); + + HRESULT ( STDMETHODCALLTYPE *BeginWrite )( + IWMDMOperation3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetObjectName )( + IWMDMOperation3 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *SetObjectName )( + IWMDMOperation3 * This, + /* [size_is][string][in] */ __RPC__in_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetObjectAttributes )( + IWMDMOperation3 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *SetObjectAttributes )( + IWMDMOperation3 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetObjectTotalSize )( + IWMDMOperation3 * This, + /* [out] */ __RPC__out DWORD *pdwSize, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *SetObjectTotalSize )( + IWMDMOperation3 * This, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *TransferObjectData )( + IWMDMOperation3 * This, + /* [size_is][out][in] */ __RPC__inout_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *End )( + IWMDMOperation3 * This, + /* [in] */ __RPC__in HRESULT *phCompletionCode, + /* [in] */ __RPC__in_opt IUnknown *pNewObject); + + HRESULT ( STDMETHODCALLTYPE *TransferObjectDataOnClearChannel )( + IWMDMOperation3 * This, + /* [size_is][out][in] */ __RPC__inout_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize); + + END_INTERFACE + } IWMDMOperation3Vtbl; + + interface IWMDMOperation3 + { + CONST_VTBL struct IWMDMOperation3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMOperation3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMOperation3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMOperation3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMOperation3_BeginRead(This) \ + ( (This)->lpVtbl -> BeginRead(This) ) + +#define IWMDMOperation3_BeginWrite(This) \ + ( (This)->lpVtbl -> BeginWrite(This) ) + +#define IWMDMOperation3_GetObjectName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetObjectName(This,pwszName,nMaxChars) ) + +#define IWMDMOperation3_SetObjectName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> SetObjectName(This,pwszName,nMaxChars) ) + +#define IWMDMOperation3_GetObjectAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetObjectAttributes(This,pdwAttributes,pFormat) ) + +#define IWMDMOperation3_SetObjectAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetObjectAttributes(This,dwAttributes,pFormat) ) + +#define IWMDMOperation3_GetObjectTotalSize(This,pdwSize,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetObjectTotalSize(This,pdwSize,pdwSizeHigh) ) + +#define IWMDMOperation3_SetObjectTotalSize(This,dwSize,dwSizeHigh) \ + ( (This)->lpVtbl -> SetObjectTotalSize(This,dwSize,dwSizeHigh) ) + +#define IWMDMOperation3_TransferObjectData(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> TransferObjectData(This,pData,pdwSize,abMac) ) + +#define IWMDMOperation3_End(This,phCompletionCode,pNewObject) \ + ( (This)->lpVtbl -> End(This,phCompletionCode,pNewObject) ) + + +#define IWMDMOperation3_TransferObjectDataOnClearChannel(This,pData,pdwSize) \ + ( (This)->lpVtbl -> TransferObjectDataOnClearChannel(This,pData,pdwSize) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMOperation3_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMProgress_INTERFACE_DEFINED__ +#define __IWMDMProgress_INTERFACE_DEFINED__ + +/* interface IWMDMProgress */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMProgress; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A0C-33ED-11d3-8470-00C04F79DBC0") + IWMDMProgress : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Begin( + /* [in] */ DWORD dwEstimatedTicks) = 0; + + virtual HRESULT STDMETHODCALLTYPE Progress( + /* [in] */ DWORD dwTranspiredTicks) = 0; + + virtual HRESULT STDMETHODCALLTYPE End( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMProgressVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMProgress * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMProgress * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMProgress * This); + + HRESULT ( STDMETHODCALLTYPE *Begin )( + IWMDMProgress * This, + /* [in] */ DWORD dwEstimatedTicks); + + HRESULT ( STDMETHODCALLTYPE *Progress )( + IWMDMProgress * This, + /* [in] */ DWORD dwTranspiredTicks); + + HRESULT ( STDMETHODCALLTYPE *End )( + IWMDMProgress * This); + + END_INTERFACE + } IWMDMProgressVtbl; + + interface IWMDMProgress + { + CONST_VTBL struct IWMDMProgressVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMProgress_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMProgress_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMProgress_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMProgress_Begin(This,dwEstimatedTicks) \ + ( (This)->lpVtbl -> Begin(This,dwEstimatedTicks) ) + +#define IWMDMProgress_Progress(This,dwTranspiredTicks) \ + ( (This)->lpVtbl -> Progress(This,dwTranspiredTicks) ) + +#define IWMDMProgress_End(This) \ + ( (This)->lpVtbl -> End(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMProgress_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMProgress2_INTERFACE_DEFINED__ +#define __IWMDMProgress2_INTERFACE_DEFINED__ + +/* interface IWMDMProgress2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMProgress2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3A43F550-B383-4e92-B04A-E6BBC660FEFC") + IWMDMProgress2 : public IWMDMProgress + { + public: + virtual HRESULT STDMETHODCALLTYPE End2( + /* [in] */ HRESULT hrCompletionCode) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMProgress2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMProgress2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMProgress2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMProgress2 * This); + + HRESULT ( STDMETHODCALLTYPE *Begin )( + IWMDMProgress2 * This, + /* [in] */ DWORD dwEstimatedTicks); + + HRESULT ( STDMETHODCALLTYPE *Progress )( + IWMDMProgress2 * This, + /* [in] */ DWORD dwTranspiredTicks); + + HRESULT ( STDMETHODCALLTYPE *End )( + IWMDMProgress2 * This); + + HRESULT ( STDMETHODCALLTYPE *End2 )( + IWMDMProgress2 * This, + /* [in] */ HRESULT hrCompletionCode); + + END_INTERFACE + } IWMDMProgress2Vtbl; + + interface IWMDMProgress2 + { + CONST_VTBL struct IWMDMProgress2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMProgress2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMProgress2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMProgress2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMProgress2_Begin(This,dwEstimatedTicks) \ + ( (This)->lpVtbl -> Begin(This,dwEstimatedTicks) ) + +#define IWMDMProgress2_Progress(This,dwTranspiredTicks) \ + ( (This)->lpVtbl -> Progress(This,dwTranspiredTicks) ) + +#define IWMDMProgress2_End(This) \ + ( (This)->lpVtbl -> End(This) ) + + +#define IWMDMProgress2_End2(This,hrCompletionCode) \ + ( (This)->lpVtbl -> End2(This,hrCompletionCode) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMProgress2_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMProgress3_INTERFACE_DEFINED__ +#define __IWMDMProgress3_INTERFACE_DEFINED__ + +/* interface IWMDMProgress3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMProgress3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("21DE01CB-3BB4-4929-B21A-17AF3F80F658") + IWMDMProgress3 : public IWMDMProgress2 + { + public: + virtual HRESULT STDMETHODCALLTYPE Begin3( + /* [in] */ GUID EventId, + /* [in] */ DWORD dwEstimatedTicks, + /* [unique][out][in] */ __RPC__inout_opt OPAQUECOMMAND *pContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE Progress3( + /* [in] */ GUID EventId, + /* [in] */ DWORD dwTranspiredTicks, + /* [unique][out][in] */ __RPC__inout_opt OPAQUECOMMAND *pContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE End3( + /* [in] */ GUID EventId, + /* [in] */ HRESULT hrCompletionCode, + /* [unique][out][in] */ __RPC__inout_opt OPAQUECOMMAND *pContext) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMProgress3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMProgress3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMProgress3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMProgress3 * This); + + HRESULT ( STDMETHODCALLTYPE *Begin )( + IWMDMProgress3 * This, + /* [in] */ DWORD dwEstimatedTicks); + + HRESULT ( STDMETHODCALLTYPE *Progress )( + IWMDMProgress3 * This, + /* [in] */ DWORD dwTranspiredTicks); + + HRESULT ( STDMETHODCALLTYPE *End )( + IWMDMProgress3 * This); + + HRESULT ( STDMETHODCALLTYPE *End2 )( + IWMDMProgress3 * This, + /* [in] */ HRESULT hrCompletionCode); + + HRESULT ( STDMETHODCALLTYPE *Begin3 )( + IWMDMProgress3 * This, + /* [in] */ GUID EventId, + /* [in] */ DWORD dwEstimatedTicks, + /* [unique][out][in] */ __RPC__inout_opt OPAQUECOMMAND *pContext); + + HRESULT ( STDMETHODCALLTYPE *Progress3 )( + IWMDMProgress3 * This, + /* [in] */ GUID EventId, + /* [in] */ DWORD dwTranspiredTicks, + /* [unique][out][in] */ __RPC__inout_opt OPAQUECOMMAND *pContext); + + HRESULT ( STDMETHODCALLTYPE *End3 )( + IWMDMProgress3 * This, + /* [in] */ GUID EventId, + /* [in] */ HRESULT hrCompletionCode, + /* [unique][out][in] */ __RPC__inout_opt OPAQUECOMMAND *pContext); + + END_INTERFACE + } IWMDMProgress3Vtbl; + + interface IWMDMProgress3 + { + CONST_VTBL struct IWMDMProgress3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMProgress3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMProgress3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMProgress3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMProgress3_Begin(This,dwEstimatedTicks) \ + ( (This)->lpVtbl -> Begin(This,dwEstimatedTicks) ) + +#define IWMDMProgress3_Progress(This,dwTranspiredTicks) \ + ( (This)->lpVtbl -> Progress(This,dwTranspiredTicks) ) + +#define IWMDMProgress3_End(This) \ + ( (This)->lpVtbl -> End(This) ) + + +#define IWMDMProgress3_End2(This,hrCompletionCode) \ + ( (This)->lpVtbl -> End2(This,hrCompletionCode) ) + + +#define IWMDMProgress3_Begin3(This,EventId,dwEstimatedTicks,pContext) \ + ( (This)->lpVtbl -> Begin3(This,EventId,dwEstimatedTicks,pContext) ) + +#define IWMDMProgress3_Progress3(This,EventId,dwTranspiredTicks,pContext) \ + ( (This)->lpVtbl -> Progress3(This,EventId,dwTranspiredTicks,pContext) ) + +#define IWMDMProgress3_End3(This,EventId,hrCompletionCode,pContext) \ + ( (This)->lpVtbl -> End3(This,EventId,hrCompletionCode,pContext) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMProgress3_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMDevice_INTERFACE_DEFINED__ +#define __IWMDMDevice_INTERFACE_DEFINED__ + +/* interface IWMDMDevice */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A02-33ED-11d3-8470-00C04F79DBC0") + IWMDMDevice : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetName( + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetManufacturer( + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVersion( + /* [out] */ __RPC__out DWORD *pdwVersion) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetType( + /* [out] */ __RPC__out DWORD *pdwType) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSerialNumber( + /* [out] */ __RPC__out PWMDMID pSerialNumber, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPowerSource( + /* [out] */ __RPC__out DWORD *pdwPowerSource, + /* [out] */ __RPC__out DWORD *pdwPercentRemaining) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ __RPC__out DWORD *pdwStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceIcon( + /* [out] */ __RPC__out ULONG *hIcon) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumStorage( + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **ppEnumStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFormatSupport( + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFormatCount) _WAVEFORMATEX **ppFormatEx, + /* [out] */ __RPC__out UINT *pnFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnMimeTypeCount) LPWSTR **pppwszMimeType, + /* [out] */ __RPC__out UINT *pnMimeTypeCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE SendOpaqueCommand( + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMDevice * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMDevice * This); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IWMDMDevice * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetManufacturer )( + IWMDMDevice * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetVersion )( + IWMDMDevice * This, + /* [out] */ __RPC__out DWORD *pdwVersion); + + HRESULT ( STDMETHODCALLTYPE *GetType )( + IWMDMDevice * This, + /* [out] */ __RPC__out DWORD *pdwType); + + HRESULT ( STDMETHODCALLTYPE *GetSerialNumber )( + IWMDMDevice * This, + /* [out] */ __RPC__out PWMDMID pSerialNumber, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetPowerSource )( + IWMDMDevice * This, + /* [out] */ __RPC__out DWORD *pdwPowerSource, + /* [out] */ __RPC__out DWORD *pdwPercentRemaining); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IWMDMDevice * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceIcon )( + IWMDMDevice * This, + /* [out] */ __RPC__out ULONG *hIcon); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IWMDMDevice * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport )( + IWMDMDevice * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFormatCount) _WAVEFORMATEX **ppFormatEx, + /* [out] */ __RPC__out UINT *pnFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnMimeTypeCount) LPWSTR **pppwszMimeType, + /* [out] */ __RPC__out UINT *pnMimeTypeCount); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IWMDMDevice * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + END_INTERFACE + } IWMDMDeviceVtbl; + + interface IWMDMDevice + { + CONST_VTBL struct IWMDMDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMDevice_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMDevice_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMDevice_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMDevice_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IWMDMDevice_GetManufacturer(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetManufacturer(This,pwszName,nMaxChars) ) + +#define IWMDMDevice_GetVersion(This,pdwVersion) \ + ( (This)->lpVtbl -> GetVersion(This,pdwVersion) ) + +#define IWMDMDevice_GetType(This,pdwType) \ + ( (This)->lpVtbl -> GetType(This,pdwType) ) + +#define IWMDMDevice_GetSerialNumber(This,pSerialNumber,abMac) \ + ( (This)->lpVtbl -> GetSerialNumber(This,pSerialNumber,abMac) ) + +#define IWMDMDevice_GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) \ + ( (This)->lpVtbl -> GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) ) + +#define IWMDMDevice_GetStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetStatus(This,pdwStatus) ) + +#define IWMDMDevice_GetDeviceIcon(This,hIcon) \ + ( (This)->lpVtbl -> GetDeviceIcon(This,hIcon) ) + +#define IWMDMDevice_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IWMDMDevice_GetFormatSupport(This,ppFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport(This,ppFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) ) + +#define IWMDMDevice_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMDevice_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMDevice2_INTERFACE_DEFINED__ +#define __IWMDMDevice2_INTERFACE_DEFINED__ + +/* interface IWMDMDevice2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMDevice2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("E34F3D37-9D67-4fc1-9252-62D28B2F8B55") + IWMDMDevice2 : public IWMDMDevice + { + public: + virtual HRESULT STDMETHODCALLTYPE GetStorage( + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFormatSupport2( + /* [in] */ DWORD dwFlags, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnAudioFormatCount) _WAVEFORMATEX **ppAudioFormatEx, + /* [ref][out] */ __RPC__out UINT *pnAudioFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnVideoFormatCount) _VIDEOINFOHEADER **ppVideoFormatEx, + /* [ref][out] */ __RPC__out UINT *pnVideoFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFileTypeCount) WMFILECAPABILITIES **ppFileType, + /* [ref][out] */ __RPC__out UINT *pnFileTypeCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSpecifyPropertyPages( + /* [ref][out] */ __RPC__deref_out_opt ISpecifyPropertyPages **ppSpecifyPropPages, + /* [size_is][size_is][ref][out] */ __RPC__deref_out_ecount_full_opt(*pcUnks) IUnknown ***pppUnknowns, + /* [ref][out] */ __RPC__out ULONG *pcUnks) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCanonicalName( + /* [size_is][out] */ __RPC__out_ecount_full(nMaxChars) LPWSTR pwszPnPName, + /* [in] */ UINT nMaxChars) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMDevice2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMDevice2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMDevice2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMDevice2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IWMDMDevice2 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetManufacturer )( + IWMDMDevice2 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetVersion )( + IWMDMDevice2 * This, + /* [out] */ __RPC__out DWORD *pdwVersion); + + HRESULT ( STDMETHODCALLTYPE *GetType )( + IWMDMDevice2 * This, + /* [out] */ __RPC__out DWORD *pdwType); + + HRESULT ( STDMETHODCALLTYPE *GetSerialNumber )( + IWMDMDevice2 * This, + /* [out] */ __RPC__out PWMDMID pSerialNumber, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetPowerSource )( + IWMDMDevice2 * This, + /* [out] */ __RPC__out DWORD *pdwPowerSource, + /* [out] */ __RPC__out DWORD *pdwPercentRemaining); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IWMDMDevice2 * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceIcon )( + IWMDMDevice2 * This, + /* [out] */ __RPC__out ULONG *hIcon); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IWMDMDevice2 * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport )( + IWMDMDevice2 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFormatCount) _WAVEFORMATEX **ppFormatEx, + /* [out] */ __RPC__out UINT *pnFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnMimeTypeCount) LPWSTR **pppwszMimeType, + /* [out] */ __RPC__out UINT *pnMimeTypeCount); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IWMDMDevice2 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IWMDMDevice2 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport2 )( + IWMDMDevice2 * This, + /* [in] */ DWORD dwFlags, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnAudioFormatCount) _WAVEFORMATEX **ppAudioFormatEx, + /* [ref][out] */ __RPC__out UINT *pnAudioFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnVideoFormatCount) _VIDEOINFOHEADER **ppVideoFormatEx, + /* [ref][out] */ __RPC__out UINT *pnVideoFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFileTypeCount) WMFILECAPABILITIES **ppFileType, + /* [ref][out] */ __RPC__out UINT *pnFileTypeCount); + + HRESULT ( STDMETHODCALLTYPE *GetSpecifyPropertyPages )( + IWMDMDevice2 * This, + /* [ref][out] */ __RPC__deref_out_opt ISpecifyPropertyPages **ppSpecifyPropPages, + /* [size_is][size_is][ref][out] */ __RPC__deref_out_ecount_full_opt(*pcUnks) IUnknown ***pppUnknowns, + /* [ref][out] */ __RPC__out ULONG *pcUnks); + + HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( + IWMDMDevice2 * This, + /* [size_is][out] */ __RPC__out_ecount_full(nMaxChars) LPWSTR pwszPnPName, + /* [in] */ UINT nMaxChars); + + END_INTERFACE + } IWMDMDevice2Vtbl; + + interface IWMDMDevice2 + { + CONST_VTBL struct IWMDMDevice2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMDevice2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMDevice2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMDevice2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMDevice2_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IWMDMDevice2_GetManufacturer(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetManufacturer(This,pwszName,nMaxChars) ) + +#define IWMDMDevice2_GetVersion(This,pdwVersion) \ + ( (This)->lpVtbl -> GetVersion(This,pdwVersion) ) + +#define IWMDMDevice2_GetType(This,pdwType) \ + ( (This)->lpVtbl -> GetType(This,pdwType) ) + +#define IWMDMDevice2_GetSerialNumber(This,pSerialNumber,abMac) \ + ( (This)->lpVtbl -> GetSerialNumber(This,pSerialNumber,abMac) ) + +#define IWMDMDevice2_GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) \ + ( (This)->lpVtbl -> GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) ) + +#define IWMDMDevice2_GetStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetStatus(This,pdwStatus) ) + +#define IWMDMDevice2_GetDeviceIcon(This,hIcon) \ + ( (This)->lpVtbl -> GetDeviceIcon(This,hIcon) ) + +#define IWMDMDevice2_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IWMDMDevice2_GetFormatSupport(This,ppFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport(This,ppFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) ) + +#define IWMDMDevice2_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IWMDMDevice2_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IWMDMDevice2_GetFormatSupport2(This,dwFlags,ppAudioFormatEx,pnAudioFormatCount,ppVideoFormatEx,pnVideoFormatCount,ppFileType,pnFileTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport2(This,dwFlags,ppAudioFormatEx,pnAudioFormatCount,ppVideoFormatEx,pnVideoFormatCount,ppFileType,pnFileTypeCount) ) + +#define IWMDMDevice2_GetSpecifyPropertyPages(This,ppSpecifyPropPages,pppUnknowns,pcUnks) \ + ( (This)->lpVtbl -> GetSpecifyPropertyPages(This,ppSpecifyPropPages,pppUnknowns,pcUnks) ) + +#define IWMDMDevice2_GetCanonicalName(This,pwszPnPName,nMaxChars) \ + ( (This)->lpVtbl -> GetCanonicalName(This,pwszPnPName,nMaxChars) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMDevice2_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMDevice3_INTERFACE_DEFINED__ +#define __IWMDMDevice3_INTERFACE_DEFINED__ + +/* interface IWMDMDevice3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMDevice3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6c03e4fe-05db-4dda-9e3c-06233a6d5d65") + IWMDMDevice3 : public IWMDMDevice2 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetProperty( + /* [in] */ __RPC__in LPCWSTR pwszPropName, + /* [out] */ __RPC__out PROPVARIANT *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProperty( + /* [in] */ __RPC__in LPCWSTR pwszPropName, + /* [in] */ __RPC__in const PROPVARIANT *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFormatCapability( + /* [in] */ WMDM_FORMATCODE format, + /* [out] */ __RPC__out WMDM_FORMAT_CAPABILITY *pFormatSupport) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeviceIoControl( + /* [in] */ DWORD dwIoControlCode, + /* [size_is][in] */ __RPC__in_ecount_full(nInBufferSize) BYTE *lpInBuffer, + /* [in] */ DWORD nInBufferSize, + /* [size_is][out] */ __RPC__out_ecount_full(*pnOutBufferSize) BYTE *lpOutBuffer, + /* [out][in] */ __RPC__inout LPDWORD pnOutBufferSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindStorage( + /* [in] */ WMDM_FIND_SCOPE findScope, + /* [in] */ __RPC__in LPCWSTR pwszUniqueID, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMDevice3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMDevice3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMDevice3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMDevice3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IWMDMDevice3 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetManufacturer )( + IWMDMDevice3 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetVersion )( + IWMDMDevice3 * This, + /* [out] */ __RPC__out DWORD *pdwVersion); + + HRESULT ( STDMETHODCALLTYPE *GetType )( + IWMDMDevice3 * This, + /* [out] */ __RPC__out DWORD *pdwType); + + HRESULT ( STDMETHODCALLTYPE *GetSerialNumber )( + IWMDMDevice3 * This, + /* [out] */ __RPC__out PWMDMID pSerialNumber, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetPowerSource )( + IWMDMDevice3 * This, + /* [out] */ __RPC__out DWORD *pdwPowerSource, + /* [out] */ __RPC__out DWORD *pdwPercentRemaining); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IWMDMDevice3 * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceIcon )( + IWMDMDevice3 * This, + /* [out] */ __RPC__out ULONG *hIcon); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IWMDMDevice3 * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport )( + IWMDMDevice3 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFormatCount) _WAVEFORMATEX **ppFormatEx, + /* [out] */ __RPC__out UINT *pnFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnMimeTypeCount) LPWSTR **pppwszMimeType, + /* [out] */ __RPC__out UINT *pnMimeTypeCount); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IWMDMDevice3 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IWMDMDevice3 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport2 )( + IWMDMDevice3 * This, + /* [in] */ DWORD dwFlags, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnAudioFormatCount) _WAVEFORMATEX **ppAudioFormatEx, + /* [ref][out] */ __RPC__out UINT *pnAudioFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnVideoFormatCount) _VIDEOINFOHEADER **ppVideoFormatEx, + /* [ref][out] */ __RPC__out UINT *pnVideoFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFileTypeCount) WMFILECAPABILITIES **ppFileType, + /* [ref][out] */ __RPC__out UINT *pnFileTypeCount); + + HRESULT ( STDMETHODCALLTYPE *GetSpecifyPropertyPages )( + IWMDMDevice3 * This, + /* [ref][out] */ __RPC__deref_out_opt ISpecifyPropertyPages **ppSpecifyPropPages, + /* [size_is][size_is][ref][out] */ __RPC__deref_out_ecount_full_opt(*pcUnks) IUnknown ***pppUnknowns, + /* [ref][out] */ __RPC__out ULONG *pcUnks); + + HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( + IWMDMDevice3 * This, + /* [size_is][out] */ __RPC__out_ecount_full(nMaxChars) LPWSTR pwszPnPName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetProperty )( + IWMDMDevice3 * This, + /* [in] */ __RPC__in LPCWSTR pwszPropName, + /* [out] */ __RPC__out PROPVARIANT *pValue); + + HRESULT ( STDMETHODCALLTYPE *SetProperty )( + IWMDMDevice3 * This, + /* [in] */ __RPC__in LPCWSTR pwszPropName, + /* [in] */ __RPC__in const PROPVARIANT *pValue); + + HRESULT ( STDMETHODCALLTYPE *GetFormatCapability )( + IWMDMDevice3 * This, + /* [in] */ WMDM_FORMATCODE format, + /* [out] */ __RPC__out WMDM_FORMAT_CAPABILITY *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *DeviceIoControl )( + IWMDMDevice3 * This, + /* [in] */ DWORD dwIoControlCode, + /* [size_is][in] */ __RPC__in_ecount_full(nInBufferSize) BYTE *lpInBuffer, + /* [in] */ DWORD nInBufferSize, + /* [size_is][out] */ __RPC__out_ecount_full(*pnOutBufferSize) BYTE *lpOutBuffer, + /* [out][in] */ __RPC__inout LPDWORD pnOutBufferSize); + + HRESULT ( STDMETHODCALLTYPE *FindStorage )( + IWMDMDevice3 * This, + /* [in] */ WMDM_FIND_SCOPE findScope, + /* [in] */ __RPC__in LPCWSTR pwszUniqueID, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppStorage); + + END_INTERFACE + } IWMDMDevice3Vtbl; + + interface IWMDMDevice3 + { + CONST_VTBL struct IWMDMDevice3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMDevice3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMDevice3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMDevice3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMDevice3_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IWMDMDevice3_GetManufacturer(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetManufacturer(This,pwszName,nMaxChars) ) + +#define IWMDMDevice3_GetVersion(This,pdwVersion) \ + ( (This)->lpVtbl -> GetVersion(This,pdwVersion) ) + +#define IWMDMDevice3_GetType(This,pdwType) \ + ( (This)->lpVtbl -> GetType(This,pdwType) ) + +#define IWMDMDevice3_GetSerialNumber(This,pSerialNumber,abMac) \ + ( (This)->lpVtbl -> GetSerialNumber(This,pSerialNumber,abMac) ) + +#define IWMDMDevice3_GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) \ + ( (This)->lpVtbl -> GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) ) + +#define IWMDMDevice3_GetStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetStatus(This,pdwStatus) ) + +#define IWMDMDevice3_GetDeviceIcon(This,hIcon) \ + ( (This)->lpVtbl -> GetDeviceIcon(This,hIcon) ) + +#define IWMDMDevice3_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IWMDMDevice3_GetFormatSupport(This,ppFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport(This,ppFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) ) + +#define IWMDMDevice3_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IWMDMDevice3_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IWMDMDevice3_GetFormatSupport2(This,dwFlags,ppAudioFormatEx,pnAudioFormatCount,ppVideoFormatEx,pnVideoFormatCount,ppFileType,pnFileTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport2(This,dwFlags,ppAudioFormatEx,pnAudioFormatCount,ppVideoFormatEx,pnVideoFormatCount,ppFileType,pnFileTypeCount) ) + +#define IWMDMDevice3_GetSpecifyPropertyPages(This,ppSpecifyPropPages,pppUnknowns,pcUnks) \ + ( (This)->lpVtbl -> GetSpecifyPropertyPages(This,ppSpecifyPropPages,pppUnknowns,pcUnks) ) + +#define IWMDMDevice3_GetCanonicalName(This,pwszPnPName,nMaxChars) \ + ( (This)->lpVtbl -> GetCanonicalName(This,pwszPnPName,nMaxChars) ) + + +#define IWMDMDevice3_GetProperty(This,pwszPropName,pValue) \ + ( (This)->lpVtbl -> GetProperty(This,pwszPropName,pValue) ) + +#define IWMDMDevice3_SetProperty(This,pwszPropName,pValue) \ + ( (This)->lpVtbl -> SetProperty(This,pwszPropName,pValue) ) + +#define IWMDMDevice3_GetFormatCapability(This,format,pFormatSupport) \ + ( (This)->lpVtbl -> GetFormatCapability(This,format,pFormatSupport) ) + +#define IWMDMDevice3_DeviceIoControl(This,dwIoControlCode,lpInBuffer,nInBufferSize,lpOutBuffer,pnOutBufferSize) \ + ( (This)->lpVtbl -> DeviceIoControl(This,dwIoControlCode,lpInBuffer,nInBufferSize,lpOutBuffer,pnOutBufferSize) ) + +#define IWMDMDevice3_FindStorage(This,findScope,pwszUniqueID,ppStorage) \ + ( (This)->lpVtbl -> FindStorage(This,findScope,pwszUniqueID,ppStorage) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMDevice3_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMDeviceSession_INTERFACE_DEFINED__ +#define __IWMDMDeviceSession_INTERFACE_DEFINED__ + +/* interface IWMDMDeviceSession */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMDeviceSession; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("82af0a65-9d96-412c-83e5-3c43e4b06cc7") + IWMDMDeviceSession : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE BeginSession( + /* [in] */ WMDM_SESSION_TYPE type, + /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(dwSizeCtx) BYTE *pCtx, + /* [in] */ DWORD dwSizeCtx) = 0; + + virtual HRESULT STDMETHODCALLTYPE EndSession( + /* [in] */ WMDM_SESSION_TYPE type, + /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(dwSizeCtx) BYTE *pCtx, + /* [in] */ DWORD dwSizeCtx) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMDeviceSessionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMDeviceSession * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMDeviceSession * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMDeviceSession * This); + + HRESULT ( STDMETHODCALLTYPE *BeginSession )( + IWMDMDeviceSession * This, + /* [in] */ WMDM_SESSION_TYPE type, + /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(dwSizeCtx) BYTE *pCtx, + /* [in] */ DWORD dwSizeCtx); + + HRESULT ( STDMETHODCALLTYPE *EndSession )( + IWMDMDeviceSession * This, + /* [in] */ WMDM_SESSION_TYPE type, + /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(dwSizeCtx) BYTE *pCtx, + /* [in] */ DWORD dwSizeCtx); + + END_INTERFACE + } IWMDMDeviceSessionVtbl; + + interface IWMDMDeviceSession + { + CONST_VTBL struct IWMDMDeviceSessionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMDeviceSession_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMDeviceSession_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMDeviceSession_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMDeviceSession_BeginSession(This,type,pCtx,dwSizeCtx) \ + ( (This)->lpVtbl -> BeginSession(This,type,pCtx,dwSizeCtx) ) + +#define IWMDMDeviceSession_EndSession(This,type,pCtx,dwSizeCtx) \ + ( (This)->lpVtbl -> EndSession(This,type,pCtx,dwSizeCtx) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMDeviceSession_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMEnumDevice_INTERFACE_DEFINED__ +#define __IWMDMEnumDevice_INTERFACE_DEFINED__ + +/* interface IWMDMEnumDevice */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMEnumDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A01-33ED-11d3-8470-00C04F79DBC0") + IWMDMEnumDevice : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IWMDMDevice **ppDevice, + /* [out] */ __RPC__out ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG celt, + /* [out] */ __RPC__out ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ __RPC__deref_out_opt IWMDMEnumDevice **ppEnumDevice) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMEnumDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMEnumDevice * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMEnumDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMEnumDevice * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IWMDMEnumDevice * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IWMDMDevice **ppDevice, + /* [out] */ __RPC__out ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IWMDMEnumDevice * This, + /* [in] */ ULONG celt, + /* [out] */ __RPC__out ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IWMDMEnumDevice * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IWMDMEnumDevice * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumDevice **ppEnumDevice); + + END_INTERFACE + } IWMDMEnumDeviceVtbl; + + interface IWMDMEnumDevice + { + CONST_VTBL struct IWMDMEnumDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMEnumDevice_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMEnumDevice_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMEnumDevice_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMEnumDevice_Next(This,celt,ppDevice,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,ppDevice,pceltFetched) ) + +#define IWMDMEnumDevice_Skip(This,celt,pceltFetched) \ + ( (This)->lpVtbl -> Skip(This,celt,pceltFetched) ) + +#define IWMDMEnumDevice_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) + +#define IWMDMEnumDevice_Clone(This,ppEnumDevice) \ + ( (This)->lpVtbl -> Clone(This,ppEnumDevice) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMEnumDevice_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMDeviceControl_INTERFACE_DEFINED__ +#define __IWMDMDeviceControl_INTERFACE_DEFINED__ + +/* interface IWMDMDeviceControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMDeviceControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A04-33ED-11d3-8470-00C04F79DBC0") + IWMDMDeviceControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ __RPC__out DWORD *pdwStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCapabilities( + /* [out] */ __RPC__out DWORD *pdwCapabilitiesMask) = 0; + + virtual HRESULT STDMETHODCALLTYPE Play( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Record( + /* [in] */ __RPC__in _WAVEFORMATEX *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE Pause( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Resume( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Seek( + /* [in] */ UINT fuMode, + /* [in] */ int nOffset) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMDeviceControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMDeviceControl * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMDeviceControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IWMDMDeviceControl * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *GetCapabilities )( + IWMDMDeviceControl * This, + /* [out] */ __RPC__out DWORD *pdwCapabilitiesMask); + + HRESULT ( STDMETHODCALLTYPE *Play )( + IWMDMDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *Record )( + IWMDMDeviceControl * This, + /* [in] */ __RPC__in _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IWMDMDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *Resume )( + IWMDMDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IWMDMDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *Seek )( + IWMDMDeviceControl * This, + /* [in] */ UINT fuMode, + /* [in] */ int nOffset); + + END_INTERFACE + } IWMDMDeviceControlVtbl; + + interface IWMDMDeviceControl + { + CONST_VTBL struct IWMDMDeviceControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMDeviceControl_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMDeviceControl_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMDeviceControl_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMDeviceControl_GetStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetStatus(This,pdwStatus) ) + +#define IWMDMDeviceControl_GetCapabilities(This,pdwCapabilitiesMask) \ + ( (This)->lpVtbl -> GetCapabilities(This,pdwCapabilitiesMask) ) + +#define IWMDMDeviceControl_Play(This) \ + ( (This)->lpVtbl -> Play(This) ) + +#define IWMDMDeviceControl_Record(This,pFormat) \ + ( (This)->lpVtbl -> Record(This,pFormat) ) + +#define IWMDMDeviceControl_Pause(This) \ + ( (This)->lpVtbl -> Pause(This) ) + +#define IWMDMDeviceControl_Resume(This) \ + ( (This)->lpVtbl -> Resume(This) ) + +#define IWMDMDeviceControl_Stop(This) \ + ( (This)->lpVtbl -> Stop(This) ) + +#define IWMDMDeviceControl_Seek(This,fuMode,nOffset) \ + ( (This)->lpVtbl -> Seek(This,fuMode,nOffset) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMDeviceControl_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMEnumStorage_INTERFACE_DEFINED__ +#define __IWMDMEnumStorage_INTERFACE_DEFINED__ + +/* interface IWMDMEnumStorage */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMEnumStorage; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A05-33ED-11d3-8470-00C04F79DBC0") + IWMDMEnumStorage : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IWMDMStorage **ppStorage, + /* [out] */ __RPC__out ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG celt, + /* [out] */ __RPC__out ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **ppEnumStorage) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMEnumStorageVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMEnumStorage * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMEnumStorage * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMEnumStorage * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IWMDMEnumStorage * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IWMDMStorage **ppStorage, + /* [out] */ __RPC__out ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IWMDMEnumStorage * This, + /* [in] */ ULONG celt, + /* [out] */ __RPC__out ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IWMDMEnumStorage * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IWMDMEnumStorage * This, + /* [out] */ __RPC__deref_out_opt IWMDMEnumStorage **ppEnumStorage); + + END_INTERFACE + } IWMDMEnumStorageVtbl; + + interface IWMDMEnumStorage + { + CONST_VTBL struct IWMDMEnumStorageVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMEnumStorage_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMEnumStorage_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMEnumStorage_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMEnumStorage_Next(This,celt,ppStorage,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,ppStorage,pceltFetched) ) + +#define IWMDMEnumStorage_Skip(This,celt,pceltFetched) \ + ( (This)->lpVtbl -> Skip(This,celt,pceltFetched) ) + +#define IWMDMEnumStorage_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) + +#define IWMDMEnumStorage_Clone(This,ppEnumStorage) \ + ( (This)->lpVtbl -> Clone(This,ppEnumStorage) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMEnumStorage_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMStorageControl_INTERFACE_DEFINED__ +#define __IWMDMStorageControl_INTERFACE_DEFINED__ + +/* interface IWMDMStorageControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMStorageControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A08-33ED-11d3-8470-00C04F79DBC0") + IWMDMStorageControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Insert( + /* [in] */ UINT fuMode, + /* [unique][in] */ __RPC__in_opt LPWSTR pwszFile, + /* [unique][in] */ __RPC__in_opt IWMDMOperation *pOperation, + /* [unique][in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppNewObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE Delete( + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress) = 0; + + virtual HRESULT STDMETHODCALLTYPE Rename( + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in LPWSTR pwszNewName, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress) = 0; + + virtual HRESULT STDMETHODCALLTYPE Read( + /* [in] */ UINT fuMode, + /* [unique][in] */ __RPC__in_opt LPWSTR pwszFile, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IWMDMOperation *pOperation) = 0; + + virtual HRESULT STDMETHODCALLTYPE Move( + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMStorage *pTargetObject, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMStorageControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMStorageControl * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMStorageControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMStorageControl * This); + + HRESULT ( STDMETHODCALLTYPE *Insert )( + IWMDMStorageControl * This, + /* [in] */ UINT fuMode, + /* [unique][in] */ __RPC__in_opt LPWSTR pwszFile, + /* [unique][in] */ __RPC__in_opt IWMDMOperation *pOperation, + /* [unique][in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppNewObject); + + HRESULT ( STDMETHODCALLTYPE *Delete )( + IWMDMStorageControl * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Rename )( + IWMDMStorageControl * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in LPWSTR pwszNewName, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Read )( + IWMDMStorageControl * This, + /* [in] */ UINT fuMode, + /* [unique][in] */ __RPC__in_opt LPWSTR pwszFile, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IWMDMOperation *pOperation); + + HRESULT ( STDMETHODCALLTYPE *Move )( + IWMDMStorageControl * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMStorage *pTargetObject, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + END_INTERFACE + } IWMDMStorageControlVtbl; + + interface IWMDMStorageControl + { + CONST_VTBL struct IWMDMStorageControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMStorageControl_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMStorageControl_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMStorageControl_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMStorageControl_Insert(This,fuMode,pwszFile,pOperation,pProgress,ppNewObject) \ + ( (This)->lpVtbl -> Insert(This,fuMode,pwszFile,pOperation,pProgress,ppNewObject) ) + +#define IWMDMStorageControl_Delete(This,fuMode,pProgress) \ + ( (This)->lpVtbl -> Delete(This,fuMode,pProgress) ) + +#define IWMDMStorageControl_Rename(This,fuMode,pwszNewName,pProgress) \ + ( (This)->lpVtbl -> Rename(This,fuMode,pwszNewName,pProgress) ) + +#define IWMDMStorageControl_Read(This,fuMode,pwszFile,pProgress,pOperation) \ + ( (This)->lpVtbl -> Read(This,fuMode,pwszFile,pProgress,pOperation) ) + +#define IWMDMStorageControl_Move(This,fuMode,pTargetObject,pProgress) \ + ( (This)->lpVtbl -> Move(This,fuMode,pTargetObject,pProgress) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMStorageControl_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMStorageControl2_INTERFACE_DEFINED__ +#define __IWMDMStorageControl2_INTERFACE_DEFINED__ + +/* interface IWMDMStorageControl2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMStorageControl2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("972C2E88-BD6C-4125-8E09-84F837E637B6") + IWMDMStorageControl2 : public IWMDMStorageControl + { + public: + virtual HRESULT STDMETHODCALLTYPE Insert2( + /* [in] */ UINT fuMode, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileSource, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileDest, + /* [unique][in] */ __RPC__in_opt IWMDMOperation *pOperation, + /* [unique][in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [unique][out][in] */ __RPC__deref_opt_inout_opt IWMDMStorage **ppNewObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMStorageControl2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMStorageControl2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMStorageControl2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMStorageControl2 * This); + + HRESULT ( STDMETHODCALLTYPE *Insert )( + IWMDMStorageControl2 * This, + /* [in] */ UINT fuMode, + /* [unique][in] */ __RPC__in_opt LPWSTR pwszFile, + /* [unique][in] */ __RPC__in_opt IWMDMOperation *pOperation, + /* [unique][in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppNewObject); + + HRESULT ( STDMETHODCALLTYPE *Delete )( + IWMDMStorageControl2 * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Rename )( + IWMDMStorageControl2 * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in LPWSTR pwszNewName, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Read )( + IWMDMStorageControl2 * This, + /* [in] */ UINT fuMode, + /* [unique][in] */ __RPC__in_opt LPWSTR pwszFile, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IWMDMOperation *pOperation); + + HRESULT ( STDMETHODCALLTYPE *Move )( + IWMDMStorageControl2 * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMStorage *pTargetObject, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Insert2 )( + IWMDMStorageControl2 * This, + /* [in] */ UINT fuMode, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileSource, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileDest, + /* [unique][in] */ __RPC__in_opt IWMDMOperation *pOperation, + /* [unique][in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [unique][out][in] */ __RPC__deref_opt_inout_opt IWMDMStorage **ppNewObject); + + END_INTERFACE + } IWMDMStorageControl2Vtbl; + + interface IWMDMStorageControl2 + { + CONST_VTBL struct IWMDMStorageControl2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMStorageControl2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMStorageControl2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMStorageControl2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMStorageControl2_Insert(This,fuMode,pwszFile,pOperation,pProgress,ppNewObject) \ + ( (This)->lpVtbl -> Insert(This,fuMode,pwszFile,pOperation,pProgress,ppNewObject) ) + +#define IWMDMStorageControl2_Delete(This,fuMode,pProgress) \ + ( (This)->lpVtbl -> Delete(This,fuMode,pProgress) ) + +#define IWMDMStorageControl2_Rename(This,fuMode,pwszNewName,pProgress) \ + ( (This)->lpVtbl -> Rename(This,fuMode,pwszNewName,pProgress) ) + +#define IWMDMStorageControl2_Read(This,fuMode,pwszFile,pProgress,pOperation) \ + ( (This)->lpVtbl -> Read(This,fuMode,pwszFile,pProgress,pOperation) ) + +#define IWMDMStorageControl2_Move(This,fuMode,pTargetObject,pProgress) \ + ( (This)->lpVtbl -> Move(This,fuMode,pTargetObject,pProgress) ) + + +#define IWMDMStorageControl2_Insert2(This,fuMode,pwszFileSource,pwszFileDest,pOperation,pProgress,pUnknown,ppNewObject) \ + ( (This)->lpVtbl -> Insert2(This,fuMode,pwszFileSource,pwszFileDest,pOperation,pProgress,pUnknown,ppNewObject) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMStorageControl2_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMStorageControl3_INTERFACE_DEFINED__ +#define __IWMDMStorageControl3_INTERFACE_DEFINED__ + +/* interface IWMDMStorageControl3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMStorageControl3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B3266365-D4F3-4696-8D53-BD27EC60993A") + IWMDMStorageControl3 : public IWMDMStorageControl2 + { + public: + virtual HRESULT STDMETHODCALLTYPE Insert3( + /* [in] */ UINT fuMode, + /* [in] */ UINT fuType, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileSource, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileDest, + /* [unique][in] */ __RPC__in_opt IWMDMOperation *pOperation, + /* [unique][in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [unique][in] */ __RPC__in_opt IWMDMMetaData *pMetaData, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [unique][out][in] */ __RPC__deref_opt_inout_opt IWMDMStorage **ppNewObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMStorageControl3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMStorageControl3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMStorageControl3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMStorageControl3 * This); + + HRESULT ( STDMETHODCALLTYPE *Insert )( + IWMDMStorageControl3 * This, + /* [in] */ UINT fuMode, + /* [unique][in] */ __RPC__in_opt LPWSTR pwszFile, + /* [unique][in] */ __RPC__in_opt IWMDMOperation *pOperation, + /* [unique][in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [out] */ __RPC__deref_out_opt IWMDMStorage **ppNewObject); + + HRESULT ( STDMETHODCALLTYPE *Delete )( + IWMDMStorageControl3 * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Rename )( + IWMDMStorageControl3 * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in LPWSTR pwszNewName, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Read )( + IWMDMStorageControl3 * This, + /* [in] */ UINT fuMode, + /* [unique][in] */ __RPC__in_opt LPWSTR pwszFile, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IWMDMOperation *pOperation); + + HRESULT ( STDMETHODCALLTYPE *Move )( + IWMDMStorageControl3 * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMStorage *pTargetObject, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Insert2 )( + IWMDMStorageControl3 * This, + /* [in] */ UINT fuMode, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileSource, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileDest, + /* [unique][in] */ __RPC__in_opt IWMDMOperation *pOperation, + /* [unique][in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [unique][out][in] */ __RPC__deref_opt_inout_opt IWMDMStorage **ppNewObject); + + HRESULT ( STDMETHODCALLTYPE *Insert3 )( + IWMDMStorageControl3 * This, + /* [in] */ UINT fuMode, + /* [in] */ UINT fuType, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileSource, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszFileDest, + /* [unique][in] */ __RPC__in_opt IWMDMOperation *pOperation, + /* [unique][in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [unique][in] */ __RPC__in_opt IWMDMMetaData *pMetaData, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [unique][out][in] */ __RPC__deref_opt_inout_opt IWMDMStorage **ppNewObject); + + END_INTERFACE + } IWMDMStorageControl3Vtbl; + + interface IWMDMStorageControl3 + { + CONST_VTBL struct IWMDMStorageControl3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMStorageControl3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMStorageControl3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMStorageControl3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMStorageControl3_Insert(This,fuMode,pwszFile,pOperation,pProgress,ppNewObject) \ + ( (This)->lpVtbl -> Insert(This,fuMode,pwszFile,pOperation,pProgress,ppNewObject) ) + +#define IWMDMStorageControl3_Delete(This,fuMode,pProgress) \ + ( (This)->lpVtbl -> Delete(This,fuMode,pProgress) ) + +#define IWMDMStorageControl3_Rename(This,fuMode,pwszNewName,pProgress) \ + ( (This)->lpVtbl -> Rename(This,fuMode,pwszNewName,pProgress) ) + +#define IWMDMStorageControl3_Read(This,fuMode,pwszFile,pProgress,pOperation) \ + ( (This)->lpVtbl -> Read(This,fuMode,pwszFile,pProgress,pOperation) ) + +#define IWMDMStorageControl3_Move(This,fuMode,pTargetObject,pProgress) \ + ( (This)->lpVtbl -> Move(This,fuMode,pTargetObject,pProgress) ) + + +#define IWMDMStorageControl3_Insert2(This,fuMode,pwszFileSource,pwszFileDest,pOperation,pProgress,pUnknown,ppNewObject) \ + ( (This)->lpVtbl -> Insert2(This,fuMode,pwszFileSource,pwszFileDest,pOperation,pProgress,pUnknown,ppNewObject) ) + + +#define IWMDMStorageControl3_Insert3(This,fuMode,fuType,pwszFileSource,pwszFileDest,pOperation,pProgress,pMetaData,pUnknown,ppNewObject) \ + ( (This)->lpVtbl -> Insert3(This,fuMode,fuType,pwszFileSource,pwszFileDest,pOperation,pProgress,pMetaData,pUnknown,ppNewObject) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMStorageControl3_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMObjectInfo_INTERFACE_DEFINED__ +#define __IWMDMObjectInfo_INTERFACE_DEFINED__ + +/* interface IWMDMObjectInfo */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMObjectInfo; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A09-33ED-11d3-8470-00C04F79DBC0") + IWMDMObjectInfo : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPlayLength( + /* [out] */ __RPC__out DWORD *pdwLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPlayLength( + /* [in] */ DWORD dwLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPlayOffset( + /* [out] */ __RPC__out DWORD *pdwOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPlayOffset( + /* [in] */ DWORD dwOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalLength( + /* [out] */ __RPC__out DWORD *pdwLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetLastPlayPosition( + /* [out] */ __RPC__out DWORD *pdwLastPos) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetLongestPlayPosition( + /* [out] */ __RPC__out DWORD *pdwLongestPos) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMObjectInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMObjectInfo * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMObjectInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMObjectInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetPlayLength )( + IWMDMObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwLength); + + HRESULT ( STDMETHODCALLTYPE *SetPlayLength )( + IWMDMObjectInfo * This, + /* [in] */ DWORD dwLength); + + HRESULT ( STDMETHODCALLTYPE *GetPlayOffset )( + IWMDMObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwOffset); + + HRESULT ( STDMETHODCALLTYPE *SetPlayOffset )( + IWMDMObjectInfo * This, + /* [in] */ DWORD dwOffset); + + HRESULT ( STDMETHODCALLTYPE *GetTotalLength )( + IWMDMObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwLength); + + HRESULT ( STDMETHODCALLTYPE *GetLastPlayPosition )( + IWMDMObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwLastPos); + + HRESULT ( STDMETHODCALLTYPE *GetLongestPlayPosition )( + IWMDMObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwLongestPos); + + END_INTERFACE + } IWMDMObjectInfoVtbl; + + interface IWMDMObjectInfo + { + CONST_VTBL struct IWMDMObjectInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMObjectInfo_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMObjectInfo_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMObjectInfo_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMObjectInfo_GetPlayLength(This,pdwLength) \ + ( (This)->lpVtbl -> GetPlayLength(This,pdwLength) ) + +#define IWMDMObjectInfo_SetPlayLength(This,dwLength) \ + ( (This)->lpVtbl -> SetPlayLength(This,dwLength) ) + +#define IWMDMObjectInfo_GetPlayOffset(This,pdwOffset) \ + ( (This)->lpVtbl -> GetPlayOffset(This,pdwOffset) ) + +#define IWMDMObjectInfo_SetPlayOffset(This,dwOffset) \ + ( (This)->lpVtbl -> SetPlayOffset(This,dwOffset) ) + +#define IWMDMObjectInfo_GetTotalLength(This,pdwLength) \ + ( (This)->lpVtbl -> GetTotalLength(This,pdwLength) ) + +#define IWMDMObjectInfo_GetLastPlayPosition(This,pdwLastPos) \ + ( (This)->lpVtbl -> GetLastPlayPosition(This,pdwLastPos) ) + +#define IWMDMObjectInfo_GetLongestPlayPosition(This,pdwLongestPos) \ + ( (This)->lpVtbl -> GetLongestPlayPosition(This,pdwLongestPos) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMObjectInfo_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMRevoked_INTERFACE_DEFINED__ +#define __IWMDMRevoked_INTERFACE_DEFINED__ + +/* interface IWMDMRevoked */ +/* [ref][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMRevoked; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EBECCEDB-88EE-4e55-B6A4-8D9F07D696AA") + IWMDMRevoked : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetRevocationURL( + /* [size_is][size_is][string][out][in] */ __RPC__deref_inout_ecount_full_opt_string(*pdwBufferLen) LPWSTR *ppwszRevocationURL, + /* [out][in] */ __RPC__inout DWORD *pdwBufferLen, + /* [out] */ __RPC__out DWORD *pdwRevokedBitFlag) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMRevokedVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMRevoked * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMRevoked * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMRevoked * This); + + HRESULT ( STDMETHODCALLTYPE *GetRevocationURL )( + IWMDMRevoked * This, + /* [size_is][size_is][string][out][in] */ __RPC__deref_inout_ecount_full_opt_string(*pdwBufferLen) LPWSTR *ppwszRevocationURL, + /* [out][in] */ __RPC__inout DWORD *pdwBufferLen, + /* [out] */ __RPC__out DWORD *pdwRevokedBitFlag); + + END_INTERFACE + } IWMDMRevokedVtbl; + + interface IWMDMRevoked + { + CONST_VTBL struct IWMDMRevokedVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMRevoked_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMRevoked_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMRevoked_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMRevoked_GetRevocationURL(This,ppwszRevocationURL,pdwBufferLen,pdwRevokedBitFlag) \ + ( (This)->lpVtbl -> GetRevocationURL(This,ppwszRevocationURL,pdwBufferLen,pdwRevokedBitFlag) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMRevoked_INTERFACE_DEFINED__ */ + + +#ifndef __IWMDMNotification_INTERFACE_DEFINED__ +#define __IWMDMNotification_INTERFACE_DEFINED__ + +/* interface IWMDMNotification */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IWMDMNotification; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3F5E95C0-0F43-4ed4-93D2-C89A45D59B81") + IWMDMNotification : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE WMDMMessage( + /* [in] */ DWORD dwMessageType, + /* [string][in] */ __RPC__in LPCWSTR pwszCanonicalName) = 0; + + }; + +#else /* C style interface */ + + typedef struct IWMDMNotificationVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IWMDMNotification * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IWMDMNotification * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IWMDMNotification * This); + + HRESULT ( STDMETHODCALLTYPE *WMDMMessage )( + IWMDMNotification * This, + /* [in] */ DWORD dwMessageType, + /* [string][in] */ __RPC__in LPCWSTR pwszCanonicalName); + + END_INTERFACE + } IWMDMNotificationVtbl; + + interface IWMDMNotification + { + CONST_VTBL struct IWMDMNotificationVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IWMDMNotification_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IWMDMNotification_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IWMDMNotification_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IWMDMNotification_WMDMMessage(This,dwMessageType,pwszCanonicalName) \ + ( (This)->lpVtbl -> WMDMMessage(This,dwMessageType,pwszCanonicalName) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IWMDMNotification_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_mswmdm_0000_0028 */ +/* [local] */ + +// WMDM constants for wellknown meta-data tags +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMFileName = L"WMDM/FileName"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMFormatCode = L"WMDM/FormatCode"; +//Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME +static const WCHAR *g_wszWMDMLastModifiedDate = L"WMDM/LastModifiedDate"; +//Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME +static const WCHAR *g_wszWMDMFileCreationDate = L"WMDM/FileCreationDate"; +//Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD +static const WCHAR *g_wszWMDMFileSize = L"WMDM/FileSize"; +//Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD +static const WCHAR *g_wszWMDMFileAttributes = L"WMDM/FileAttributes"; +//Format code: WAVE Format +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszAudioWAVECodec = L"WMDM/AudioWAVECodec"; +//Format code: FOURCC code +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszVideoFourCCCodec = L"WMDM/VideoFourCCCodec"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMTitle = L"WMDM/Title"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMAuthor = L"WMDM/Author"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMDescription = L"WMDM/Description"; +//Type: BOOL, WMDM_TAG_DATATYPE: WMDM_TYPE_BOOL +static const WCHAR *g_wszWMDMIsProtected = L"WMDM/IsProtected"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMAlbumTitle = L"WMDM/AlbumTitle"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMAlbumArtist = L"WMDM/AlbumArtist"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMTrack = L"WMDM/Track"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMGenre = L"WMDM/Genre"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMTrackMood = L"WMDM/TrackMood"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMAlbumCoverFormat = L"WMDM/AlbumCoverFormat"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMAlbumCoverSize = L"WMDM/AlbumCoverSize"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMAlbumCoverHeight = L"WMDM/AlbumCoverHeight"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMAlbumCoverWidth = L"WMDM/AlbumCoverWidth"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMAlbumCoverDuration = L"WMDM/AlbumCoverDuration"; +//Type: BYTE*, WMDM_TAG_DATATYPE: WMDM_TYPE_BINARY +static const WCHAR *g_wszWMDMAlbumCoverData = L"WMDM/AlbumCoverData"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMYear = L"WMDM/Year"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMComposer = L"WMDM/Composer"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMCodec = L"WMDM/Codec"; +static const WCHAR *g_wszWMDMDRMId = L"WMDM/DRMId"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMBitrate = L"WMDM/Bitrate"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMBitRateType = L"WMDM/BitRateType"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMSampleRate = L"WMDM/SampleRate"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMNumChannels = L"WMDM/NumChannels"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMBlockAlignment = L"WMDM/BlockAlignment"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMAudioBitDepth = L"WMDM/AudioBitDepth"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMTotalBitrate = L"WMDM/TotalBitrate"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMVideoBitrate = L"WMDM/VideoBitrate"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMFrameRate = L"WMDM/FrameRate"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMScanType = L"WMDM/ScanType"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMKeyFrameDistance = L"WMDM/KeyFrameDistance"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMBufferSize = L"WMDM/BufferSize"; +//Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD +static const WCHAR *g_wszWMDMQualitySetting = L"WMDM/QualitySetting"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMEncodingProfile = L"WMDM/EncodingProfile"; +//Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD +static const WCHAR *g_wszWMDMDuration = L"WMDM/Duration"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMAlbumArt = L"WMDM/AlbumArt"; +//Type: BOOL, WMDM_TAG_DATATYPE: WMDM_TYPE_BOOL +static const WCHAR *g_wszWMDMBuyNow = L"WMDM/BuyNow"; +//Type: BOOL, WMDM_TAG_DATATYPE: WMDM_TYPE_BOOL +static const WCHAR *g_wszWMDMNonConsumable = L"WMDM/NonConsumable"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMediaClassPrimaryID = L"WMDM/MediaClassPrimaryID"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMMediaClassSecondaryID = L"WMDM/MediaClassSecondaryID"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMUserEffectiveRating = L"WMDM/UserEffectiveRating"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMUserRating = L"WMDM/UserRating"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMUserRatingOnDevice = L"WMDM/UserRatingOnDevice"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMPlayCount = L"WMDM/PlayCount"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMDevicePlayCount = L"WMDM/DevicePlayCount"; +//Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME +static const WCHAR *g_wszWMDMAuthorDate = L"WMDM/AuthorDate"; +//Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME +static const WCHAR *g_wszWMDMUserLastPlayTime = L"WMDM/UserLastPlayTime"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMSubTitle = L"WMDM/SubTitle"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMSubTitleDescription = L"WMDM/SubTitleDescription"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMMediaCredits = L"WMDM/MediaCredits"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMMediaStationName = L"WMDM/MediaStationName"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMMediaOriginalChannel = L"WMDM/MediaOriginalChannel"; +//Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME +static const WCHAR *g_wszWMDMMediaOriginalBroadcastDateTime = L"WMDM/MediaOriginalBroadcastDateTime"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMProviderCopyright = L"WMDM/ProviderCopyright"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMSyncID = L"WMDM/SyncID"; +//Type: GUID, WMDM_TAG_DATATYPE: WMDM_TYPE_GUID +static const WCHAR *g_wszWMDMPersistentUniqueID = L"WMDM/PersistentUniqueID"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMWidth = L"WMDM/Width"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMHeight = L"WMDM/Height"; +//Type: WMDMDATETIME, WMDM_TAG_DATATYPE: WMDM_TYPE_DATETIME +static const WCHAR *g_wszWMDMSyncTime = L"WMDM/SyncTime"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMParentalRating = L"WMDM/ParentalRating"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMMetaGenre = L"WMDM/MetaGenre"; +//Type: BOOL, WMDM_TAG_DATATYPE: WMDM_TYPE_BOOL +static const WCHAR *g_wszWMDMIsRepeat = L"WMDM/IsRepeat"; +// Device properties +//PROPVARIANT vt = VT_BSTR | VT_ARRAY +static const WCHAR *g_wszWMDMSupportedDeviceProperties = L"WMDM/SupportedDeviceProperties"; +//PROPVARIANT vt = VT_BSTR +static const WCHAR *g_wszWMDMDeviceFriendlyName = L"WMDM/DeviceFriendlyName"; +//PROPVARIANT vt = VT_UI4 | VT_ARRAY +static const WCHAR *g_wszWMDMFormatsSupported = L"WMDM/FormatsSupported"; +//PROPVARIANT vt = VT_BOOL +static const WCHAR *g_wszWMDMFormatsSupportedAreOrdered = L"WMDM/FormatsSupportedAreOrdered"; +//PROPVARIANT vt = VT_BSTR +static const WCHAR *g_wszWMDMSyncRelationshipID = L"WMDM/SyncRelationshipID"; +//PROPVARIANT vt = VT_BSTR +static const WCHAR *g_wszWMDMDeviceModelName = L"WMDM/DeviceModelName"; +//PROPVARIANT vt = VT_BSTR +static const WCHAR *g_wszWMDMDeviceFirmwareVersion = L"WMDM/DeviceFirmwareVersion"; +//PROPVARIANT vt = VT_BSTR +static const WCHAR *g_wszWMDMDeviceVendorExtension = L"WMDM/DeviceVendorExtension"; +//PROPVARIANT vt = VT_CLSID +static const WCHAR *g_wszWMDMDeviceProtocol = L"WMDM/DeviceProtocol"; +//PROPVARIANT vt = VT_CLSID +static const WCHAR *g_wszWMDMDeviceServiceProviderVendor = L"WMDM/DeviceServiceProviderVendor"; +//PROPVARIANT vt = VT_BSTR +static const WCHAR *g_wszWMDMDeviceRevocationInfo = L"WMDM/DeviceRevocationInfo"; +//PROPVARIANT vt = VT_BSTR +static const WCHAR *g_wszWMDMCollectionID = L"WMDM/CollectionID"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMOwner = L"WMDM/Owner"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMEditor = L"WMDM/Editor"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMWebmaster = L"WMDM/Webmaster"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMSourceURL = L"WMDM/SourceURL"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMDestinationURL = L"WMDM/DestinationURL"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMCategory = L"WMDM/Category"; +//Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD +static const WCHAR *g_wszWMDMTimeBookmark = L"WMDM/TimeBookmark"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMObjectBookmark = L"WMDM/ObjectBookmark"; +//Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD +static const WCHAR *g_wszWMDMByteBookmark = L"WMDM/ByteBookmark"; +//Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD +static const WCHAR *g_wszWMDMDataOffset = L"WMDM/DataOffset"; +//Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD +static const WCHAR *g_wszWMDMDataLength = L"WMDM/DataLength"; +//Type: DWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_DWORD +static const WCHAR *g_wszWMDMDataUnits = L"WMDM/DataUnits"; +//Type: QWORD, WMDM_TAG_DATATYPE: WMDM_TYPE_QWORD +static const WCHAR *g_wszWMDMTimeToLive = L"WMDM/TimeToLive"; +//Type: LPCWSTR, WMDM_TAG_DATATYPE: WMDM_TYPE_STRING +static const WCHAR *g_wszWMDMMediaGuid = L"WMDM/MediaGuid"; +//Type: BYTE*, WMDM_TAG_DATATYPE: WMDM_TYPE_BINARY +static const WCHAR *g_wszWPDPassthroughPropertyValues = L"WPD/PassthroughPropertyValues"; +#define CCH_WMDM_PROPNAME(sz) (sizeof(sz)/sizeof(sz[0])) +union WMDMDetermineMaxPropStringLen { +WCHAR sz001[CCH_WMDM_PROPNAME(L"WMDM/DeviceFirmwareVersion")]; +WCHAR sz002[CCH_WMDM_PROPNAME(L"WMDM/SupportedDeviceProperties")]; +WCHAR sz003[CCH_WMDM_PROPNAME(L"WMDM/FileName")]; +WCHAR sz004[CCH_WMDM_PROPNAME(L"WMDM/FormatCode")]; +WCHAR sz005[CCH_WMDM_PROPNAME(L"WMDM/LastModifiedDate")]; +WCHAR sz006[CCH_WMDM_PROPNAME(L"WMDM/FileSize")]; +WCHAR sz007[CCH_WMDM_PROPNAME(L"WMDM/FileAttributes")]; +WCHAR sz008[CCH_WMDM_PROPNAME(L"WMDM/AudioWAVECodec")]; +WCHAR sz009[CCH_WMDM_PROPNAME(L"WMDM/VideoFourCCCodec")]; +WCHAR sz010[CCH_WMDM_PROPNAME(L"WMDM/Title")]; +WCHAR sz011[CCH_WMDM_PROPNAME(L"WMDM/Author")]; +WCHAR sz012[CCH_WMDM_PROPNAME(L"WMDM/Description")]; +WCHAR sz013[CCH_WMDM_PROPNAME(L"WMDM/IsProtected")]; +WCHAR sz014[CCH_WMDM_PROPNAME(L"WMDM/AlbumTitle")]; +WCHAR sz015[CCH_WMDM_PROPNAME(L"WMDM/AlbumArtist")]; +WCHAR sz016[CCH_WMDM_PROPNAME(L"WMDM/Track")]; +WCHAR sz017[CCH_WMDM_PROPNAME(L"WMDM/Genre")]; +WCHAR sz018[CCH_WMDM_PROPNAME(L"WMDM/TrackMood")]; +WCHAR sz019[CCH_WMDM_PROPNAME(L"WMDM/AlbumCoverFormat")]; +WCHAR sz020[CCH_WMDM_PROPNAME(L"WMDM/AlbumCoverSize")]; +WCHAR sz021[CCH_WMDM_PROPNAME(L"WMDM/AlbumCoverHeight")]; +WCHAR sz022[CCH_WMDM_PROPNAME(L"WMDM/AlbumCoverWidth")]; +WCHAR sz023[CCH_WMDM_PROPNAME(L"WMDM/AlbumCoverDuration")]; +WCHAR sz024[CCH_WMDM_PROPNAME(L"WMDM/AlbumCoverData")]; +WCHAR sz025[CCH_WMDM_PROPNAME(L"WMDM/Year")]; +WCHAR sz026[CCH_WMDM_PROPNAME(L"WMDM/Composer")]; +WCHAR sz027[CCH_WMDM_PROPNAME(L"WMDM/Codec")]; +WCHAR sz028[CCH_WMDM_PROPNAME(L"WMDM/DRMId")]; +WCHAR sz029[CCH_WMDM_PROPNAME(L"WMDM/Bitrate")]; +WCHAR sz030[CCH_WMDM_PROPNAME(L"WMDM/BitRateType")]; +WCHAR sz031[CCH_WMDM_PROPNAME(L"WMDM/SampleRate")]; +WCHAR sz032[CCH_WMDM_PROPNAME(L"WMDM/NumChannels")]; +WCHAR sz033[CCH_WMDM_PROPNAME(L"WMDM/BlockAlignment")]; +WCHAR sz034[CCH_WMDM_PROPNAME(L"WMDM/AudioBitDepth")]; +WCHAR sz035[CCH_WMDM_PROPNAME(L"WMDM/TotalBitrate")]; +WCHAR sz036[CCH_WMDM_PROPNAME(L"WMDM/VideoBitrate")]; +WCHAR sz037[CCH_WMDM_PROPNAME(L"WMDM/FrameRate")]; +WCHAR sz041[CCH_WMDM_PROPNAME(L"WMDM/ScanType")]; +WCHAR sz043[CCH_WMDM_PROPNAME(L"WMDM/KeyFrameDistance")]; +WCHAR sz044[CCH_WMDM_PROPNAME(L"WMDM/BufferSize")]; +WCHAR sz045[CCH_WMDM_PROPNAME(L"WMDM/QualitySetting")]; +WCHAR sz046[CCH_WMDM_PROPNAME(L"WMDM/Duration")]; +WCHAR sz047[CCH_WMDM_PROPNAME(L"WMDM/AlbumArt")]; +WCHAR sz048[CCH_WMDM_PROPNAME(L"WMDM/BuyNow")]; +WCHAR sz049[CCH_WMDM_PROPNAME(L"WMDM/MediaClassPrimaryID")]; +WCHAR sz050[CCH_WMDM_PROPNAME(L"WMDM/MediaClassSecondayID")]; +WCHAR sz051[CCH_WMDM_PROPNAME(L"WMDM/UserEffectiveRating")]; +WCHAR sz052[CCH_WMDM_PROPNAME(L"WMDM/UserRating")]; +WCHAR sz053[CCH_WMDM_PROPNAME(L"WMDM/UserRatingOnDevice")]; +WCHAR sz054[CCH_WMDM_PROPNAME(L"WMDM/PlayCount")]; +WCHAR sz055[CCH_WMDM_PROPNAME(L"WMDM/DevicePlayCount")]; +WCHAR sz056[CCH_WMDM_PROPNAME(L"WMDM/AuthorDate")]; +WCHAR sz057[CCH_WMDM_PROPNAME(L"WMDM/UserLastPlayTime")]; +WCHAR sz058[CCH_WMDM_PROPNAME(L"WMDM/SubTitle")]; +WCHAR sz059[CCH_WMDM_PROPNAME(L"WMDM/SubTitleDescription")]; +WCHAR sz060[CCH_WMDM_PROPNAME(L"WMDM/MediaCredits")]; +WCHAR sz061[CCH_WMDM_PROPNAME(L"WMDM/MediaStationName")]; +WCHAR sz062[CCH_WMDM_PROPNAME(L"WMDM/MediaOriginalChannel")]; +WCHAR sz063[CCH_WMDM_PROPNAME(L"WMDM/MediaOriginalBroadcastDateTime")]; +WCHAR sz064[CCH_WMDM_PROPNAME(L"WMDM/ProviderCopyright")]; +WCHAR sz065[CCH_WMDM_PROPNAME(L"WMDM/SyncID")]; +WCHAR sz066[CCH_WMDM_PROPNAME(L"WMDM/PersistentUniqueID")]; +WCHAR sz067[CCH_WMDM_PROPNAME(L"WMDM/Width")]; +WCHAR sz068[CCH_WMDM_PROPNAME(L"WMDM/Height")]; +WCHAR sz069[CCH_WMDM_PROPNAME(L"WMDM/SyncTime")]; +WCHAR sz070[CCH_WMDM_PROPNAME(L"WMDM/ParentalRating")]; +WCHAR sz071[CCH_WMDM_PROPNAME(L"WMDM/MetaGenre")]; +WCHAR sz072[CCH_WMDM_PROPNAME(L"WMDM/IsRepeat")]; +WCHAR sz073[CCH_WMDM_PROPNAME(L"WMDM/SupportedDeviceProperties")]; +WCHAR sz074[CCH_WMDM_PROPNAME(L"WMDM/DeviceFriendlyName")]; +WCHAR sz075[CCH_WMDM_PROPNAME(L"WMDM/FormatsSupported")]; +WCHAR sz076[CCH_WMDM_PROPNAME(L"WMDM/SyncRelationshipID")]; +WCHAR sz077[CCH_WMDM_PROPNAME(L"WMDM/DeviceModelName")]; +WCHAR sz078[CCH_WMDM_PROPNAME(L"WMDM/DeviceFirmwareVersion")]; +WCHAR sz079[CCH_WMDM_PROPNAME(L"WMDM/DeviceVendorExtension")]; +WCHAR sz080[CCH_WMDM_PROPNAME(L"WMDM/DeviceProtocol")]; +WCHAR sz081[CCH_WMDM_PROPNAME(L"WMDM/DeviceServiceProviderVendor")]; +WCHAR sz082[CCH_WMDM_PROPNAME(L"WMDM/EncodingProfile")]; +WCHAR sz083[CCH_WMDM_PROPNAME(L"WMDM/FormatsSupportedAreOrdered")]; +WCHAR sz084[CCH_WMDM_PROPNAME(L"WMDM/DeviceRevocationInfo")]; +WCHAR sz085[CCH_WMDM_PROPNAME(L"WMDM/CollectionID")]; +WCHAR sz086[CCH_WMDM_PROPNAME(L"WPD/PassthroughPropertyValues")]; +}; +#define WMDM_MAXLEN_PROPERTYNAME (sizeof(WMDMDetermineMaxPropStringLen)/sizeof(WCHAR)) +// Open Mode Flags +#define MDSP_READ 0x00000001 +#define MDSP_WRITE 0x00000002 +// Seek Flags +#define MDSP_SEEK_BOF 0x00000001 +#define MDSP_SEEK_CUR 0x00000002 +#define MDSP_SEEK_EOF 0x00000004 + + + + + + + + + + + +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0028_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0028_v0_0_s_ifspec; + +#ifndef __IMDServiceProvider_INTERFACE_DEFINED__ +#define __IMDServiceProvider_INTERFACE_DEFINED__ + +/* interface IMDServiceProvider */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDServiceProvider; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A10-33ED-11d3-8470-00C04F79DBC0") + IMDServiceProvider : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDeviceCount( + /* [out] */ __RPC__out DWORD *pdwCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumDevices( + /* [out] */ __RPC__deref_out_opt IMDSPEnumDevice **ppEnumDevice) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDServiceProviderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDServiceProvider * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDServiceProvider * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDServiceProvider * This); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceCount )( + IMDServiceProvider * This, + /* [out] */ __RPC__out DWORD *pdwCount); + + HRESULT ( STDMETHODCALLTYPE *EnumDevices )( + IMDServiceProvider * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumDevice **ppEnumDevice); + + END_INTERFACE + } IMDServiceProviderVtbl; + + interface IMDServiceProvider + { + CONST_VTBL struct IMDServiceProviderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDServiceProvider_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDServiceProvider_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDServiceProvider_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDServiceProvider_GetDeviceCount(This,pdwCount) \ + ( (This)->lpVtbl -> GetDeviceCount(This,pdwCount) ) + +#define IMDServiceProvider_EnumDevices(This,ppEnumDevice) \ + ( (This)->lpVtbl -> EnumDevices(This,ppEnumDevice) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDServiceProvider_INTERFACE_DEFINED__ */ + + +#ifndef __IMDServiceProvider2_INTERFACE_DEFINED__ +#define __IMDServiceProvider2_INTERFACE_DEFINED__ + +/* interface IMDServiceProvider2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDServiceProvider2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B2FA24B7-CDA3-4694-9862-413AE1A34819") + IMDServiceProvider2 : public IMDServiceProvider + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateDevice( + /* [string][in] */ __RPC__in LPCWSTR pwszDevicePath, + /* [out] */ __RPC__out DWORD *pdwCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwCount) IMDSPDevice ***pppDeviceArray) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDServiceProvider2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDServiceProvider2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDServiceProvider2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDServiceProvider2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceCount )( + IMDServiceProvider2 * This, + /* [out] */ __RPC__out DWORD *pdwCount); + + HRESULT ( STDMETHODCALLTYPE *EnumDevices )( + IMDServiceProvider2 * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumDevice **ppEnumDevice); + + HRESULT ( STDMETHODCALLTYPE *CreateDevice )( + IMDServiceProvider2 * This, + /* [string][in] */ __RPC__in LPCWSTR pwszDevicePath, + /* [out] */ __RPC__out DWORD *pdwCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwCount) IMDSPDevice ***pppDeviceArray); + + END_INTERFACE + } IMDServiceProvider2Vtbl; + + interface IMDServiceProvider2 + { + CONST_VTBL struct IMDServiceProvider2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDServiceProvider2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDServiceProvider2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDServiceProvider2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDServiceProvider2_GetDeviceCount(This,pdwCount) \ + ( (This)->lpVtbl -> GetDeviceCount(This,pdwCount) ) + +#define IMDServiceProvider2_EnumDevices(This,ppEnumDevice) \ + ( (This)->lpVtbl -> EnumDevices(This,ppEnumDevice) ) + + +#define IMDServiceProvider2_CreateDevice(This,pwszDevicePath,pdwCount,pppDeviceArray) \ + ( (This)->lpVtbl -> CreateDevice(This,pwszDevicePath,pdwCount,pppDeviceArray) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDServiceProvider2_INTERFACE_DEFINED__ */ + + +#ifndef __IMDServiceProvider3_INTERFACE_DEFINED__ +#define __IMDServiceProvider3_INTERFACE_DEFINED__ + +/* interface IMDServiceProvider3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDServiceProvider3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4ed13ef3-a971-4d19-9f51-0e1826b2da57") + IMDServiceProvider3 : public IMDServiceProvider2 + { + public: + virtual HRESULT STDMETHODCALLTYPE SetDeviceEnumPreference( + /* [in] */ DWORD dwEnumPref) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDServiceProvider3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDServiceProvider3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDServiceProvider3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDServiceProvider3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceCount )( + IMDServiceProvider3 * This, + /* [out] */ __RPC__out DWORD *pdwCount); + + HRESULT ( STDMETHODCALLTYPE *EnumDevices )( + IMDServiceProvider3 * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumDevice **ppEnumDevice); + + HRESULT ( STDMETHODCALLTYPE *CreateDevice )( + IMDServiceProvider3 * This, + /* [string][in] */ __RPC__in LPCWSTR pwszDevicePath, + /* [out] */ __RPC__out DWORD *pdwCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwCount) IMDSPDevice ***pppDeviceArray); + + HRESULT ( STDMETHODCALLTYPE *SetDeviceEnumPreference )( + IMDServiceProvider3 * This, + /* [in] */ DWORD dwEnumPref); + + END_INTERFACE + } IMDServiceProvider3Vtbl; + + interface IMDServiceProvider3 + { + CONST_VTBL struct IMDServiceProvider3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDServiceProvider3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDServiceProvider3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDServiceProvider3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDServiceProvider3_GetDeviceCount(This,pdwCount) \ + ( (This)->lpVtbl -> GetDeviceCount(This,pdwCount) ) + +#define IMDServiceProvider3_EnumDevices(This,ppEnumDevice) \ + ( (This)->lpVtbl -> EnumDevices(This,ppEnumDevice) ) + + +#define IMDServiceProvider3_CreateDevice(This,pwszDevicePath,pdwCount,pppDeviceArray) \ + ( (This)->lpVtbl -> CreateDevice(This,pwszDevicePath,pdwCount,pppDeviceArray) ) + + +#define IMDServiceProvider3_SetDeviceEnumPreference(This,dwEnumPref) \ + ( (This)->lpVtbl -> SetDeviceEnumPreference(This,dwEnumPref) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDServiceProvider3_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPEnumDevice_INTERFACE_DEFINED__ +#define __IMDSPEnumDevice_INTERFACE_DEFINED__ + +/* interface IMDSPEnumDevice */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPEnumDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A11-33ED-11d3-8470-00C04F79DBC0") + IMDSPEnumDevice : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IMDSPDevice **ppDevice, + /* [out] */ __RPC__out ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG celt, + /* [out] */ __RPC__out ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ __RPC__deref_out_opt IMDSPEnumDevice **ppEnumDevice) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPEnumDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPEnumDevice * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPEnumDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPEnumDevice * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IMDSPEnumDevice * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IMDSPDevice **ppDevice, + /* [out] */ __RPC__out ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IMDSPEnumDevice * This, + /* [in] */ ULONG celt, + /* [out] */ __RPC__out ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IMDSPEnumDevice * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMDSPEnumDevice * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumDevice **ppEnumDevice); + + END_INTERFACE + } IMDSPEnumDeviceVtbl; + + interface IMDSPEnumDevice + { + CONST_VTBL struct IMDSPEnumDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPEnumDevice_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPEnumDevice_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPEnumDevice_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPEnumDevice_Next(This,celt,ppDevice,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,ppDevice,pceltFetched) ) + +#define IMDSPEnumDevice_Skip(This,celt,pceltFetched) \ + ( (This)->lpVtbl -> Skip(This,celt,pceltFetched) ) + +#define IMDSPEnumDevice_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) + +#define IMDSPEnumDevice_Clone(This,ppEnumDevice) \ + ( (This)->lpVtbl -> Clone(This,ppEnumDevice) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPEnumDevice_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPDevice_INTERFACE_DEFINED__ +#define __IMDSPDevice_INTERFACE_DEFINED__ + +/* interface IMDSPDevice */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A12-33ED-11d3-8470-00C04F79DBC0") + IMDSPDevice : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetName( + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetManufacturer( + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVersion( + /* [out] */ __RPC__out DWORD *pdwVersion) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetType( + /* [out] */ __RPC__out DWORD *pdwType) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSerialNumber( + /* [out] */ __RPC__out PWMDMID pSerialNumber, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPowerSource( + /* [out] */ __RPC__out DWORD *pdwPowerSource, + /* [out] */ __RPC__out DWORD *pdwPercentRemaining) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ __RPC__out DWORD *pdwStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceIcon( + /* [out] */ __RPC__out ULONG *hIcon) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumStorage( + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFormatSupport( + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFormatCount) _WAVEFORMATEX **pFormatEx, + /* [out] */ __RPC__out UINT *pnFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnMimeTypeCount) LPWSTR **pppwszMimeType, + /* [out] */ __RPC__out UINT *pnMimeTypeCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE SendOpaqueCommand( + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPDevice * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPDevice * This); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IMDSPDevice * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetManufacturer )( + IMDSPDevice * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetVersion )( + IMDSPDevice * This, + /* [out] */ __RPC__out DWORD *pdwVersion); + + HRESULT ( STDMETHODCALLTYPE *GetType )( + IMDSPDevice * This, + /* [out] */ __RPC__out DWORD *pdwType); + + HRESULT ( STDMETHODCALLTYPE *GetSerialNumber )( + IMDSPDevice * This, + /* [out] */ __RPC__out PWMDMID pSerialNumber, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetPowerSource )( + IMDSPDevice * This, + /* [out] */ __RPC__out DWORD *pdwPowerSource, + /* [out] */ __RPC__out DWORD *pdwPercentRemaining); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IMDSPDevice * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceIcon )( + IMDSPDevice * This, + /* [out] */ __RPC__out ULONG *hIcon); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IMDSPDevice * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport )( + IMDSPDevice * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFormatCount) _WAVEFORMATEX **pFormatEx, + /* [out] */ __RPC__out UINT *pnFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnMimeTypeCount) LPWSTR **pppwszMimeType, + /* [out] */ __RPC__out UINT *pnMimeTypeCount); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IMDSPDevice * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + END_INTERFACE + } IMDSPDeviceVtbl; + + interface IMDSPDevice + { + CONST_VTBL struct IMDSPDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPDevice_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPDevice_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPDevice_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPDevice_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IMDSPDevice_GetManufacturer(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetManufacturer(This,pwszName,nMaxChars) ) + +#define IMDSPDevice_GetVersion(This,pdwVersion) \ + ( (This)->lpVtbl -> GetVersion(This,pdwVersion) ) + +#define IMDSPDevice_GetType(This,pdwType) \ + ( (This)->lpVtbl -> GetType(This,pdwType) ) + +#define IMDSPDevice_GetSerialNumber(This,pSerialNumber,abMac) \ + ( (This)->lpVtbl -> GetSerialNumber(This,pSerialNumber,abMac) ) + +#define IMDSPDevice_GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) \ + ( (This)->lpVtbl -> GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) ) + +#define IMDSPDevice_GetStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetStatus(This,pdwStatus) ) + +#define IMDSPDevice_GetDeviceIcon(This,hIcon) \ + ( (This)->lpVtbl -> GetDeviceIcon(This,hIcon) ) + +#define IMDSPDevice_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IMDSPDevice_GetFormatSupport(This,pFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport(This,pFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) ) + +#define IMDSPDevice_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPDevice_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPDevice2_INTERFACE_DEFINED__ +#define __IMDSPDevice2_INTERFACE_DEFINED__ + +/* interface IMDSPDevice2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPDevice2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("420D16AD-C97D-4e00-82AA-00E9F4335DDD") + IMDSPDevice2 : public IMDSPDevice + { + public: + virtual HRESULT STDMETHODCALLTYPE GetStorage( + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFormatSupport2( + /* [in] */ DWORD dwFlags, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnAudioFormatCount) _WAVEFORMATEX **ppAudioFormatEx, + /* [ref][out] */ __RPC__out UINT *pnAudioFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnVideoFormatCount) _VIDEOINFOHEADER **ppVideoFormatEx, + /* [ref][out] */ __RPC__out UINT *pnVideoFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFileTypeCount) WMFILECAPABILITIES **ppFileType, + /* [ref][out] */ __RPC__out UINT *pnFileTypeCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSpecifyPropertyPages( + /* [ref][out] */ __RPC__deref_out_opt ISpecifyPropertyPages **ppSpecifyPropPages, + /* [size_is][size_is][ref][out] */ __RPC__deref_out_ecount_full_opt(*pcUnks) IUnknown ***pppUnknowns, + /* [ref][out] */ __RPC__out ULONG *pcUnks) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCanonicalName( + /* [size_is][out] */ __RPC__out_ecount_full(nMaxChars) LPWSTR pwszPnPName, + /* [in] */ UINT nMaxChars) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPDevice2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPDevice2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPDevice2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPDevice2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IMDSPDevice2 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetManufacturer )( + IMDSPDevice2 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetVersion )( + IMDSPDevice2 * This, + /* [out] */ __RPC__out DWORD *pdwVersion); + + HRESULT ( STDMETHODCALLTYPE *GetType )( + IMDSPDevice2 * This, + /* [out] */ __RPC__out DWORD *pdwType); + + HRESULT ( STDMETHODCALLTYPE *GetSerialNumber )( + IMDSPDevice2 * This, + /* [out] */ __RPC__out PWMDMID pSerialNumber, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetPowerSource )( + IMDSPDevice2 * This, + /* [out] */ __RPC__out DWORD *pdwPowerSource, + /* [out] */ __RPC__out DWORD *pdwPercentRemaining); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IMDSPDevice2 * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceIcon )( + IMDSPDevice2 * This, + /* [out] */ __RPC__out ULONG *hIcon); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IMDSPDevice2 * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport )( + IMDSPDevice2 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFormatCount) _WAVEFORMATEX **pFormatEx, + /* [out] */ __RPC__out UINT *pnFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnMimeTypeCount) LPWSTR **pppwszMimeType, + /* [out] */ __RPC__out UINT *pnMimeTypeCount); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IMDSPDevice2 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IMDSPDevice2 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport2 )( + IMDSPDevice2 * This, + /* [in] */ DWORD dwFlags, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnAudioFormatCount) _WAVEFORMATEX **ppAudioFormatEx, + /* [ref][out] */ __RPC__out UINT *pnAudioFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnVideoFormatCount) _VIDEOINFOHEADER **ppVideoFormatEx, + /* [ref][out] */ __RPC__out UINT *pnVideoFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFileTypeCount) WMFILECAPABILITIES **ppFileType, + /* [ref][out] */ __RPC__out UINT *pnFileTypeCount); + + HRESULT ( STDMETHODCALLTYPE *GetSpecifyPropertyPages )( + IMDSPDevice2 * This, + /* [ref][out] */ __RPC__deref_out_opt ISpecifyPropertyPages **ppSpecifyPropPages, + /* [size_is][size_is][ref][out] */ __RPC__deref_out_ecount_full_opt(*pcUnks) IUnknown ***pppUnknowns, + /* [ref][out] */ __RPC__out ULONG *pcUnks); + + HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( + IMDSPDevice2 * This, + /* [size_is][out] */ __RPC__out_ecount_full(nMaxChars) LPWSTR pwszPnPName, + /* [in] */ UINT nMaxChars); + + END_INTERFACE + } IMDSPDevice2Vtbl; + + interface IMDSPDevice2 + { + CONST_VTBL struct IMDSPDevice2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPDevice2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPDevice2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPDevice2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPDevice2_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IMDSPDevice2_GetManufacturer(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetManufacturer(This,pwszName,nMaxChars) ) + +#define IMDSPDevice2_GetVersion(This,pdwVersion) \ + ( (This)->lpVtbl -> GetVersion(This,pdwVersion) ) + +#define IMDSPDevice2_GetType(This,pdwType) \ + ( (This)->lpVtbl -> GetType(This,pdwType) ) + +#define IMDSPDevice2_GetSerialNumber(This,pSerialNumber,abMac) \ + ( (This)->lpVtbl -> GetSerialNumber(This,pSerialNumber,abMac) ) + +#define IMDSPDevice2_GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) \ + ( (This)->lpVtbl -> GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) ) + +#define IMDSPDevice2_GetStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetStatus(This,pdwStatus) ) + +#define IMDSPDevice2_GetDeviceIcon(This,hIcon) \ + ( (This)->lpVtbl -> GetDeviceIcon(This,hIcon) ) + +#define IMDSPDevice2_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IMDSPDevice2_GetFormatSupport(This,pFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport(This,pFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) ) + +#define IMDSPDevice2_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IMDSPDevice2_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IMDSPDevice2_GetFormatSupport2(This,dwFlags,ppAudioFormatEx,pnAudioFormatCount,ppVideoFormatEx,pnVideoFormatCount,ppFileType,pnFileTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport2(This,dwFlags,ppAudioFormatEx,pnAudioFormatCount,ppVideoFormatEx,pnVideoFormatCount,ppFileType,pnFileTypeCount) ) + +#define IMDSPDevice2_GetSpecifyPropertyPages(This,ppSpecifyPropPages,pppUnknowns,pcUnks) \ + ( (This)->lpVtbl -> GetSpecifyPropertyPages(This,ppSpecifyPropPages,pppUnknowns,pcUnks) ) + +#define IMDSPDevice2_GetCanonicalName(This,pwszPnPName,nMaxChars) \ + ( (This)->lpVtbl -> GetCanonicalName(This,pwszPnPName,nMaxChars) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPDevice2_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPDevice3_INTERFACE_DEFINED__ +#define __IMDSPDevice3_INTERFACE_DEFINED__ + +/* interface IMDSPDevice3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPDevice3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1a839845-fc55-487c-976f-ee38ac0e8c4e") + IMDSPDevice3 : public IMDSPDevice2 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetProperty( + /* [in] */ __RPC__in LPCWSTR pwszPropName, + /* [out] */ __RPC__out PROPVARIANT *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProperty( + /* [in] */ __RPC__in LPCWSTR pwszPropName, + /* [in] */ __RPC__in const PROPVARIANT *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFormatCapability( + /* [in] */ WMDM_FORMATCODE format, + /* [out] */ __RPC__out WMDM_FORMAT_CAPABILITY *pFormatSupport) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeviceIoControl( + /* [in] */ DWORD dwIoControlCode, + /* [size_is][in] */ __RPC__in_ecount_full(nInBufferSize) BYTE *lpInBuffer, + /* [in] */ DWORD nInBufferSize, + /* [size_is][out] */ __RPC__out_ecount_full(*pnOutBufferSize) BYTE *lpOutBuffer, + /* [out][in] */ __RPC__inout LPDWORD pnOutBufferSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindStorage( + /* [in] */ WMDM_FIND_SCOPE findScope, + /* [in] */ __RPC__in LPCWSTR pwszUniqueID, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPDevice3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPDevice3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPDevice3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPDevice3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IMDSPDevice3 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetManufacturer )( + IMDSPDevice3 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetVersion )( + IMDSPDevice3 * This, + /* [out] */ __RPC__out DWORD *pdwVersion); + + HRESULT ( STDMETHODCALLTYPE *GetType )( + IMDSPDevice3 * This, + /* [out] */ __RPC__out DWORD *pdwType); + + HRESULT ( STDMETHODCALLTYPE *GetSerialNumber )( + IMDSPDevice3 * This, + /* [out] */ __RPC__out PWMDMID pSerialNumber, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetPowerSource )( + IMDSPDevice3 * This, + /* [out] */ __RPC__out DWORD *pdwPowerSource, + /* [out] */ __RPC__out DWORD *pdwPercentRemaining); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IMDSPDevice3 * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceIcon )( + IMDSPDevice3 * This, + /* [out] */ __RPC__out ULONG *hIcon); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IMDSPDevice3 * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport )( + IMDSPDevice3 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFormatCount) _WAVEFORMATEX **pFormatEx, + /* [out] */ __RPC__out UINT *pnFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnMimeTypeCount) LPWSTR **pppwszMimeType, + /* [out] */ __RPC__out UINT *pnMimeTypeCount); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IMDSPDevice3 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IMDSPDevice3 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *GetFormatSupport2 )( + IMDSPDevice3 * This, + /* [in] */ DWORD dwFlags, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnAudioFormatCount) _WAVEFORMATEX **ppAudioFormatEx, + /* [ref][out] */ __RPC__out UINT *pnAudioFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnVideoFormatCount) _VIDEOINFOHEADER **ppVideoFormatEx, + /* [ref][out] */ __RPC__out UINT *pnVideoFormatCount, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnFileTypeCount) WMFILECAPABILITIES **ppFileType, + /* [ref][out] */ __RPC__out UINT *pnFileTypeCount); + + HRESULT ( STDMETHODCALLTYPE *GetSpecifyPropertyPages )( + IMDSPDevice3 * This, + /* [ref][out] */ __RPC__deref_out_opt ISpecifyPropertyPages **ppSpecifyPropPages, + /* [size_is][size_is][ref][out] */ __RPC__deref_out_ecount_full_opt(*pcUnks) IUnknown ***pppUnknowns, + /* [ref][out] */ __RPC__out ULONG *pcUnks); + + HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( + IMDSPDevice3 * This, + /* [size_is][out] */ __RPC__out_ecount_full(nMaxChars) LPWSTR pwszPnPName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetProperty )( + IMDSPDevice3 * This, + /* [in] */ __RPC__in LPCWSTR pwszPropName, + /* [out] */ __RPC__out PROPVARIANT *pValue); + + HRESULT ( STDMETHODCALLTYPE *SetProperty )( + IMDSPDevice3 * This, + /* [in] */ __RPC__in LPCWSTR pwszPropName, + /* [in] */ __RPC__in const PROPVARIANT *pValue); + + HRESULT ( STDMETHODCALLTYPE *GetFormatCapability )( + IMDSPDevice3 * This, + /* [in] */ WMDM_FORMATCODE format, + /* [out] */ __RPC__out WMDM_FORMAT_CAPABILITY *pFormatSupport); + + HRESULT ( STDMETHODCALLTYPE *DeviceIoControl )( + IMDSPDevice3 * This, + /* [in] */ DWORD dwIoControlCode, + /* [size_is][in] */ __RPC__in_ecount_full(nInBufferSize) BYTE *lpInBuffer, + /* [in] */ DWORD nInBufferSize, + /* [size_is][out] */ __RPC__out_ecount_full(*pnOutBufferSize) BYTE *lpOutBuffer, + /* [out][in] */ __RPC__inout LPDWORD pnOutBufferSize); + + HRESULT ( STDMETHODCALLTYPE *FindStorage )( + IMDSPDevice3 * This, + /* [in] */ WMDM_FIND_SCOPE findScope, + /* [in] */ __RPC__in LPCWSTR pwszUniqueID, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage); + + END_INTERFACE + } IMDSPDevice3Vtbl; + + interface IMDSPDevice3 + { + CONST_VTBL struct IMDSPDevice3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPDevice3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPDevice3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPDevice3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPDevice3_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IMDSPDevice3_GetManufacturer(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetManufacturer(This,pwszName,nMaxChars) ) + +#define IMDSPDevice3_GetVersion(This,pdwVersion) \ + ( (This)->lpVtbl -> GetVersion(This,pdwVersion) ) + +#define IMDSPDevice3_GetType(This,pdwType) \ + ( (This)->lpVtbl -> GetType(This,pdwType) ) + +#define IMDSPDevice3_GetSerialNumber(This,pSerialNumber,abMac) \ + ( (This)->lpVtbl -> GetSerialNumber(This,pSerialNumber,abMac) ) + +#define IMDSPDevice3_GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) \ + ( (This)->lpVtbl -> GetPowerSource(This,pdwPowerSource,pdwPercentRemaining) ) + +#define IMDSPDevice3_GetStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetStatus(This,pdwStatus) ) + +#define IMDSPDevice3_GetDeviceIcon(This,hIcon) \ + ( (This)->lpVtbl -> GetDeviceIcon(This,hIcon) ) + +#define IMDSPDevice3_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IMDSPDevice3_GetFormatSupport(This,pFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport(This,pFormatEx,pnFormatCount,pppwszMimeType,pnMimeTypeCount) ) + +#define IMDSPDevice3_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IMDSPDevice3_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IMDSPDevice3_GetFormatSupport2(This,dwFlags,ppAudioFormatEx,pnAudioFormatCount,ppVideoFormatEx,pnVideoFormatCount,ppFileType,pnFileTypeCount) \ + ( (This)->lpVtbl -> GetFormatSupport2(This,dwFlags,ppAudioFormatEx,pnAudioFormatCount,ppVideoFormatEx,pnVideoFormatCount,ppFileType,pnFileTypeCount) ) + +#define IMDSPDevice3_GetSpecifyPropertyPages(This,ppSpecifyPropPages,pppUnknowns,pcUnks) \ + ( (This)->lpVtbl -> GetSpecifyPropertyPages(This,ppSpecifyPropPages,pppUnknowns,pcUnks) ) + +#define IMDSPDevice3_GetCanonicalName(This,pwszPnPName,nMaxChars) \ + ( (This)->lpVtbl -> GetCanonicalName(This,pwszPnPName,nMaxChars) ) + + +#define IMDSPDevice3_GetProperty(This,pwszPropName,pValue) \ + ( (This)->lpVtbl -> GetProperty(This,pwszPropName,pValue) ) + +#define IMDSPDevice3_SetProperty(This,pwszPropName,pValue) \ + ( (This)->lpVtbl -> SetProperty(This,pwszPropName,pValue) ) + +#define IMDSPDevice3_GetFormatCapability(This,format,pFormatSupport) \ + ( (This)->lpVtbl -> GetFormatCapability(This,format,pFormatSupport) ) + +#define IMDSPDevice3_DeviceIoControl(This,dwIoControlCode,lpInBuffer,nInBufferSize,lpOutBuffer,pnOutBufferSize) \ + ( (This)->lpVtbl -> DeviceIoControl(This,dwIoControlCode,lpInBuffer,nInBufferSize,lpOutBuffer,pnOutBufferSize) ) + +#define IMDSPDevice3_FindStorage(This,findScope,pwszUniqueID,ppStorage) \ + ( (This)->lpVtbl -> FindStorage(This,findScope,pwszUniqueID,ppStorage) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPDevice3_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPDeviceControl_INTERFACE_DEFINED__ +#define __IMDSPDeviceControl_INTERFACE_DEFINED__ + +/* interface IMDSPDeviceControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPDeviceControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A14-33ED-11d3-8470-00C04F79DBC0") + IMDSPDeviceControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDCStatus( + /* [out] */ __RPC__out DWORD *pdwStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCapabilities( + /* [out] */ __RPC__out DWORD *pdwCapabilitiesMask) = 0; + + virtual HRESULT STDMETHODCALLTYPE Play( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Record( + /* [in] */ __RPC__in _WAVEFORMATEX *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE Pause( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Resume( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Seek( + /* [in] */ UINT fuMode, + /* [in] */ int nOffset) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPDeviceControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPDeviceControl * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPDeviceControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetDCStatus )( + IMDSPDeviceControl * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *GetCapabilities )( + IMDSPDeviceControl * This, + /* [out] */ __RPC__out DWORD *pdwCapabilitiesMask); + + HRESULT ( STDMETHODCALLTYPE *Play )( + IMDSPDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *Record )( + IMDSPDeviceControl * This, + /* [in] */ __RPC__in _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IMDSPDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *Resume )( + IMDSPDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IMDSPDeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *Seek )( + IMDSPDeviceControl * This, + /* [in] */ UINT fuMode, + /* [in] */ int nOffset); + + END_INTERFACE + } IMDSPDeviceControlVtbl; + + interface IMDSPDeviceControl + { + CONST_VTBL struct IMDSPDeviceControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPDeviceControl_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPDeviceControl_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPDeviceControl_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPDeviceControl_GetDCStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetDCStatus(This,pdwStatus) ) + +#define IMDSPDeviceControl_GetCapabilities(This,pdwCapabilitiesMask) \ + ( (This)->lpVtbl -> GetCapabilities(This,pdwCapabilitiesMask) ) + +#define IMDSPDeviceControl_Play(This) \ + ( (This)->lpVtbl -> Play(This) ) + +#define IMDSPDeviceControl_Record(This,pFormat) \ + ( (This)->lpVtbl -> Record(This,pFormat) ) + +#define IMDSPDeviceControl_Pause(This) \ + ( (This)->lpVtbl -> Pause(This) ) + +#define IMDSPDeviceControl_Resume(This) \ + ( (This)->lpVtbl -> Resume(This) ) + +#define IMDSPDeviceControl_Stop(This) \ + ( (This)->lpVtbl -> Stop(This) ) + +#define IMDSPDeviceControl_Seek(This,fuMode,nOffset) \ + ( (This)->lpVtbl -> Seek(This,fuMode,nOffset) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPDeviceControl_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPEnumStorage_INTERFACE_DEFINED__ +#define __IMDSPEnumStorage_INTERFACE_DEFINED__ + +/* interface IMDSPEnumStorage */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPEnumStorage; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A15-33ED-11d3-8470-00C04F79DBC0") + IMDSPEnumStorage : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IMDSPStorage **ppStorage, + /* [out] */ __RPC__out ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG celt, + /* [out] */ __RPC__out ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPEnumStorageVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPEnumStorage * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPEnumStorage * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPEnumStorage * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IMDSPEnumStorage * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IMDSPStorage **ppStorage, + /* [out] */ __RPC__out ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IMDSPEnumStorage * This, + /* [in] */ ULONG celt, + /* [out] */ __RPC__out ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IMDSPEnumStorage * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMDSPEnumStorage * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage); + + END_INTERFACE + } IMDSPEnumStorageVtbl; + + interface IMDSPEnumStorage + { + CONST_VTBL struct IMDSPEnumStorageVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPEnumStorage_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPEnumStorage_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPEnumStorage_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPEnumStorage_Next(This,celt,ppStorage,pceltFetched) \ + ( (This)->lpVtbl -> Next(This,celt,ppStorage,pceltFetched) ) + +#define IMDSPEnumStorage_Skip(This,celt,pceltFetched) \ + ( (This)->lpVtbl -> Skip(This,celt,pceltFetched) ) + +#define IMDSPEnumStorage_Reset(This) \ + ( (This)->lpVtbl -> Reset(This) ) + +#define IMDSPEnumStorage_Clone(This,ppEnumStorage) \ + ( (This)->lpVtbl -> Clone(This,ppEnumStorage) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPEnumStorage_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPStorage_INTERFACE_DEFINED__ +#define __IMDSPStorage_INTERFACE_DEFINED__ + +/* interface IMDSPStorage */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPStorage; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A16-33ED-11d3-8470-00C04F79DBC0") + IMDSPStorage : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetAttributes( + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStorageGlobals( + /* [out] */ __RPC__deref_out_opt IMDSPStorageGlobals **ppStorageGlobals) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAttributes( + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetName( + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDate( + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSize( + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRights( + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateStorage( + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [in] */ __RPC__in LPWSTR pwszName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumStorage( + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE SendOpaqueCommand( + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPStorageVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPStorage * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPStorage * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPStorage * This); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes )( + IMDSPStorage * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetStorageGlobals )( + IMDSPStorage * This, + /* [out] */ __RPC__deref_out_opt IMDSPStorageGlobals **ppStorageGlobals); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes )( + IMDSPStorage * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IMDSPStorage * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetDate )( + IMDSPStorage * This, + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC); + + HRESULT ( STDMETHODCALLTYPE *GetSize )( + IMDSPStorage * This, + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + IMDSPStorage * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *CreateStorage )( + IMDSPStorage * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [in] */ __RPC__in LPWSTR pwszName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IMDSPStorage * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IMDSPStorage * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + END_INTERFACE + } IMDSPStorageVtbl; + + interface IMDSPStorage + { + CONST_VTBL struct IMDSPStorageVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPStorage_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPStorage_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPStorage_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPStorage_SetAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetAttributes(This,dwAttributes,pFormat) ) + +#define IMDSPStorage_GetStorageGlobals(This,ppStorageGlobals) \ + ( (This)->lpVtbl -> GetStorageGlobals(This,ppStorageGlobals) ) + +#define IMDSPStorage_GetAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetAttributes(This,pdwAttributes,pFormat) ) + +#define IMDSPStorage_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IMDSPStorage_GetDate(This,pDateTimeUTC) \ + ( (This)->lpVtbl -> GetDate(This,pDateTimeUTC) ) + +#define IMDSPStorage_GetSize(This,pdwSizeLow,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetSize(This,pdwSizeLow,pdwSizeHigh) ) + +#define IMDSPStorage_GetRights(This,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,ppRights,pnRightsCount,abMac) ) + +#define IMDSPStorage_CreateStorage(This,dwAttributes,pFormat,pwszName,ppNewStorage) \ + ( (This)->lpVtbl -> CreateStorage(This,dwAttributes,pFormat,pwszName,ppNewStorage) ) + +#define IMDSPStorage_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IMDSPStorage_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPStorage_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPStorage2_INTERFACE_DEFINED__ +#define __IMDSPStorage2_INTERFACE_DEFINED__ + +/* interface IMDSPStorage2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPStorage2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0A5E07A5-6454-4451-9C36-1C6AE7E2B1D6") + IMDSPStorage2 : public IMDSPStorage + { + public: + virtual HRESULT STDMETHODCALLTYPE GetStorage( + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateStorage2( + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat, + /* [in] */ __RPC__in LPWSTR pwszName, + /* [in] */ ULONGLONG qwFileSize, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetAttributes2( + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAttributes2( + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPStorage2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPStorage2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPStorage2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPStorage2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes )( + IMDSPStorage2 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetStorageGlobals )( + IMDSPStorage2 * This, + /* [out] */ __RPC__deref_out_opt IMDSPStorageGlobals **ppStorageGlobals); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes )( + IMDSPStorage2 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IMDSPStorage2 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetDate )( + IMDSPStorage2 * This, + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC); + + HRESULT ( STDMETHODCALLTYPE *GetSize )( + IMDSPStorage2 * This, + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + IMDSPStorage2 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *CreateStorage )( + IMDSPStorage2 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [in] */ __RPC__in LPWSTR pwszName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IMDSPStorage2 * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IMDSPStorage2 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IMDSPStorage2 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *CreateStorage2 )( + IMDSPStorage2 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat, + /* [in] */ __RPC__in LPWSTR pwszName, + /* [in] */ ULONGLONG qwFileSize, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes2 )( + IMDSPStorage2 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes2 )( + IMDSPStorage2 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat); + + END_INTERFACE + } IMDSPStorage2Vtbl; + + interface IMDSPStorage2 + { + CONST_VTBL struct IMDSPStorage2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPStorage2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPStorage2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPStorage2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPStorage2_SetAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetAttributes(This,dwAttributes,pFormat) ) + +#define IMDSPStorage2_GetStorageGlobals(This,ppStorageGlobals) \ + ( (This)->lpVtbl -> GetStorageGlobals(This,ppStorageGlobals) ) + +#define IMDSPStorage2_GetAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetAttributes(This,pdwAttributes,pFormat) ) + +#define IMDSPStorage2_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IMDSPStorage2_GetDate(This,pDateTimeUTC) \ + ( (This)->lpVtbl -> GetDate(This,pDateTimeUTC) ) + +#define IMDSPStorage2_GetSize(This,pdwSizeLow,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetSize(This,pdwSizeLow,pdwSizeHigh) ) + +#define IMDSPStorage2_GetRights(This,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,ppRights,pnRightsCount,abMac) ) + +#define IMDSPStorage2_CreateStorage(This,dwAttributes,pFormat,pwszName,ppNewStorage) \ + ( (This)->lpVtbl -> CreateStorage(This,dwAttributes,pFormat,pwszName,ppNewStorage) ) + +#define IMDSPStorage2_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IMDSPStorage2_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IMDSPStorage2_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IMDSPStorage2_CreateStorage2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat,pwszName,qwFileSize,ppNewStorage) \ + ( (This)->lpVtbl -> CreateStorage2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat,pwszName,qwFileSize,ppNewStorage) ) + +#define IMDSPStorage2_SetAttributes2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> SetAttributes2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat) ) + +#define IMDSPStorage2_GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPStorage2_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPStorage3_INTERFACE_DEFINED__ +#define __IMDSPStorage3_INTERFACE_DEFINED__ + +/* interface IMDSPStorage3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPStorage3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6C669867-97ED-4a67-9706-1C5529D2A414") + IMDSPStorage3 : public IMDSPStorage2 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetMetadata( + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMetadata( + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPStorage3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPStorage3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPStorage3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPStorage3 * This); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes )( + IMDSPStorage3 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetStorageGlobals )( + IMDSPStorage3 * This, + /* [out] */ __RPC__deref_out_opt IMDSPStorageGlobals **ppStorageGlobals); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes )( + IMDSPStorage3 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IMDSPStorage3 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetDate )( + IMDSPStorage3 * This, + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC); + + HRESULT ( STDMETHODCALLTYPE *GetSize )( + IMDSPStorage3 * This, + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + IMDSPStorage3 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *CreateStorage )( + IMDSPStorage3 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [in] */ __RPC__in LPWSTR pwszName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IMDSPStorage3 * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IMDSPStorage3 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IMDSPStorage3 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *CreateStorage2 )( + IMDSPStorage3 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat, + /* [in] */ __RPC__in LPWSTR pwszName, + /* [in] */ ULONGLONG qwFileSize, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes2 )( + IMDSPStorage3 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes2 )( + IMDSPStorage3 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetMetadata )( + IMDSPStorage3 * This, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata); + + HRESULT ( STDMETHODCALLTYPE *SetMetadata )( + IMDSPStorage3 * This, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata); + + END_INTERFACE + } IMDSPStorage3Vtbl; + + interface IMDSPStorage3 + { + CONST_VTBL struct IMDSPStorage3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPStorage3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPStorage3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPStorage3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPStorage3_SetAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetAttributes(This,dwAttributes,pFormat) ) + +#define IMDSPStorage3_GetStorageGlobals(This,ppStorageGlobals) \ + ( (This)->lpVtbl -> GetStorageGlobals(This,ppStorageGlobals) ) + +#define IMDSPStorage3_GetAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetAttributes(This,pdwAttributes,pFormat) ) + +#define IMDSPStorage3_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IMDSPStorage3_GetDate(This,pDateTimeUTC) \ + ( (This)->lpVtbl -> GetDate(This,pDateTimeUTC) ) + +#define IMDSPStorage3_GetSize(This,pdwSizeLow,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetSize(This,pdwSizeLow,pdwSizeHigh) ) + +#define IMDSPStorage3_GetRights(This,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,ppRights,pnRightsCount,abMac) ) + +#define IMDSPStorage3_CreateStorage(This,dwAttributes,pFormat,pwszName,ppNewStorage) \ + ( (This)->lpVtbl -> CreateStorage(This,dwAttributes,pFormat,pwszName,ppNewStorage) ) + +#define IMDSPStorage3_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IMDSPStorage3_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IMDSPStorage3_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IMDSPStorage3_CreateStorage2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat,pwszName,qwFileSize,ppNewStorage) \ + ( (This)->lpVtbl -> CreateStorage2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat,pwszName,qwFileSize,ppNewStorage) ) + +#define IMDSPStorage3_SetAttributes2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> SetAttributes2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat) ) + +#define IMDSPStorage3_GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) ) + + +#define IMDSPStorage3_GetMetadata(This,pMetadata) \ + ( (This)->lpVtbl -> GetMetadata(This,pMetadata) ) + +#define IMDSPStorage3_SetMetadata(This,pMetadata) \ + ( (This)->lpVtbl -> SetMetadata(This,pMetadata) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPStorage3_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPStorage4_INTERFACE_DEFINED__ +#define __IMDSPStorage4_INTERFACE_DEFINED__ + +/* interface IMDSPStorage4 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPStorage4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3133b2c4-515c-481b-b1ce-39327ecb4f74") + IMDSPStorage4 : public IMDSPStorage3 + { + public: + virtual HRESULT STDMETHODCALLTYPE SetReferences( + /* [in] */ DWORD dwRefs, + /* [size_is][unique][in] */ __RPC__in_ecount_full_opt(dwRefs) IMDSPStorage **ppISPStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetReferences( + /* [out] */ __RPC__out DWORD *pdwRefs, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwRefs) IMDSPStorage ***pppISPStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateStorageWithMetadata( + /* [in] */ DWORD dwAttributes, + /* [in] */ __RPC__in LPCWSTR pwszName, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata, + /* [in] */ ULONGLONG qwFileSize, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSpecifiedMetadata( + /* [in] */ DWORD cProperties, + /* [size_is][in] */ __RPC__in_ecount_full(cProperties) LPCWSTR *ppwszPropNames, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindStorage( + /* [in] */ WMDM_FIND_SCOPE findScope, + /* [in] */ __RPC__in LPCWSTR pwszUniqueID, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetParent( + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPStorage4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPStorage4 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPStorage4 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPStorage4 * This); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes )( + IMDSPStorage4 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetStorageGlobals )( + IMDSPStorage4 * This, + /* [out] */ __RPC__deref_out_opt IMDSPStorageGlobals **ppStorageGlobals); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes )( + IMDSPStorage4 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetName )( + IMDSPStorage4 * This, + /* [size_is][string][out] */ __RPC__out_ecount_full_string(nMaxChars) LPWSTR pwszName, + /* [in] */ UINT nMaxChars); + + HRESULT ( STDMETHODCALLTYPE *GetDate )( + IMDSPStorage4 * This, + /* [out] */ __RPC__out PWMDMDATETIME pDateTimeUTC); + + HRESULT ( STDMETHODCALLTYPE *GetSize )( + IMDSPStorage4 * This, + /* [out] */ __RPC__out DWORD *pdwSizeLow, + /* [out] */ __RPC__out DWORD *pdwSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + IMDSPStorage4 * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *CreateStorage )( + IMDSPStorage4 * This, + /* [in] */ DWORD dwAttributes, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pFormat, + /* [in] */ __RPC__in LPWSTR pwszName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage); + + HRESULT ( STDMETHODCALLTYPE *EnumStorage )( + IMDSPStorage4 * This, + /* [out] */ __RPC__deref_out_opt IMDSPEnumStorage **ppEnumStorage); + + HRESULT ( STDMETHODCALLTYPE *SendOpaqueCommand )( + IMDSPStorage4 * This, + /* [out][in] */ __RPC__inout OPAQUECOMMAND *pCommand); + + HRESULT ( STDMETHODCALLTYPE *GetStorage )( + IMDSPStorage4 * This, + /* [string][in] */ __RPC__in LPCWSTR pszStorageName, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *CreateStorage2 )( + IMDSPStorage4 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat, + /* [in] */ __RPC__in LPWSTR pwszName, + /* [in] */ ULONGLONG qwFileSize, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage); + + HRESULT ( STDMETHODCALLTYPE *SetAttributes2 )( + IMDSPStorage4 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ DWORD dwAttributesEx, + /* [unique][in] */ __RPC__in_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][in] */ __RPC__in_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetAttributes2 )( + IMDSPStorage4 * This, + /* [out] */ __RPC__out DWORD *pdwAttributes, + /* [out] */ __RPC__out DWORD *pdwAttributesEx, + /* [unique][out][in] */ __RPC__inout_opt _WAVEFORMATEX *pAudioFormat, + /* [unique][out][in] */ __RPC__inout_opt _VIDEOINFOHEADER *pVideoFormat); + + HRESULT ( STDMETHODCALLTYPE *GetMetadata )( + IMDSPStorage4 * This, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata); + + HRESULT ( STDMETHODCALLTYPE *SetMetadata )( + IMDSPStorage4 * This, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata); + + HRESULT ( STDMETHODCALLTYPE *SetReferences )( + IMDSPStorage4 * This, + /* [in] */ DWORD dwRefs, + /* [size_is][unique][in] */ __RPC__in_ecount_full_opt(dwRefs) IMDSPStorage **ppISPStorage); + + HRESULT ( STDMETHODCALLTYPE *GetReferences )( + IMDSPStorage4 * This, + /* [out] */ __RPC__out DWORD *pdwRefs, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwRefs) IMDSPStorage ***pppISPStorage); + + HRESULT ( STDMETHODCALLTYPE *CreateStorageWithMetadata )( + IMDSPStorage4 * This, + /* [in] */ DWORD dwAttributes, + /* [in] */ __RPC__in LPCWSTR pwszName, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata, + /* [in] */ ULONGLONG qwFileSize, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewStorage); + + HRESULT ( STDMETHODCALLTYPE *GetSpecifiedMetadata )( + IMDSPStorage4 * This, + /* [in] */ DWORD cProperties, + /* [size_is][in] */ __RPC__in_ecount_full(cProperties) LPCWSTR *ppwszPropNames, + /* [in] */ __RPC__in_opt IWMDMMetaData *pMetadata); + + HRESULT ( STDMETHODCALLTYPE *FindStorage )( + IMDSPStorage4 * This, + /* [in] */ WMDM_FIND_SCOPE findScope, + /* [in] */ __RPC__in LPCWSTR pwszUniqueID, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage); + + HRESULT ( STDMETHODCALLTYPE *GetParent )( + IMDSPStorage4 * This, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppStorage); + + END_INTERFACE + } IMDSPStorage4Vtbl; + + interface IMDSPStorage4 + { + CONST_VTBL struct IMDSPStorage4Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPStorage4_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPStorage4_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPStorage4_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPStorage4_SetAttributes(This,dwAttributes,pFormat) \ + ( (This)->lpVtbl -> SetAttributes(This,dwAttributes,pFormat) ) + +#define IMDSPStorage4_GetStorageGlobals(This,ppStorageGlobals) \ + ( (This)->lpVtbl -> GetStorageGlobals(This,ppStorageGlobals) ) + +#define IMDSPStorage4_GetAttributes(This,pdwAttributes,pFormat) \ + ( (This)->lpVtbl -> GetAttributes(This,pdwAttributes,pFormat) ) + +#define IMDSPStorage4_GetName(This,pwszName,nMaxChars) \ + ( (This)->lpVtbl -> GetName(This,pwszName,nMaxChars) ) + +#define IMDSPStorage4_GetDate(This,pDateTimeUTC) \ + ( (This)->lpVtbl -> GetDate(This,pDateTimeUTC) ) + +#define IMDSPStorage4_GetSize(This,pdwSizeLow,pdwSizeHigh) \ + ( (This)->lpVtbl -> GetSize(This,pdwSizeLow,pdwSizeHigh) ) + +#define IMDSPStorage4_GetRights(This,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,ppRights,pnRightsCount,abMac) ) + +#define IMDSPStorage4_CreateStorage(This,dwAttributes,pFormat,pwszName,ppNewStorage) \ + ( (This)->lpVtbl -> CreateStorage(This,dwAttributes,pFormat,pwszName,ppNewStorage) ) + +#define IMDSPStorage4_EnumStorage(This,ppEnumStorage) \ + ( (This)->lpVtbl -> EnumStorage(This,ppEnumStorage) ) + +#define IMDSPStorage4_SendOpaqueCommand(This,pCommand) \ + ( (This)->lpVtbl -> SendOpaqueCommand(This,pCommand) ) + + +#define IMDSPStorage4_GetStorage(This,pszStorageName,ppStorage) \ + ( (This)->lpVtbl -> GetStorage(This,pszStorageName,ppStorage) ) + +#define IMDSPStorage4_CreateStorage2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat,pwszName,qwFileSize,ppNewStorage) \ + ( (This)->lpVtbl -> CreateStorage2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat,pwszName,qwFileSize,ppNewStorage) ) + +#define IMDSPStorage4_SetAttributes2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> SetAttributes2(This,dwAttributes,dwAttributesEx,pAudioFormat,pVideoFormat) ) + +#define IMDSPStorage4_GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) \ + ( (This)->lpVtbl -> GetAttributes2(This,pdwAttributes,pdwAttributesEx,pAudioFormat,pVideoFormat) ) + + +#define IMDSPStorage4_GetMetadata(This,pMetadata) \ + ( (This)->lpVtbl -> GetMetadata(This,pMetadata) ) + +#define IMDSPStorage4_SetMetadata(This,pMetadata) \ + ( (This)->lpVtbl -> SetMetadata(This,pMetadata) ) + + +#define IMDSPStorage4_SetReferences(This,dwRefs,ppISPStorage) \ + ( (This)->lpVtbl -> SetReferences(This,dwRefs,ppISPStorage) ) + +#define IMDSPStorage4_GetReferences(This,pdwRefs,pppISPStorage) \ + ( (This)->lpVtbl -> GetReferences(This,pdwRefs,pppISPStorage) ) + +#define IMDSPStorage4_CreateStorageWithMetadata(This,dwAttributes,pwszName,pMetadata,qwFileSize,ppNewStorage) \ + ( (This)->lpVtbl -> CreateStorageWithMetadata(This,dwAttributes,pwszName,pMetadata,qwFileSize,ppNewStorage) ) + +#define IMDSPStorage4_GetSpecifiedMetadata(This,cProperties,ppwszPropNames,pMetadata) \ + ( (This)->lpVtbl -> GetSpecifiedMetadata(This,cProperties,ppwszPropNames,pMetadata) ) + +#define IMDSPStorage4_FindStorage(This,findScope,pwszUniqueID,ppStorage) \ + ( (This)->lpVtbl -> FindStorage(This,findScope,pwszUniqueID,ppStorage) ) + +#define IMDSPStorage4_GetParent(This,ppStorage) \ + ( (This)->lpVtbl -> GetParent(This,ppStorage) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPStorage4_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPStorageGlobals_INTERFACE_DEFINED__ +#define __IMDSPStorageGlobals_INTERFACE_DEFINED__ + +/* interface IMDSPStorageGlobals */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPStorageGlobals; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A17-33ED-11d3-8470-00C04F79DBC0") + IMDSPStorageGlobals : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCapabilities( + /* [out] */ __RPC__out DWORD *pdwCapabilities) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSerialNumber( + /* [out] */ __RPC__out PWMDMID pSerialNum, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalSize( + /* [out] */ __RPC__out DWORD *pdwTotalSizeLow, + /* [out] */ __RPC__out DWORD *pdwTotalSizeHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalFree( + /* [out] */ __RPC__out DWORD *pdwFreeLow, + /* [out] */ __RPC__out DWORD *pdwFreeHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalBad( + /* [out] */ __RPC__out DWORD *pdwBadLow, + /* [out] */ __RPC__out DWORD *pdwBadHigh) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ __RPC__out DWORD *pdwStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE Initialize( + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDevice( + /* [out] */ __RPC__deref_out_opt IMDSPDevice **ppDevice) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRootStorage( + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppRoot) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPStorageGlobalsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPStorageGlobals * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPStorageGlobals * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPStorageGlobals * This); + + HRESULT ( STDMETHODCALLTYPE *GetCapabilities )( + IMDSPStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwCapabilities); + + HRESULT ( STDMETHODCALLTYPE *GetSerialNumber )( + IMDSPStorageGlobals * This, + /* [out] */ __RPC__out PWMDMID pSerialNum, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetTotalSize )( + IMDSPStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwTotalSizeLow, + /* [out] */ __RPC__out DWORD *pdwTotalSizeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetTotalFree )( + IMDSPStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwFreeLow, + /* [out] */ __RPC__out DWORD *pdwFreeHigh); + + HRESULT ( STDMETHODCALLTYPE *GetTotalBad )( + IMDSPStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwBadLow, + /* [out] */ __RPC__out DWORD *pdwBadHigh); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IMDSPStorageGlobals * This, + /* [out] */ __RPC__out DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *Initialize )( + IMDSPStorageGlobals * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *GetDevice )( + IMDSPStorageGlobals * This, + /* [out] */ __RPC__deref_out_opt IMDSPDevice **ppDevice); + + HRESULT ( STDMETHODCALLTYPE *GetRootStorage )( + IMDSPStorageGlobals * This, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppRoot); + + END_INTERFACE + } IMDSPStorageGlobalsVtbl; + + interface IMDSPStorageGlobals + { + CONST_VTBL struct IMDSPStorageGlobalsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPStorageGlobals_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPStorageGlobals_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPStorageGlobals_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPStorageGlobals_GetCapabilities(This,pdwCapabilities) \ + ( (This)->lpVtbl -> GetCapabilities(This,pdwCapabilities) ) + +#define IMDSPStorageGlobals_GetSerialNumber(This,pSerialNum,abMac) \ + ( (This)->lpVtbl -> GetSerialNumber(This,pSerialNum,abMac) ) + +#define IMDSPStorageGlobals_GetTotalSize(This,pdwTotalSizeLow,pdwTotalSizeHigh) \ + ( (This)->lpVtbl -> GetTotalSize(This,pdwTotalSizeLow,pdwTotalSizeHigh) ) + +#define IMDSPStorageGlobals_GetTotalFree(This,pdwFreeLow,pdwFreeHigh) \ + ( (This)->lpVtbl -> GetTotalFree(This,pdwFreeLow,pdwFreeHigh) ) + +#define IMDSPStorageGlobals_GetTotalBad(This,pdwBadLow,pdwBadHigh) \ + ( (This)->lpVtbl -> GetTotalBad(This,pdwBadLow,pdwBadHigh) ) + +#define IMDSPStorageGlobals_GetStatus(This,pdwStatus) \ + ( (This)->lpVtbl -> GetStatus(This,pdwStatus) ) + +#define IMDSPStorageGlobals_Initialize(This,fuMode,pProgress) \ + ( (This)->lpVtbl -> Initialize(This,fuMode,pProgress) ) + +#define IMDSPStorageGlobals_GetDevice(This,ppDevice) \ + ( (This)->lpVtbl -> GetDevice(This,ppDevice) ) + +#define IMDSPStorageGlobals_GetRootStorage(This,ppRoot) \ + ( (This)->lpVtbl -> GetRootStorage(This,ppRoot) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPStorageGlobals_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPObjectInfo_INTERFACE_DEFINED__ +#define __IMDSPObjectInfo_INTERFACE_DEFINED__ + +/* interface IMDSPObjectInfo */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPObjectInfo; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A19-33ED-11d3-8470-00C04F79DBC0") + IMDSPObjectInfo : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPlayLength( + /* [out] */ __RPC__out DWORD *pdwLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPlayLength( + /* [in] */ DWORD dwLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPlayOffset( + /* [out] */ __RPC__out DWORD *pdwOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPlayOffset( + /* [in] */ DWORD dwOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalLength( + /* [out] */ __RPC__out DWORD *pdwLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetLastPlayPosition( + /* [out] */ __RPC__out DWORD *pdwLastPos) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetLongestPlayPosition( + /* [out] */ __RPC__out DWORD *pdwLongestPos) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPObjectInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPObjectInfo * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPObjectInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPObjectInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetPlayLength )( + IMDSPObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwLength); + + HRESULT ( STDMETHODCALLTYPE *SetPlayLength )( + IMDSPObjectInfo * This, + /* [in] */ DWORD dwLength); + + HRESULT ( STDMETHODCALLTYPE *GetPlayOffset )( + IMDSPObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwOffset); + + HRESULT ( STDMETHODCALLTYPE *SetPlayOffset )( + IMDSPObjectInfo * This, + /* [in] */ DWORD dwOffset); + + HRESULT ( STDMETHODCALLTYPE *GetTotalLength )( + IMDSPObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwLength); + + HRESULT ( STDMETHODCALLTYPE *GetLastPlayPosition )( + IMDSPObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwLastPos); + + HRESULT ( STDMETHODCALLTYPE *GetLongestPlayPosition )( + IMDSPObjectInfo * This, + /* [out] */ __RPC__out DWORD *pdwLongestPos); + + END_INTERFACE + } IMDSPObjectInfoVtbl; + + interface IMDSPObjectInfo + { + CONST_VTBL struct IMDSPObjectInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPObjectInfo_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPObjectInfo_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPObjectInfo_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPObjectInfo_GetPlayLength(This,pdwLength) \ + ( (This)->lpVtbl -> GetPlayLength(This,pdwLength) ) + +#define IMDSPObjectInfo_SetPlayLength(This,dwLength) \ + ( (This)->lpVtbl -> SetPlayLength(This,dwLength) ) + +#define IMDSPObjectInfo_GetPlayOffset(This,pdwOffset) \ + ( (This)->lpVtbl -> GetPlayOffset(This,pdwOffset) ) + +#define IMDSPObjectInfo_SetPlayOffset(This,dwOffset) \ + ( (This)->lpVtbl -> SetPlayOffset(This,dwOffset) ) + +#define IMDSPObjectInfo_GetTotalLength(This,pdwLength) \ + ( (This)->lpVtbl -> GetTotalLength(This,pdwLength) ) + +#define IMDSPObjectInfo_GetLastPlayPosition(This,pdwLastPos) \ + ( (This)->lpVtbl -> GetLastPlayPosition(This,pdwLastPos) ) + +#define IMDSPObjectInfo_GetLongestPlayPosition(This,pdwLongestPos) \ + ( (This)->lpVtbl -> GetLongestPlayPosition(This,pdwLongestPos) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPObjectInfo_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPObject_INTERFACE_DEFINED__ +#define __IMDSPObject_INTERFACE_DEFINED__ + +/* interface IMDSPObject */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPObject; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A18-33ED-11d3-8470-00C04F79DBC0") + IMDSPObject : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Open( + /* [in] */ UINT fuMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE Read( + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE Write( + /* [size_is][in] */ __RPC__in_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE Delete( + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress) = 0; + + virtual HRESULT STDMETHODCALLTYPE Seek( + /* [in] */ UINT fuFlags, + /* [in] */ DWORD dwOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE Rename( + /* [in] */ __RPC__in LPWSTR pwszNewName, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress) = 0; + + virtual HRESULT STDMETHODCALLTYPE Move( + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IMDSPStorage *pTarget) = 0; + + virtual HRESULT STDMETHODCALLTYPE Close( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPObjectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPObject * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPObject * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPObject * This); + + HRESULT ( STDMETHODCALLTYPE *Open )( + IMDSPObject * This, + /* [in] */ UINT fuMode); + + HRESULT ( STDMETHODCALLTYPE *Read )( + IMDSPObject * This, + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *Write )( + IMDSPObject * This, + /* [size_is][in] */ __RPC__in_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *Delete )( + IMDSPObject * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Seek )( + IMDSPObject * This, + /* [in] */ UINT fuFlags, + /* [in] */ DWORD dwOffset); + + HRESULT ( STDMETHODCALLTYPE *Rename )( + IMDSPObject * This, + /* [in] */ __RPC__in LPWSTR pwszNewName, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Move )( + IMDSPObject * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IMDSPStorage *pTarget); + + HRESULT ( STDMETHODCALLTYPE *Close )( + IMDSPObject * This); + + END_INTERFACE + } IMDSPObjectVtbl; + + interface IMDSPObject + { + CONST_VTBL struct IMDSPObjectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPObject_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPObject_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPObject_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPObject_Open(This,fuMode) \ + ( (This)->lpVtbl -> Open(This,fuMode) ) + +#define IMDSPObject_Read(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> Read(This,pData,pdwSize,abMac) ) + +#define IMDSPObject_Write(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> Write(This,pData,pdwSize,abMac) ) + +#define IMDSPObject_Delete(This,fuMode,pProgress) \ + ( (This)->lpVtbl -> Delete(This,fuMode,pProgress) ) + +#define IMDSPObject_Seek(This,fuFlags,dwOffset) \ + ( (This)->lpVtbl -> Seek(This,fuFlags,dwOffset) ) + +#define IMDSPObject_Rename(This,pwszNewName,pProgress) \ + ( (This)->lpVtbl -> Rename(This,pwszNewName,pProgress) ) + +#define IMDSPObject_Move(This,fuMode,pProgress,pTarget) \ + ( (This)->lpVtbl -> Move(This,fuMode,pProgress,pTarget) ) + +#define IMDSPObject_Close(This) \ + ( (This)->lpVtbl -> Close(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPObject_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPObject2_INTERFACE_DEFINED__ +#define __IMDSPObject2_INTERFACE_DEFINED__ + +/* interface IMDSPObject2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPObject2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3f34cd3e-5907-4341-9af9-97f4187c3aa5") + IMDSPObject2 : public IMDSPObject + { + public: + virtual HRESULT STDMETHODCALLTYPE ReadOnClearChannel( + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE WriteOnClearChannel( + /* [size_is][in] */ __RPC__in_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPObject2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPObject2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPObject2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPObject2 * This); + + HRESULT ( STDMETHODCALLTYPE *Open )( + IMDSPObject2 * This, + /* [in] */ UINT fuMode); + + HRESULT ( STDMETHODCALLTYPE *Read )( + IMDSPObject2 * This, + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *Write )( + IMDSPObject2 * This, + /* [size_is][in] */ __RPC__in_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *Delete )( + IMDSPObject2 * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Seek )( + IMDSPObject2 * This, + /* [in] */ UINT fuFlags, + /* [in] */ DWORD dwOffset); + + HRESULT ( STDMETHODCALLTYPE *Rename )( + IMDSPObject2 * This, + /* [in] */ __RPC__in LPWSTR pwszNewName, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress); + + HRESULT ( STDMETHODCALLTYPE *Move )( + IMDSPObject2 * This, + /* [in] */ UINT fuMode, + /* [in] */ __RPC__in_opt IWMDMProgress *pProgress, + /* [in] */ __RPC__in_opt IMDSPStorage *pTarget); + + HRESULT ( STDMETHODCALLTYPE *Close )( + IMDSPObject2 * This); + + HRESULT ( STDMETHODCALLTYPE *ReadOnClearChannel )( + IMDSPObject2 * This, + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize); + + HRESULT ( STDMETHODCALLTYPE *WriteOnClearChannel )( + IMDSPObject2 * This, + /* [size_is][in] */ __RPC__in_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize); + + END_INTERFACE + } IMDSPObject2Vtbl; + + interface IMDSPObject2 + { + CONST_VTBL struct IMDSPObject2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPObject2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPObject2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPObject2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPObject2_Open(This,fuMode) \ + ( (This)->lpVtbl -> Open(This,fuMode) ) + +#define IMDSPObject2_Read(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> Read(This,pData,pdwSize,abMac) ) + +#define IMDSPObject2_Write(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> Write(This,pData,pdwSize,abMac) ) + +#define IMDSPObject2_Delete(This,fuMode,pProgress) \ + ( (This)->lpVtbl -> Delete(This,fuMode,pProgress) ) + +#define IMDSPObject2_Seek(This,fuFlags,dwOffset) \ + ( (This)->lpVtbl -> Seek(This,fuFlags,dwOffset) ) + +#define IMDSPObject2_Rename(This,pwszNewName,pProgress) \ + ( (This)->lpVtbl -> Rename(This,pwszNewName,pProgress) ) + +#define IMDSPObject2_Move(This,fuMode,pProgress,pTarget) \ + ( (This)->lpVtbl -> Move(This,fuMode,pProgress,pTarget) ) + +#define IMDSPObject2_Close(This) \ + ( (This)->lpVtbl -> Close(This) ) + + +#define IMDSPObject2_ReadOnClearChannel(This,pData,pdwSize) \ + ( (This)->lpVtbl -> ReadOnClearChannel(This,pData,pdwSize) ) + +#define IMDSPObject2_WriteOnClearChannel(This,pData,pdwSize) \ + ( (This)->lpVtbl -> WriteOnClearChannel(This,pData,pdwSize) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPObject2_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPDirectTransfer_INTERFACE_DEFINED__ +#define __IMDSPDirectTransfer_INTERFACE_DEFINED__ + +/* interface IMDSPDirectTransfer */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPDirectTransfer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c2fe57a8-9304-478c-9ee4-47e397b912d7") + IMDSPDirectTransfer : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE TransferToDevice( + /* [string][unique][in] */ __RPC__in_opt LPCWSTR pwszSourceFilePath, + /* [in] */ __RPC__in_opt IWMDMOperation *pSourceOperation, + /* [in] */ UINT fuFlags, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszDestinationName, + /* [in] */ __RPC__in_opt IWMDMMetaData *pSourceMetaData, + /* [in] */ __RPC__in_opt IWMDMProgress *pTransferProgress, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPDirectTransferVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPDirectTransfer * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPDirectTransfer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPDirectTransfer * This); + + HRESULT ( STDMETHODCALLTYPE *TransferToDevice )( + IMDSPDirectTransfer * This, + /* [string][unique][in] */ __RPC__in_opt LPCWSTR pwszSourceFilePath, + /* [in] */ __RPC__in_opt IWMDMOperation *pSourceOperation, + /* [in] */ UINT fuFlags, + /* [string][unique][in] */ __RPC__in_opt LPWSTR pwszDestinationName, + /* [in] */ __RPC__in_opt IWMDMMetaData *pSourceMetaData, + /* [in] */ __RPC__in_opt IWMDMProgress *pTransferProgress, + /* [out] */ __RPC__deref_out_opt IMDSPStorage **ppNewObject); + + END_INTERFACE + } IMDSPDirectTransferVtbl; + + interface IMDSPDirectTransfer + { + CONST_VTBL struct IMDSPDirectTransferVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPDirectTransfer_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPDirectTransfer_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPDirectTransfer_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPDirectTransfer_TransferToDevice(This,pwszSourceFilePath,pSourceOperation,fuFlags,pwszDestinationName,pSourceMetaData,pTransferProgress,ppNewObject) \ + ( (This)->lpVtbl -> TransferToDevice(This,pwszSourceFilePath,pSourceOperation,fuFlags,pwszDestinationName,pSourceMetaData,pTransferProgress,ppNewObject) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPDirectTransfer_INTERFACE_DEFINED__ */ + + +#ifndef __IMDSPRevoked_INTERFACE_DEFINED__ +#define __IMDSPRevoked_INTERFACE_DEFINED__ + +/* interface IMDSPRevoked */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMDSPRevoked; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A4E8F2D4-3F31-464d-B53D-4FC335998184") + IMDSPRevoked : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetRevocationURL( + /* [size_is][size_is][string][out][in] */ __RPC__deref_inout_ecount_full_opt_string(*pdwBufferLen) LPWSTR *ppwszRevocationURL, + /* [out][in] */ __RPC__inout DWORD *pdwBufferLen) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMDSPRevokedVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMDSPRevoked * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMDSPRevoked * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMDSPRevoked * This); + + HRESULT ( STDMETHODCALLTYPE *GetRevocationURL )( + IMDSPRevoked * This, + /* [size_is][size_is][string][out][in] */ __RPC__deref_inout_ecount_full_opt_string(*pdwBufferLen) LPWSTR *ppwszRevocationURL, + /* [out][in] */ __RPC__inout DWORD *pdwBufferLen); + + END_INTERFACE + } IMDSPRevokedVtbl; + + interface IMDSPRevoked + { + CONST_VTBL struct IMDSPRevokedVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMDSPRevoked_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IMDSPRevoked_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IMDSPRevoked_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IMDSPRevoked_GetRevocationURL(This,ppwszRevocationURL,pdwBufferLen) \ + ( (This)->lpVtbl -> GetRevocationURL(This,ppwszRevocationURL,pdwBufferLen) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IMDSPRevoked_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_mswmdm_0000_0047 */ +/* [local] */ + +// SCP Data Flags +#define WMDM_SCP_EXAMINE_EXTENSION 0x00000001L +#define WMDM_SCP_EXAMINE_DATA 0x00000002L +#define WMDM_SCP_DECIDE_DATA 0x00000008L +#define WMDM_SCP_PROTECTED_OUTPUT 0x00000010L +#define WMDM_SCP_UNPROTECTED_OUTPUT 0x00000020L +#define WMDM_SCP_RIGHTS_DATA 0x00000040L +// SCP Transfer Flags +#define WMDM_SCP_TRANSFER_OBJECTDATA 0x00000020L +#define WMDM_SCP_NO_MORE_CHANGES 0x00000040L +// SCP DRMINFO Flags +#define WMDM_SCP_DRMINFO_NOT_DRMPROTECTED 0x00000000L +#define WMDM_SCP_DRMINFO_V1HEADER 0x00000001L +#define WMDM_SCP_DRMINFO_V2HEADER 0x00000002L +#ifndef _DEFINE_SCP_EVENTID +#define _DEFINE_SCP_EVENTID +// {86248CC9-4A59-43e2-9146-48A7F3F4140C} +// this event ID is used when SCP is acquiring secure clock from server +DEFINE_GUID(SCP_EVENTID_ACQSECURECLOCK, +0x86248cc9, 0x4a59, 0x43e2, 0x91, 0x46, 0x48, 0xa7, 0xf3, 0xf4, 0x14, 0xc); +// +// {87A507C7-B469-4386-B976-D5D1CE538A6F} +DEFINE_GUID(SCP_EVENTID_NEEDTOINDIV, +0x87a507c7, 0xb469, 0x4386, 0xb9, 0x76, 0xd5, 0xd1, 0xce, 0x53, 0x8a, 0x6f); +// this event ID is used to notify the player the version DRM header found in the content +// {213DD287-41D2-432b-9E3F-3B4F7B3581DD} +DEFINE_GUID(SCP_EVENTID_DRMINFO, +0x213dd287, 0x41d2, 0x432b, 0x9e, 0x3f, 0x3b, 0x4f, 0x7b, 0x35, 0x81, 0xdd); +// this parameter ID is used when notifying SCP_EVENTID_DRMINFO message +// {41D0155D-7CC7-4217-ADA9-005074624DA4} +DEFINE_GUID(SCP_PARAMID_DRMVERSION, +0x41d0155d, 0x7cc7, 0x4217, 0xad, 0xa9, 0x00, 0x50, 0x74, 0x62, 0x4d, 0xa4); +#endif + + + + + + +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0047_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0047_v0_0_s_ifspec; + +#ifndef __ISCPSecureAuthenticate_INTERFACE_DEFINED__ +#define __ISCPSecureAuthenticate_INTERFACE_DEFINED__ + +/* interface ISCPSecureAuthenticate */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISCPSecureAuthenticate; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A0F-33ED-11d3-8470-00C04F79DBC0") + ISCPSecureAuthenticate : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetSecureQuery( + /* [out] */ __RPC__deref_out_opt ISCPSecureQuery **ppSecureQuery) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISCPSecureAuthenticateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISCPSecureAuthenticate * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISCPSecureAuthenticate * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISCPSecureAuthenticate * This); + + HRESULT ( STDMETHODCALLTYPE *GetSecureQuery )( + ISCPSecureAuthenticate * This, + /* [out] */ __RPC__deref_out_opt ISCPSecureQuery **ppSecureQuery); + + END_INTERFACE + } ISCPSecureAuthenticateVtbl; + + interface ISCPSecureAuthenticate + { + CONST_VTBL struct ISCPSecureAuthenticateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISCPSecureAuthenticate_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISCPSecureAuthenticate_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISCPSecureAuthenticate_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISCPSecureAuthenticate_GetSecureQuery(This,ppSecureQuery) \ + ( (This)->lpVtbl -> GetSecureQuery(This,ppSecureQuery) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISCPSecureAuthenticate_INTERFACE_DEFINED__ */ + + +#ifndef __ISCPSecureAuthenticate2_INTERFACE_DEFINED__ +#define __ISCPSecureAuthenticate2_INTERFACE_DEFINED__ + +/* interface ISCPSecureAuthenticate2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISCPSecureAuthenticate2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B580CFAE-1672-47e2-ACAA-44BBECBCAE5B") + ISCPSecureAuthenticate2 : public ISCPSecureAuthenticate + { + public: + virtual HRESULT STDMETHODCALLTYPE GetSCPSession( + /* [out] */ __RPC__deref_out_opt ISCPSession **ppSCPSession) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISCPSecureAuthenticate2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISCPSecureAuthenticate2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISCPSecureAuthenticate2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISCPSecureAuthenticate2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetSecureQuery )( + ISCPSecureAuthenticate2 * This, + /* [out] */ __RPC__deref_out_opt ISCPSecureQuery **ppSecureQuery); + + HRESULT ( STDMETHODCALLTYPE *GetSCPSession )( + ISCPSecureAuthenticate2 * This, + /* [out] */ __RPC__deref_out_opt ISCPSession **ppSCPSession); + + END_INTERFACE + } ISCPSecureAuthenticate2Vtbl; + + interface ISCPSecureAuthenticate2 + { + CONST_VTBL struct ISCPSecureAuthenticate2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISCPSecureAuthenticate2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISCPSecureAuthenticate2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISCPSecureAuthenticate2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISCPSecureAuthenticate2_GetSecureQuery(This,ppSecureQuery) \ + ( (This)->lpVtbl -> GetSecureQuery(This,ppSecureQuery) ) + + +#define ISCPSecureAuthenticate2_GetSCPSession(This,ppSCPSession) \ + ( (This)->lpVtbl -> GetSCPSession(This,ppSCPSession) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISCPSecureAuthenticate2_INTERFACE_DEFINED__ */ + + +#ifndef __ISCPSecureQuery_INTERFACE_DEFINED__ +#define __ISCPSecureQuery_INTERFACE_DEFINED__ + +/* interface ISCPSecureQuery */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISCPSecureQuery; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A0D-33ED-11d3-8470-00C04F79DBC0") + ISCPSecureQuery : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDataDemands( + /* [out] */ __RPC__out UINT *pfuFlags, + /* [out] */ __RPC__out DWORD *pdwMinRightsData, + /* [out] */ __RPC__out DWORD *pdwMinExamineData, + /* [out] */ __RPC__out DWORD *pdwMinDecideData, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE ExamineData( + /* [in] */ UINT fuFlags, + /* [unique][string][in] */ __RPC__in_opt LPWSTR pwszExtension, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE MakeDecision( + /* [in] */ UINT fuFlags, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwAppSec, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStorageGlobals, + /* [out] */ __RPC__deref_out_opt ISCPSecureExchange **ppExchange, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRights( + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStgGlobals, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISCPSecureQueryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISCPSecureQuery * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISCPSecureQuery * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISCPSecureQuery * This); + + HRESULT ( STDMETHODCALLTYPE *GetDataDemands )( + ISCPSecureQuery * This, + /* [out] */ __RPC__out UINT *pfuFlags, + /* [out] */ __RPC__out DWORD *pdwMinRightsData, + /* [out] */ __RPC__out DWORD *pdwMinExamineData, + /* [out] */ __RPC__out DWORD *pdwMinDecideData, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *ExamineData )( + ISCPSecureQuery * This, + /* [in] */ UINT fuFlags, + /* [unique][string][in] */ __RPC__in_opt LPWSTR pwszExtension, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *MakeDecision )( + ISCPSecureQuery * This, + /* [in] */ UINT fuFlags, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwAppSec, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStorageGlobals, + /* [out] */ __RPC__deref_out_opt ISCPSecureExchange **ppExchange, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + ISCPSecureQuery * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStgGlobals, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + END_INTERFACE + } ISCPSecureQueryVtbl; + + interface ISCPSecureQuery + { + CONST_VTBL struct ISCPSecureQueryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISCPSecureQuery_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISCPSecureQuery_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISCPSecureQuery_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISCPSecureQuery_GetDataDemands(This,pfuFlags,pdwMinRightsData,pdwMinExamineData,pdwMinDecideData,abMac) \ + ( (This)->lpVtbl -> GetDataDemands(This,pfuFlags,pdwMinRightsData,pdwMinExamineData,pdwMinDecideData,abMac) ) + +#define ISCPSecureQuery_ExamineData(This,fuFlags,pwszExtension,pData,dwSize,abMac) \ + ( (This)->lpVtbl -> ExamineData(This,fuFlags,pwszExtension,pData,dwSize,abMac) ) + +#define ISCPSecureQuery_MakeDecision(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,ppExchange,abMac) \ + ( (This)->lpVtbl -> MakeDecision(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,ppExchange,abMac) ) + +#define ISCPSecureQuery_GetRights(This,pData,dwSize,pbSPSessionKey,dwSessionKeyLen,pStgGlobals,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,pData,dwSize,pbSPSessionKey,dwSessionKeyLen,pStgGlobals,ppRights,pnRightsCount,abMac) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISCPSecureQuery_INTERFACE_DEFINED__ */ + + +#ifndef __ISCPSecureQuery2_INTERFACE_DEFINED__ +#define __ISCPSecureQuery2_INTERFACE_DEFINED__ + +/* interface ISCPSecureQuery2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISCPSecureQuery2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EBE17E25-4FD7-4632-AF46-6D93D4FCC72E") + ISCPSecureQuery2 : public ISCPSecureQuery + { + public: + virtual HRESULT STDMETHODCALLTYPE MakeDecision2( + /* [in] */ UINT fuFlags, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwAppSec, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStorageGlobals, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertAppLen) BYTE *pAppCertApp, + /* [in] */ DWORD dwAppCertAppLen, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertSPLen) BYTE *pAppCertSP, + /* [in] */ DWORD dwAppCertSPLen, + /* [size_is][size_is][string][out][in] */ __RPC__deref_inout_ecount_full_opt_string(*pdwRevocationURLLen) LPWSTR *pszRevocationURL, + /* [ref][out][in] */ __RPC__inout DWORD *pdwRevocationURLLen, + /* [out] */ __RPC__out DWORD *pdwRevocationBitFlag, + /* [unique][out][in] */ __RPC__inout_opt ULONGLONG *pqwFileSize, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [out] */ __RPC__deref_out_opt ISCPSecureExchange **ppExchange, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISCPSecureQuery2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISCPSecureQuery2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISCPSecureQuery2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISCPSecureQuery2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDataDemands )( + ISCPSecureQuery2 * This, + /* [out] */ __RPC__out UINT *pfuFlags, + /* [out] */ __RPC__out DWORD *pdwMinRightsData, + /* [out] */ __RPC__out DWORD *pdwMinExamineData, + /* [out] */ __RPC__out DWORD *pdwMinDecideData, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *ExamineData )( + ISCPSecureQuery2 * This, + /* [in] */ UINT fuFlags, + /* [unique][string][in] */ __RPC__in_opt LPWSTR pwszExtension, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *MakeDecision )( + ISCPSecureQuery2 * This, + /* [in] */ UINT fuFlags, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwAppSec, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStorageGlobals, + /* [out] */ __RPC__deref_out_opt ISCPSecureExchange **ppExchange, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + ISCPSecureQuery2 * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStgGlobals, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *MakeDecision2 )( + ISCPSecureQuery2 * This, + /* [in] */ UINT fuFlags, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwAppSec, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStorageGlobals, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertAppLen) BYTE *pAppCertApp, + /* [in] */ DWORD dwAppCertAppLen, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertSPLen) BYTE *pAppCertSP, + /* [in] */ DWORD dwAppCertSPLen, + /* [size_is][size_is][string][out][in] */ __RPC__deref_inout_ecount_full_opt_string(*pdwRevocationURLLen) LPWSTR *pszRevocationURL, + /* [ref][out][in] */ __RPC__inout DWORD *pdwRevocationURLLen, + /* [out] */ __RPC__out DWORD *pdwRevocationBitFlag, + /* [unique][out][in] */ __RPC__inout_opt ULONGLONG *pqwFileSize, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [out] */ __RPC__deref_out_opt ISCPSecureExchange **ppExchange, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + END_INTERFACE + } ISCPSecureQuery2Vtbl; + + interface ISCPSecureQuery2 + { + CONST_VTBL struct ISCPSecureQuery2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISCPSecureQuery2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISCPSecureQuery2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISCPSecureQuery2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISCPSecureQuery2_GetDataDemands(This,pfuFlags,pdwMinRightsData,pdwMinExamineData,pdwMinDecideData,abMac) \ + ( (This)->lpVtbl -> GetDataDemands(This,pfuFlags,pdwMinRightsData,pdwMinExamineData,pdwMinDecideData,abMac) ) + +#define ISCPSecureQuery2_ExamineData(This,fuFlags,pwszExtension,pData,dwSize,abMac) \ + ( (This)->lpVtbl -> ExamineData(This,fuFlags,pwszExtension,pData,dwSize,abMac) ) + +#define ISCPSecureQuery2_MakeDecision(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,ppExchange,abMac) \ + ( (This)->lpVtbl -> MakeDecision(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,ppExchange,abMac) ) + +#define ISCPSecureQuery2_GetRights(This,pData,dwSize,pbSPSessionKey,dwSessionKeyLen,pStgGlobals,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,pData,dwSize,pbSPSessionKey,dwSessionKeyLen,pStgGlobals,ppRights,pnRightsCount,abMac) ) + + +#define ISCPSecureQuery2_MakeDecision2(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,pAppCertApp,dwAppCertAppLen,pAppCertSP,dwAppCertSPLen,pszRevocationURL,pdwRevocationURLLen,pdwRevocationBitFlag,pqwFileSize,pUnknown,ppExchange,abMac) \ + ( (This)->lpVtbl -> MakeDecision2(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,pAppCertApp,dwAppCertAppLen,pAppCertSP,dwAppCertSPLen,pszRevocationURL,pdwRevocationURLLen,pdwRevocationBitFlag,pqwFileSize,pUnknown,ppExchange,abMac) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISCPSecureQuery2_INTERFACE_DEFINED__ */ + + +#ifndef __ISCPSecureExchange_INTERFACE_DEFINED__ +#define __ISCPSecureExchange_INTERFACE_DEFINED__ + +/* interface ISCPSecureExchange */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISCPSecureExchange; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DCB3A0E-33ED-11d3-8470-00C04F79DBC0") + ISCPSecureExchange : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE TransferContainerData( + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [out] */ __RPC__out UINT *pfuReadyFlags, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE ObjectData( + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE TransferComplete( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISCPSecureExchangeVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISCPSecureExchange * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISCPSecureExchange * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISCPSecureExchange * This); + + HRESULT ( STDMETHODCALLTYPE *TransferContainerData )( + ISCPSecureExchange * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [out] */ __RPC__out UINT *pfuReadyFlags, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *ObjectData )( + ISCPSecureExchange * This, + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *TransferComplete )( + ISCPSecureExchange * This); + + END_INTERFACE + } ISCPSecureExchangeVtbl; + + interface ISCPSecureExchange + { + CONST_VTBL struct ISCPSecureExchangeVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISCPSecureExchange_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISCPSecureExchange_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISCPSecureExchange_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISCPSecureExchange_TransferContainerData(This,pData,dwSize,pfuReadyFlags,abMac) \ + ( (This)->lpVtbl -> TransferContainerData(This,pData,dwSize,pfuReadyFlags,abMac) ) + +#define ISCPSecureExchange_ObjectData(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> ObjectData(This,pData,pdwSize,abMac) ) + +#define ISCPSecureExchange_TransferComplete(This) \ + ( (This)->lpVtbl -> TransferComplete(This) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISCPSecureExchange_INTERFACE_DEFINED__ */ + + +#ifndef __ISCPSecureExchange2_INTERFACE_DEFINED__ +#define __ISCPSecureExchange2_INTERFACE_DEFINED__ + +/* interface ISCPSecureExchange2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISCPSecureExchange2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6C62FC7B-2690-483F-9D44-0A20CB35577C") + ISCPSecureExchange2 : public ISCPSecureExchange + { + public: + virtual HRESULT STDMETHODCALLTYPE TransferContainerData2( + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pProgressCallback, + /* [out] */ __RPC__out UINT *pfuReadyFlags, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISCPSecureExchange2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISCPSecureExchange2 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISCPSecureExchange2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISCPSecureExchange2 * This); + + HRESULT ( STDMETHODCALLTYPE *TransferContainerData )( + ISCPSecureExchange2 * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [out] */ __RPC__out UINT *pfuReadyFlags, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *ObjectData )( + ISCPSecureExchange2 * This, + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *TransferComplete )( + ISCPSecureExchange2 * This); + + HRESULT ( STDMETHODCALLTYPE *TransferContainerData2 )( + ISCPSecureExchange2 * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pProgressCallback, + /* [out] */ __RPC__out UINT *pfuReadyFlags, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + END_INTERFACE + } ISCPSecureExchange2Vtbl; + + interface ISCPSecureExchange2 + { + CONST_VTBL struct ISCPSecureExchange2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISCPSecureExchange2_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISCPSecureExchange2_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISCPSecureExchange2_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISCPSecureExchange2_TransferContainerData(This,pData,dwSize,pfuReadyFlags,abMac) \ + ( (This)->lpVtbl -> TransferContainerData(This,pData,dwSize,pfuReadyFlags,abMac) ) + +#define ISCPSecureExchange2_ObjectData(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> ObjectData(This,pData,pdwSize,abMac) ) + +#define ISCPSecureExchange2_TransferComplete(This) \ + ( (This)->lpVtbl -> TransferComplete(This) ) + + +#define ISCPSecureExchange2_TransferContainerData2(This,pData,dwSize,pProgressCallback,pfuReadyFlags,abMac) \ + ( (This)->lpVtbl -> TransferContainerData2(This,pData,dwSize,pProgressCallback,pfuReadyFlags,abMac) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISCPSecureExchange2_INTERFACE_DEFINED__ */ + + +#ifndef __ISCPSecureExchange3_INTERFACE_DEFINED__ +#define __ISCPSecureExchange3_INTERFACE_DEFINED__ + +/* interface ISCPSecureExchange3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISCPSecureExchange3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ab4e77e4-8908-4b17-bd2a-b1dbe6dd69e1") + ISCPSecureExchange3 : public ISCPSecureExchange2 + { + public: + virtual HRESULT STDMETHODCALLTYPE TransferContainerDataOnClearChannel( + /* [in] */ __RPC__in_opt IMDSPDevice *pDevice, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pProgressCallback, + /* [out] */ __RPC__out UINT *pfuReadyFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetObjectDataOnClearChannel( + /* [in] */ __RPC__in_opt IMDSPDevice *pDevice, + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE TransferCompleteForDevice( + /* [in] */ __RPC__in_opt IMDSPDevice *pDevice) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISCPSecureExchange3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISCPSecureExchange3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISCPSecureExchange3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISCPSecureExchange3 * This); + + HRESULT ( STDMETHODCALLTYPE *TransferContainerData )( + ISCPSecureExchange3 * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [out] */ __RPC__out UINT *pfuReadyFlags, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *ObjectData )( + ISCPSecureExchange3 * This, + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *TransferComplete )( + ISCPSecureExchange3 * This); + + HRESULT ( STDMETHODCALLTYPE *TransferContainerData2 )( + ISCPSecureExchange3 * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pProgressCallback, + /* [out] */ __RPC__out UINT *pfuReadyFlags, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *TransferContainerDataOnClearChannel )( + ISCPSecureExchange3 * This, + /* [in] */ __RPC__in_opt IMDSPDevice *pDevice, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pProgressCallback, + /* [out] */ __RPC__out UINT *pfuReadyFlags); + + HRESULT ( STDMETHODCALLTYPE *GetObjectDataOnClearChannel )( + ISCPSecureExchange3 * This, + /* [in] */ __RPC__in_opt IMDSPDevice *pDevice, + /* [size_is][out] */ __RPC__out_ecount_full(*pdwSize) BYTE *pData, + /* [out][in] */ __RPC__inout DWORD *pdwSize); + + HRESULT ( STDMETHODCALLTYPE *TransferCompleteForDevice )( + ISCPSecureExchange3 * This, + /* [in] */ __RPC__in_opt IMDSPDevice *pDevice); + + END_INTERFACE + } ISCPSecureExchange3Vtbl; + + interface ISCPSecureExchange3 + { + CONST_VTBL struct ISCPSecureExchange3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISCPSecureExchange3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISCPSecureExchange3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISCPSecureExchange3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISCPSecureExchange3_TransferContainerData(This,pData,dwSize,pfuReadyFlags,abMac) \ + ( (This)->lpVtbl -> TransferContainerData(This,pData,dwSize,pfuReadyFlags,abMac) ) + +#define ISCPSecureExchange3_ObjectData(This,pData,pdwSize,abMac) \ + ( (This)->lpVtbl -> ObjectData(This,pData,pdwSize,abMac) ) + +#define ISCPSecureExchange3_TransferComplete(This) \ + ( (This)->lpVtbl -> TransferComplete(This) ) + + +#define ISCPSecureExchange3_TransferContainerData2(This,pData,dwSize,pProgressCallback,pfuReadyFlags,abMac) \ + ( (This)->lpVtbl -> TransferContainerData2(This,pData,dwSize,pProgressCallback,pfuReadyFlags,abMac) ) + + +#define ISCPSecureExchange3_TransferContainerDataOnClearChannel(This,pDevice,pData,dwSize,pProgressCallback,pfuReadyFlags) \ + ( (This)->lpVtbl -> TransferContainerDataOnClearChannel(This,pDevice,pData,dwSize,pProgressCallback,pfuReadyFlags) ) + +#define ISCPSecureExchange3_GetObjectDataOnClearChannel(This,pDevice,pData,pdwSize) \ + ( (This)->lpVtbl -> GetObjectDataOnClearChannel(This,pDevice,pData,pdwSize) ) + +#define ISCPSecureExchange3_TransferCompleteForDevice(This,pDevice) \ + ( (This)->lpVtbl -> TransferCompleteForDevice(This,pDevice) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISCPSecureExchange3_INTERFACE_DEFINED__ */ + + +#ifndef __ISCPSession_INTERFACE_DEFINED__ +#define __ISCPSession_INTERFACE_DEFINED__ + +/* interface ISCPSession */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISCPSession; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("88a3e6ed-eee4-4619-bbb3-fd4fb62715d1") + ISCPSession : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE BeginSession( + /* [in] */ __RPC__in_opt IMDSPDevice *pIDevice, + /* [size_is][in] */ __RPC__in_ecount_full(dwSizeCtx) BYTE *pCtx, + /* [in] */ DWORD dwSizeCtx) = 0; + + virtual HRESULT STDMETHODCALLTYPE EndSession( + /* [size_is][in] */ __RPC__in_ecount_full(dwSizeCtx) BYTE *pCtx, + /* [in] */ DWORD dwSizeCtx) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSecureQuery( + /* [out] */ __RPC__deref_out_opt ISCPSecureQuery **ppSecureQuery) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISCPSessionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISCPSession * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISCPSession * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISCPSession * This); + + HRESULT ( STDMETHODCALLTYPE *BeginSession )( + ISCPSession * This, + /* [in] */ __RPC__in_opt IMDSPDevice *pIDevice, + /* [size_is][in] */ __RPC__in_ecount_full(dwSizeCtx) BYTE *pCtx, + /* [in] */ DWORD dwSizeCtx); + + HRESULT ( STDMETHODCALLTYPE *EndSession )( + ISCPSession * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSizeCtx) BYTE *pCtx, + /* [in] */ DWORD dwSizeCtx); + + HRESULT ( STDMETHODCALLTYPE *GetSecureQuery )( + ISCPSession * This, + /* [out] */ __RPC__deref_out_opt ISCPSecureQuery **ppSecureQuery); + + END_INTERFACE + } ISCPSessionVtbl; + + interface ISCPSession + { + CONST_VTBL struct ISCPSessionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISCPSession_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISCPSession_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISCPSession_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISCPSession_BeginSession(This,pIDevice,pCtx,dwSizeCtx) \ + ( (This)->lpVtbl -> BeginSession(This,pIDevice,pCtx,dwSizeCtx) ) + +#define ISCPSession_EndSession(This,pCtx,dwSizeCtx) \ + ( (This)->lpVtbl -> EndSession(This,pCtx,dwSizeCtx) ) + +#define ISCPSession_GetSecureQuery(This,ppSecureQuery) \ + ( (This)->lpVtbl -> GetSecureQuery(This,ppSecureQuery) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISCPSession_INTERFACE_DEFINED__ */ + + +#ifndef __ISCPSecureQuery3_INTERFACE_DEFINED__ +#define __ISCPSecureQuery3_INTERFACE_DEFINED__ + +/* interface ISCPSecureQuery3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISCPSecureQuery3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B7EDD1A2-4DAB-484b-B3C5-AD39B8B4C0B1") + ISCPSecureQuery3 : public ISCPSecureQuery2 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetRightsOnClearChannel( + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStgGlobals, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pProgressCallback, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE MakeDecisionOnClearChannel( + /* [in] */ UINT fuFlags, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwAppSec, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStorageGlobals, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pProgressCallback, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertAppLen) BYTE *pAppCertApp, + /* [in] */ DWORD dwAppCertAppLen, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertSPLen) BYTE *pAppCertSP, + /* [in] */ DWORD dwAppCertSPLen, + /* [size_is][size_is][string][out][in] */ __RPC__deref_inout_ecount_full_opt_string(*pdwRevocationURLLen) LPWSTR *pszRevocationURL, + /* [ref][out][in] */ __RPC__inout DWORD *pdwRevocationURLLen, + /* [out] */ __RPC__out DWORD *pdwRevocationBitFlag, + /* [unique][out][in] */ __RPC__inout_opt ULONGLONG *pqwFileSize, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [out] */ __RPC__deref_out_opt ISCPSecureExchange **ppExchange) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISCPSecureQuery3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISCPSecureQuery3 * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISCPSecureQuery3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISCPSecureQuery3 * This); + + HRESULT ( STDMETHODCALLTYPE *GetDataDemands )( + ISCPSecureQuery3 * This, + /* [out] */ __RPC__out UINT *pfuFlags, + /* [out] */ __RPC__out DWORD *pdwMinRightsData, + /* [out] */ __RPC__out DWORD *pdwMinExamineData, + /* [out] */ __RPC__out DWORD *pdwMinDecideData, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *ExamineData )( + ISCPSecureQuery3 * This, + /* [in] */ UINT fuFlags, + /* [unique][string][in] */ __RPC__in_opt LPWSTR pwszExtension, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *MakeDecision )( + ISCPSecureQuery3 * This, + /* [in] */ UINT fuFlags, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwAppSec, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStorageGlobals, + /* [out] */ __RPC__deref_out_opt ISCPSecureExchange **ppExchange, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetRights )( + ISCPSecureQuery3 * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStgGlobals, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *MakeDecision2 )( + ISCPSecureQuery3 * This, + /* [in] */ UINT fuFlags, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwAppSec, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStorageGlobals, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertAppLen) BYTE *pAppCertApp, + /* [in] */ DWORD dwAppCertAppLen, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertSPLen) BYTE *pAppCertSP, + /* [in] */ DWORD dwAppCertSPLen, + /* [size_is][size_is][string][out][in] */ __RPC__deref_inout_ecount_full_opt_string(*pdwRevocationURLLen) LPWSTR *pszRevocationURL, + /* [ref][out][in] */ __RPC__inout DWORD *pdwRevocationURLLen, + /* [out] */ __RPC__out DWORD *pdwRevocationBitFlag, + /* [unique][out][in] */ __RPC__inout_opt ULONGLONG *pqwFileSize, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [out] */ __RPC__deref_out_opt ISCPSecureExchange **ppExchange, + /* [out][in] */ __RPC__inout_ecount_full(WMDM_MAC_LENGTH) BYTE abMac[ 8 ]); + + HRESULT ( STDMETHODCALLTYPE *GetRightsOnClearChannel )( + ISCPSecureQuery3 * This, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStgGlobals, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pProgressCallback, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pnRightsCount) PWMDMRIGHTS *ppRights, + /* [out] */ __RPC__out UINT *pnRightsCount); + + HRESULT ( STDMETHODCALLTYPE *MakeDecisionOnClearChannel )( + ISCPSecureQuery3 * This, + /* [in] */ UINT fuFlags, + /* [size_is][in] */ __RPC__in_ecount_full(dwSize) BYTE *pData, + /* [in] */ DWORD dwSize, + /* [in] */ DWORD dwAppSec, + /* [size_is][in] */ __RPC__in_ecount_full(dwSessionKeyLen) BYTE *pbSPSessionKey, + /* [in] */ DWORD dwSessionKeyLen, + /* [in] */ __RPC__in_opt IMDSPStorageGlobals *pStorageGlobals, + /* [in] */ __RPC__in_opt IWMDMProgress3 *pProgressCallback, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertAppLen) BYTE *pAppCertApp, + /* [in] */ DWORD dwAppCertAppLen, + /* [size_is][in] */ __RPC__in_ecount_full(dwAppCertSPLen) BYTE *pAppCertSP, + /* [in] */ DWORD dwAppCertSPLen, + /* [size_is][size_is][string][out][in] */ __RPC__deref_inout_ecount_full_opt_string(*pdwRevocationURLLen) LPWSTR *pszRevocationURL, + /* [ref][out][in] */ __RPC__inout DWORD *pdwRevocationURLLen, + /* [out] */ __RPC__out DWORD *pdwRevocationBitFlag, + /* [unique][out][in] */ __RPC__inout_opt ULONGLONG *pqwFileSize, + /* [in] */ __RPC__in_opt IUnknown *pUnknown, + /* [out] */ __RPC__deref_out_opt ISCPSecureExchange **ppExchange); + + END_INTERFACE + } ISCPSecureQuery3Vtbl; + + interface ISCPSecureQuery3 + { + CONST_VTBL struct ISCPSecureQuery3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISCPSecureQuery3_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISCPSecureQuery3_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISCPSecureQuery3_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISCPSecureQuery3_GetDataDemands(This,pfuFlags,pdwMinRightsData,pdwMinExamineData,pdwMinDecideData,abMac) \ + ( (This)->lpVtbl -> GetDataDemands(This,pfuFlags,pdwMinRightsData,pdwMinExamineData,pdwMinDecideData,abMac) ) + +#define ISCPSecureQuery3_ExamineData(This,fuFlags,pwszExtension,pData,dwSize,abMac) \ + ( (This)->lpVtbl -> ExamineData(This,fuFlags,pwszExtension,pData,dwSize,abMac) ) + +#define ISCPSecureQuery3_MakeDecision(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,ppExchange,abMac) \ + ( (This)->lpVtbl -> MakeDecision(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,ppExchange,abMac) ) + +#define ISCPSecureQuery3_GetRights(This,pData,dwSize,pbSPSessionKey,dwSessionKeyLen,pStgGlobals,ppRights,pnRightsCount,abMac) \ + ( (This)->lpVtbl -> GetRights(This,pData,dwSize,pbSPSessionKey,dwSessionKeyLen,pStgGlobals,ppRights,pnRightsCount,abMac) ) + + +#define ISCPSecureQuery3_MakeDecision2(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,pAppCertApp,dwAppCertAppLen,pAppCertSP,dwAppCertSPLen,pszRevocationURL,pdwRevocationURLLen,pdwRevocationBitFlag,pqwFileSize,pUnknown,ppExchange,abMac) \ + ( (This)->lpVtbl -> MakeDecision2(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,pAppCertApp,dwAppCertAppLen,pAppCertSP,dwAppCertSPLen,pszRevocationURL,pdwRevocationURLLen,pdwRevocationBitFlag,pqwFileSize,pUnknown,ppExchange,abMac) ) + + +#define ISCPSecureQuery3_GetRightsOnClearChannel(This,pData,dwSize,pbSPSessionKey,dwSessionKeyLen,pStgGlobals,pProgressCallback,ppRights,pnRightsCount) \ + ( (This)->lpVtbl -> GetRightsOnClearChannel(This,pData,dwSize,pbSPSessionKey,dwSessionKeyLen,pStgGlobals,pProgressCallback,ppRights,pnRightsCount) ) + +#define ISCPSecureQuery3_MakeDecisionOnClearChannel(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,pProgressCallback,pAppCertApp,dwAppCertAppLen,pAppCertSP,dwAppCertSPLen,pszRevocationURL,pdwRevocationURLLen,pdwRevocationBitFlag,pqwFileSize,pUnknown,ppExchange) \ + ( (This)->lpVtbl -> MakeDecisionOnClearChannel(This,fuFlags,pData,dwSize,dwAppSec,pbSPSessionKey,dwSessionKeyLen,pStorageGlobals,pProgressCallback,pAppCertApp,dwAppCertAppLen,pAppCertSP,dwAppCertSPLen,pszRevocationURL,pdwRevocationURLLen,pdwRevocationBitFlag,pqwFileSize,pUnknown,ppExchange) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISCPSecureQuery3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_mswmdm_0000_0056 */ +/* [local] */ + +#define SAC_MAC_LEN 8 + + +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0056_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0056_v0_0_s_ifspec; + +#ifndef __IComponentAuthenticate_INTERFACE_DEFINED__ +#define __IComponentAuthenticate_INTERFACE_DEFINED__ + +/* interface IComponentAuthenticate */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IComponentAuthenticate; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A9889C00-6D2B-11d3-8496-00C04F79DBC0") + IComponentAuthenticate : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SACAuth( + /* [in] */ DWORD dwProtocolID, + /* [in] */ DWORD dwPass, + /* [size_is][in] */ __RPC__in_ecount_full(dwDataInLen) BYTE *pbDataIn, + /* [in] */ DWORD dwDataInLen, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwDataOutLen) BYTE **ppbDataOut, + /* [out] */ __RPC__out DWORD *pdwDataOutLen) = 0; + + virtual HRESULT STDMETHODCALLTYPE SACGetProtocols( + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwProtocolCount) DWORD **ppdwProtocols, + /* [out] */ __RPC__out DWORD *pdwProtocolCount) = 0; + + }; + +#else /* C style interface */ + + typedef struct IComponentAuthenticateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IComponentAuthenticate * This, + /* [in] */ __RPC__in REFIID riid, + /* [iid_is][out] */ + __RPC__deref_out void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IComponentAuthenticate * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IComponentAuthenticate * This); + + HRESULT ( STDMETHODCALLTYPE *SACAuth )( + IComponentAuthenticate * This, + /* [in] */ DWORD dwProtocolID, + /* [in] */ DWORD dwPass, + /* [size_is][in] */ __RPC__in_ecount_full(dwDataInLen) BYTE *pbDataIn, + /* [in] */ DWORD dwDataInLen, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwDataOutLen) BYTE **ppbDataOut, + /* [out] */ __RPC__out DWORD *pdwDataOutLen); + + HRESULT ( STDMETHODCALLTYPE *SACGetProtocols )( + IComponentAuthenticate * This, + /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pdwProtocolCount) DWORD **ppdwProtocols, + /* [out] */ __RPC__out DWORD *pdwProtocolCount); + + END_INTERFACE + } IComponentAuthenticateVtbl; + + interface IComponentAuthenticate + { + CONST_VTBL struct IComponentAuthenticateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IComponentAuthenticate_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IComponentAuthenticate_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IComponentAuthenticate_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IComponentAuthenticate_SACAuth(This,dwProtocolID,dwPass,pbDataIn,dwDataInLen,ppbDataOut,pdwDataOutLen) \ + ( (This)->lpVtbl -> SACAuth(This,dwProtocolID,dwPass,pbDataIn,dwDataInLen,ppbDataOut,pdwDataOutLen) ) + +#define IComponentAuthenticate_SACGetProtocols(This,ppdwProtocols,pdwProtocolCount) \ + ( (This)->lpVtbl -> SACGetProtocols(This,ppdwProtocols,pdwProtocolCount) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IComponentAuthenticate_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_mswmdm_0000_0057 */ +/* [local] */ + +const GUID EVENT_WMDM_CONTENT_TRANSFER = { 0x339C9BF4, 0xBCFE, 0x4ED8, { 0x94, 0xDF, 0xEA, 0xF8, 0xC2, 0x6A, 0xB6, 0x1B } }; + + +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0057_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mswmdm_0000_0057_v0_0_s_ifspec; + + +#ifndef __MSWMDMLib_LIBRARY_DEFINED__ +#define __MSWMDMLib_LIBRARY_DEFINED__ + +/* library MSWMDMLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_MSWMDMLib; + +EXTERN_C const CLSID CLSID_MediaDevMgrClassFactory; + +#ifdef __cplusplus + +class DECLSPEC_UUID("50040C1D-BDBF-4924-B873-F14D6C5BFD66") +MediaDevMgrClassFactory; +#endif + +EXTERN_C const CLSID CLSID_MediaDevMgr; + +#ifdef __cplusplus + +class DECLSPEC_UUID("25BAAD81-3560-11D3-8471-00C04F79DBC0") +MediaDevMgr; +#endif + +EXTERN_C const CLSID CLSID_WMDMDevice; + +#ifdef __cplusplus + +class DECLSPEC_UUID("807B3CDF-357A-11d3-8471-00C04F79DBC0") +WMDMDevice; +#endif + +EXTERN_C const CLSID CLSID_WMDMStorage; + +#ifdef __cplusplus + +class DECLSPEC_UUID("807B3CE0-357A-11d3-8471-00C04F79DBC0") +WMDMStorage; +#endif + +EXTERN_C const CLSID CLSID_WMDMStorageGlobal; + +#ifdef __cplusplus + +class DECLSPEC_UUID("807B3CE1-357A-11d3-8471-00C04F79DBC0") +WMDMStorageGlobal; +#endif + +EXTERN_C const CLSID CLSID_WMDMDeviceEnum; + +#ifdef __cplusplus + +class DECLSPEC_UUID("430E35AF-3971-11D3-8474-00C04F79DBC0") +WMDMDeviceEnum; +#endif + +EXTERN_C const CLSID CLSID_WMDMStorageEnum; + +#ifdef __cplusplus + +class DECLSPEC_UUID("EB401A3B-3AF7-11d3-8474-00C04F79DBC0") +WMDMStorageEnum; +#endif +#endif /* __MSWMDMLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); +unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); +unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); +void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); + +unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long *, unsigned long , LPSAFEARRAY * ); +unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long *, unsigned char *, LPSAFEARRAY * ); +unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); +void __RPC_USER LPSAFEARRAY_UserFree( unsigned long *, LPSAFEARRAY * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/Src/Plugins/Portable/pmp_p4s/mswmdm_i.c b/Src/Plugins/Portable/pmp_p4s/mswmdm_i.c new file mode 100644 index 00000000..6f05026a --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/mswmdm_i.c @@ -0,0 +1,269 @@ + + +/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ + +/* link this file in with the server and any clients */ + + + /* File created by MIDL compiler version 7.00.0498 */ +/* Compiler settings for mswmdm.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + + +#ifdef __cplusplus +extern "C"{ +#endif + + +#include <rpc.h> +#include <rpcndr.h> + +#ifdef _MIDL_USE_GUIDDEF_ + +#ifndef INITGUID +#define INITGUID +#include <guiddef.h> +#undef INITGUID +#else +#include <guiddef.h> +#endif + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) + +#else // !_MIDL_USE_GUIDDEF_ + +#ifndef __IID_DEFINED__ +#define __IID_DEFINED__ + +typedef struct _IID +{ + unsigned long x; + unsigned short s1; + unsigned short s2; + unsigned char c[8]; +} IID; + +#endif // __IID_DEFINED__ + +#ifndef CLSID_DEFINED +#define CLSID_DEFINED +typedef IID CLSID; +#endif // CLSID_DEFINED + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} + +#endif !_MIDL_USE_GUIDDEF_ + +MIDL_DEFINE_GUID(IID, IID_IWMDMMetaData,0xEC3B0663,0x0951,0x460a,0x9A,0x80,0x0D,0xCE,0xED,0x3C,0x04,0x3C); + + +MIDL_DEFINE_GUID(IID, IID_IWMDeviceManager,0x1DCB3A00,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDeviceManager2,0x923E5249,0x8731,0x4c5b,0x9B,0x1C,0xB8,0xB6,0x0B,0x6E,0x46,0xAF); + + +MIDL_DEFINE_GUID(IID, IID_IWMDeviceManager3,0xaf185c41,0x100d,0x46ed,0xbe,0x2e,0x9c,0xe8,0xc4,0x45,0x94,0xef); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMStorageGlobals,0x1DCB3A07,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMStorage,0x1DCB3A06,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMStorage2,0x1ED5A144,0x5CD5,0x4683,0x9E,0xFF,0x72,0xCB,0xDB,0x2D,0x95,0x33); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMStorage3,0x97717EEA,0x926A,0x464e,0x96,0xA4,0x24,0x7B,0x02,0x16,0x02,0x6E); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMStorage4,0xc225bac5,0xa03a,0x40b8,0x9a,0x23,0x91,0xcf,0x47,0x8c,0x64,0xa6); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMOperation,0x1DCB3A0B,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMOperation2,0x33445B48,0x7DF7,0x425c,0xAD,0x8F,0x0F,0xC6,0xD8,0x2F,0x9F,0x75); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMOperation3,0xd1f9b46a,0x9ca8,0x46d8,0x9d,0x0f,0x1e,0xc9,0xba,0xe5,0x49,0x19); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMProgress,0x1DCB3A0C,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMProgress2,0x3A43F550,0xB383,0x4e92,0xB0,0x4A,0xE6,0xBB,0xC6,0x60,0xFE,0xFC); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMProgress3,0x21DE01CB,0x3BB4,0x4929,0xB2,0x1A,0x17,0xAF,0x3F,0x80,0xF6,0x58); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMDevice,0x1DCB3A02,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMDevice2,0xE34F3D37,0x9D67,0x4fc1,0x92,0x52,0x62,0xD2,0x8B,0x2F,0x8B,0x55); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMDevice3,0x6c03e4fe,0x05db,0x4dda,0x9e,0x3c,0x06,0x23,0x3a,0x6d,0x5d,0x65); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMDeviceSession,0x82af0a65,0x9d96,0x412c,0x83,0xe5,0x3c,0x43,0xe4,0xb0,0x6c,0xc7); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMEnumDevice,0x1DCB3A01,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMDeviceControl,0x1DCB3A04,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMEnumStorage,0x1DCB3A05,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMStorageControl,0x1DCB3A08,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMStorageControl2,0x972C2E88,0xBD6C,0x4125,0x8E,0x09,0x84,0xF8,0x37,0xE6,0x37,0xB6); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMStorageControl3,0xB3266365,0xD4F3,0x4696,0x8D,0x53,0xBD,0x27,0xEC,0x60,0x99,0x3A); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMObjectInfo,0x1DCB3A09,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMRevoked,0xEBECCEDB,0x88EE,0x4e55,0xB6,0xA4,0x8D,0x9F,0x07,0xD6,0x96,0xAA); + + +MIDL_DEFINE_GUID(IID, IID_IWMDMNotification,0x3F5E95C0,0x0F43,0x4ed4,0x93,0xD2,0xC8,0x9A,0x45,0xD5,0x9B,0x81); + + +MIDL_DEFINE_GUID(IID, IID_IMDServiceProvider,0x1DCB3A10,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IMDServiceProvider2,0xB2FA24B7,0xCDA3,0x4694,0x98,0x62,0x41,0x3A,0xE1,0xA3,0x48,0x19); + + +MIDL_DEFINE_GUID(IID, IID_IMDServiceProvider3,0x4ed13ef3,0xa971,0x4d19,0x9f,0x51,0x0e,0x18,0x26,0xb2,0xda,0x57); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPEnumDevice,0x1DCB3A11,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPDevice,0x1DCB3A12,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPDevice2,0x420D16AD,0xC97D,0x4e00,0x82,0xAA,0x00,0xE9,0xF4,0x33,0x5D,0xDD); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPDevice3,0x1a839845,0xfc55,0x487c,0x97,0x6f,0xee,0x38,0xac,0x0e,0x8c,0x4e); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPDeviceControl,0x1DCB3A14,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPEnumStorage,0x1DCB3A15,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPStorage,0x1DCB3A16,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPStorage2,0x0A5E07A5,0x6454,0x4451,0x9C,0x36,0x1C,0x6A,0xE7,0xE2,0xB1,0xD6); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPStorage3,0x6C669867,0x97ED,0x4a67,0x97,0x06,0x1C,0x55,0x29,0xD2,0xA4,0x14); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPStorage4,0x3133b2c4,0x515c,0x481b,0xb1,0xce,0x39,0x32,0x7e,0xcb,0x4f,0x74); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPStorageGlobals,0x1DCB3A17,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPObjectInfo,0x1DCB3A19,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPObject,0x1DCB3A18,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPObject2,0x3f34cd3e,0x5907,0x4341,0x9a,0xf9,0x97,0xf4,0x18,0x7c,0x3a,0xa5); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPDirectTransfer,0xc2fe57a8,0x9304,0x478c,0x9e,0xe4,0x47,0xe3,0x97,0xb9,0x12,0xd7); + + +MIDL_DEFINE_GUID(IID, IID_IMDSPRevoked,0xA4E8F2D4,0x3F31,0x464d,0xB5,0x3D,0x4F,0xC3,0x35,0x99,0x81,0x84); + + +MIDL_DEFINE_GUID(IID, IID_ISCPSecureAuthenticate,0x1DCB3A0F,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_ISCPSecureAuthenticate2,0xB580CFAE,0x1672,0x47e2,0xAC,0xAA,0x44,0xBB,0xEC,0xBC,0xAE,0x5B); + + +MIDL_DEFINE_GUID(IID, IID_ISCPSecureQuery,0x1DCB3A0D,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_ISCPSecureQuery2,0xEBE17E25,0x4FD7,0x4632,0xAF,0x46,0x6D,0x93,0xD4,0xFC,0xC7,0x2E); + + +MIDL_DEFINE_GUID(IID, IID_ISCPSecureExchange,0x1DCB3A0E,0x33ED,0x11d3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, IID_ISCPSecureExchange2,0x6C62FC7B,0x2690,0x483F,0x9D,0x44,0x0A,0x20,0xCB,0x35,0x57,0x7C); + + +MIDL_DEFINE_GUID(IID, IID_ISCPSecureExchange3,0xab4e77e4,0x8908,0x4b17,0xbd,0x2a,0xb1,0xdb,0xe6,0xdd,0x69,0xe1); + + +MIDL_DEFINE_GUID(IID, IID_ISCPSession,0x88a3e6ed,0xeee4,0x4619,0xbb,0xb3,0xfd,0x4f,0xb6,0x27,0x15,0xd1); + + +MIDL_DEFINE_GUID(IID, IID_ISCPSecureQuery3,0xB7EDD1A2,0x4DAB,0x484b,0xB3,0xC5,0xAD,0x39,0xB8,0xB4,0xC0,0xB1); + + +MIDL_DEFINE_GUID(IID, IID_IComponentAuthenticate,0xA9889C00,0x6D2B,0x11d3,0x84,0x96,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(IID, LIBID_MSWMDMLib,0x6EC6C744,0x355F,0x11D3,0x84,0x70,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(CLSID, CLSID_MediaDevMgrClassFactory,0x50040C1D,0xBDBF,0x4924,0xB8,0x73,0xF1,0x4D,0x6C,0x5B,0xFD,0x66); + + +MIDL_DEFINE_GUID(CLSID, CLSID_MediaDevMgr,0x25BAAD81,0x3560,0x11D3,0x84,0x71,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(CLSID, CLSID_WMDMDevice,0x807B3CDF,0x357A,0x11d3,0x84,0x71,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(CLSID, CLSID_WMDMStorage,0x807B3CE0,0x357A,0x11d3,0x84,0x71,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(CLSID, CLSID_WMDMStorageGlobal,0x807B3CE1,0x357A,0x11d3,0x84,0x71,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(CLSID, CLSID_WMDMDeviceEnum,0x430E35AF,0x3971,0x11D3,0x84,0x74,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + + +MIDL_DEFINE_GUID(CLSID, CLSID_WMDMStorageEnum,0xEB401A3B,0x3AF7,0x11d3,0x84,0x74,0x00,0xC0,0x4F,0x79,0xDB,0xC0); + +#undef MIDL_DEFINE_GUID + +#ifdef __cplusplus +} +#endif + + + diff --git a/Src/Plugins/Portable/pmp_p4s/pmp_p4s.rc b/Src/Plugins/Portable/pmp_p4s/pmp_p4s.rc new file mode 100644 index 00000000..4c0344b6 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/pmp_p4s.rc @@ -0,0 +1,91 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource1.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource1.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""version.rc2""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_NULLSOFT_P4S_PLUGIN "Nullsoft PlaysForSure Plug-in v%s" + 65535 "{01C3E74C-261E-45e2-AA30-ED4039DCD3A2}" +END + +STRINGTABLE +BEGIN + IDS_TRANSFERRING_PERCENT "Transferring %d%%" + IDS_LOADING "Loading %s..." + IDS_COUND_NOT_CREATE_FOLDER "Error: Could not create folder on device" + IDS_COULD_NOT_CREATE_METADATA "Error: Could not create metadata: %x" + IDS_INCOMPATABLE_DEVICE "Incompatable device" + IDS_ERROR_IN_INSERT "Error in Insert: %x" + IDS_UNSPECIFIED_ERROR "Unspecified Error" + IDS_WAITING_FOR_OTHER_TRANSFERS "Waiting for other transfers to finish..." + IDS_TRANSFERRING "Transferring..." + IDS_DONE "Done" + IDS_WAITING "Waiting..." + IDS_FAILED "Failed" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "version.rc2" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Src/Plugins/Portable/pmp_p4s/pmp_p4s.vcxproj b/Src/Plugins/Portable/pmp_p4s/pmp_p4s.vcxproj new file mode 100644 index 00000000..60109e81 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/pmp_p4s.vcxproj @@ -0,0 +1,434 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <VCProjectVersion>17.0</VCProjectVersion> + <ProjectGuid>{2EAD12FA-51FE-4AB6-A0C8-3952209AA81F}</ProjectGuid> + <RootNamespace>pmp_p4s</RootNamespace> + <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <UseOfMfc>false</UseOfMfc> + <UseOfAtl>false</UseOfAtl> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <UseOfMfc>false</UseOfMfc> + <UseOfAtl>false</UseOfAtl> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <UseOfMfc>false</UseOfMfc> + <UseOfAtl>false</UseOfAtl> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <UseOfMfc>false</UseOfMfc> + <UseOfAtl>false</UseOfAtl> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>17.0.32505.173</_ProjectFileVersion> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + <LinkIncremental>false</LinkIncremental> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>false</LinkIncremental> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + <LinkIncremental>false</LinkIncremental> + <GenerateManifest>false</GenerateManifest> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + <GenerateManifest>false</GenerateManifest> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + </PropertyGroup> + <PropertyGroup Label="Vcpkg"> + <VcpkgEnableManifest>false</VcpkgEnableManifest> + </PropertyGroup> + <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <VcpkgInstalledDir> + </VcpkgInstalledDir> + <VcpkgUseStatic>false</VcpkgUseStatic> + <VcpkgConfiguration>Debug</VcpkgConfiguration> + <VcpkgTriplet>x86-windows-static-md</VcpkgTriplet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Vcpkg"> + <VcpkgInstalledDir> + </VcpkgInstalledDir> + <VcpkgUseStatic>false</VcpkgUseStatic> + <VcpkgTriplet>x86-windows-static-md</VcpkgTriplet> + <VcpkgConfiguration>Debug</VcpkgConfiguration> + </PropertyGroup> + <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <VcpkgInstalledDir> + </VcpkgInstalledDir> + <VcpkgUseStatic>false</VcpkgUseStatic> + <VcpkgTriplet>x86-windows-static-md</VcpkgTriplet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Vcpkg"> + <VcpkgInstalledDir> + </VcpkgInstalledDir> + <VcpkgUseStatic>false</VcpkgUseStatic> + <VcpkgTriplet>x86-windows-static-md</VcpkgTriplet> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>false</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>$(IntDir)$(TargetName).tlb</TypeLibraryName> + <HeaderFileName /> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\..\replicant;..\..\..\Wasabi;..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ML_ex_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <PrecompiledHeader /> + <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> + <ObjectFileName>$(IntDir)</ObjectFileName> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x040c</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>sehupd.lib;mssachlp.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>tataki.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <GenerateMapFile>false</GenerateMapFile> + <MapExports>false</MapExports> + <BaseAddress>0x14C00000</BaseAddress> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention /> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <MapFileName>$(IntDir)$(TargetName).map</MapFileName> + </Link> + <PostBuildEvent> + <Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ +xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command> + <Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>false</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>$(IntDir)$(TargetName).tlb</TypeLibraryName> + <HeaderFileName> + </HeaderFileName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\..\replicant;..\..\..\Wasabi;..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ML_ex_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> + <ObjectFileName>$(IntDir)</ObjectFileName> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x040c</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>sehupd.lib;mssachlp.lib;fmtd.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>tataki.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <GenerateMapFile>false</GenerateMapFile> + <MapExports>false</MapExports> + <BaseAddress>0x14C00000</BaseAddress> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + <AdditionalLibraryDirectories>..\..\..\external_dependencies\vcpkg\buildtrees\fmt\$(PlatformShortName)-windows-dbg;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <MapFileName>$(IntDir)$(TargetName).map</MapFileName> + </Link> + <PostBuildEvent> + <Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ +xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command> + <Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>$(IntDir)$(TargetName).tlb</TypeLibraryName> + <HeaderFileName /> + </Midl> + <ClCompile> + <Optimization>MinSpace</Optimization> + <FavorSizeOrSpeed>Size</FavorSizeOrSpeed> + <AdditionalIncludeDirectories>..\..\..\replicant;..\..\..\Wasabi;..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ML_ex_EXPORTS;UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader /> + <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> + <ObjectFileName>$(IntDir)</ObjectFileName> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>None</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x040c</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>sehupd.lib;mssachlp.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>tataki.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>false</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <MapFileName>$(IntDir)$(TargetName).map</MapFileName> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + <PostBuildEvent> + <Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command> + <Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>$(IntDir)$(TargetName).tlb</TypeLibraryName> + <HeaderFileName> + </HeaderFileName> + </Midl> + <ClCompile> + <Optimization>MinSpace</Optimization> + <FavorSizeOrSpeed>Size</FavorSizeOrSpeed> + <AdditionalIncludeDirectories>..\..\..\replicant;..\..\..\Wasabi;..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ML_ex_EXPORTS;UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> + <ObjectFileName>$(IntDir)</ObjectFileName> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>None</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x040c</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>sehupd.lib;mssachlp.lib;fmt.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>tataki.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>false</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <MapFileName>$(IntDir)$(TargetName).map</MapFileName> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + <AdditionalLibraryDirectories>..\..\..\external_dependencies\vcpkg\buildtrees\fmt\$(PlatformShortName)-windows-rel;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + <PostBuildEvent> + <Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command> + <Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\tataki\tataki.vcxproj"> + <Project>{255b68b5-7ef8-45ef-a675-2d6b88147909}</Project> + <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies> + <ReferenceOutputAssembly>true</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\..\..\Wasabi\bfc\bfc.vcxproj"> + <Project>{d0ec862e-dddd-4f4f-934f-b75dc9062dc1}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\Wasabi\Wasabi.vcxproj"> + <Project>{3e0bfa8a-b86a-42e9-a33f-ec294f823f7f}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\WAT\WAT.vcxproj"> + <Project>{c5714908-a71f-4644-bd95-aad8ee7914da}</Project> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\General\gen_ml\itemlist.cpp" /> + <ClCompile Include="..\..\General\gen_ml\ml_lib.cpp" /> + <ClCompile Include="deviceprovider.cpp" /> + <ClCompile Include="key-sub-523.c" /> + <ClCompile Include="main.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ML_ex_EXPORTS</PreprocessorDefinitions> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ML_ex_EXPORTS</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ML_ex_EXPORTS</PreprocessorDefinitions> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ML_ex_EXPORTS</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="MyProgress.cpp" /> + <ClCompile Include="P4SDevice.cpp" /> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="mssachlp.lib" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\General\gen_ml\itemlist.h" /> + <ClInclude Include="..\..\General\gen_ml\ml.h" /> + <ClInclude Include="..\..\Library\ml_pmp\AutoChar.h" /> + <ClInclude Include="..\..\Library\ml_pmp\AutoWide.h" /> + <ClInclude Include="..\..\Library\ml_pmp\pmp.h" /> + <ClInclude Include="deviceprovider.h" /> + <ClInclude Include="mswmdm.h" /> + <ClInclude Include="MyProgress.h" /> + <ClInclude Include="P4SDevice.h" /> + <ClInclude Include="resource1.h" /> + </ItemGroup> + <ItemGroup> + <Image Include="resources\creativeZenIcon.png" /> + <Image Include="resources\nokiaIcon.png" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="pmp_p4s.rc" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/pmp_p4s.vcxproj.filters b/Src/Plugins/Portable/pmp_p4s/pmp_p4s.vcxproj.filters new file mode 100644 index 00000000..0ee77cc5 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/pmp_p4s.vcxproj.filters @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{26c4de59-6800-4e2e-ae56-f878113f2e65}</UniqueIdentifier> + <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{c6299fac-f519-4ddb-9e8d-125e8f8a9fd0}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{584fb53f-22c8-454e-b344-1b279c0f2448}</UniqueIdentifier> + <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions> + </Filter> + <Filter Include="Image Files"> + <UniqueIdentifier>{8d672363-3c3f-4b3c-abdf-fa0e9c29023d}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="deviceprovider.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="key-sub-523.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="main.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="MyProgress.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="P4SDevice.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\General\gen_ml\itemlist.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\General\gen_ml\ml_lib.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="deviceprovider.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="mswmdm.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="MyProgress.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="P4SDevice.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="resource1.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\General\gen_ml\itemlist.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\General\gen_ml\ml.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\Library\ml_pmp\AutoChar.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\Library\ml_pmp\AutoWide.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\Library\ml_pmp\pmp.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <Image Include="resources\nokiaIcon.png"> + <Filter>Image Files</Filter> + </Image> + <Image Include="resources\creativeZenIcon.png"> + <Filter>Image Files</Filter> + </Image> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="pmp_p4s.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="mssachlp.lib"> + <Filter>Resource Files</Filter> + </CustomBuild> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/resource1.h b/Src/Plugins/Portable/pmp_p4s/resource1.h new file mode 100644 index 00000000..eebb7234 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/resource1.h @@ -0,0 +1,31 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by pmp_p4s1.rc +// +#define IDS_TRANSFERRING_PERCENT 1 +#define IDS_LOADING 2 +#define IDS_COUND_NOT_CREATE_FOLDER 3 +#define IDS_COULD_NOT_CREATE_METADATA 4 +#define IDS_INCOMPATIBLE_DEVICE 5 +#define IDS_INCOMPATABLE_DEVICE 5 +#define IDS_ERROR_IN_INSERT 6 +#define IDS_UNSPECIFIED_ERROR 7 +#define IDS_WAITING_FOR_OTHER_TRANSFERS 8 +#define IDS_TRANSFERRING 9 +#define IDS_DONE 10 +#define IDS_WAITING 11 +#define IDS_FAILED 12 +#define IDR_CREATIVE_ZEN_ICON 102 +#define IDR_NOKIA_ICON 103 +#define IDS_NULLSOFT_P4S_PLUGIN 65534 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 107 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/Src/Plugins/Portable/pmp_p4s/resources/creativeZenIcon.png b/Src/Plugins/Portable/pmp_p4s/resources/creativeZenIcon.png Binary files differnew file mode 100644 index 00000000..7352c626 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/resources/creativeZenIcon.png diff --git a/Src/Plugins/Portable/pmp_p4s/resources/nokiaIcon.png b/Src/Plugins/Portable/pmp_p4s/resources/nokiaIcon.png Binary files differnew file mode 100644 index 00000000..b050357e --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/resources/nokiaIcon.png diff --git a/Src/Plugins/Portable/pmp_p4s/sac.h b/Src/Plugins/Portable/pmp_p4s/sac.h new file mode 100644 index 00000000..c1e3c267 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/sac.h @@ -0,0 +1,26 @@ +// +// Microsoft Windows Media Technologies +// Copyright (c) Microsoft Corporation. All rights reserved. +// + +#ifndef __SAC_H__ +#define __SAC_H__ + +typedef DWORD HMAC; + +#define RSA_KEY_LEN 64 +#define SAC_SESSION_KEYLEN 8 + +#define SAC_PROTOCOL_WMDM 1 +#define SAC_PROTOCOL_V1 2 + +#define SAC_CERT_X509 1 +#define SAC_CERT_V1 2 + +typedef struct __MACINFO +{ + BOOL fUsed; + BYTE abMacState[36]; +} MACINFO; + +#endif //__SAC_H__
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/scclient.h b/Src/Plugins/Portable/pmp_p4s/scclient.h new file mode 100644 index 00000000..9a181e7b --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/scclient.h @@ -0,0 +1,73 @@ +// +// Microsoft Windows Media Technologies +// Copyright (c) Microsoft Corporation. All rights reserved. +// + +#ifndef _CSECURECHANNELCLIENT_H_2AD99356_6FD2_11d3_8497_00C04F79DBC0 +#define _CSECURECHANNELCLIENT_H_2AD99356_6FD2_11d3_8497_00C04F79DBC0 + +#include "wtypes.h" + +#ifdef USE_X509 +#include "rsa.h" +#endif + +#ifdef USE_X509 +#include "x509cert.h" +#endif + +#include "sac.h" + +class CSecureChannelClient +{ +public: + CSecureChannelClient(); + ~CSecureChannelClient(); + HRESULT SetCertificate(DWORD dwFlags, + BYTE *pbAppCert, + DWORD dwCertLen, + BYTE *pbAppPVK, + DWORD dwPVKLen); + void SetInterface(IComponentAuthenticate *pComponentAuth); + HRESULT Authenticate(DWORD dwProtocolID); + HRESULT EncryptParam(BYTE *pbData, + DWORD dwDataLen); + HRESULT DecryptParam(BYTE *pbData, + DWORD dwDataLen); + HRESULT MACInit(HMAC *phMAC); + HRESULT MACUpdate(HMAC hMAC, + BYTE *pbData, + DWORD dwDataLen); + HRESULT MACFinal(HMAC hMAC, + BYTE abData[SAC_MAC_LEN]); + HRESULT GetAppSec(DWORD *pdwLocalAppSec, DWORD *pdwRemoteAppSec); + HRESULT SetSessionKey(BYTE *pbSPSessionKey); + HRESULT GetSessionKey(BYTE *pbSPSessionKey); + HRESULT GetRemoteAppCert(BYTE *pbAppCert, DWORD* pdwCertLen); + BOOL fIsAuthenticated(); +private: + BOOL m_fAuthenticated; + BYTE *m_pbAppCert; + DWORD m_dwCertLen; + BYTE *m_pbRemoteCert; + DWORD m_dwRemoteCertLen; + BYTE *m_pbAppPVK; + DWORD m_dwPVKLen; + BYTE *m_pbSessionKey; + DWORD m_dwSessionKeyLen; + BOOL m_TableInit; + unsigned long m_DesTable[32]; + IComponentAuthenticate *m_pAuth; + DWORD m_dwCertFlags; +#ifdef USE_X509 + CX509Cert m_CertObj; +#endif + MACINFO aMacInfo[20]; + BYTE m_abMacKey[64]; + BOOL m_fMacKeyInit; + CRITICAL_SECTION m_CS; + HRESULT Protocol1(); + HRESULT Protocol2(); +}; + +#endif // _CSECURECHANNELCLIENT_H_2AD99356-6FD2-11d3-8497-00C04F79DBC0
\ No newline at end of file diff --git a/Src/Plugins/Portable/pmp_p4s/sehupd.lib b/Src/Plugins/Portable/pmp_p4s/sehupd.lib Binary files differnew file mode 100644 index 00000000..a9ebd938 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/sehupd.lib diff --git a/Src/Plugins/Portable/pmp_p4s/version.rc2 b/Src/Plugins/Portable/pmp_p4s/version.rc2 new file mode 100644 index 00000000..cb0e4351 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/version.rc2 @@ -0,0 +1,39 @@ + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// +#include "../../../Winamp/buildType.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,99,1,0 + PRODUCTVERSION WINAMP_PRODUCTVER + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Winamp SA" + VALUE "FileDescription", "Winamp Portable Device Plug-in" + VALUE "FileVersion", "0,99,1,0" + VALUE "InternalName", "Nullsoft PlaysForSure" + VALUE "LegalCopyright", "Copyright © 2006-2023 Winamp SA" + VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA" + VALUE "OriginalFilename", "pmp_p4s.dll" + VALUE "ProductName", "Winamp" + VALUE "ProductVersion", STR_WINAMP_PRODUCTVER + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/Src/Plugins/Portable/pmp_p4s/wmdm.chm b/Src/Plugins/Portable/pmp_p4s/wmdm.chm Binary files differnew file mode 100644 index 00000000..5b8bea70 --- /dev/null +++ b/Src/Plugins/Portable/pmp_p4s/wmdm.chm |