windows-nt/Source/XPSP1/NT/shell/inc/mediautil.h
2020-09-26 16:20:57 +08:00

35 lines
1.3 KiB
C++

// mediautil.h: media bar utility routines that need to be shared between shdocvw & browseui
#ifndef _MEDIAUTIL_H_
#define _MEDIAUTIL_H_
//+----------------------------------------------------------------------------------------
// CMediaBarUtil
//-----------------------------------------------------------------------------------------
class CMediaBarUtil
{
public:
CMediaBarUtil() {}
~CMediaBarUtil() {}
// Reg helpers
static HRESULT SetMediaRegValue(LPWSTR pstrName, DWORD dwRegDataType, void *pvData, DWORD cbData, BOOL fMime = FALSE);
static HUSKEY GetMediaRegKey();
static HUSKEY GetMimeRegKey();
static HUSKEY OpenRegKey(TCHAR * pchName);
static HRESULT CloseRegKey(HUSKEY hUSKey);
static HRESULT IsRegValueTrue(HUSKEY hUSKey, TCHAR * pchName, BOOL * pfValue);
static BOOL GetImplicitMediaRegValue(TCHAR * pchName);
static BOOL GetAutoplay();
static BOOL GetAutoplayPrompt();
static HRESULT ToggleAutoplay(BOOL fOn);
static HRESULT ToggleAutoplayPrompting(BOOL fOn);
static BOOL IsRecognizedMime(BSTR bstrMime);
static HRESULT ShouldPlay(TCHAR * szMime, BOOL * pfShouldPlay);
static BOOL IsWMP7OrGreaterCapable();
static BOOL IsWMP7OrGreaterInstalled();
};
#endif // _MEDIAUTIL_H_