ReactOS 0.4.16-dev-1475-g410db43
shlwapi_undoc.h File Reference
#include <winreg.h>
Include dependency graph for shlwapi_undoc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagPOLICYDATA
 

Macros

#define ASSOCQUERY_LOWORD_MASK   0x0000FFFF
 
#define ASSOCQUERY_STRING   0x00010000
 
#define ASSOCQUERY_EXISTS   0x00020000
 
#define ASSOCQUERY_DIRECT   0x00040000
 
#define ASSOCQUERY_DWORD   0x00080000
 
#define ASSOCQUERY_INDIRECT   0x00100000
 
#define ASSOCQUERY_OBJECT   0x00200000
 
#define ASSOCQUERY_GUID   0x00400000
 
#define ASSOCQUERY_EXTRA_NON_VERB   0x01000000
 
#define ASSOCQUERY_EXTRA_VERB   0x02000000
 
#define ASSOCQUERY_SIGNIFICANCE   0x04000000
 
#define ASSOCQUERY_FALLBACK   0x80000000
 
#define SHELL_NO_POLICY   ((DWORD)-1)
 
#define SHELL_GCOUNTER_DEFINE_GUID(name, a, b, c, d, e, f, g, h, i, j, k)   const GUID name = { a, b, c, { d, e, f, g, h, i, j, k } }
 
#define SHELL_GCOUNTER_DEFINE_HANDLE(name)   HANDLE name = NULL
 
#define SHELL_GCOUNTER_PARAMETERS(handle, id)   handle
 
#define SHELL_GlobalCounterCreate(refguid, handle)
 
#define SHELL_GlobalCounterIsInitialized(handle)   ( (handle) != NULL )
 
#define SHELL_GlobalCounterGet(handle)   SHGlobalCounterGetValue(handle)
 
#define SHELL_GlobalCounterIncrement(handle)   SHGlobalCounterIncrement(handle)
 
#define SHELL_GCOUNTER_DECLAREPARAMETERS(handle, id)   SHELL_GCOUNTER_PARAMETERS(HANDLE handle, SHGLOBALCOUNTER id)
 
#define SHAboutInfo   SHAboutInfoA
 
#define SHExpandEnvironmentStrings   SHExpandEnvironmentStringsA
 
#define SHCreateWorkerWindow   SHCreateWorkerWindowA
 
#define SHGetValueGoodBoot   SHGetValueGoodBootA
 
#define SHLoadRegUIString   SHLoadRegUIStringA
 
#define WHICH_PIF   (1 << 0)
 
#define WHICH_COM   (1 << 1)
 
#define WHICH_EXE   (1 << 2)
 
#define WHICH_BAT   (1 << 3)
 
#define WHICH_LNK   (1 << 4)
 
#define WHICH_CMD   (1 << 5)
 
#define WHICH_OPTIONAL   (1 << 6)
 
#define WHICH_DEFAULT   (WHICH_PIF | WHICH_COM | WHICH_EXE | WHICH_BAT | WHICH_LNK | WHICH_CMD)
 
#define PATH_CHAR_CLASS_LETTER   0x00000001
 
#define PATH_CHAR_CLASS_ASTERIX   0x00000002
 
#define PATH_CHAR_CLASS_DOT   0x00000004
 
#define PATH_CHAR_CLASS_BACKSLASH   0x00000008
 
#define PATH_CHAR_CLASS_COLON   0x00000010
 
#define PATH_CHAR_CLASS_SEMICOLON   0x00000020
 
#define PATH_CHAR_CLASS_COMMA   0x00000040
 
#define PATH_CHAR_CLASS_SPACE   0x00000080
 
#define PATH_CHAR_CLASS_OTHER_VALID   0x00000100
 
#define PATH_CHAR_CLASS_DOUBLEQUOTE   0x00000200
 
#define PATH_CHAR_CLASS_INVALID   0x00000000
 
#define PATH_CHAR_CLASS_ANY   0xffffffff
 
#define SHACF_CONTEXTMENU   0x00000001
 
#define SHACF_FLUSHNOWAITALWAYS   SHACF_CONTEXTMENU
 
#define SHACF_DOCOBJECT   0x00000002
 
#define SHACF_CORELINTERNETENUM   0x00000004
 
#define SHACF_OLDCREATEVIEWWND   SHACF_CORELINTERNETENUM
 
#define SHACF_WIN95DEFVIEW   SHACF_CORELINTERNETENUM
 
#define SHACF_MYCOMPUTERFIRST   0x00000008
 
#define SHACF_OLDREGITEMGDN   0x00000010
 
#define SHACF_LOADCOLUMNHANDLER   0x00000040
 
#define SHACF_ANSI   0x00000080
 
#define SHACF_UNKNOWN1   0x00000100
 
#define SHACF_WIN95SHLEXEC   0x00000200
 
#define SHACF_STAROFFICE5PRINTER   0x00000400
 
#define SHACF_NOVALIDATEFSIDS   0x00000800
 
#define SHACF_FILEOPENNEEDSEXT   0x00001000
 
#define SHACF_WIN95BINDTOOBJECT   0x00002000
 
#define SHACF_IGNOREENUMRESET   0x00004000
 
#define SHACF_ANSIDISPLAYNAMES   0x00010000
 
#define SHACF_FILEOPENBOGUSCTRLID   0x00020000
 
#define SHACF_FORCELFNIDLIST   0x00040000
 
#define SHACF_UNKNOWN2   0x01000000
 
#define SHACF_UNKNOWN3   0x80000000
 
#define INTERFACE   IAssociationElementOld
 

Typedefs

typedef DWORD ASSOCQUERY
 
typedef struct tagPOLICYDATA POLICYDATA
 
typedef struct tagPOLICYDATALPPOLICYDATA
 

Enumerations

enum  _shellkey_flags {
  SHKEY_Root_HKCU = 0x1 , SHKEY_Root_HKLM = 0x2 , SHKEY_Key_Explorer = 0x00 , SHKEY_Key_Shell = 0x10 ,
  SHKEY_Key_ShellNoRoam = 0x20 , SHKEY_Key_Classes = 0x30 , SHKEY_Subkey_Default = 0x0000 , SHKEY_Subkey_ResourceName = 0x1000 ,
  SHKEY_Subkey_Handlers = 0x2000 , SHKEY_Subkey_Associations = 0x3000 , SHKEY_Subkey_Volatile = 0x4000 , SHKEY_Subkey_MUICache = 0x5000 ,
  SHKEY_Subkey_FileExts = 0x6000 , SHKEY_Root_HKCU = 0x1 , SHKEY_Root_HKLM = 0x2 , SHKEY_Key_Explorer = 0x00 ,
  SHKEY_Key_Shell = 0x10 , SHKEY_Key_ShellNoRoam = 0x20 , SHKEY_Key_Classes = 0x30 , SHKEY_Subkey_Default = 0x0000 ,
  SHKEY_Subkey_ResourceName = 0x1000 , SHKEY_Subkey_Handlers = 0x2000 , SHKEY_Subkey_Associations = 0x3000 , SHKEY_Subkey_Volatile = 0x4000 ,
  SHKEY_Subkey_MUICache = 0x5000 , SHKEY_Subkey_FileExts = 0x6000
}
 

Functions

HANDLE WINAPI SHGlobalCounterCreate (REFGUID guid)
 
PVOID WINAPI SHInterlockedCompareExchange (PVOID *dest, PVOID xchg, PVOID compare)
 
LONG WINAPI SHGlobalCounterGetValue (HANDLE hGlobalCounter)
 
LONG WINAPI SHGlobalCounterIncrement (HANDLE hGlobalCounter)
 
DWORD WINAPI SHRestrictionLookup (_In_ DWORD policy, _In_ LPCWSTR key, _In_ const POLICYDATA *polTable, _Inout_ LPDWORD polArr)
 
BOOL WINAPI SHAboutInfoA (LPSTR lpszDest, DWORD dwDestLen)
 
BOOL WINAPI SHAboutInfoW (LPWSTR lpszDest, DWORD dwDestLen)
 
HRESULT WINAPI CLSIDFromStringWrap (_In_ LPCWSTR idstr, _Out_ CLSID *id)
 
HMODULE WINAPI SHPinDllOfCLSID (REFIID refiid)
 
HRESULT WINAPI IUnknown_QueryStatus (IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
 
HRESULT WINAPI IUnknown_Exec (IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
LONG WINAPI SHSetWindowBits (HWND hwnd, INT offset, UINT wMask, UINT wFlags)
 
HWND WINAPI SHSetParentHwnd (HWND hWnd, HWND hWndParent)
 
HRESULT WINAPI ConnectToConnectionPoint (IUnknown *lpUnkSink, REFIID riid, BOOL bAdviseOnly, IUnknown *lpUnknown, LPDWORD lpCookie, IConnectionPoint **lppCP)
 
BOOL WINAPI SHIsSameObject (IUnknown *lpInt1, IUnknown *lpInt2)
 
BOOL WINAPI SHLoadMenuPopup (HINSTANCE hInst, LPCWSTR szName)
 
void WINAPI SHPropagateMessage (HWND hWnd, UINT uiMsgId, WPARAM wParam, LPARAM lParam, BOOL bSend)
 
DWORD WINAPI SHRemoveAllSubMenus (HMENU hMenu)
 
UINT WINAPI SHEnableMenuItem (HMENU hMenu, UINT wItemID, BOOL bEnable)
 
DWORD WINAPI SHCheckMenuItem (HMENU hMenu, UINT uID, BOOL bCheck)
 
DWORD WINAPI SHRegisterClassA (WNDCLASSA *wndclass)
 
BOOL WINAPI SHSimulateDrop (IDropTarget *pDrop, IDataObject *pDataObj, DWORD grfKeyState, PPOINTL lpPt, DWORD *pdwEffect)
 
DWORD WINAPI SHGetCurColorRes (void)
 
HMENU WINAPI SHGetMenuFromID (HMENU hMenu, UINT uID)
 
DWORD WINAPI SHMenuIndexFromID (HMENU hMenu, UINT uID)
 
DWORD WINAPI SHWaitForSendMessageThread (HANDLE hand, DWORD dwTimeout)
 
DWORD WINAPI SHSendMessageBroadcastW (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT WINAPI SHIsExpandableFolder (LPSHELLFOLDER lpFolder, LPCITEMIDLIST pidl)
 
DWORD WINAPI SHFillRectClr (HDC hDC, LPCRECT pRect, COLORREF cRef)
 
int WINAPI SHSearchMapInt (const int *lpKeys, const int *lpValues, int iLen, int iKey)
 
VOID WINAPI IUnknown_Set (IUnknown **lppDest, IUnknown *lpUnknown)
 
HRESULT WINAPI MayQSForward (_In_ IUnknown *lpUnknown, _In_ INT nUnknown, _In_opt_ REFGUID riidCmdGrp, _In_ ULONG cCmds, _Inout_ OLECMD *prgCmds, _Inout_ OLECMDTEXT *pCmdText)
 
HRESULT WINAPI MayExecForward (_In_ IUnknown *lpUnknown, _In_ INT nUnknown, _In_opt_ REFGUID pguidCmdGroup, _In_ DWORD nCmdID, _In_ DWORD nCmdexecopt, _In_ VARIANT *pvaIn, _Inout_ VARIANT *pvaOut)
 
HRESULT WINAPI IsQSForward (_In_opt_ REFGUID pguidCmdGroup, _In_ ULONG cCmds, _In_ OLECMD *prgCmds)
 
BOOL WINAPI SHIsChildOrSelf (HWND hParent, HWND hChild)
 
HRESULT WINAPI SHForwardContextMenuMsg (IUnknown *pUnk, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult, BOOL useIContextMenu2)
 
VOID WINAPI SHSetDefaultDialogFont (HWND hWnd, INT id)
 
EXTERN_C BOOL WINAPI SHBoolSystemParametersInfo (UINT uiAction, PVOID pvParam)
 
HRESULT WINAPI SHRegGetCLSIDKeyW (REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU, BOOL bCreate, PHKEY phKey)
 
BOOL WINAPI SHAddDataBlock (LPDBLIST *lppList, const DATABLOCK_HEADER *lpNewItem)
 
BOOL WINAPI SHRemoveDataBlock (LPDBLIST *lppList, DWORD dwSignature)
 
DATABLOCK_HEADER *WINAPI SHFindDataBlock (LPDBLIST lpList, DWORD dwSignature)
 
HRESULT WINAPI SHWriteDataBlockList (IStream *lpStream, LPDBLIST lpList)
 
HRESULT WINAPI SHReadDataBlockList (IStream *lpStream, LPDBLIST *lppList)
 
VOID WINAPI SHFreeDataBlockList (LPDBLIST lpList)
 
LONG WINAPI RegCreateKeyExWrapW (_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
 
DWORD WINAPI SHExpandEnvironmentStringsA (LPCSTR, LPSTR, DWORD)
 
DWORD WINAPI SHExpandEnvironmentStringsW (LPCWSTR, LPWSTR, DWORD)
 
BOOL WINAPI SHIsEmptyStream (IStream *)
 
HRESULT WINAPI IStream_Size (IStream *lpStream, ULARGE_INTEGER *lpulSize)
 
HRESULT WINAPI SHInvokeDefaultCommand (HWND, IShellFolder *, LPCITEMIDLIST)
 
HRESULT WINAPI SHPropertyBag_ReadType (IPropertyBag *ppb, LPCWSTR pszPropName, VARIANTARG *pvarg, VARTYPE vt)
 
HRESULT WINAPI SHPropertyBag_ReadBOOL (IPropertyBag *ppb, LPCWSTR pszPropName, BOOL *pbValue)
 
BOOL WINAPI SHPropertyBag_ReadBOOLOld (IPropertyBag *ppb, LPCWSTR pszPropName, BOOL bDefValue)
 
HRESULT WINAPI SHPropertyBag_ReadSHORT (IPropertyBag *ppb, LPCWSTR pszPropName, SHORT *psValue)
 
HRESULT WINAPI SHPropertyBag_ReadInt (IPropertyBag *ppb, LPCWSTR pszPropName, LPINT pnValue)
 
HRESULT WINAPI SHPropertyBag_ReadLONG (IPropertyBag *ppb, LPCWSTR pszPropName, LPLONG pValue)
 
HRESULT WINAPI SHPropertyBag_ReadDWORD (IPropertyBag *ppb, LPCWSTR pszPropName, DWORD *pdwValue)
 
HRESULT WINAPI SHPropertyBag_ReadBSTR (IPropertyBag *ppb, LPCWSTR pszPropName, BSTR *pbstr)
 
HRESULT WINAPI SHPropertyBag_ReadStr (IPropertyBag *ppb, LPCWSTR pszPropName, LPWSTR pszDst, int cchMax)
 
HRESULT WINAPI SHPropertyBag_ReadPOINTL (IPropertyBag *ppb, LPCWSTR pszPropName, POINTL *pptl)
 
HRESULT WINAPI SHPropertyBag_ReadPOINTS (IPropertyBag *ppb, LPCWSTR pszPropName, POINTS *ppts)
 
HRESULT WINAPI SHPropertyBag_ReadRECTL (IPropertyBag *ppb, LPCWSTR pszPropName, RECTL *prcl)
 
HRESULT WINAPI SHPropertyBag_ReadGUID (IPropertyBag *ppb, LPCWSTR pszPropName, GUID *pguid)
 
HRESULT WINAPI SHPropertyBag_ReadStream (IPropertyBag *ppb, LPCWSTR pszPropName, IStream **ppStream)
 
INT WINAPI SHGetPerScreenResName (_Out_writes_(cchBuffer) LPWSTR pszBuffer, _In_ INT cchBuffer, _In_ DWORD dwReserved)
 
HRESULT WINAPI SHPropertyBag_Delete (IPropertyBag *ppb, LPCWSTR pszPropName)
 
HRESULT WINAPI SHPropertyBag_WriteBOOL (IPropertyBag *ppb, LPCWSTR pszPropName, BOOL bValue)
 
HRESULT WINAPI SHPropertyBag_WriteSHORT (IPropertyBag *ppb, LPCWSTR pszPropName, SHORT sValue)
 
HRESULT WINAPI SHPropertyBag_WriteInt (IPropertyBag *ppb, LPCWSTR pszPropName, INT nValue)
 
HRESULT WINAPI SHPropertyBag_WriteLONG (IPropertyBag *ppb, LPCWSTR pszPropName, LONG lValue)
 
HRESULT WINAPI SHPropertyBag_WriteDWORD (IPropertyBag *ppb, LPCWSTR pszPropName, DWORD dwValue)
 
HRESULT WINAPI SHPropertyBag_WriteStr (IPropertyBag *ppb, LPCWSTR pszPropName, LPCWSTR pszValue)
 
HRESULT WINAPI SHPropertyBag_WriteGUID (IPropertyBag *ppb, LPCWSTR pszPropName, const GUID *pguid)
 
HRESULT WINAPI SHPropertyBag_WriteStream (IPropertyBag *ppb, LPCWSTR pszPropName, IStream *pStream)
 
HRESULT WINAPI SHPropertyBag_WritePOINTL (IPropertyBag *ppb, LPCWSTR pszPropName, const POINTL *pptl)
 
HRESULT WINAPI SHPropertyBag_WritePOINTS (IPropertyBag *ppb, LPCWSTR pszPropName, const POINTS *ppts)
 
HRESULT WINAPI SHPropertyBag_WriteRECTL (IPropertyBag *ppb, LPCWSTR pszPropName, const RECTL *prcl)
 
HRESULT WINAPI SHCreatePropertyBagOnMemory (_In_ DWORD dwMode, _In_ REFIID riid, _Out_ void **ppvObj)
 
HRESULT WINAPI SHCreatePropertyBagOnRegKey (_In_ HKEY hKey, _In_z_ LPCWSTR pszSubKey, _In_ DWORD dwMode, _In_ REFIID riid, _Out_ void **ppvObj)
 
HRESULT WINAPI SHCreatePropertyBagOnProfileSection (_In_z_ LPCWSTR lpFileName, _In_opt_z_ LPCWSTR pszSection, _In_ DWORD dwMode, _In_ REFIID riid, _Out_ void **ppvObj)
 
EXTERN_C HRESULT WINAPI IUnknown_QueryServicePropertyBag (_In_ IUnknown *punk, _In_ long flags, _In_ REFIID riid, _Outptr_ void **ppvObj)
 
HWND WINAPI SHCreateWorkerWindowA (WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
 
HWND WINAPI SHCreateWorkerWindowW (WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
 
HRESULT WINAPI IUnknown_SetOwner (IUnknown *iface, IUnknown *pUnk)
 
HRESULT WINAPI IUnknown_GetClassID (IUnknown *lpUnknown, CLSID *lpClassId)
 
HRESULT WINAPI IUnknown_QueryServiceExec (IUnknown *lpUnknown, REFIID service, const GUID *group, DWORD cmdId, DWORD cmdOpt, VARIANT *pIn, VARIANT *pOut)
 
HRESULT WINAPI IUnknown_UIActivateIO (IUnknown *unknown, BOOL activate, LPMSG msg)
 
HRESULT WINAPI IUnknown_TranslateAcceleratorOCS (IUnknown *lpUnknown, LPMSG lpMsg, DWORD dwModifiers)
 
HRESULT WINAPI IUnknown_OnFocusOCS (IUnknown *lpUnknown, BOOL fGotFocus)
 
HRESULT WINAPI IUnknown_HandleIRestrict (LPUNKNOWN lpUnknown, PVOID lpArg1, PVOID lpArg2, PVOID lpArg3, PVOID lpArg4)
 
HRESULT WINAPI IUnknown_HasFocusIO (IUnknown *punk)
 
HRESULT WINAPI IUnknown_TranslateAcceleratorIO (IUnknown *punk, MSG *pmsg)
 
HRESULT WINAPI IUnknown_OnFocusChangeIS (LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
 
DWORD WINAPI SHAnsiToUnicode (LPCSTR lpSrcStr, LPWSTR lpDstStr, INT iLen)
 
INT WINAPI SHUnicodeToAnsi (LPCWSTR lpSrcStr, LPSTR lpDstStr, INT iLen)
 
DWORD WINAPI SHAnsiToUnicodeCP (DWORD dwCp, LPCSTR lpSrcStr, LPWSTR lpDstStr, int iLen)
 
DWORD WINAPI SHUnicodeToAnsiCP (UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr, int dstlen)
 
PVOID WINAPI SHLockSharedEx (HANDLE hData, DWORD dwProcessId, BOOL bWriteAccess)
 
DWORD WINAPI SHGetValueGoodBootA (HKEY hkey, LPCSTR pSubKey, LPCSTR pValue, LPDWORD pwType, LPVOID pvData, LPDWORD pbData)
 
DWORD WINAPI SHGetValueGoodBootW (HKEY hkey, LPCWSTR pSubKey, LPCWSTR pValue, LPDWORD pwType, LPVOID pvData, LPDWORD pbData)
 
HRESULT WINAPI SHLoadRegUIStringA (HKEY hkey, LPCSTR value, LPSTR buf, DWORD size)
 
HRESULT WINAPI SHLoadRegUIStringW (HKEY hkey, LPCWSTR value, LPWSTR buf, DWORD size)
 
DWORD WINAPI SHGetIniStringW (_In_z_ LPCWSTR appName, _In_z_ LPCWSTR keyName, _Out_writes_to_(outLen, return+1) LPWSTR out, _In_ DWORD outLen, _In_z_ LPCWSTR filename)
 
BOOL WINAPI SHSetIniStringW (_In_z_ LPCWSTR appName, _In_z_ LPCWSTR keyName, _In_opt_z_ LPCWSTR str, _In_z_ LPCWSTR filename)
 
DWORD WINAPI SHGetIniStringUTF7W (_In_opt_z_ LPCWSTR lpAppName, _In_z_ LPCWSTR lpKeyName, _Out_writes_to_(nSize, return+1) _Post_z_ LPWSTR lpReturnedString, _In_ DWORD nSize, _In_z_ LPCWSTR lpFileName)
 
BOOL WINAPI SHSetIniStringUTF7W (_In_z_ LPCWSTR lpAppName, _In_z_ LPCWSTR lpKeyName, _In_opt_z_ LPCWSTR lpString, _In_z_ LPCWSTR lpFileName)
 
HKEY WINAPI SHGetShellKey (DWORD flags, LPCWSTR sub_key, BOOL create)
 
int WINAPIV ShellMessageBoxWrapW (_In_opt_ HINSTANCE hAppInst, _In_opt_ HWND hWnd, _In_ LPCWSTR lpcText, _In_opt_ LPCWSTR lpcTitle, _In_ UINT fuStyle,...)
 
BOOL WINAPI PathFileExistsDefExtW (LPWSTR lpszPath, DWORD dwWhich)
 
BOOL WINAPI PathFileExistsDefExtAndAttributesW (_Inout_ LPWSTR pszPath, _In_ DWORD dwWhich, _Out_opt_ LPDWORD pdwFileAttributes)
 
BOOL WINAPI PathFindOnPathExW (LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich)
 
VOID WINAPI FixSlashesAndColonW (LPWSTR)
 
BOOL WINAPI PathIsValidCharA (char c, DWORD dwClass)
 
BOOL WINAPI PathIsValidCharW (WCHAR c, DWORD dwClass)
 
BOOL WINAPI SHGetPathFromIDListWrapW (LPCITEMIDLIST pidl, LPWSTR pszPath)
 
BOOL WINAPI IContextMenu_Invoke (_In_ IContextMenu *pContextMenu, _In_ HWND hwnd, _In_ LPCSTR lpVerb, _In_ UINT uFlags)
 
HRESULT WINAPI RunRegCommand (_In_opt_ HWND hWnd, _In_ HKEY hKey, _In_opt_ PCWSTR pszSubKey)
 
HRESULT WINAPI RunIndirectRegCommand (_In_opt_ HWND hWnd, _In_ HKEY hKey, _In_opt_ PCWSTR pszSubKey, _In_ PCWSTR pszVerb)
 
HRESULT WINAPI SHRunIndirectRegClientCommand (_In_ HWND hWnd, _In_ PCWSTR pszClientType)
 
DWORD WINAPI SHGetObjectCompatFlags (IUnknown *pUnk, const CLSID *clsid)
 
DWORD WINAPI SHGetAppCompatFlags (_In_ DWORD dwMask)
 
 STDMETHOD_ (ULONG, AddRef)(THIS) PURE
 
 STDMETHOD_ (ULONG, Release)(THIS) PURE
 
STDMETHOD() QueryString (THIS_ ASSOCQUERY query, PCWSTR key, PWSTR *ppszValue) PURE
 
STDMETHOD() QueryDword (THIS_ ASSOCQUERY query, PCWSTR key, DWORD *pdwValue) PURE
 
STDMETHOD() QueryExists (THIS_ ASSOCQUERY query, PCWSTR key) PURE
 
STDMETHOD() QueryDirect (THIS_ ASSOCQUERY query, PCWSTR key, FLAGGED_BYTE_BLOB **ppBlob) PURE
 
STDMETHOD() QueryObject (THIS_ ASSOCQUERY query, PCWSTR key, REFIID riid, PVOID *ppvObj) PURE
 

Macro Definition Documentation

◆ ASSOCQUERY_DIRECT

#define ASSOCQUERY_DIRECT   0x00040000

Definition at line 27 of file shlwapi_undoc.h.

◆ ASSOCQUERY_DWORD

#define ASSOCQUERY_DWORD   0x00080000

Definition at line 28 of file shlwapi_undoc.h.

◆ ASSOCQUERY_EXISTS

#define ASSOCQUERY_EXISTS   0x00020000

Definition at line 26 of file shlwapi_undoc.h.

◆ ASSOCQUERY_EXTRA_NON_VERB

#define ASSOCQUERY_EXTRA_NON_VERB   0x01000000

Definition at line 32 of file shlwapi_undoc.h.

◆ ASSOCQUERY_EXTRA_VERB

#define ASSOCQUERY_EXTRA_VERB   0x02000000

Definition at line 33 of file shlwapi_undoc.h.

◆ ASSOCQUERY_FALLBACK

#define ASSOCQUERY_FALLBACK   0x80000000

Definition at line 35 of file shlwapi_undoc.h.

◆ ASSOCQUERY_GUID

#define ASSOCQUERY_GUID   0x00400000

Definition at line 31 of file shlwapi_undoc.h.

◆ ASSOCQUERY_INDIRECT

#define ASSOCQUERY_INDIRECT   0x00100000

Definition at line 29 of file shlwapi_undoc.h.

◆ ASSOCQUERY_LOWORD_MASK

#define ASSOCQUERY_LOWORD_MASK   0x0000FFFF

Definition at line 24 of file shlwapi_undoc.h.

◆ ASSOCQUERY_OBJECT

#define ASSOCQUERY_OBJECT   0x00200000

Definition at line 30 of file shlwapi_undoc.h.

◆ ASSOCQUERY_SIGNIFICANCE

#define ASSOCQUERY_SIGNIFICANCE   0x04000000

Definition at line 34 of file shlwapi_undoc.h.

◆ ASSOCQUERY_STRING

#define ASSOCQUERY_STRING   0x00010000

Definition at line 25 of file shlwapi_undoc.h.

◆ INTERFACE

#define INTERFACE   IAssociationElementOld

Definition at line 435 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_ANY

#define PATH_CHAR_CLASS_ANY   0xffffffff

Definition at line 371 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_ASTERIX

#define PATH_CHAR_CLASS_ASTERIX   0x00000002

Definition at line 361 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_BACKSLASH

#define PATH_CHAR_CLASS_BACKSLASH   0x00000008

Definition at line 363 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COLON

#define PATH_CHAR_CLASS_COLON   0x00000010

Definition at line 364 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COMMA

#define PATH_CHAR_CLASS_COMMA   0x00000040

Definition at line 366 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOT

#define PATH_CHAR_CLASS_DOT   0x00000004

Definition at line 362 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOUBLEQUOTE

#define PATH_CHAR_CLASS_DOUBLEQUOTE   0x00000200

Definition at line 369 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_INVALID

#define PATH_CHAR_CLASS_INVALID   0x00000000

Definition at line 370 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_LETTER

#define PATH_CHAR_CLASS_LETTER   0x00000001

Definition at line 360 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_OTHER_VALID

#define PATH_CHAR_CLASS_OTHER_VALID   0x00000100

Definition at line 368 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SEMICOLON

#define PATH_CHAR_CLASS_SEMICOLON   0x00000020

Definition at line 365 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SPACE

#define PATH_CHAR_CLASS_SPACE   0x00000080

Definition at line 367 of file shlwapi_undoc.h.

◆ SHAboutInfo

#define SHAboutInfo   SHAboutInfoA

Definition at line 86 of file shlwapi_undoc.h.

◆ SHACF_ANSI

#define SHACF_ANSI   0x00000080

Definition at line 411 of file shlwapi_undoc.h.

◆ SHACF_ANSIDISPLAYNAMES

#define SHACF_ANSIDISPLAYNAMES   0x00010000

Definition at line 420 of file shlwapi_undoc.h.

◆ SHACF_CONTEXTMENU

#define SHACF_CONTEXTMENU   0x00000001

Definition at line 401 of file shlwapi_undoc.h.

◆ SHACF_CORELINTERNETENUM

#define SHACF_CORELINTERNETENUM   0x00000004

Definition at line 404 of file shlwapi_undoc.h.

◆ SHACF_DOCOBJECT

#define SHACF_DOCOBJECT   0x00000002

Definition at line 403 of file shlwapi_undoc.h.

◆ SHACF_FILEOPENBOGUSCTRLID

#define SHACF_FILEOPENBOGUSCTRLID   0x00020000

Definition at line 421 of file shlwapi_undoc.h.

◆ SHACF_FILEOPENNEEDSEXT

#define SHACF_FILEOPENNEEDSEXT   0x00001000

Definition at line 416 of file shlwapi_undoc.h.

◆ SHACF_FLUSHNOWAITALWAYS

#define SHACF_FLUSHNOWAITALWAYS   SHACF_CONTEXTMENU

Definition at line 402 of file shlwapi_undoc.h.

◆ SHACF_FORCELFNIDLIST

#define SHACF_FORCELFNIDLIST   0x00040000

Definition at line 422 of file shlwapi_undoc.h.

◆ SHACF_IGNOREENUMRESET

#define SHACF_IGNOREENUMRESET   0x00004000

Definition at line 418 of file shlwapi_undoc.h.

◆ SHACF_LOADCOLUMNHANDLER

#define SHACF_LOADCOLUMNHANDLER   0x00000040

Definition at line 410 of file shlwapi_undoc.h.

◆ SHACF_MYCOMPUTERFIRST

#define SHACF_MYCOMPUTERFIRST   0x00000008

Definition at line 407 of file shlwapi_undoc.h.

◆ SHACF_NOVALIDATEFSIDS

#define SHACF_NOVALIDATEFSIDS   0x00000800

Definition at line 415 of file shlwapi_undoc.h.

◆ SHACF_OLDCREATEVIEWWND

#define SHACF_OLDCREATEVIEWWND   SHACF_CORELINTERNETENUM

Definition at line 405 of file shlwapi_undoc.h.

◆ SHACF_OLDREGITEMGDN

#define SHACF_OLDREGITEMGDN   0x00000010

Definition at line 408 of file shlwapi_undoc.h.

◆ SHACF_STAROFFICE5PRINTER

#define SHACF_STAROFFICE5PRINTER   0x00000400

Definition at line 414 of file shlwapi_undoc.h.

◆ SHACF_UNKNOWN1

#define SHACF_UNKNOWN1   0x00000100

Definition at line 412 of file shlwapi_undoc.h.

◆ SHACF_UNKNOWN2

#define SHACF_UNKNOWN2   0x01000000

Definition at line 424 of file shlwapi_undoc.h.

◆ SHACF_UNKNOWN3

#define SHACF_UNKNOWN3   0x80000000

Definition at line 425 of file shlwapi_undoc.h.

◆ SHACF_WIN95BINDTOOBJECT

#define SHACF_WIN95BINDTOOBJECT   0x00002000

Definition at line 417 of file shlwapi_undoc.h.

◆ SHACF_WIN95DEFVIEW

#define SHACF_WIN95DEFVIEW   SHACF_CORELINTERNETENUM

Definition at line 406 of file shlwapi_undoc.h.

◆ SHACF_WIN95SHLEXEC

#define SHACF_WIN95SHLEXEC   0x00000200

Definition at line 413 of file shlwapi_undoc.h.

◆ SHCreateWorkerWindow

#define SHCreateWorkerWindow   SHCreateWorkerWindowA

Definition at line 252 of file shlwapi_undoc.h.

◆ SHELL_GCOUNTER_DECLAREPARAMETERS

#define SHELL_GCOUNTER_DECLAREPARAMETERS (   handle,
  id 
)    SHELL_GCOUNTER_PARAMETERS(HANDLE handle, SHGLOBALCOUNTER id)

Definition at line 72 of file shlwapi_undoc.h.

◆ SHELL_GCOUNTER_DEFINE_GUID

#define SHELL_GCOUNTER_DEFINE_GUID (   name,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
  j,
  k 
)    const GUID name = { a, b, c, { d, e, f, g, h, i, j, k } }

Definition at line 60 of file shlwapi_undoc.h.

◆ SHELL_GCOUNTER_DEFINE_HANDLE

#define SHELL_GCOUNTER_DEFINE_HANDLE (   name)    HANDLE name = NULL

Definition at line 61 of file shlwapi_undoc.h.

◆ SHELL_GCOUNTER_PARAMETERS

#define SHELL_GCOUNTER_PARAMETERS (   handle,
  id 
)    handle

Definition at line 62 of file shlwapi_undoc.h.

◆ SHELL_GlobalCounterCreate

#define SHELL_GlobalCounterCreate (   refguid,
  handle 
)
Value:
do { \
SHELL_GetCachedGlobalCounter(&(handle), (refguid)); \
} while (0)
#define EXTERN_C
Definition: basetyps.h:12
static HANDLE SHELL_GetCachedGlobalCounter(_Inout_ HANDLE *phGlobalCounter, _In_ REFGUID rguid)
Definition: shpolicy.c:102
Definition: scsiwmi.h:51

Definition at line 63 of file shlwapi_undoc.h.

◆ SHELL_GlobalCounterGet

#define SHELL_GlobalCounterGet (   handle)    SHGlobalCounterGetValue(handle)

Definition at line 69 of file shlwapi_undoc.h.

◆ SHELL_GlobalCounterIncrement

#define SHELL_GlobalCounterIncrement (   handle)    SHGlobalCounterIncrement(handle)

Definition at line 70 of file shlwapi_undoc.h.

◆ SHELL_GlobalCounterIsInitialized

#define SHELL_GlobalCounterIsInitialized (   handle)    ( (handle) != NULL )

Definition at line 68 of file shlwapi_undoc.h.

◆ SHELL_NO_POLICY

#define SHELL_NO_POLICY   ((DWORD)-1)

Definition at line 37 of file shlwapi_undoc.h.

◆ SHExpandEnvironmentStrings

#define SHExpandEnvironmentStrings   SHExpandEnvironmentStringsA

Definition at line 167 of file shlwapi_undoc.h.

◆ SHGetValueGoodBoot

#define SHGetValueGoodBoot   SHGetValueGoodBootA

Definition at line 284 of file shlwapi_undoc.h.

◆ SHLoadRegUIString

#define SHLoadRegUIString   SHLoadRegUIStringA

Definition at line 285 of file shlwapi_undoc.h.

◆ WHICH_BAT

#define WHICH_BAT   (1 << 3)

Definition at line 352 of file shlwapi_undoc.h.

◆ WHICH_CMD

#define WHICH_CMD   (1 << 5)

Definition at line 354 of file shlwapi_undoc.h.

◆ WHICH_COM

#define WHICH_COM   (1 << 1)

Definition at line 350 of file shlwapi_undoc.h.

◆ WHICH_DEFAULT

#define WHICH_DEFAULT   (WHICH_PIF | WHICH_COM | WHICH_EXE | WHICH_BAT | WHICH_LNK | WHICH_CMD)

Definition at line 357 of file shlwapi_undoc.h.

◆ WHICH_EXE

#define WHICH_EXE   (1 << 2)

Definition at line 351 of file shlwapi_undoc.h.

◆ WHICH_LNK

#define WHICH_LNK   (1 << 4)

Definition at line 353 of file shlwapi_undoc.h.

◆ WHICH_OPTIONAL

#define WHICH_OPTIONAL   (1 << 6)

Definition at line 355 of file shlwapi_undoc.h.

◆ WHICH_PIF

#define WHICH_PIF   (1 << 0)

Definition at line 349 of file shlwapi_undoc.h.

Typedef Documentation

◆ ASSOCQUERY

typedef DWORD ASSOCQUERY

Definition at line 23 of file shlwapi_undoc.h.

◆ LPPOLICYDATA

◆ POLICYDATA

Enumeration Type Documentation

◆ _shellkey_flags

Enumerator
SHKEY_Root_HKCU 
SHKEY_Root_HKLM 
SHKEY_Key_Explorer 
SHKEY_Key_Shell 
SHKEY_Key_ShellNoRoam 
SHKEY_Key_Classes 
SHKEY_Subkey_Default 
SHKEY_Subkey_ResourceName 
SHKEY_Subkey_Handlers 
SHKEY_Subkey_Associations 
SHKEY_Subkey_Volatile 
SHKEY_Subkey_MUICache 
SHKEY_Subkey_FileExts 
SHKEY_Root_HKCU 
SHKEY_Root_HKLM 
SHKEY_Key_Explorer 
SHKEY_Key_Shell 
SHKEY_Key_ShellNoRoam 
SHKEY_Key_Classes 
SHKEY_Subkey_Default 
SHKEY_Subkey_ResourceName 
SHKEY_Subkey_Handlers 
SHKEY_Subkey_Associations 
SHKEY_Subkey_Volatile 
SHKEY_Subkey_MUICache 
SHKEY_Subkey_FileExts 

Definition at line 318 of file shlwapi_undoc.h.

319{
320 SHKEY_Root_HKCU = 0x1,
321 SHKEY_Root_HKLM = 0x2,
322 SHKEY_Key_Explorer = 0x00,
323 SHKEY_Key_Shell = 0x10,
325 SHKEY_Key_Classes = 0x30,
326 SHKEY_Subkey_Default = 0x0000,
328 SHKEY_Subkey_Handlers = 0x2000,
330 SHKEY_Subkey_Volatile = 0x4000,
331 SHKEY_Subkey_MUICache = 0x5000,
332 SHKEY_Subkey_FileExts = 0x6000
333};
@ SHKEY_Subkey_Handlers
@ SHKEY_Root_HKLM
@ SHKEY_Key_ShellNoRoam
@ SHKEY_Subkey_Volatile
@ SHKEY_Subkey_Associations
@ SHKEY_Key_Classes
@ SHKEY_Subkey_MUICache
@ SHKEY_Key_Explorer
@ SHKEY_Root_HKCU
@ SHKEY_Subkey_FileExts
@ SHKEY_Key_Shell
@ SHKEY_Subkey_Default
@ SHKEY_Subkey_ResourceName

Function Documentation

◆ CLSIDFromStringWrap()

HRESULT WINAPI CLSIDFromStringWrap ( _In_ LPCWSTR  idstr,
_Out_ CLSID id 
)

◆ ConnectToConnectionPoint()

HRESULT WINAPI ConnectToConnectionPoint ( IUnknown lpUnkSink,
REFIID  riid,
BOOL  bAdviseOnly,
IUnknown lpUnknown,
LPDWORD  lpCookie,
IConnectionPoint **  lppCP 
)

Definition at line 1193 of file ordinal.c.

1196{
1197 HRESULT hRet;
1198 IConnectionPointContainer* lpContainer;
1199 IConnectionPoint *lpCP;
1200
1201 if(!lpUnknown || (fConnect && !lpUnkSink))
1202 return E_FAIL;
1203
1204 if(lppCP)
1205 *lppCP = NULL;
1206
1207 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IConnectionPointContainer,
1208 (void**)&lpContainer);
1209 if (SUCCEEDED(hRet))
1210 {
1211 hRet = IConnectionPointContainer_FindConnectionPoint(lpContainer, riid, &lpCP);
1212
1213 if (SUCCEEDED(hRet))
1214 {
1215 if(!fConnect)
1216 hRet = IConnectionPoint_Unadvise(lpCP, *lpCookie);
1217 else
1218 hRet = IConnectionPoint_Advise(lpCP, lpUnkSink, lpCookie);
1219
1220 if (FAILED(hRet))
1221 *lpCookie = 0;
1222
1223 if (lppCP && SUCCEEDED(hRet))
1224 *lppCP = lpCP; /* Caller keeps the interface */
1225 else
1226 IConnectionPoint_Release(lpCP); /* Release it */
1227 }
1228
1229 IConnectionPointContainer_Release(lpContainer);
1230 }
1231 return hRet;
1232}
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
REFIID riid
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
const GUID IID_IConnectionPointContainer

Referenced by init_pointers().

◆ FixSlashesAndColonW()

VOID WINAPI FixSlashesAndColonW ( LPWSTR  lpwstr)

Definition at line 4718 of file ordinal.c.

4719{
4720 while (*lpwstr)
4721 {
4722 if (*lpwstr == '/')
4723 *lpwstr = '\\';
4724 lpwstr++;
4725 }
4726}

Referenced by PathQualifyExW().

◆ IContextMenu_Invoke()

BOOL WINAPI IContextMenu_Invoke ( _In_ IContextMenu pContextMenu,
_In_ HWND  hwnd,
_In_ LPCSTR  lpVerb,
_In_ UINT  uFlags 
)

Definition at line 196 of file utils.cpp.

201{
202 TRACE("(%p, %p, %s, %u)\n", pContextMenu, hwnd, debugstr_a(lpVerb), uFlags);
204 uFlags, lpVerb, NULL, false);
205 return !FAILED_UNEXPECTEDLY(hr);
206}
UINT uFlags
Definition: api.c:59
static HRESULT SHInvokeCommandOnContextMenuInternal(_In_opt_ HWND hWnd, _In_opt_ IUnknown *pUnk, _In_ IContextMenu *pCM, _In_ UINT fCMIC, _In_ UINT fCMF, _In_opt_ LPCSTR pszVerb, _In_opt_ LPCWSTR pwszDir, _In_ bool ForceQCM)
Definition: utils.cpp:45
#define FAILED_UNEXPECTEDLY
Definition: utils.cpp:30
#define debugstr_a
Definition: kernel32.h:31
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ IsQSForward()

HRESULT WINAPI IsQSForward ( _In_opt_ REFGUID  pguidCmdGroup,
_In_ ULONG  cCmds,
_In_ OLECMD *  prgCmds 
)

◆ IStream_Size()

HRESULT WINAPI IStream_Size ( IStream lpStream,
ULARGE_INTEGER lpulSize 
)

Definition at line 661 of file istream.c.

662{
663 STATSTG statstg;
664 HRESULT hRet;
665
666 TRACE("(%p,%p)\n", lpStream, lpulSize);
667
668 memset(&statstg, 0, sizeof(statstg));
669
670 hRet = IStream_Stat(lpStream, &statstg, 1);
671
672 if (SUCCEEDED(hRet) && lpulSize)
673 *lpulSize = statstg.cbSize;
674 return hRet;
675}
#define memset(x, y, z)
Definition: compat.h:39

Referenced by CDesktopUpgradePropertyBag::_GetOldDesktopViewStream(), CRegPropertyBag::_GetStreamSize(), and CDesktopUpgradePropertyBag::_NewStreamFromOld().

◆ IUnknown_Exec()

HRESULT WINAPI IUnknown_Exec ( IUnknown lpUnknown,
REFGUID  pguidCmdGroup,
DWORD  nCmdID,
DWORD  nCmdexecopt,
VARIANT pvaIn,
VARIANT pvaOut 
)

Definition at line 1087 of file ordinal.c.

1090{
1091 HRESULT hRet = E_FAIL;
1092
1093 TRACE("(%p,%p,%d,%d,%p,%p)\n",lpUnknown, pguidCmdGroup, nCmdID,
1094 nCmdexecopt, pvaIn, pvaOut);
1095
1096 if (lpUnknown)
1097 {
1098 IOleCommandTarget* lpOle;
1099
1100 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleCommandTarget,
1101 (void**)&lpOle);
1102 if (SUCCEEDED(hRet) && lpOle)
1103 {
1104 hRet = IOleCommandTarget_Exec(lpOle, pguidCmdGroup, nCmdID,
1105 nCmdexecopt, pvaIn, pvaOut);
1106 IOleCommandTarget_Release(lpOle);
1107 }
1108 }
1109 return hRet;
1110}

Referenced by CTrayBandSite::AddBand(), CISFBand::BandInfoChanged(), CTrayWindow::CheckTrayWndPosition(), CInternetToolbar::CreateMenuBar(), CBaseBar::Exec(), CShellBrowser::Exec(), CMenuSite::Exec(), ExecResetDefViewFolderSettings(), CShellBrowser::Initialize(), MayExecForwardMockup(), CBaseBarSite::OnCommand(), CInternetToolbar::OnFolders(), CInternetToolbar::OnSearch(), CShellBrowser::OnToggleAddressBandVisible(), CShellBrowser::OnToggleLinksBandVisible(), CShellBrowser::OnToggleTextLabels(), CShellBrowser::OnToggleToolbarBandVisible(), CShellBrowser::OnToggleToolbarLock(), CShellBrowser::OnToolbarCustomize(), CInternetToolbar::OnUpLevel(), CShellBrowser::SetAsDefFolderSettings(), CInternetToolbar::SetDirty(), CShellBrowser::ShowBand(), CShellBrowser::ShowControlWindow(), and CTrayBandSite::Update().

◆ IUnknown_GetClassID()

HRESULT WINAPI IUnknown_GetClassID ( IUnknown lpUnknown,
CLSID lpClassId 
)

Definition at line 1457 of file ordinal.c.

1458{
1459 IPersist *persist;
1460 HRESULT hr;
1461
1462 TRACE("(%p, %p)\n", lpUnknown, clsid);
1463
1464 if (!lpUnknown)
1465 {
1466 memset(clsid, 0, sizeof(*clsid));
1467 return E_FAIL;
1468 }
1469
1470 hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersist, (void**)&persist);
1471 if (hr != S_OK)
1472 {
1473 hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersistFolder, (void**)&persist);
1474 if (hr != S_OK)
1475 return hr;
1476 }
1477
1478 hr = IPersist_GetClassID(persist, clsid);
1479 IPersist_Release(persist);
1480 return hr;
1481}
#define S_OK
Definition: intsafe.h:52
REFCLSID clsid
Definition: msctf.c:82
const GUID IID_IPersist
Definition: proxy.cpp:14

Referenced by CShellBrowser::BrowseToPIDL(), GetClassOfItem(), CDefView::GetDefaultViewStream(), CSearchBar::GetSearchResultsFolder(), init_pointers(), and SHSkipJunction().

◆ IUnknown_HandleIRestrict()

HRESULT WINAPI IUnknown_HandleIRestrict ( LPUNKNOWN  lpUnknown,
PVOID  lpArg1,
PVOID  lpArg2,
PVOID  lpArg3,
PVOID  lpArg4 
)

Definition at line 1953 of file ordinal.c.

1955{
1956 /* FIXME: {D12F26B2-D90A-11D0-830D-00AA005B4383} - What object does this represent? */
1957 static const DWORD service_id[] = { 0xd12f26b2, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
1958 /* FIXME: {D12F26B1-D90A-11D0-830D-00AA005B4383} - Also Unknown/undocumented */
1959 static const DWORD function_id[] = { 0xd12f26b1, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
1960 HRESULT hRet = E_INVALIDARG;
1961 LPUNKNOWN lpUnkInner = NULL; /* FIXME: Real type is unknown */
1962
1963 TRACE("(%p,%p,%p,%p,%p)\n", lpUnknown, lpArg1, lpArg2, lpArg3, lpArg4);
1964
1965 if (lpUnknown && lpArg4)
1966 {
1967 hRet = IUnknown_QueryService(lpUnknown, (REFGUID)service_id,
1968 (REFGUID)function_id, (void**)&lpUnkInner);
1969
1970 if (SUCCEEDED(hRet) && lpUnkInner)
1971 {
1972 /* FIXME: The type of service object requested is unknown, however
1973 * testing shows that its first method is called with 4 parameters.
1974 * Fake this by using IParseDisplayName_ParseDisplayName since the
1975 * signature and position in the vtable matches our unknown object type.
1976 */
1977 hRet = IParseDisplayName_ParseDisplayName((LPPARSEDISPLAYNAME)lpUnkInner,
1978 lpArg1, lpArg2, lpArg3, lpArg4);
1979 IUnknown_Release(lpUnkInner);
1980 }
1981 }
1982 return hRet;
1983}
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1501
unsigned long DWORD
Definition: ntddk_ex.h:95
static LPUNKNOWN
Definition: ndr_ole.c:49

◆ IUnknown_HasFocusIO()

HRESULT WINAPI IUnknown_HasFocusIO ( IUnknown punk)

Definition at line 4451 of file ordinal.c.

4452{
4453 IInputObject* lpInput = NULL;
4454 HRESULT hRet = E_INVALIDARG;
4455
4456 TRACE("(%p)\n", lpUnknown);
4457 if (lpUnknown)
4458 {
4459 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
4460 (void**)&lpInput);
4461 if (SUCCEEDED(hRet) && lpInput)
4462 {
4463 hRet = IInputObject_HasFocusIO(lpInput);
4464 IInputObject_Release(lpInput);
4465 }
4466 }
4467 return hRet;
4468}
#define IInputObject_HasFocusIO(p)
Definition: shlobj.h:719
#define IInputObject_Release(p)
Definition: shlobj.h:716

Referenced by CBaseBarSite::HasFocusIO(), CInternetToolbar::HasFocusIO(), CBaseBar::HasFocusIO(), and CMenuDeskBar::HasFocusIO().

◆ IUnknown_OnFocusChangeIS()

HRESULT WINAPI IUnknown_OnFocusChangeIS ( LPUNKNOWN  lpUnknown,
LPUNKNOWN  pFocusObject,
BOOL  bFocus 
)

Definition at line 4971 of file ordinal.c.

4972{
4973 IInputObjectSite *pIOS = NULL;
4974 HRESULT hRet = E_INVALIDARG;
4975
4976 TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
4977
4978 if (lpUnknown)
4979 {
4980 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
4981 (void **)&pIOS);
4982 if (SUCCEEDED(hRet) && pIOS)
4983 {
4984 hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
4986 }
4987 }
4988 return hRet;
4989}
#define IInputObjectSite_Release(p)
Definition: shlobj.h:740
#define IInputObjectSite_OnFocusChangeIS(p, a, b)
Definition: shlobj.h:742

Referenced by CBaseBarSite::OnFocusChangeIS(), CBaseBar::OnFocusChangeIS(), CMenuDeskBar::OnFocusChangeIS(), CSearchBar::OnSetFocus(), and CAddressBand::UIActivateIO().

◆ IUnknown_OnFocusOCS()

HRESULT WINAPI IUnknown_OnFocusOCS ( IUnknown lpUnknown,
BOOL  fGotFocus 
)

Definition at line 1931 of file ordinal.c.

1932{
1933 IOleControlSite* lpCSite = NULL;
1934 HRESULT hRet = E_FAIL;
1935
1936 TRACE("(%p, %d)\n", lpUnknown, fGotFocus);
1937 if (lpUnknown)
1938 {
1939 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
1940 (void**)&lpCSite);
1941 if (SUCCEEDED(hRet) && lpCSite)
1942 {
1943 hRet = IOleControlSite_OnFocus(lpCSite, fGotFocus);
1944 IOleControlSite_Release(lpCSite);
1945 }
1946 }
1947 return hRet;
1948}
const GUID IID_IOleControlSite

◆ IUnknown_QueryServiceExec()

HRESULT WINAPI IUnknown_QueryServiceExec ( IUnknown lpUnknown,
REFIID  service,
const GUID group,
DWORD  cmdId,
DWORD  cmdOpt,
VARIANT pIn,
VARIANT pOut 
)

Definition at line 1553 of file ordinal.c.

1555{
1557 HRESULT hr;
1558
1559 TRACE("%p %s %s %d %08x %p %p\n", lpUnknown, debugstr_guid(service),
1560 debugstr_guid(group), cmdId, cmdOpt, pIn, pOut);
1561
1562 hr = IUnknown_QueryService(lpUnknown, service, &IID_IOleCommandTarget, (void**)&target);
1563 if (hr == S_OK)
1564 {
1565 hr = IOleCommandTarget_Exec(target, group, cmdId, cmdOpt, pIn, pOut);
1566 IOleCommandTarget_Release(target);
1567 }
1568
1569 TRACE("<-- hr=0x%08x\n", hr);
1570
1571 return hr;
1572}
GLboolean GLuint group
Definition: glext.h:11120
GLenum target
Definition: glext.h:7315
#define debugstr_guid
Definition: kernel32.h:35

Referenced by CMenuBand::AdjustForTheme(), init_pointers(), CMenuDeskBar::Popup(), and CMenuDeskBar::SetIconSize().

◆ IUnknown_QueryServicePropertyBag()

EXTERN_C HRESULT WINAPI IUnknown_QueryServicePropertyBag ( _In_ IUnknown punk,
_In_ long  flags,
_In_ REFIID  riid,
_Outptr_ void **  ppvObj 
)

Definition at line 1967 of file propbag.cpp.

1972{
1973 TRACE("%p 0x%x %p %p\n", punk, flags, &riid, ppvObj);
1974
1976 HRESULT hr = IUnknown_QueryService(punk, SID_STopLevelBrowser, IID_IShellBrowserService,
1977 (void **)&pService);
1978 if (FAILED(hr))
1979 {
1980 ERR("0x%X\n", hr);
1981 return hr;
1982 }
1983
1984 return pService->GetPropertyBag(flags, riid, ppvObj);
1985}
#define ERR(fmt,...)
Definition: precomp.h:57
GLbitfield flags
Definition: glext.h:7161

Referenced by CDefView::LoadViewState(), and CDefView::SaveViewState().

◆ IUnknown_QueryStatus()

HRESULT WINAPI IUnknown_QueryStatus ( IUnknown lpUnknown,
REFGUID  pguidCmdGroup,
ULONG  cCmds,
OLECMD *  prgCmds,
OLECMDTEXT *  pCmdText 
)

Definition at line 1048 of file ordinal.c.

1050{
1051 HRESULT hRet = E_FAIL;
1052
1053 TRACE("(%p,%p,%d,%p,%p)\n",lpUnknown, pguidCmdGroup, cCmds, prgCmds, pCmdText);
1054
1055 if (lpUnknown)
1056 {
1057 IOleCommandTarget* lpOle;
1058
1059 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleCommandTarget,
1060 (void**)&lpOle);
1061
1062 if (SUCCEEDED(hRet) && lpOle)
1063 {
1064 hRet = IOleCommandTarget_QueryStatus(lpOle, pguidCmdGroup, cCmds,
1065 prgCmds, pCmdText);
1066 IOleCommandTarget_Release(lpOle);
1067 }
1068 }
1069 return hRet;
1070}

Referenced by CInternetToolbar::CommandStateChanged(), CShellBrowser::IsInternetToolbarBandShown(), MayQSForwardMockup(), CInternetToolbar::OnMenuDropDown(), CAddressBand::QueryStatus(), CMenuSite::QueryStatus(), and CShellBrowser::UpdateViewMenu().

◆ IUnknown_Set()

VOID WINAPI IUnknown_Set ( IUnknown **  lppDest,
IUnknown lpUnknown 
)

Definition at line 2190 of file ordinal.c.

2191{
2192 TRACE("(%p,%p)\n", lppDest, lpUnknown);
2193
2194 IUnknown_AtomicRelease(lppDest);
2195
2196 if (lpUnknown)
2197 {
2198 IUnknown_AddRef(lpUnknown);
2199 *lppDest = lpUnknown;
2200 }
2201}
void WINAPI IUnknown_AtomicRelease(IUnknown **lpUnknown)
Definition: ordinal.c:1245

Referenced by Free(), and CFindFolderContextMenu::SetSite().

◆ IUnknown_SetOwner()

HRESULT WINAPI IUnknown_SetOwner ( IUnknown iface,
IUnknown pUnk 
)

Definition at line 1385 of file ordinal.c.

1386{
1387 IShellService *service;
1388 HRESULT hr;
1389
1390 TRACE("(%p, %p)\n", iface, pUnk);
1391
1392 if (!iface) return E_FAIL;
1393
1394 hr = IUnknown_QueryInterface(iface, &IID_IShellService, (void**)&service);
1395 if (hr == S_OK)
1396 {
1397 hr = IShellService_SetOwner(service, pUnk);
1398 IShellService_Release(service);
1399 }
1400
1401 return hr;
1402}
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30

Referenced by CTrayBandSite::AddContextMenus().

◆ IUnknown_TranslateAcceleratorIO()

HRESULT WINAPI IUnknown_TranslateAcceleratorIO ( IUnknown punk,
MSG pmsg 
)

◆ IUnknown_TranslateAcceleratorOCS()

HRESULT WINAPI IUnknown_TranslateAcceleratorOCS ( IUnknown lpUnknown,
LPMSG  lpMsg,
DWORD  dwModifiers 
)

Definition at line 1898 of file ordinal.c.

1899{
1900 IOleControlSite* lpCSite = NULL;
1901 HRESULT hRet = E_INVALIDARG;
1902
1903 TRACE("(%p,%p,0x%08x)\n", lpUnknown, lpMsg, dwModifiers);
1904 if (lpUnknown)
1905 {
1906 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
1907 (void**)&lpCSite);
1908 if (SUCCEEDED(hRet) && lpCSite)
1909 {
1910 hRet = IOleControlSite_TranslateAccelerator(lpCSite, lpMsg, dwModifiers);
1911 IOleControlSite_Release(lpCSite);
1912 }
1913 }
1914 return hRet;
1915}

◆ IUnknown_UIActivateIO()

HRESULT WINAPI IUnknown_UIActivateIO ( IUnknown unknown,
BOOL  activate,
LPMSG  msg 
)

Definition at line 1633 of file ordinal.c.

1634{
1635 IInputObject* object = NULL;
1636 HRESULT ret;
1637
1638 if (!unknown)
1639 return E_FAIL;
1640
1641 /* Get an IInputObject interface from the object */
1642 ret = IUnknown_QueryInterface(unknown, &IID_IInputObject, (LPVOID*) &object);
1643
1644 if (ret == S_OK)
1645 {
1646 ret = IInputObject_UIActivateIO(object, activate, msg);
1647 IInputObject_Release(object);
1648 }
1649
1650 return ret;
1651}
#define msg(x)
Definition: auth_time.c:54
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1605
return ret
Definition: mutex.c:146
#define IInputObject_UIActivateIO(p, a, b)
Definition: shlobj.h:718

Referenced by CTrayWindow::OnActivate(), CTrayWindow::OnSetFocus(), CMenuDeskBar::UIActivateIO(), CBaseBarSite::UIActivateIO(), CBaseBar::UIActivateIO(), and CMenuSite::UIActivateIO().

◆ MayExecForward()

HRESULT WINAPI MayExecForward ( _In_ IUnknown lpUnknown,
_In_ INT  nUnknown,
_In_opt_ REFGUID  pguidCmdGroup,
_In_ DWORD  nCmdID,
_In_ DWORD  nCmdexecopt,
_In_ VARIANT pvaIn,
_Inout_ VARIANT pvaOut 
)

◆ MayQSForward()

HRESULT WINAPI MayQSForward ( _In_ IUnknown lpUnknown,
_In_ INT  nUnknown,
_In_opt_ REFGUID  riidCmdGrp,
_In_ ULONG  cCmds,
_Inout_ OLECMD *  prgCmds,
_Inout_ OLECMDTEXT *  pCmdText 
)

◆ PathFileExistsDefExtAndAttributesW()

BOOL WINAPI PathFileExistsDefExtAndAttributesW ( _Inout_ LPWSTR  pszPath,
_In_ DWORD  dwWhich,
_Out_opt_ LPDWORD  pdwFileAttributes 
)

Definition at line 300 of file utils.cpp.

304{
305 TRACE("(%s, 0x%lX, %p)\n", debugstr_w(pszPath), dwWhich, pdwFileAttributes);
306
307 if (pdwFileAttributes)
308 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
309
310 if (!pszPath)
311 return FALSE;
312
313 if (!dwWhich || (*PathFindExtensionW(pszPath) && (dwWhich & WHICH_OPTIONAL)))
314 return PathFileExistsAndAttributesW(pszPath, pdwFileAttributes);
315
316 if (!PathFileExistsDefExtW(pszPath, dwWhich))
317 {
318 if (pdwFileAttributes)
319 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
320 return FALSE;
321 }
322
323 if (pdwFileAttributes)
324 *pdwFileAttributes = GetFileAttributesW(pszPath);
325
326 return TRUE;
327}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
LPWSTR WINAPI PathFindExtensionW(const WCHAR *path)
Definition: path.c:1274
BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr)
Definition: path.c:1838
BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich)
Definition: path.c:1123
#define debugstr_w
Definition: kernel32.h:32
#define WHICH_OPTIONAL
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23

Referenced by START_TEST().

◆ PathFileExistsDefExtW()

BOOL WINAPI PathFileExistsDefExtW ( LPWSTR  lpszPath,
DWORD  dwWhich 
)

Definition at line 1123 of file path.c.

1124{
1125 static const WCHAR pszExts[][5] = { { '.', 'p', 'i', 'f', 0},
1126 { '.', 'c', 'o', 'm', 0},
1127 { '.', 'e', 'x', 'e', 0},
1128 { '.', 'b', 'a', 't', 0},
1129 { '.', 'l', 'n', 'k', 0},
1130 { '.', 'c', 'm', 'd', 0},
1131 { 0, 0, 0, 0, 0} };
1132
1133 TRACE("(%s,%d)\n", debugstr_w(lpszPath), dwWhich);
1134
1135 if (!lpszPath || PathIsUNCServerW(lpszPath) || PathIsUNCServerShareW(lpszPath))
1136 return FALSE;
1137
1138 if (dwWhich)
1139 {
1140 LPCWSTR szExt = PathFindExtensionW(lpszPath);
1141#ifndef __REACTOS__
1142 if (!*szExt || dwWhich & 0x40)
1143#else
1144 if (!*szExt || dwWhich & WHICH_OPTIONAL)
1145#endif
1146 {
1147 size_t iChoose = 0;
1148 int iLen = lstrlenW(lpszPath);
1149 if (iLen > (MAX_PATH - 5))
1150 return FALSE;
1151#ifndef __REACTOS__
1152 while ( (dwWhich & 0x1) && pszExts[iChoose][0] )
1153#else
1154 while (pszExts[iChoose][0])
1155#endif
1156 {
1157#ifdef __REACTOS__
1158 if (dwWhich & 0x1)
1159 {
1161#endif
1162 lstrcpyW(lpszPath + iLen, pszExts[iChoose]);
1163 if (PathFileExistsW(lpszPath))
1164 return TRUE;
1165#ifdef __REACTOS__
1166 }
1167#endif
1168 iChoose++;
1169 dwWhich >>= 1;
1170 }
1171 *(lpszPath + iLen) = (WCHAR)'\0';
1172 return FALSE;
1173 }
1174 }
1175 return PathFileExistsW(lpszPath);
1176}
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
BOOL WINAPI PathIsUNCServerW(LPCWSTR lpszPath)
Definition: path.c:2329
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1783
BOOL WINAPI PathIsUNCServerShareW(LPCWSTR lpszPath)
Definition: path.c:2384
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define GetFileAttributes
Definition: winbase.h:3856
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by PathFileExistsDefExtA(), PathFileExistsDefExtAndAttributesW(), PathFindOnPathExA(), PathFindOnPathExW(), PathSearchOnExtensionsW(), and SHLWAPI_PathFindInOtherDirs().

◆ PathFindOnPathExW()

BOOL WINAPI PathFindOnPathExW ( LPWSTR  lpszFile,
LPCWSTR lppszOtherDirs,
DWORD  dwWhich 
)

Definition at line 1357 of file path.c.

1358{
1360
1361 TRACE("(%s,%p,%08x)\n", debugstr_w(lpszFile), lppszOtherDirs, dwWhich);
1362
1363 if (!lpszFile || !PathIsFileSpecW(lpszFile))
1364 return FALSE;
1365
1366 /* Search provided directories first */
1367 if (lppszOtherDirs && *lppszOtherDirs)
1368 {
1369 LPCWSTR *lpszOtherPath = lppszOtherDirs;
1370 while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
1371 {
1372 PathCombineW(buff, *lpszOtherPath, lpszFile);
1373 if (PathFileExistsDefExtW(buff, dwWhich))
1374 {
1375 strcpyW(lpszFile, buff);
1376 return TRUE;
1377 }
1378 lpszOtherPath++;
1379 }
1380 }
1381 /* Not found, try system and path dirs */
1382 return SHLWAPI_PathFindInOtherDirs(lpszFile, dwWhich);
1383}
static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
Definition: path.c:1223
BOOL WINAPI PathIsFileSpecW(LPCWSTR lpszPath)
Definition: path.c:2139
static unsigned char buff[32768]
Definition: fatten.c:17
#define PathCombineW
Definition: pathcch.h:318
#define strcpyW(d, s)
Definition: unicode.h:35

Referenced by PathFindOnPathW(), PathSearchOnExtensionsW(), ShellExecCmdLine(), and WelcomeDlgProc().

◆ PathIsValidCharA()

BOOL WINAPI PathIsValidCharA ( char  c,
DWORD  dwClass 
)

Definition at line 2213 of file path.c.

2214{
2215 if ((unsigned)c > 0x7e)
2216 return class & PATH_CHAR_CLASS_OTHER_VALID;
2217
2218 return class & path_charclass[(unsigned)c];
2219}
#define PATH_CHAR_CLASS_OTHER_VALID
Definition: path.c:2139
static const DWORD path_charclass[]
Definition: path.c:2145
const GLubyte * c
Definition: glext.h:8905
static unsigned(__cdecl *hash_bstr)(bstr_t s)

◆ PathIsValidCharW()

BOOL WINAPI PathIsValidCharW ( WCHAR  c,
DWORD  dwClass 
)

Definition at line 2221 of file path.c.

2222{
2223 if (c > 0x7e)
2224 return class & PATH_CHAR_CLASS_OTHER_VALID;
2225
2226 return class & path_charclass[c];
2227}
#define c
Definition: ke_i.h:80

Referenced by PathIsValidElement(), PathQualifyExW(), SHDOCVW_PathDeleteInvalidChars(), and UrlUnescapeAndMakeFileNameValid().

◆ QueryDirect()

STDMETHOD() QueryDirect ( THIS_ ASSOCQUERY  query,
PCWSTR  key,
FLAGGED_BYTE_BLOB **  ppBlob 
)

◆ QueryDword()

STDMETHOD() QueryDword ( THIS_ ASSOCQUERY  query,
PCWSTR  key,
DWORD pdwValue 
)

◆ QueryExists()

STDMETHOD() QueryExists ( THIS_ ASSOCQUERY  query,
PCWSTR  key 
)

◆ QueryObject()

STDMETHOD() QueryObject ( THIS_ ASSOCQUERY  query,
PCWSTR  key,
REFIID  riid,
PVOID ppvObj 
)

◆ QueryString()

STDMETHOD() QueryString ( THIS_ ASSOCQUERY  query,
PCWSTR  key,
PWSTR ppszValue 
)

◆ RegCreateKeyExWrapW()

LONG WINAPI RegCreateKeyExWrapW ( _In_ HKEY  hKey,
_In_ LPCWSTR  lpSubKey,
_In_ DWORD  Reserved,
_In_opt_ LPWSTR  lpClass,
_In_ DWORD  dwOptions,
_In_ REGSAM  samDesired,
_In_opt_ LPSECURITY_ATTRIBUTES  lpSecurityAttributes,
_Out_ PHKEY  phkResult,
_Out_opt_ LPDWORD  lpdwDisposition 
)

Referenced by CMruBase::InitData().

◆ RunIndirectRegCommand()

HRESULT WINAPI RunIndirectRegCommand ( _In_opt_ HWND  hWnd,
_In_ HKEY  hKey,
_In_opt_ PCWSTR  pszSubKey,
_In_ PCWSTR  pszVerb 
)

Definition at line 250 of file utils.cpp.

251{
252 WCHAR szKey[MAX_PATH];
253 HRESULT hr;
254 if (pszSubKey)
255 hr = StringCchPrintfW(szKey, _countof(szKey), L"%s\\shell\\%s\\command", pszSubKey, pszVerb);
256 else
257 hr = StringCchPrintfW(szKey, _countof(szKey), L"shell\\%s\\command", pszVerb);
258 return SUCCEEDED(hr) ? RunRegCommand(hWnd, hKey, szKey) : hr;
259}
HWND hWnd
Definition: settings.c:17
EXTERN_C HRESULT WINAPI RunRegCommand(_In_opt_ HWND hWnd, _In_ HKEY hKey, _In_opt_ PCWSTR pszSubKey)
Definition: utils.cpp:236
#define L(x)
Definition: resources.c:13
FxAutoRegKey hKey
#define _countof(array)
Definition: sndvol32.h:70
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530

Referenced by SHRunIndirectRegClientCommand().

◆ RunRegCommand()

HRESULT WINAPI RunRegCommand ( _In_opt_ HWND  hWnd,
_In_ HKEY  hKey,
_In_opt_ PCWSTR  pszSubKey 
)

Definition at line 236 of file utils.cpp.

237{
238 WCHAR szCmd[MAX_PATH * 2];
239 DWORD cb = sizeof(szCmd);
240 DWORD error = RegGetValueW(hKey, pszSubKey, NULL, RRF_RT_REG_SZ, NULL, szCmd, &cb);
241 if (error)
244}
#define RRF_RT_REG_SZ
Definition: driver.c:575
EXTERN_C LSTATUS WINAPI RegGetValueW(HKEY, LPCWSTR, LPCWSTR, DWORD, LPDWORD, PVOID, LPDWORD)
Definition: reg.c:1931
static HRESULT ShellExecuteCommand(_In_opt_ HWND hWnd, _In_ PCWSTR Command, _In_opt_ UINT Flags)
Definition: utils.cpp:212
#define error(str)
Definition: mkdosfs.c:1605
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
#define SEE_MASK_FLAG_LOG_USAGE
Definition: shellapi.h:55
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92

Referenced by RunIndirectRegCommand().

◆ SHAboutInfoA()

BOOL WINAPI SHAboutInfoA ( LPSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 915 of file ordinal.c.

916{
917 WCHAR buff[2084];
918
919 TRACE("(%p,%d)\n", lpszDest, dwDestLen);
920
921 if (lpszDest && SHAboutInfoW(buff, dwDestLen))
922 {
923 WideCharToMultiByte(CP_ACP, 0, buff, -1, lpszDest, dwDestLen, NULL, NULL);
924 return TRUE;
925 }
926 return FALSE;
927}
WCHAR lpszDest[260]
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
BOOL WINAPI SHAboutInfoW(LPWSTR, DWORD)
Definition: ordinal.c:934

◆ SHAboutInfoW()

BOOL WINAPI SHAboutInfoW ( LPWSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 934 of file ordinal.c.

935{
936 static const WCHAR szIEKey[] = { 'S','O','F','T','W','A','R','E','\\',
937 'M','i','c','r','o','s','o','f','t','\\','I','n','t','e','r','n','e','t',
938 ' ','E','x','p','l','o','r','e','r','\0' };
939 static const WCHAR szWinNtKey[] = { 'S','O','F','T','W','A','R','E','\\',
940 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',' ',
941 'N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0' };
942 static const WCHAR szWinKey[] = { 'S','O','F','T','W','A','R','E','\\',
943 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
944 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0' };
945 static const WCHAR szRegKey[] = { 'S','O','F','T','W','A','R','E','\\',
946 'M','i','c','r','o','s','o','f','t','\\','I','n','t','e','r','n','e','t',
947 ' ','E','x','p','l','o','r','e','r','\\',
948 'R','e','g','i','s','t','r','a','t','i','o','n','\0' };
949 static const WCHAR szVersion[] = { 'V','e','r','s','i','o','n','\0' };
950 static const WCHAR szCustomized[] = { 'C','u','s','t','o','m','i','z','e','d',
951 'V','e','r','s','i','o','n','\0' };
952 static const WCHAR szOwner[] = { 'R','e','g','i','s','t','e','r','e','d',
953 'O','w','n','e','r','\0' };
954 static const WCHAR szOrg[] = { 'R','e','g','i','s','t','e','r','e','d',
955 'O','r','g','a','n','i','z','a','t','i','o','n','\0' };
956 static const WCHAR szProduct[] = { 'P','r','o','d','u','c','t','I','d','\0' };
957 static const WCHAR szUpdate[] = { 'I','E','A','K',
958 'U','p','d','a','t','e','U','r','l','\0' };
959 static const WCHAR szHelp[] = { 'I','E','A','K',
960 'H','e','l','p','S','t','r','i','n','g','\0' };
961 WCHAR buff[2084];
962 HKEY hReg;
963 DWORD dwType, dwLen;
964
965 TRACE("(%p,%d)\n", lpszDest, dwDestLen);
966
967 if (!lpszDest)
968 return FALSE;
969
970 *lpszDest = '\0';
971
972 /* Try the NT key first, followed by 95/98 key */
973 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szWinNtKey, 0, KEY_READ, &hReg) &&
974 RegOpenKeyExW(HKEY_LOCAL_MACHINE, szWinKey, 0, KEY_READ, &hReg))
975 return FALSE;
976
977 /* OS Version */
978 buff[0] = '\0';
979 dwLen = 30;
980 if (!SHGetValueW(HKEY_LOCAL_MACHINE, szIEKey, szVersion, &dwType, buff, &dwLen))
981 {
982 DWORD dwStrLen = strlenW(buff);
983 dwLen = 30 - dwStrLen;
985 szCustomized, &dwType, buff+dwStrLen, &dwLen);
986 }
987 StrCatBuffW(lpszDest, buff, dwDestLen);
988
989 /* ~Registered Owner */
990 buff[0] = '~';
991 dwLen = 256;
992 if (SHGetValueW(hReg, szOwner, 0, &dwType, buff+1, &dwLen))
993 buff[1] = '\0';
994 StrCatBuffW(lpszDest, buff, dwDestLen);
995
996 /* ~Registered Organization */
997 dwLen = 256;
998 if (SHGetValueW(hReg, szOrg, 0, &dwType, buff+1, &dwLen))
999 buff[1] = '\0';
1000 StrCatBuffW(lpszDest, buff, dwDestLen);
1001
1002 /* FIXME: Not sure where this number comes from */
1003 buff[0] = '~';
1004 buff[1] = '0';
1005 buff[2] = '\0';
1006 StrCatBuffW(lpszDest, buff, dwDestLen);
1007
1008 /* ~Product Id */
1009 dwLen = 256;
1010 if (SHGetValueW(HKEY_LOCAL_MACHINE, szRegKey, szProduct, &dwType, buff+1, &dwLen))
1011 buff[1] = '\0';
1012 StrCatBuffW(lpszDest, buff, dwDestLen);
1013
1014 /* ~IE Update Url */
1015 dwLen = 2048;
1016 if(SHGetValueW(HKEY_LOCAL_MACHINE, szWinKey, szUpdate, &dwType, buff+1, &dwLen))
1017 buff[1] = '\0';
1018 StrCatBuffW(lpszDest, buff, dwDestLen);
1019
1020 /* ~IE Help String */
1021 dwLen = 256;
1022 if(SHGetValueW(hReg, szHelp, 0, &dwType, buff+1, &dwLen))
1023 buff[1] = '\0';
1024 StrCatBuffW(lpszDest, buff, dwDestLen);
1025
1026 RegCloseKey(hReg);
1027 return TRUE;
1028}
#define RegCloseKey(hKey)
Definition: registry.h:49
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
WCHAR *WINAPI StrCatBuffW(WCHAR *str, const WCHAR *cat, INT max_len)
Definition: string.c:1390
DWORD WINAPI SHGetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
Definition: reg.c:1236
static LPCWSTR szVersion
Definition: asmcache.c:748
#define KEY_READ
Definition: nt_native.h:1023
#define strlenW(s)
Definition: unicode.h:34
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by SHAboutInfoA().

◆ SHAddDataBlock()

BOOL WINAPI SHAddDataBlock ( LPDBLIST lppList,
const DATABLOCK_HEADER lpNewItem 
)

Definition at line 68 of file clist.c.

69{
70 LPDATABLOCK_HEADER lpInsertAt = NULL;
71 ULONG ulSize;
72
73 TRACE("(%p,%p)\n", lppList, lpNewItem);
74
75 if(!lppList || !lpNewItem)
76 return FALSE;
77
78 if (lpNewItem->cbSize < sizeof(DATABLOCK_HEADER) ||
79 lpNewItem->dwSignature == CLIST_ID_CONTAINER)
80 return FALSE;
81
82 ulSize = lpNewItem->cbSize;
83
84 if(ulSize & 0x3)
85 {
86 /* Tune size to a ULONG boundary, add space for container element */
87 ulSize = ((ulSize + 0x3) & 0xFFFFFFFC) + sizeof(DATABLOCK_HEADER);
88 TRACE("Creating container item, new size = %d\n", ulSize);
89 }
90
91 if(!*lppList)
92 {
93 /* An empty list. Allocate space for terminal ulSize also */
94 *lppList = LocalAlloc(LMEM_ZEROINIT, ulSize + sizeof(ULONG));
95 lpInsertAt = *lppList;
96 }
97 else
98 {
99 /* Append to the end of the list */
100 ULONG ulTotalSize = 0;
101 LPDATABLOCK_HEADER lpIter = *lppList;
102
103 /* Iterate to the end of the list, calculating the total size */
104 while (lpIter->cbSize)
105 {
106 ulTotalSize += lpIter->cbSize;
107 lpIter = NextItem(lpIter);
108 }
109
110 /* Increase the size of the list */
111 lpIter = LocalReAlloc(*lppList, ulTotalSize + ulSize+sizeof(ULONG),
113 if(lpIter)
114 {
115 *lppList = lpIter;
116 lpInsertAt = (LPDATABLOCK_HEADER)((char*)lpIter + ulTotalSize); /* At end */
117 }
118 }
119
120 if(lpInsertAt)
121 {
122 /* Copy in the new item */
123 LPDATABLOCK_HEADER lpDest = lpInsertAt;
124
125 if(ulSize != lpNewItem->cbSize)
126 {
127 lpInsertAt->cbSize = ulSize;
128 lpInsertAt->dwSignature = CLIST_ID_CONTAINER;
129 lpDest++;
130 }
131 memcpy(lpDest, lpNewItem, lpNewItem->cbSize);
132
133 /* Terminate the list */
134 lpInsertAt = NextItem(lpInsertAt);
135 lpInsertAt->cbSize = 0;
136
137 return TRUE;
138 }
139 return FALSE;
140}
static LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
Definition: clist.c:42
#define CLIST_ID_CONTAINER
Definition: clist.c:35
HLOCAL NTAPI LocalReAlloc(HLOCAL hMem, SIZE_T dwBytes, UINT uFlags)
Definition: heapmem.c:1625
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
struct tagDATABLOCKHEADER * LPDATABLOCK_HEADER
struct tagDATABLOCKHEADER DATABLOCK_HEADER
uint32_t ULONG
Definition: typedefs.h:59
#define LMEM_MOVEABLE
Definition: winbase.h:402
#define LMEM_ZEROINIT
Definition: winbase.h:408

Referenced by CShellLink::AddDataBlock(), and SHReadDataBlockList().

◆ SHAnsiToUnicode()

DWORD WINAPI SHAnsiToUnicode ( LPCSTR  lpSrcStr,
LPWSTR  lpDstStr,
INT  iLen 
)

◆ SHAnsiToUnicodeCP()

DWORD WINAPI SHAnsiToUnicodeCP ( DWORD  dwCp,
LPCSTR  lpSrcStr,
LPWSTR  lpDstStr,
int  iLen 
)

Definition at line 2648 of file string.c.

2649{
2650 DWORD dwRet;
2651
2652 dwRet = MultiByteToWideChar(dwCp, 0, lpSrcStr, -1, lpDstStr, iLen);
2653 TRACE("%s->%s,ret=%d\n", debugstr_a(lpSrcStr), debugstr_w(lpDstStr), dwRet);
2654 return dwRet;
2655}
#define MultiByteToWideChar
Definition: compat.h:110

Referenced by SHAnsiToUnicode().

◆ SHBoolSystemParametersInfo()

EXTERN_C BOOL WINAPI SHBoolSystemParametersInfo ( UINT  uiAction,
PVOID  pvParam 
)

◆ SHCheckMenuItem()

DWORD WINAPI SHCheckMenuItem ( HMENU  hMenu,
UINT  uID,
BOOL  bCheck 
)

Definition at line 1800 of file ordinal.c.

1801{
1802 TRACE("%p, %u, %d\n", hMenu, uID, bCheck);
1803 return CheckMenuItem(hMenu, uID, bCheck ? MF_CHECKED : MF_UNCHECKED);
1804}
#define MF_CHECKED
Definition: winuser.h:132
#define MF_UNCHECKED
Definition: winuser.h:204
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)

Referenced by CInternetToolbar::OnContextMenu(), and CShellBrowser::UpdateViewMenu().

◆ SHCreatePropertyBagOnMemory()

HRESULT WINAPI SHCreatePropertyBagOnMemory ( _In_ DWORD  dwMode,
_In_ REFIID  riid,
_Out_ void **  ppvObj 
)

Definition at line 254 of file propbag.cpp.

255{
256 TRACE("0x%08X, %s, %p\n", dwMode, debugstr_guid(&riid), ppvObj);
257
258 *ppvObj = NULL;
259
260 CComPtr<CMemPropertyBag> pMemBag(new CMemPropertyBag(dwMode));
261
262 return pMemBag->QueryInterface(riid, ppvObj);
263}

Referenced by SHCreatePropertyBag(), and SHPropertyBag_OnMemory().

◆ SHCreatePropertyBagOnProfileSection()

HRESULT WINAPI SHCreatePropertyBagOnProfileSection ( _In_z_ LPCWSTR  lpFileName,
_In_opt_z_ LPCWSTR  pszSection,
_In_ DWORD  dwMode,
_In_ REFIID  riid,
_Out_ void **  ppvObj 
)

Definition at line 965 of file propbag.cpp.

971{
973 PWCHAR pchFileTitle;
974 WCHAR szBuff[MAX_PATH];
975
976 if (dwMode & STGM_CREATE)
977 {
981 {
982 pchFileTitle = PathFindFileNameW(lpFileName);
983 if (lstrcmpiW(pchFileTitle, L"desktop.ini") == 0)
984 {
985 StrCpyNW(szBuff, lpFileName, _countof(szBuff));
986 if (PathRemoveFileSpecW(szBuff))
987 PathMakeSystemFolderW(szBuff);
988 }
990 }
991 }
992
993 *ppvObj = NULL;
994
997
998 CComPtr<CIniPropertyBag> pIniPB(new CIniPropertyBag(dwMode));
999
1000 HRESULT hr = pIniPB->Init(lpFileName, pszSection);
1001 if (FAILED(hr))
1002 {
1003 ERR("0x%08X\n", hr);
1004 return hr;
1005 }
1006
1007 return pIniPB->QueryInterface(riid, ppvObj);
1008}
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileW
Definition: compat.h:741
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4265
WCHAR *WINAPI PathFindFileNameW(const WCHAR *path)
Definition: path.c:1701
BOOL WINAPI PathRemoveFileSpecW(WCHAR *path)
Definition: path.c:1145
BOOL WINAPI PathFileExistsW(const WCHAR *path)
Definition: path.c:2607
WCHAR *WINAPI StrCpyNW(WCHAR *dst, const WCHAR *src, int count)
Definition: string.c:462
BOOL WINAPI PathMakeSystemFolderW(LPCWSTR lpszPath)
Definition: path.c:3126
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define CREATE_NEW
Definition: disk.h:69
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
_In_ HANDLE hFile
Definition: mswsock.h:90
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
#define STGM_CREATE
Definition: objbase.h:926
uint16_t * PWCHAR
Definition: typedefs.h:56
_In_ LPCSTR lpFileName
Definition: winbase.h:3112

Referenced by SHPropertyBag_OnIniFile().

◆ SHCreatePropertyBagOnRegKey()

HRESULT WINAPI SHCreatePropertyBagOnRegKey ( _In_ HKEY  hKey,
_In_z_ LPCWSTR  pszSubKey,
_In_ DWORD  dwMode,
_In_ REFIID  riid,
_Out_ void **  ppvObj 
)

Definition at line 575 of file propbag.cpp.

581{
582 TRACE("%p, %s, 0x%08X, %s, %p\n", hKey, debugstr_w(pszSubKey), dwMode,
583 debugstr_guid(&riid), ppvObj);
584
585 *ppvObj = NULL;
586
587 CComPtr<CRegPropertyBag> pRegBag(new CRegPropertyBag(dwMode));
588
589 HRESULT hr = pRegBag->Init(hKey, pszSubKey);
590 if (FAILED(hr))
591 return hr;
592
593 return pRegBag->QueryInterface(riid, ppvObj);
594}

Referenced by CViewStatePropertyBag::_CreateBag(), and CViewStatePropertyBag::_FindNearestInheritBag().

◆ SHCreateWorkerWindowA()

HWND WINAPI SHCreateWorkerWindowA ( WNDPROC  wndProc,
HWND  hWndParent,
DWORD  dwExStyle,
DWORD  dwStyle,
HMENU  hMenu,
LONG_PTR  wnd_extra 
)

Definition at line 2798 of file ordinal.c.

2800{
2801 static const char szClass[] = "WorkerA";
2802 WNDCLASSA wc;
2803 HWND hWnd;
2804
2805 TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
2806 wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2807
2808 /* Create Window class */
2809 wc.style = 0;
2811 wc.cbClsExtra = 0;
2812 wc.cbWndExtra = sizeof(LONG_PTR);
2814 wc.hIcon = NULL;
2816 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
2817 wc.lpszMenuName = NULL;
2818 wc.lpszClassName = szClass;
2819
2820 SHRegisterClassA(&wc);
2821
2822 hWnd = CreateWindowExA(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
2823 hWndParent, hMenu, shlwapi_hInstance, 0);
2824 if (hWnd)
2825 {
2826 SetWindowLongPtrW(hWnd, 0, wnd_extra);
2828 }
2829
2830 return hWnd;
2831}
HINSTANCE shlwapi_hInstance
Definition: shlwapi_main.c:33
DWORD WINAPI SHRegisterClassA(WNDCLASSA *wndclass)
Definition: ordinal.c:1817
static LRESULT WINAPI wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: imm32.c:185
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HBRUSH hbrBackground
Definition: winuser.h:3246
HICON hIcon
Definition: winuser.h:3244
HINSTANCE hInstance
Definition: winuser.h:3243
HCURSOR hCursor
Definition: winuser.h:3245
int cbWndExtra
Definition: winuser.h:3242
UINT style
Definition: winuser.h:3239
LPCSTR lpszMenuName
Definition: winuser.h:3247
LPCSTR lpszClassName
Definition: winuser.h:3248
WNDPROC lpfnWndProc
Definition: winuser.h:3240
int cbClsExtra
Definition: winuser.h:3241
#define LONG_PTR
Definition: treelist.c:79
#define GWLP_WNDPROC
Definition: treelist.c:66
#define SetWindowLongPtrA
Definition: winuser.h:5430
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_ARROW
Definition: winuser.h:695
#define SetWindowLongPtrW
Definition: winuser.h:5431
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2427
#define COLOR_BTNFACE
Definition: winuser.h:939
char * LPSTR
Definition: xmlstorage.h:182

Referenced by init_pointers(), and SHCreateWorkerWindowW().

◆ SHCreateWorkerWindowW()

HWND WINAPI SHCreateWorkerWindowW ( WNDPROC  wndProc,
HWND  hWndParent,
DWORD  dwExStyle,
DWORD  dwStyle,
HMENU  hMenu,
LONG_PTR  wnd_extra 
)

Definition at line 3123 of file ordinal.c.

3125{
3126 static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', 0 };
3127 WNDCLASSW wc;
3128 HWND hWnd;
3129
3130 TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
3131 wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
3132
3133 /* If our OS is natively ANSI, use the ANSI version */
3134 if (GetVersion() & 0x80000000) /* not NT */
3135 {
3136 TRACE("fallback to ANSI, ver 0x%08x\n", GetVersion());
3137 return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
3138 }
3139
3140 /* Create Window class */
3141 wc.style = 0;
3143 wc.cbClsExtra = 0;
3144 wc.cbWndExtra = sizeof(LONG_PTR);
3146 wc.hIcon = NULL;
3148 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
3149 wc.lpszMenuName = NULL;
3150 wc.lpszClassName = szClass;
3151
3152 SHRegisterClassW(&wc);
3153
3154 hWnd = CreateWindowExW(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
3155 hWndParent, hMenu, shlwapi_hInstance, 0);
3156 if (hWnd)
3157 {
3158 SetWindowLongPtrW(hWnd, 0, wnd_extra);
3160 }
3161
3162 return hWnd;
3163}
DWORD WINAPI GetVersion(void)
Definition: version.c:1458
DWORD WINAPI SHRegisterClassW(WNDCLASSW *lpWndClass)
Definition: ordinal.c:2678
HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2798
LPCWSTR lpszClassName
Definition: winuser.h:3261
LPCWSTR lpszMenuName
Definition: winuser.h:3260
HBRUSH hbrBackground
Definition: winuser.h:3259
HICON hIcon
Definition: winuser.h:3257
HINSTANCE hInstance
Definition: winuser.h:3256
int cbClsExtra
Definition: winuser.h:3254
UINT style
Definition: winuser.h:3252
WNDPROC lpfnWndProc
Definition: winuser.h:3253
int cbWndExtra
Definition: winuser.h:3255
HCURSOR hCursor
Definition: winuser.h:3258
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2442
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by DoShellContextMenu(), CToolbarProxy::Initialize(), CBrandBand::SetSite(), CInternetToolbar::SetSite(), SHCreateDefaultWorkerWindow(), and CUserNotification::Show().

◆ ShellMessageBoxWrapW()

int WINAPIV ShellMessageBoxWrapW ( _In_opt_ HINSTANCE  hAppInst,
_In_opt_ HWND  hWnd,
_In_ LPCWSTR  lpcText,
_In_opt_ LPCWSTR  lpcTitle,
_In_ UINT  fuStyle,
  ... 
)

◆ SHEnableMenuItem()

UINT WINAPI SHEnableMenuItem ( HMENU  hMenu,
UINT  wItemID,
BOOL  bEnable 
)

Definition at line 1781 of file ordinal.c.

1782{
1783 TRACE("%p, %u, %d\n", hMenu, wItemID, bEnable);
1784 return EnableMenuItem(hMenu, wItemID, bEnable ? MF_ENABLED : MF_GRAYED);
1785}
_In_ BOOL bEnable
Definition: winddi.h:3426
#define MF_ENABLED
Definition: winuser.h:128
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define MF_GRAYED
Definition: winuser.h:129

Referenced by CInternetToolbar::OnContextMenu(), CShellBrowser::OnInitMenuPopup(), CShellBrowser::UpdateGotoMenu(), and CShellBrowser::UpdateViewMenu().

◆ SHExpandEnvironmentStringsA()

DWORD WINAPI SHExpandEnvironmentStringsA ( LPCSTR  ,
LPSTR  ,
DWORD   
)

◆ SHExpandEnvironmentStringsW()

◆ SHFillRectClr()

DWORD WINAPI SHFillRectClr ( HDC  hDC,
LPCRECT  pRect,
COLORREF  cRef 
)

Definition at line 2133 of file ordinal.c.

2134{
2135 COLORREF cOldColor = SetBkColor(hDC, cRef);
2136 ExtTextOutA(hDC, 0, 0, ETO_OPAQUE, pRect, 0, 0, 0);
2137 SetBkColor(hDC, cOldColor);
2138 return 0;
2139}
static HDC hDC
Definition: 3dtext.c:33
DWORD COLORREF
Definition: windef.h:300
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:999
BOOL WINAPI ExtTextOutA(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
#define ETO_OPAQUE
Definition: wingdi.h:647

Referenced by CDefView::OnPrintClient().

◆ SHFindDataBlock()

DATABLOCK_HEADER *WINAPI SHFindDataBlock ( LPDBLIST  lpList,
DWORD  dwSignature 
)

Definition at line 424 of file clist.c.

425{
426 TRACE("(%p,%d)\n", lpList, dwSignature);
427
428 if(lpList)
429 {
430 while(lpList->cbSize)
431 {
432 if(lpList->dwSignature == dwSignature)
433 return lpList; /* Matched */
434 else if(lpList->dwSignature == CLIST_ID_CONTAINER && lpList[1].dwSignature == dwSignature)
435 return lpList + 1; /* Contained item matches */
436
437 lpList = NextItem(lpList);
438 }
439 }
440 return NULL;
441}

Referenced by CShellLink::CopyDataBlock(), CShellLink::GetAdvertiseInfo(), CShellLink::GetIconLocation(), CShellLink::GetPath(), CShellLink::Load(), CShellLink::SetIconLocation(), CShellLink::SetPath(), and CShellLink::WriteAdvertiseInfo().

◆ SHForwardContextMenuMsg()

HRESULT WINAPI SHForwardContextMenuMsg ( IUnknown pUnk,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT pResult,
BOOL  useIContextMenu2 
)

Definition at line 11 of file rosordinal.c.

13{
14 HRESULT hr;
15 IContextMenu3* pcmenu3;
16 IContextMenu2* pcmenu2;
17
18 if (!pUnk)
19 return E_FAIL;
20
21 /* First try to use the IContextMenu3 interface */
22 hr = IUnknown_QueryInterface(pUnk, &IID_IContextMenu3, (void**)&pcmenu3);
23 if (SUCCEEDED(hr))
24 {
25 hr = IContextMenu3_HandleMenuMsg2(pcmenu3, uMsg, wParam, lParam, pResult);
26 IContextMenu3_Release(pcmenu3);
27 return hr;
28 }
29
30 /* Return failure if we can't use the IContextMenu2 interface */
31 if(!useIContextMenu2)
32 return hr;
33
34 /* Now try to use the IContextMenu2 interface */
35 hr = IUnknown_QueryInterface(pUnk, &IID_IContextMenu2, (void**)&pcmenu2);
36 if (FAILED(hr))
37 return hr;
38
39 hr = IContextMenu2_HandleMenuMsg(pcmenu2, uMsg, wParam, lParam);
40 IContextMenu2_Release(pcmenu2);
41 if (pResult)
42 *pResult = 0;
43 return hr == S_OK ? S_FALSE : hr;
44}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define S_FALSE
Definition: winerror.h:2357

Referenced by BrFolderDlgProc(), DumpMenu(), CDefaultContextMenu::HandleMenuMsg2(), MenuMessageForwarderWndProc(), CDefView::OnMenuMessage(), and ShellContextMenuWindowProc().

◆ SHFreeDataBlockList()

VOID WINAPI SHFreeDataBlockList ( LPDBLIST  lpList)

Definition at line 331 of file clist.c.

332{
333 TRACE("(%p)\n", lpList);
334
335 if (lpList)
336 LocalFree(lpList);
337}
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594

Referenced by DumpCommand(), CShellLink::Reset(), and CShellLink::~CShellLink().

◆ SHGetAppCompatFlags()

DWORD WINAPI SHGetAppCompatFlags ( _In_ DWORD  dwMask)

Definition at line 433 of file appcompat.c.

434{
435 TRACE("(0x%lX)\n", dwMask);
436
437 // Initialize and retrieve flags if necessary
438 if (dwMask & SHACF_TO_INIT)
439 {
441 {
442 DWORD dwAppCompatFlags = SHLWAPI_InitAppCompat();
443 InterlockedExchange((PLONG)&g_dwAppCompatFlags, dwAppCompatFlags);
444
445 g_fAppCompatInitialized = TRUE; // Mark as initialized
446 }
447 }
448
449 // Retrieve additional flags if necessary
450 DWORD dwAppCompatFlags = g_dwAppCompatFlags;
451 if (dwAppCompatFlags && (dwMask & (SHACF_UNKNOWN1 | SHACF_UNKNOWN2)))
452 {
453 // Find the target window and its flags using g_wndCompatInfo
455 {
457 };
459
460 // Add the target flags if a match is found
461 if (data.iFound >= 0)
462 dwAppCompatFlags |= g_wndCompatInfo[data.iFound].dwCompatFlags;
463
464 dwAppCompatFlags |= SHACF_UNKNOWN3;
465
466 InterlockedExchange((PLONG)&g_dwAppCompatFlags, dwAppCompatFlags);
467 }
468
469 return dwAppCompatFlags;
470}
#define InterlockedExchange
Definition: armddk.h:54
static WNDCOMPATINFO g_wndCompatInfo[]
Definition: appcompat.c:119
static DWORD SHLWAPI_InitAppCompat(VOID)
Definition: appcompat.c:374
static BOOL CALLBACK SHLWAPI_WndCompatEnumProc(_In_ HWND hWnd, _In_ LPARAM lParam)
Definition: appcompat.c:136
static DWORD g_dwAppCompatFlags
Definition: appcompat.c:19
#define SHACF_TO_INIT
Definition: appcompat.c:407
static BOOL g_fAppCompatInitialized
Definition: appcompat.c:17
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define SHACF_UNKNOWN1
#define SHACF_UNKNOWN3
#define SHACF_UNKNOWN2
DWORD dwCompatFlags
Definition: appcompat.c:117
int32_t * PLONG
Definition: typedefs.h:58
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1158
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)

Referenced by ShellExecuteA(), and ShellExecuteW().

◆ SHGetCurColorRes()

DWORD WINAPI SHGetCurColorRes ( void  )

Definition at line 2023 of file ordinal.c.

2024{
2025 HDC hdc;
2026 DWORD ret;
2027
2028 TRACE("()\n");
2029
2030 hdc = GetDC(0);
2032 ReleaseDC(0, hdc);
2033 return ret;
2034}
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define PLANES
Definition: wingdi.h:721
#define BITSPIXEL
Definition: wingdi.h:720
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by CBrandBand::SelectImage(), and SIC_GetIconBPP().

◆ SHGetIniStringUTF7W()

DWORD WINAPI SHGetIniStringUTF7W ( _In_opt_z_ LPCWSTR  lpAppName,
_In_z_ LPCWSTR  lpKeyName,
_Out_writes_to_(nSize, return+1) _Post_z_ LPWSTR  lpReturnedString,
_In_ DWORD  nSize,
_In_z_ LPCWSTR  lpFileName 
)

Definition at line 722 of file propbag.cpp.

728{
729 if (*lpKeyName == L'@') // UTF-7
730 return SHGetIniStringW(lpAppName, lpKeyName + 1, lpReturnedString, nSize, lpFileName);
731
732 return GetPrivateProfileStringW(lpAppName, lpKeyName, L"", lpReturnedString, nSize, lpFileName);
733}
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Definition: profile.c:1142
EXTERN_C DWORD WINAPI SHGetIniStringW(_In_z_ LPCWSTR appName, _In_z_ LPCWSTR keyName, _Out_writes_to_(outLen, return+1) LPWSTR out, _In_ DWORD outLen, _In_z_ LPCWSTR filename)
Definition: propbag.cpp:602
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2125

Referenced by CIniPropertyBag::Read().

◆ SHGetIniStringW()

DWORD WINAPI SHGetIniStringW ( _In_z_ LPCWSTR  appName,
_In_z_ LPCWSTR  keyName,
_Out_writes_to_(outLen, return+1) LPWSTR  out,
_In_ DWORD  outLen,
_In_z_ LPCWSTR  filename 
)

Definition at line 602 of file propbag.cpp.

608{
609 TRACE("(%s,%s,%p,%08x,%s)\n", debugstr_w(appName), debugstr_w(keyName),
610 out, outLen, debugstr_w(filename));
611
612 if (outLen == 0)
613 return 0;
614
615 // Try ".W"-appended section name. See also SHSetIniStringW
616 CStringW szSection(appName);
617 szSection += L".W";
618 CStringW pszWideBuff;
619 const INT cchWideMax = 4 * MAX_PATH; // UTF-7 needs 4 times length buffer.
620 GetPrivateProfileStringW(szSection, keyName, NULL,
621 pszWideBuff.GetBuffer(cchWideMax), cchWideMax, filename);
622 pszWideBuff.ReleaseBuffer();
623
624 if (pszWideBuff.IsEmpty()) // It's empty or not found
625 {
626 // Try the normal section name
627 return GetPrivateProfileStringW(appName, keyName, NULL, out, outLen, filename);
628 }
629
630 // Okay, now ".W" version is valid. Its value is a UTF-7 string in UTF-16
631 CW2A wide2utf7(pszWideBuff);
632 MultiByteToWideChar(CP_UTF7, 0, wide2utf7, -1, out, outLen);
633 out[outLen - 1] = UNICODE_NULL;
634
635 return lstrlenW(out);
636}
bool IsEmpty() const noexcept
Definition: atlsimpstr.h:394
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
const char * filename
Definition: ioapi.h:137
const char * appName(const char *argv0)
Definition: loadlib.c:89
#define UNICODE_NULL
int32_t INT
Definition: typedefs.h:58
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define CP_UTF7
Definition: winnls.h:253

Referenced by SHGetIniStringUTF7W().

◆ SHGetMenuFromID()

HMENU WINAPI SHGetMenuFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 1997 of file ordinal.c.

1998{
2000
2001 TRACE("(%p,%u)\n", hMenu, uID);
2002
2003 mi.cbSize = sizeof(mi);
2004 mi.fMask = MIIM_SUBMENU;
2005
2006 if (!GetMenuItemInfoW(hMenu, uID, FALSE, &mi))
2007 return NULL;
2008
2009 return mi.hSubMenu;
2010}
static MONITORINFO mi
Definition: win.c:7338
DWORD cbSize
Definition: winuser.h:3860
#define MIIM_SUBMENU
Definition: winuser.h:734
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)

Referenced by CShellBrowser::BuildExplorerBandMenu(), CShellBrowser::OnInitMenuPopup(), and CShellBrowser::UpdateViewMenu().

◆ SHGetObjectCompatFlags()

DWORD WINAPI SHGetObjectCompatFlags ( IUnknown pUnk,
const CLSID clsid 
)

Definition at line 6482 of file ordinal.c.

6483{
6484 static const WCHAR compatpathW[] =
6485 {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
6486 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
6487 'S','h','e','l','l','C','o','m','p','a','t','i','b','i','l','i','t','y','\\',
6488 'O','b','j','e','c','t','s','\\','%','s',0};
6489 WCHAR strW[sizeof(compatpathW)/sizeof(WCHAR) + 38 /* { CLSID } */];
6490 DWORD ret, length = sizeof(strW)/sizeof(WCHAR);
6491 OLECHAR *clsid_str;
6492 HKEY key;
6493 INT i;
6494
6495 TRACE("%p %s\n", pUnk, debugstr_guid(clsid));
6496
6497 if (!pUnk && !clsid) return 0;
6498
6499 if (pUnk && !clsid)
6500 {
6501 FIXME("iface not handled\n");
6502 return 0;
6503 }
6504
6505 StringFromCLSID(clsid, &clsid_str);
6506 sprintfW(strW, compatpathW, clsid_str);
6507 CoTaskMemFree(clsid_str);
6508
6510 if (ret != ERROR_SUCCESS) return 0;
6511
6512 /* now collect flag values */
6513 ret = 0;
6514 for (i = 0; RegEnumValueW(key, i, strW, &length, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; i++)
6515 {
6516 INT left, right, res, x;
6517
6518 /* search in table */
6519 left = 0;
6520 right = sizeof(objcompat_table) / sizeof(struct objcompat_entry) - 1;
6521
6522 while (right >= left) {
6523 x = (left + right) / 2;
6525 if (res == 0)
6526 {
6527 ret |= objcompat_table[x].value;
6528 break;
6529 }
6530 else if (res < 0)
6531 right = x - 1;
6532 else
6533 left = x + 1;
6534 }
6535
6536 length = sizeof(strW)/sizeof(WCHAR);
6537 }
6538
6539 return ret;
6540}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3268
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
Definition: reg.c:2830
WCHAR OLECHAR
Definition: compat.h:2292
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
static const struct objcompat_entry objcompat_table[]
Definition: ordinal.c:6440
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint res
Definition: glext.h:9613
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
WCHAR strW[12]
Definition: clipboard.c:2029
#define strcmpW(s1, s2)
Definition: unicode.h:44
#define sprintfW
Definition: unicode.h:64
Definition: copy.c:22
Definition: name.c:39
Definition: ordinal.c:6434

Referenced by init_pointers(), and SHGetAttributes().

◆ SHGetPathFromIDListWrapW()

BOOL WINAPI SHGetPathFromIDListWrapW ( LPCITEMIDLIST  pidl,
LPWSTR  pszPath 
)

Definition at line 3591 of file ordinal.c.

3592{
3593 return SHGetPathFromIDListW(pidl, pszPath);
3594}
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1490

Referenced by _ILIsNetworkPlace().

◆ SHGetPerScreenResName()

INT WINAPI SHGetPerScreenResName ( _Out_writes_(cchBuffer) LPWSTR  pszBuffer,
_In_ INT  cchBuffer,
_In_ DWORD  dwReserved 
)

Definition at line 1938 of file propbag.cpp.

1942{
1943 if (dwReserved)
1944 return 0;
1945
1946 HDC hDC = ::GetDC(NULL);
1947 INT cxWidth = ::GetDeviceCaps(hDC, HORZRES);
1948 INT cyHeight = ::GetDeviceCaps(hDC, VERTRES);
1949 INT cMonitors = ::GetSystemMetrics(SM_CMONITORS);
1951
1952 StringCchPrintfW(pszBuffer, cchBuffer, L"%dx%d(%d)", cxWidth, cyHeight, cMonitors);
1953 return lstrlenW(pszBuffer);
1954}
static DWORD cchBuffer
Definition: fusion.c:85
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
#define HORZRES
Definition: wingdi.h:716
#define VERTRES
Definition: wingdi.h:717
#define SM_CMONITORS
Definition: winuser.h:1051
int WINAPI GetSystemMetrics(_In_ int)

Referenced by CDefView::SaveViewState(), and SHPropertyBag_PerScreenRes().

◆ SHGetShellKey()

HKEY WINAPI SHGetShellKey ( DWORD  flags,
LPCWSTR  sub_key,
BOOL  create 
)

Definition at line 4789 of file ordinal.c.

4790{
4791#ifndef __REACTOS__
4792 enum _shellkey_flags {
4793 SHKEY_Root_HKCU = 0x1,
4794 SHKEY_Root_HKLM = 0x2,
4795 SHKEY_Key_Explorer = 0x00,
4796 SHKEY_Key_Shell = 0x10,
4797 SHKEY_Key_ShellNoRoam = 0x20,
4798 SHKEY_Key_Classes = 0x30,
4799 SHKEY_Subkey_Default = 0x0000,
4801 SHKEY_Subkey_Handlers = 0x2000,
4803 SHKEY_Subkey_Volatile = 0x4000,
4804 SHKEY_Subkey_MUICache = 0x5000,
4805 SHKEY_Subkey_FileExts = 0x6000
4806 };
4807#endif
4808
4809 static const WCHAR explorerW[] = {'S','o','f','t','w','a','r','e','\\',
4810 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4811 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
4812 'E','x','p','l','o','r','e','r','\\'};
4813 static const WCHAR shellW[] = {'S','o','f','t','w','a','r','e','\\',
4814 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4815 'S','h','e','l','l','\\'};
4816 static const WCHAR shell_no_roamW[] = {'S','o','f','t','w','a','r','e','\\',
4817 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4818 'S','h','e','l','l','N','o','R','o','a','m','\\'};
4819 static const WCHAR classesW[] = {'S','o','f','t','w','a','r','e','\\',
4820 'C','l','a','s','s','e','s','\\'};
4821
4822 static const WCHAR localized_resource_nameW[] = {'L','o','c','a','l','i','z','e','d',
4823 'R','e','s','o','u','r','c','e','N','a','m','e','\\'};
4824 static const WCHAR handlersW[] = {'H','a','n','d','l','e','r','s','\\'};
4825 static const WCHAR associationsW[] = {'A','s','s','o','c','i','a','t','i','o','n','s','\\'};
4826 static const WCHAR volatileW[] = {'V','o','l','a','t','i','l','e','\\'};
4827 static const WCHAR mui_cacheW[] = {'M','U','I','C','a','c','h','e','\\'};
4828 static const WCHAR file_extsW[] = {'F','i','l','e','E','x','t','s','\\'};
4829
4830 WCHAR *path;
4831 const WCHAR *key, *subkey;
4832 int size_key, size_subkey, size_user;
4833 HKEY hkey = NULL;
4834
4835 TRACE("(0x%08x, %s, %d)\n", flags, debugstr_w(sub_key), create);
4836
4837 /* For compatibility with Vista+ */
4838 if(flags == 0x1ffff)
4839 flags = 0x21;
4840
4841 switch(flags&0xff0) {
4842 case SHKEY_Key_Explorer:
4843 key = explorerW;
4844 size_key = sizeof(explorerW);
4845 break;
4846 case SHKEY_Key_Shell:
4847 key = shellW;
4848 size_key = sizeof(shellW);
4849 break;
4851 key = shell_no_roamW;
4852 size_key = sizeof(shell_no_roamW);
4853 break;
4854 case SHKEY_Key_Classes:
4855 key = classesW;
4856 size_key = sizeof(classesW);
4857 break;
4858 default:
4859 FIXME("unsupported flags (0x%08x)\n", flags);
4860 return NULL;
4861 }
4862
4863 switch(flags&0xff000) {
4865 subkey = NULL;
4866 size_subkey = 0;
4867 break;
4869 subkey = localized_resource_nameW;
4870 size_subkey = sizeof(localized_resource_nameW);
4871 break;
4873 subkey = handlersW;
4874 size_subkey = sizeof(handlersW);
4875 break;
4877 subkey = associationsW;
4878 size_subkey = sizeof(associationsW);
4879 break;
4881 subkey = volatileW;
4882 size_subkey = sizeof(volatileW);
4883 break;
4885 subkey = mui_cacheW;
4886 size_subkey = sizeof(mui_cacheW);
4887 break;
4889 subkey = file_extsW;
4890 size_subkey = sizeof(file_extsW);
4891 break;
4892 default:
4893 FIXME("unsupported flags (0x%08x)\n", flags);
4894 return NULL;
4895 }
4896
4897 if(sub_key)
4898 size_user = lstrlenW(sub_key)*sizeof(WCHAR);
4899 else
4900 size_user = 0;
4901
4902 path = HeapAlloc(GetProcessHeap(), 0, size_key+size_subkey+size_user+sizeof(WCHAR));
4903 if(!path) {
4904 ERR("Out of memory\n");
4905 return NULL;
4906 }
4907
4908 memcpy(path, key, size_key);
4909 if(subkey)
4910 memcpy(path+size_key/sizeof(WCHAR), subkey, size_subkey);
4911 if(sub_key)
4912 memcpy(path+(size_key+size_subkey)/sizeof(WCHAR), sub_key, size_user);
4913 path[(size_key+size_subkey+size_user)/sizeof(WCHAR)] = '\0';
4914
4915 if(create)
4917 path, 0, NULL, 0, MAXIMUM_ALLOWED, NULL, &hkey, NULL);
4918 else
4920 path, 0, MAXIMUM_ALLOWED, &hkey);
4921
4923 return hkey;
4924}
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
static const struct access_res create[16]
Definition: package.c:7505
_shellkey_flags
Definition: ordinal.c:2803
@ SHKEY_Subkey_Handlers
Definition: ordinal.c:2812
@ SHKEY_Root_HKLM
Definition: ordinal.c:2805
@ SHKEY_Key_ShellNoRoam
Definition: ordinal.c:2808
@ SHKEY_Subkey_Volatile
Definition: ordinal.c:2814
@ SHKEY_Subkey_Associations
Definition: ordinal.c:2813
@ SHKEY_Key_Classes
Definition: ordinal.c:2809
@ SHKEY_Subkey_MUICache
Definition: ordinal.c:2815
@ SHKEY_Key_Explorer
Definition: ordinal.c:2806
@ SHKEY_Root_HKCU
Definition: ordinal.c:2804
@ SHKEY_Subkey_FileExts
Definition: ordinal.c:2816
@ SHKEY_Key_Shell
Definition: ordinal.c:2807
@ SHKEY_Subkey_Default
Definition: ordinal.c:2810
@ SHKEY_Subkey_ResourceName
Definition: ordinal.c:2811
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
#define HKEY_CURRENT_USER
Definition: winreg.h:11

Referenced by CViewStatePropertyBag::_GetHKey(), CDesktopUpgradePropertyBag::_GetOldDesktopViewStream(), init_pointers(), CGlobalFolderSettings::Load(), read_advanced_key(), CGlobalFolderSettings::Save(), SHGetSetSettings(), SKAllocValueW(), SKDeleteValueW(), SKGetValueW(), and SKSetValueW().

◆ SHGetValueGoodBootA()

DWORD WINAPI SHGetValueGoodBootA ( HKEY  hkey,
LPCSTR  pSubKey,
LPCSTR  pValue,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pbData 
)

Definition at line 1877 of file reg.c.

1879{
1882 return SHGetValueA(hkey, pSubKey, pValue, pwType, pvData, pbData);
1883}
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
DWORD WINAPI SHGetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
Definition: reg.c:1207
PWCHAR pValue
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
Definition: wincrypt.h:4201
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3749
#define SM_CLEANBOOT
Definition: winuser.h:1038

◆ SHGetValueGoodBootW()

DWORD WINAPI SHGetValueGoodBootW ( HKEY  hkey,
LPCWSTR  pSubKey,
LPCWSTR  pValue,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pbData 
)

Definition at line 1890 of file reg.c.

1892{
1895 return SHGetValueW(hkey, pSubKey, pValue, pwType, pvData, pbData);
1896}

◆ SHGlobalCounterCreate()

HANDLE WINAPI SHGlobalCounterCreate ( REFGUID  guid)

Definition at line 551 of file thread.c.

552{
553 char szName[40];
554
555 TRACE("(%s)\n", debugstr_guid(guid));
556
557 /* Create a named semaphore using the GUID string */
558 SHStringFromGUIDA(guid, szName, sizeof(szName) - 1);
560}
GUID guid
Definition: version.c:147
INT WINAPI SHStringFromGUIDA(REFGUID, LPSTR, INT)
Definition: shimtest.c:51
HANDLE WINAPI SHGlobalCounterCreateNamedA(LPCSTR lpszName, DWORD iInitial)
Definition: thread.c:526
static const WCHAR szName[]
Definition: powrprof.c:45

Referenced by SHELL_GetCachedGlobalCounter().

◆ SHGlobalCounterGetValue()

LONG WINAPI SHGlobalCounterGetValue ( HANDLE  hGlobalCounter)

Definition at line 432 of file thread.c.

433{
434 LONG dwOldCount = 0;
435
436 TRACE("(%p)\n", hSem);
437 ReleaseSemaphore(hSem, 1, &dwOldCount); /* +1 */
438 WaitForSingleObject(hSem, 0); /* -1 */
439 return dwOldCount;
440}
long LONG
Definition: pedump.c:60
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(IN HANDLE hSemaphore, IN LONG lReleaseCount, IN LPLONG lpPreviousCount)
Definition: synch.c:542

Referenced by SHELL_QueryRestrictionsChanged(), and SHGlobalCounterDecrement().

◆ SHGlobalCounterIncrement()

LONG WINAPI SHGlobalCounterIncrement ( HANDLE  hGlobalCounter)

Definition at line 453 of file thread.c.

454{
455 LONG dwOldCount = 0;
456
457 TRACE("(%p)\n", hSem);
458 ReleaseSemaphore(hSem, 1, &dwOldCount);
459 return dwOldCount + 1;
460}

Referenced by SHSettingsChanged().

◆ SHInterlockedCompareExchange()

PVOID WINAPI SHInterlockedCompareExchange ( PVOID dest,
PVOID  xchg,
PVOID  compare 
)

Definition at line 3620 of file ordinal.c.

3621{
3623}
#define InterlockedCompareExchangePointer
Definition: interlocked.h:144
static char * dest
Definition: rtl.c:135
Definition: bug.cpp:8

◆ SHInvokeDefaultCommand()

HRESULT WINAPI SHInvokeDefaultCommand ( HWND  hWnd,
IShellFolder lpFolder,
LPCITEMIDLIST  lpApidl 
)

Definition at line 3179 of file ordinal.c.

3180{
3181 TRACE("%p %p %p\n", hWnd, lpFolder, lpApidl);
3182#ifdef __REACTOS__
3183 return SHInvokeCommand(hWnd, lpFolder, lpApidl, NULL);
3184#else
3185 return SHInvokeCommand(hWnd, lpFolder, lpApidl, 0);
3186#endif
3187}
HRESULT WINAPI SHInvokeCommand(HWND, IShellFolder *, LPCITEMIDLIST, DWORD)
Definition: ordinal.c:3752

Referenced by CMenuCallback::CallbackSM(), CStartMenuSite::Execute(), CAddressEditBox::Execute(), CShellBrowser::OnOrganizeFavorites(), and CISFBand::OnWinEvent().

◆ SHIsChildOrSelf()

BOOL WINAPI SHIsChildOrSelf ( HWND  hParent,
HWND  hChild 
)

Definition at line 2373 of file ordinal.c.

2374{
2375 TRACE("(%p,%p)\n", hParent, hChild);
2376
2377 if (!hParent || !hChild)
2378 return TRUE;
2379 else if(hParent == hChild)
2380 return FALSE;
2381 return !IsChild(hParent, hChild);
2382}
static HTREEITEM hChild
Definition: treeview.c:383
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)

◆ SHIsEmptyStream()

BOOL WINAPI SHIsEmptyStream ( IStream lpStream)

Definition at line 567 of file istream.c.

568{
569 STATSTG statstg;
570 BOOL bRet = TRUE;
571
572 TRACE("(%p)\n", lpStream);
573
574 memset(&statstg, 0, sizeof(statstg));
575
576 if(SUCCEEDED(IStream_Stat(lpStream, &statstg, 1)))
577 {
578 if(statstg.cbSize.QuadPart)
579 bRet = FALSE; /* Non-Zero */
580 }
581 else
582 {
583 DWORD dwDummy;
584
585 /* Try to read from the stream */
586 if(SUCCEEDED(SHIStream_Read(lpStream, &dwDummy, sizeof(dwDummy))))
587 {
589 zero.QuadPart = 0;
590
591 IStream_Seek(lpStream, zero, 0, NULL);
592 bRet = FALSE; /* Non-Zero */
593 }
594 }
595 return bRet;
596}
HRESULT WINAPI SHIStream_Read(IStream *lpStream, LPVOID lpvDest, ULONG ulSize)
Definition: istream.c:541
unsigned int BOOL
Definition: ntddk_ex.h:94
int zero
Definition: sehframes.cpp:29

◆ SHIsExpandableFolder()

HRESULT WINAPI SHIsExpandableFolder ( LPSHELLFOLDER  lpFolder,
LPCITEMIDLIST  pidl 
)

Definition at line 2088 of file ordinal.c.

2089{
2090 HRESULT hRet = E_INVALIDARG;
2091 IQueryInfo *lpInfo;
2092
2093 if (lpFolder && pidl)
2094 {
2095 hRet = IShellFolder_GetUIObjectOf(lpFolder, NULL, 1, &pidl, &IID_IQueryInfo,
2096 NULL, (void**)&lpInfo);
2097 if (FAILED(hRet))
2098 hRet = S_FALSE; /* Doesn't expose IQueryInfo */
2099 else
2100 {
2101 DWORD dwFlags = 0;
2102
2103 /* MSDN states of IQueryInfo_GetInfoFlags() that "This method is not
2104 * currently used". Really? You wouldn't be holding out on me would you?
2105 */
2106 hRet = IQueryInfo_GetInfoFlags(lpInfo, &dwFlags);
2107
2108 if (SUCCEEDED(hRet))
2109 {
2110 /* 0x2 is an undocumented flag apparently indicating expandability */
2111 hRet = dwFlags & 0x2 ? S_OK : S_FALSE;
2112 }
2113
2114 IQueryInfo_Release(lpInfo);
2115 }
2116 }
2117 return hRet;
2118}
#define IQueryInfo_Release(p)
Definition: shlobj.h:691
#define IQueryInfo_GetInfoFlags(p, a)
Definition: shlobj.h:694
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ SHIsSameObject()

BOOL WINAPI SHIsSameObject ( IUnknown lpInt1,
IUnknown lpInt2 
)

Definition at line 1289 of file ordinal.c.

1290{
1291 IUnknown *lpUnknown1, *lpUnknown2;
1292 BOOL ret;
1293
1294 TRACE("(%p %p)\n", lpInt1, lpInt2);
1295
1296 if (!lpInt1 || !lpInt2)
1297 return FALSE;
1298
1299 if (lpInt1 == lpInt2)
1300 return TRUE;
1301
1302 if (IUnknown_QueryInterface(lpInt1, &IID_IUnknown, (void**)&lpUnknown1) != S_OK)
1303 return FALSE;
1304
1305 if (IUnknown_QueryInterface(lpInt2, &IID_IUnknown, (void**)&lpUnknown2) != S_OK)
1306 {
1307 IUnknown_Release(lpUnknown1);
1308 return FALSE;
1309 }
1310
1311 ret = lpUnknown1 == lpUnknown2;
1312
1313 IUnknown_Release(lpUnknown1);
1314 IUnknown_Release(lpUnknown2);
1315
1316 return ret;
1317}
const GUID IID_IUnknown

◆ SHLoadMenuPopup()

BOOL WINAPI SHLoadMenuPopup ( HINSTANCE  hInst,
LPCWSTR  szName 
)

Definition at line 1666 of file ordinal.c.

1667{
1668 HMENU hMenu;
1669
1670 TRACE("%p %s\n", hInst, debugstr_w(szName));
1671
1672 if ((hMenu = LoadMenuW(hInst, szName)))
1673 {
1674 if (GetSubMenu(hMenu, 0))
1675 RemoveMenu(hMenu, 0, MF_BYPOSITION);
1676
1677 DestroyMenu(hMenu);
1678 return TRUE;
1679 }
1680 return FALSE;
1681}
HINSTANCE hInst
Definition: dxdiag.c:13
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define MF_BYPOSITION
Definition: winuser.h:203
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyMenu(_In_ HMENU)
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)

◆ SHLoadRegUIStringA()

HRESULT WINAPI SHLoadRegUIStringA ( HKEY  hkey,
LPCSTR  value,
LPSTR  buf,
DWORD  size 
)

◆ SHLoadRegUIStringW()

HRESULT WINAPI SHLoadRegUIStringW ( HKEY  hkey,
LPCWSTR  value,
LPWSTR  buf,
DWORD  size 
)

Definition at line 4396 of file ordinal.c.

4397{
4398 DWORD type, sz = size * sizeof(WCHAR);
4399
4400 if(RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)buf, &sz) != ERROR_SUCCESS)
4401 return E_FAIL;
4402
4404}
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
HRESULT WINAPI SHLoadIndirectString(const WCHAR *src, WCHAR *dst, UINT dst_len, void **reserved)
Definition: string.c:1455
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
unsigned char * LPBYTE
Definition: typedefs.h:53
Definition: pdh_main.c:96

Referenced by CBandSiteMenu::_CreateMenuPart(), CRegTreeOptions::AddItemsFromRegistry(), and GetKbdLayoutNameFromReg().

◆ SHLockSharedEx()

◆ SHMenuIndexFromID()

DWORD WINAPI SHMenuIndexFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 4708 of file ordinal.c.

4709{
4710 TRACE("%p %u\n", hMenu, uID);
4711 return GetMenuPosFromID(hMenu, uID);
4712}
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
Definition: ordinal.c:4681

Referenced by CDefView::FillViewMenu().

◆ SHPinDllOfCLSID()

HMODULE WINAPI SHPinDllOfCLSID ( REFIID  refiid)

Definition at line 2656 of file ordinal.c.

2657{
2658 HKEY newkey;
2659 DWORD type, count;
2660 CHAR value[MAX_PATH], string[MAX_PATH];
2661
2662 strcpy(string, "CLSID\\");
2663 SHStringFromGUIDA(refiid, string + 6, sizeof(string)/sizeof(char) - 6);
2664 strcat(string, "\\InProcServer32");
2665
2666 count = MAX_PATH;
2667 RegOpenKeyExA(HKEY_CLASSES_ROOT, string, 0, 1, &newkey);
2668 RegQueryValueExA(newkey, 0, 0, &type, (PBYTE)value, &count);
2669 RegCloseKey(newkey);
2670 return LoadLibraryExA(value, 0, 0);
2671}
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
Definition: reg.c:3298
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4009
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
Definition: loader.c:159
INT WINAPI SHStringFromGUIDA(REFGUID guid, LPSTR lpszDest, INT cchMax)
Definition: ordinal.c:628
GLuint GLuint GLsizei count
Definition: gl.h:1545
BYTE * PBYTE
Definition: pedump.c:66
strcat
Definition: string.h:92
strcpy
Definition: string.h:131
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
char CHAR
Definition: xmlstorage.h:175

Referenced by SHAutoComplete().

◆ SHPropagateMessage()

void WINAPI SHPropagateMessage ( HWND  hWnd,
UINT  uiMsgId,
WPARAM  wParam,
LPARAM  lParam,
BOOL  bSend 
)

Definition at line 1719 of file ordinal.c.

1720{
1722
1723 TRACE("(%p,%u,%ld,%ld,%d)\n", hWnd, uiMsgId, wParam, lParam, bSend);
1724
1725 if(hWnd)
1726 {
1727 data.uiMsgId = uiMsgId;
1728 data.wParam = wParam;
1729 data.lParam = lParam;
1730
1731 if (bSend)
1732 data.pfnPost = IsWindowUnicode(hWnd) ? (void*)SendMessageW : (void*)SendMessageA;
1733 else
1734 data.pfnPost = IsWindowUnicode(hWnd) ? (void*)PostMessageW : (void*)PostMessageA;
1735
1737 }
1738}
static BOOL CALLBACK SHLWAPI_EnumChildProc(HWND hWnd, LPARAM lParam)
Definition: ordinal.c:1692
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EnumChildWindows(_In_opt_ HWND, _In_ WNDENUMPROC, _In_ LPARAM)
BOOL WINAPI IsWindowUnicode(_In_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by CShellBrowser::OnSettingChange(), and CShellBrowser::OnSysColorChange().

◆ SHPropertyBag_Delete()

HRESULT WINAPI SHPropertyBag_Delete ( IPropertyBag ppb,
LPCWSTR  pszPropName 
)

◆ SHPropertyBag_ReadBOOL()

HRESULT WINAPI SHPropertyBag_ReadBOOL ( IPropertyBag ppb,
LPCWSTR  pszPropName,
BOOL pbValue 
)

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadBOOLOld()

BOOL WINAPI SHPropertyBag_ReadBOOLOld ( IPropertyBag ppb,
LPCWSTR  pszPropName,
BOOL  bDefValue 
)

◆ SHPropertyBag_ReadBSTR()

HRESULT WINAPI SHPropertyBag_ReadBSTR ( IPropertyBag ppb,
LPCWSTR  pszPropName,
BSTR pbstr 
)

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadDWORD()

HRESULT WINAPI SHPropertyBag_ReadDWORD ( IPropertyBag ppb,
LPCWSTR  pszPropName,
DWORD pdwValue 
)

◆ SHPropertyBag_ReadGUID()

HRESULT WINAPI SHPropertyBag_ReadGUID ( IPropertyBag ppb,
LPCWSTR  pszPropName,
GUID pguid 
)

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadInt()

HRESULT WINAPI SHPropertyBag_ReadInt ( IPropertyBag ppb,
LPCWSTR  pszPropName,
LPINT  pnValue 
)

◆ SHPropertyBag_ReadLONG()

HRESULT WINAPI SHPropertyBag_ReadLONG ( IPropertyBag ppb,
LPCWSTR  pszPropName,
LPLONG  pValue 
)

Definition at line 5789 of file ordinal.c.

5790{
5791#ifdef __REACTOS__
5792 HRESULT hr;
5793 VARIANTARG varg;
5794
5795 TRACE("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5796
5797 if (!ppb || !pszPropName || !pValue)
5798 {
5799 ERR("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5800 return E_INVALIDARG;
5801 }
5802
5803 hr = SHPropertyBag_ReadType(ppb, pszPropName, &varg, VT_I4);
5804 if (SUCCEEDED(hr))
5805 *pValue = V_I4(&varg);
5806#else
5807 VARIANT var;
5808 HRESULT hr;
5809 TRACE("%p %s %p\n", ppb,debugstr_w(pszPropName),pValue);
5810 if (!pszPropName || !ppb || !pValue)
5811 return E_INVALIDARG;
5812 V_VT(&var) = VT_I4;
5813 hr = IPropertyBag_Read(ppb, pszPropName, &var, NULL);
5814 if (SUCCEEDED(hr))
5815 {
5816 if (V_VT(&var) == VT_I4)
5817 *pValue = V_I4(&var);
5818 else
5820 }
5821#endif
5822 return hr;
5823}
@ VT_I4
Definition: compat.h:2298
const char * var
Definition: shader.c:5666
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
HRESULT WINAPI SHPropertyBag_ReadType(IPropertyBag *ppb, LPCWSTR pszPropName, VARIANTARG *pvarg, VARTYPE vt)
#define DISP_E_BADVARTYPE
Definition: winerror.h:2517

Referenced by init_pointers(), and SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadPOINTL()

HRESULT WINAPI SHPropertyBag_ReadPOINTL ( IPropertyBag ppb,
LPCWSTR  pszPropName,
POINTL pptl 
)

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadPOINTS()

HRESULT WINAPI SHPropertyBag_ReadPOINTS ( IPropertyBag ppb,
LPCWSTR  pszPropName,
POINTS ppts 
)

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadRECTL()

HRESULT WINAPI SHPropertyBag_ReadRECTL ( IPropertyBag ppb,
LPCWSTR  pszPropName,
RECTL prcl 
)

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadSHORT()

HRESULT WINAPI SHPropertyBag_ReadSHORT ( IPropertyBag ppb,
LPCWSTR  pszPropName,
SHORT psValue 
)

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadStr()

HRESULT WINAPI SHPropertyBag_ReadStr ( IPropertyBag ppb,
LPCWSTR  pszPropName,
LPWSTR  pszDst,
int  cchMax 
)

◆ SHPropertyBag_ReadStream()

HRESULT WINAPI SHPropertyBag_ReadStream ( IPropertyBag ppb,
LPCWSTR  pszPropName,
IStream **  ppStream 
)

Referenced by CDefView::LoadViewState().

◆ SHPropertyBag_ReadType()

HRESULT WINAPI SHPropertyBag_ReadType ( IPropertyBag ppb,
LPCWSTR  pszPropName,
VARIANTARG pvarg,
VARTYPE  vt 
)

Referenced by SHPropertyBag_ReadLONG().

◆ SHPropertyBag_WriteBOOL()

HRESULT WINAPI SHPropertyBag_WriteBOOL ( IPropertyBag ppb,
LPCWSTR  pszPropName,
BOOL  bValue 
)

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteDWORD()

HRESULT WINAPI SHPropertyBag_WriteDWORD ( IPropertyBag ppb,
LPCWSTR  pszPropName,
DWORD  dwValue 
)

◆ SHPropertyBag_WriteGUID()

HRESULT WINAPI SHPropertyBag_WriteGUID ( IPropertyBag ppb,
LPCWSTR  pszPropName,
const GUID pguid 
)

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteInt()

HRESULT WINAPI SHPropertyBag_WriteInt ( IPropertyBag ppb,
LPCWSTR  pszPropName,
INT  nValue 
)

◆ SHPropertyBag_WriteLONG()

HRESULT WINAPI SHPropertyBag_WriteLONG ( IPropertyBag ppb,
LPCWSTR  pszPropName,
LONG  lValue 
)

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WritePOINTL()

HRESULT WINAPI SHPropertyBag_WritePOINTL ( IPropertyBag ppb,
LPCWSTR  pszPropName,
const POINTL pptl 
)

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WritePOINTS()

HRESULT WINAPI SHPropertyBag_WritePOINTS ( IPropertyBag ppb,
LPCWSTR  pszPropName,
const POINTS ppts 
)

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteRECTL()

HRESULT WINAPI SHPropertyBag_WriteRECTL ( IPropertyBag ppb,
LPCWSTR  pszPropName,
const RECTL prcl 
)

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteSHORT()

HRESULT WINAPI SHPropertyBag_WriteSHORT ( IPropertyBag ppb,
LPCWSTR  pszPropName,
SHORT  sValue 
)

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteStr()

HRESULT WINAPI SHPropertyBag_WriteStr ( IPropertyBag ppb,
LPCWSTR  pszPropName,
LPCWSTR  pszValue 
)

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteStream()

HRESULT WINAPI SHPropertyBag_WriteStream ( IPropertyBag ppb,
LPCWSTR  pszPropName,
IStream pStream 
)

Referenced by CDefView::SaveViewState().

◆ SHReadDataBlockList()

HRESULT WINAPI SHReadDataBlockList ( IStream lpStream,
LPDBLIST lppList 
)

Definition at line 235 of file clist.c.

236{
237 DATABLOCK_HEADER bBuff[128]; /* Temporary storage for new list item */
238 ULONG ulBuffSize = sizeof(bBuff);
239 LPDATABLOCK_HEADER pItem = bBuff;
240 ULONG ulRead, ulSize;
241 HRESULT hRet = S_OK;
242
243 TRACE("(%p,%p)\n", lpStream, lppList);
244
245 if(*lppList)
246 {
247 /* Free any existing list */
248 LocalFree(*lppList);
249 *lppList = NULL;
250 }
251
252 do
253 {
254 /* Read the size of the next item */
255 hRet = IStream_Read(lpStream, &ulSize,sizeof(ulSize),&ulRead);
256
257 if(FAILED(hRet) || ulRead != sizeof(ulSize) || !ulSize)
258 break; /* Read failed or read zero size (the end of the list) */
259
260 if(ulSize > 0xFFFF)
261 {
262 LARGE_INTEGER liZero;
263 ULARGE_INTEGER ulPos;
264
265 liZero.QuadPart = 0;
266
267 /* Back the stream up; this object is too big for the list */
268 if(SUCCEEDED(IStream_Seek(lpStream, liZero, STREAM_SEEK_CUR, &ulPos)))
269 {
270 liZero.QuadPart = ulPos.QuadPart - sizeof(ULONG);
271 IStream_Seek(lpStream, liZero, STREAM_SEEK_SET, NULL);
272 }
273 break;
274 }
275 else if (ulSize >= sizeof(DATABLOCK_HEADER))
276 {
277 /* Add this new item to the list */
278 if(ulSize > ulBuffSize)
279 {
280 /* We need more buffer space, allocate it */
281 LPDATABLOCK_HEADER lpTemp;
282
283 if (pItem == bBuff)
284 lpTemp = LocalAlloc(LMEM_ZEROINIT, ulSize);
285 else
286 lpTemp = LocalReAlloc(pItem, ulSize, LMEM_ZEROINIT|LMEM_MOVEABLE);
287
288 if(!lpTemp)
289 {
290 hRet = E_OUTOFMEMORY;
291 break;
292 }
293 ulBuffSize = ulSize;
294 pItem = lpTemp;
295 }
296
297 pItem->cbSize = ulSize;
298 ulSize -= sizeof(pItem->cbSize); /* already read this member */
299
300 /* Read the item Id and data */
301 hRet = IStream_Read(lpStream, &pItem->dwSignature, ulSize, &ulRead);
302
303 if(FAILED(hRet) || ulRead != ulSize)
304 break;
305
306 SHAddDataBlock(lppList, pItem); /* Insert Item */
307 }
308 } while(1);
309
310 /* If we allocated space, free it */
311 if(pItem != bBuff)
312 LocalFree(pItem);
313
314 return hRet;
315}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
BOOL WINAPI SHAddDataBlock(LPDBLIST *lppList, const DATABLOCK_HEADER *lpNewItem)
Definition: clist.c:68
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by DumpCommand(), and CShellLink::Load().

◆ SHRegGetCLSIDKeyW()

HRESULT WINAPI SHRegGetCLSIDKeyW ( REFGUID  guid,
LPCWSTR  lpszValue,
BOOL  bUseHKCU,
BOOL  bCreate,
PHKEY  phKey 
)

Definition at line 2422 of file reg.c.

2424{
2425#ifndef __REACTOS__
2426 static const WCHAR szClassIdKey[] = { 'S','o','f','t','w','a','r','e','\\',
2427 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
2428 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
2429 'E','x','p','l','o','r','e','r','\\','C','L','S','I','D','\\' };
2430#endif
2431#define szClassIdKeyLen (sizeof(szClassIdKey)/sizeof(WCHAR))
2432 WCHAR szKey[MAX_PATH];
2433 DWORD dwRet;
2434 HKEY hkey;
2435
2436 /* Create the key string */
2437#ifdef __REACTOS__
2438 // https://www.geoffchappell.com/studies/windows/shell/shlwapi/api/reg/reggetclsidkey.htm
2439 WCHAR* ptr;
2440
2441 wcscpy(szKey, bUseHKCU ? L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\" : L"CLSID\\");
2442 ptr = szKey + wcslen(szKey);
2443 SHStringFromGUIDW(guid, ptr, 39); /* Append guid */
2444 if (lpszValue)
2445 {
2446 ptr = szKey + wcslen(szKey);
2447 wcscat(ptr, L"\\");
2448 wcscat(++ptr, lpszValue);
2449 }
2450#else
2451 memcpy(szKey, szClassIdKey, sizeof(szClassIdKey));
2452 SHStringFromGUIDW(guid, szKey + szClassIdKeyLen, 39); /* Append guid */
2453
2454 if(lpszValue)
2455 {
2456 szKey[szClassIdKeyLen + 39] = '\\';
2457 strcpyW(szKey + szClassIdKeyLen + 40, lpszValue); /* Append value name */
2458 }
2459#endif
2460
2461 hkey = bUseHKCU ? HKEY_CURRENT_USER : HKEY_CLASSES_ROOT;
2462
2463 if(bCreate)
2464 dwRet = RegCreateKeyW(hkey, szKey, phKey);
2465 else
2466 dwRet = RegOpenKeyExW(hkey, szKey, 0, KEY_READ, phKey);
2467
2468 return dwRet ? HRESULT_FROM_WIN32(dwRet) : S_OK;
2469}
wcscat
wcscpy
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1201
INT WINAPI SHStringFromGUIDW(REFGUID, LPWSTR, INT)
Definition: ordinal.c:661
#define szClassIdKeyLen
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static PVOID ptr
Definition: dispmode.c:27
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1525

Referenced by CFileSysEnum::_AddFindResult(), SHELL32_GetFSItemAttributes(), and SHRegGetCLSIDKeyA().

◆ SHRegisterClassA()

DWORD WINAPI SHRegisterClassA ( WNDCLASSA wndclass)

Definition at line 1817 of file ordinal.c.

1818{
1819 WNDCLASSA wca;
1820 if (GetClassInfoA(wndclass->hInstance, wndclass->lpszClassName, &wca))
1821 return TRUE;
1822 return (DWORD)RegisterClassA(wndclass);
1823}
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
BOOL WINAPI GetClassInfoA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSA)

Referenced by SHCreateWorkerWindowA().

◆ SHRemoveAllSubMenus()

DWORD WINAPI SHRemoveAllSubMenus ( HMENU  hMenu)

Definition at line 1752 of file ordinal.c.

1753{
1754 int iItemCount = GetMenuItemCount(hMenu) - 1;
1755
1756 TRACE("%p\n", hMenu);
1757
1758 while (iItemCount >= 0)
1759 {
1760 HMENU hSubMenu = GetSubMenu(hMenu, iItemCount);
1761 if (hSubMenu)
1762 RemoveMenu(hMenu, iItemCount, MF_BYPOSITION);
1763 iItemCount--;
1764 }
1765 return iItemCount;
1766}
int WINAPI GetMenuItemCount(_In_opt_ HMENU)

◆ SHRemoveDataBlock()

BOOL WINAPI SHRemoveDataBlock ( LPDBLIST lppList,
DWORD  dwSignature 
)

Definition at line 355 of file clist.c.

356{
357 LPDATABLOCK_HEADER lpList = NULL;
358 LPDATABLOCK_HEADER lpItem = NULL;
359 LPDATABLOCK_HEADER lpNext;
360 ULONG ulNewSize;
361
362 TRACE("(%p,%d)\n", lppList, dwSignature);
363
364 if(lppList && (lpList = *lppList))
365 {
366 /* Search for item in list */
367 while (lpList->cbSize)
368 {
369 if(lpList->dwSignature == dwSignature ||
370 (lpList->dwSignature == CLIST_ID_CONTAINER && lpList[1].dwSignature == dwSignature))
371 {
372 lpItem = lpList; /* Found */
373 break;
374 }
375 lpList = NextItem(lpList);
376 }
377 }
378
379 if(!lpItem)
380 return FALSE;
381
382 lpList = lpNext = NextItem(lpItem);
383
384 /* Locate the end of the list */
385 while (lpList->cbSize)
386 lpList = NextItem(lpList);
387
388 /* Resize the list */
389 ulNewSize = LocalSize(*lppList) - lpItem->cbSize;
390
391 /* Copy following elements over lpItem */
392 memmove(lpItem, lpNext, (char *)lpList - (char *)lpNext + sizeof(ULONG));
393
394 if(ulNewSize <= sizeof(ULONG))
395 {
396 LocalFree(*lppList);
397 *lppList = NULL; /* Removed the last element */
398 }
399 else
400 {
401 lpList = LocalReAlloc(*lppList, ulNewSize, LMEM_ZEROINIT|LMEM_MOVEABLE);
402 if(lpList)
403 *lppList = lpList;
404 }
405 return TRUE;
406}
SIZE_T NTAPI LocalSize(HLOCAL hMem)
Definition: heapmem.c:1794
#define memmove(s1, s2, n)
Definition: mkisofs.h:881

Referenced by CShellLink::RemoveDataBlock().

◆ SHRestrictionLookup()

DWORD WINAPI SHRestrictionLookup ( _In_ DWORD  policy,
_In_ LPCWSTR  key,
_In_ const POLICYDATA polTable,
_Inout_ LPDWORD  polArr 
)

◆ SHRunIndirectRegClientCommand()

HRESULT WINAPI SHRunIndirectRegClientCommand ( _In_ HWND  hWnd,
_In_ PCWSTR  pszClientType 
)

◆ SHSearchMapInt()

int WINAPI SHSearchMapInt ( const int lpKeys,
const int lpValues,
int  iLen,
int  iKey 
)

Definition at line 2161 of file ordinal.c.

2162{
2163 if (lpKeys && lpValues)
2164 {
2165 int i = 0;
2166
2167 while (i < iLen)
2168 {
2169 if (lpKeys[i] == iKey)
2170 return lpValues[i]; /* Found */
2171 i++;
2172 }
2173 }
2174 return -1; /* Not found */
2175}

Referenced by init_pointers().

◆ SHSendMessageBroadcastW()

DWORD WINAPI SHSendMessageBroadcastW ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 4191 of file ordinal.c.

4192{
4194 SMTO_ABORTIFHUNG, 2000, NULL);
4195}
#define HWND_BROADCAST
Definition: winuser.h:1215
LRESULT WINAPI SendMessageTimeoutW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM, _In_ UINT, _In_ UINT, _Out_opt_ PDWORD_PTR)
#define SMTO_ABORTIFHUNG
Definition: winuser.h:1234

Referenced by IntSetUnderlineState(), SHGetSetSettings(), ViewDlg_Apply(), and VisualEffectsDlgProc().

◆ SHSetDefaultDialogFont()

VOID WINAPI SHSetDefaultDialogFont ( HWND  hWnd,
INT  id 
)

Definition at line 2576 of file ordinal.c.

2578{
2579#ifdef __REACTOS__
2580 HFONT hOldFont, hNewFont;
2581 LOGFONTW lfOldFont, lfNewFont;
2582 HWND hwndItem;
2583
2584 TRACE("(%p, %d)\n", hWnd, id);
2585
2586 hOldFont = (HFONT)SendMessageW(hWnd, WM_GETFONT, 0, 0);
2587 GetObjectW(hOldFont, sizeof(lfOldFont), &lfOldFont);
2588 SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(lfNewFont), &lfNewFont, 0);
2589
2590 if (lfOldFont.lfCharSet == lfNewFont.lfCharSet)
2591 return;
2592
2593 hNewFont = GetPropW(hWnd, L"PropDlgFont");
2594 if (!hNewFont)
2595 {
2596 /* Create the icon-title font of the same height */
2597 lfNewFont.lfHeight = lfOldFont.lfHeight;
2598 hNewFont = CreateFontIndirectW(&lfNewFont);
2599
2600 /* If creating the font is failed, then keep the old font */
2601 if (!hNewFont)
2602 hNewFont = hOldFont;
2603
2604 /* Set "PropDlgFont" property if the font is changed */
2605 if (hOldFont != hNewFont)
2606 SetPropW(hWnd, L"PropDlgFont", hNewFont);
2607 }
2608
2609 hwndItem = GetDlgItem(hWnd, id);
2610 SendMessageW(hwndItem, WM_SETFONT, (WPARAM)hNewFont, 0);
2611#else
2612 FIXME("(%p, %d) stub\n", hWnd, id);
2613 return S_OK;
2614#endif
2615}
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
LONG lfHeight
Definition: dimm.idl:59
BYTE lfCharSet
Definition: dimm.idl:67
UINT_PTR WPARAM
Definition: windef.h:207
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
#define SPI_GETICONTITLELOGFONT
Definition: winuser.h:1391
#define WM_GETFONT
Definition: winuser.h:1670
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SETFONT
Definition: winuser.h:1669
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)

◆ SHSetIniStringUTF7W()

BOOL WINAPI SHSetIniStringUTF7W ( _In_z_ LPCWSTR  lpAppName,
_In_z_ LPCWSTR  lpKeyName,
_In_opt_z_ LPCWSTR  lpString,
_In_z_ LPCWSTR  lpFileName 
)

Definition at line 748 of file propbag.cpp.

753{
754 if (*lpKeyName == L'@') // UTF-7
755 return SHSetIniStringW(lpAppName, lpKeyName + 1, lpString, lpFileName);
756
757 return WritePrivateProfileStringW(lpAppName, lpKeyName, lpString, lpFileName);
758}
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
Definition: profile.c:1453
EXTERN_C BOOL WINAPI SHSetIniStringW(_In_z_ LPCWSTR appName, _In_z_ LPCWSTR keyName, _In_opt_z_ LPCWSTR str, _In_z_ LPCWSTR filename)
Definition: propbag.cpp:658

Referenced by CIniPropertyBag::Write().

◆ SHSetIniStringW()

BOOL WINAPI SHSetIniStringW ( _In_z_ LPCWSTR  appName,
_In_z_ LPCWSTR  keyName,
_In_opt_z_ LPCWSTR  str,
_In_z_ LPCWSTR  filename 
)

Definition at line 658 of file propbag.cpp.

663{
664 TRACE("(%s, %p, %s, %s)\n", debugstr_w(appName), keyName, debugstr_w(str),
666
667 // Write a normal profile string. If str was NULL, then key will be deleted
669 return FALSE;
670
671 if (Is7BitClean(str))
672 {
673 // Delete ".A" version
674 CStringW szSection(appName);
675 szSection += L".A";
676 WritePrivateProfileStringW(szSection, keyName, NULL, filename);
677
678 // Delete ".W" version
679 szSection = appName;
680 szSection += L".W";
681 WritePrivateProfileStringW(szSection, keyName, NULL, filename);
682
683 return TRUE;
684 }
685
686 // Now str is not 7-bit clean. It needs UTF-7 encoding in UTF-16.
687 // We write ".A" and ".W"-appended sections
688 CW2A wide2utf7(str, CP_UTF7);
689 CA2W utf72wide(wide2utf7, CP_ACP);
690
691 BOOL ret = TRUE;
692
693 // Write ".A" version
694 CStringW szSection(appName);
695 szSection += L".A";
696 if (!WritePrivateProfileStringW(szSection, keyName, str, filename))
697 ret = FALSE;
698
699 // Write ".W" version
700 szSection = appName;
701 szSection += L".W";
702 if (!WritePrivateProfileStringW(szSection, keyName, utf72wide, filename))
703 ret = FALSE;
704
705 return ret;
706}
static BOOL Is7BitClean(LPCWSTR psz)
Definition: propbag.cpp:638
const WCHAR * str

Referenced by SHSetIniStringUTF7W().

◆ SHSetParentHwnd()

HWND WINAPI SHSetParentHwnd ( HWND  hWnd,
HWND  hWndParent 
)

Definition at line 1158 of file ordinal.c.

1159{
1160 TRACE("%p, %p\n", hWnd, hWndParent);
1161
1162 if(GetParent(hWnd) == hWndParent)
1163 return NULL;
1164
1165 if(hWndParent)
1167 else
1169
1171}
LONG WINAPI SHSetWindowBits(HWND hwnd, INT offset, UINT mask, UINT flags)
Definition: ordinal.c:1130
#define WS_CHILD
Definition: pedump.c:617
#define WS_POPUP
Definition: pedump.c:616
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
HWND WINAPI GetParent(_In_ HWND)
#define GWL_STYLE
Definition: winuser.h:863

Referenced by init_pointers().

◆ SHSetWindowBits()

LONG WINAPI SHSetWindowBits ( HWND  hwnd,
INT  offset,
UINT  wMask,
UINT  wFlags 
)

Definition at line 1130 of file ordinal.c.

1131{
1133 LONG new_flags = (flags & mask) | (ret & ~mask);
1134
1135 TRACE("%p %d %x %x\n", hwnd, offset, mask, flags);
1136
1137 if (new_flags != ret)
1138 ret = SetWindowLongW(hwnd, offset, new_flags);
1139 return ret;
1140}
GLintptr offset
Definition: glext.h:5920
GLenum GLint GLuint mask
Definition: glext.h:6028
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)

Referenced by CMenuDeskBar::_AdjustForTheme(), init_pointers(), CShellBrowser::OnToggleFullscreen(), SetWindowExStyle(), SetWindowStyle(), and SHSetParentHwnd().

◆ SHSimulateDrop()

BOOL WINAPI SHSimulateDrop ( IDropTarget pDrop,
IDataObject pDataObj,
DWORD  grfKeyState,
PPOINTL  lpPt,
DWORD pdwEffect 
)

Definition at line 1828 of file ordinal.c.

1830{
1831 DWORD dwEffect = DROPEFFECT_LINK | DROPEFFECT_MOVE | DROPEFFECT_COPY;
1832 POINTL pt = { 0, 0 };
1833
1834 TRACE("%p %p 0x%08x %p %p\n", pDrop, pDataObj, grfKeyState, lpPt, pdwEffect);
1835
1836 if (!lpPt)
1837 lpPt = &pt;
1838
1839 if (!pdwEffect)
1840 pdwEffect = &dwEffect;
1841
1842 IDropTarget_DragEnter(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
1843
1844 if (*pdwEffect != DROPEFFECT_NONE)
1845 return IDropTarget_Drop(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
1846
1847 IDropTarget_DragLeave(pDrop);
1848 return TRUE;
1849}
#define pt(x, y)
Definition: drawing.c:79

Referenced by CDefaultContextMenu::DoCreateLink(), CDefaultContextMenu::DoDelete(), CDefaultContextMenu::DoPaste(), CCPLItemMenu::InvokeCommand(), and CDefaultContextMenu::InvokeRegVerb().

◆ SHUnicodeToAnsi()

◆ SHUnicodeToAnsiCP()

DWORD WINAPI SHUnicodeToAnsiCP ( UINT  CodePage,
LPCWSTR  lpSrcStr,
LPSTR  lpDstStr,
int  dstlen 
)

Definition at line 2698 of file string.c.

2699{
2700 static const WCHAR emptyW[] = { '\0' };
2701 int len , reqLen;
2702 LPSTR mem;
2703
2704 if (!lpDstStr || !dstlen)
2705 return 0;
2706
2707 if (!lpSrcStr)
2708 lpSrcStr = emptyW;
2709
2710 *lpDstStr = '\0';
2711
2712 len = strlenW(lpSrcStr) + 1;
2713
2714 switch (CodePage)
2715 {
2716 case CP_WINUNICODE:
2717 CodePage = CP_UTF8; /* Fall through... */
2718 case 0x0000C350: /* FIXME: CP_ #define */
2719 case CP_UTF7:
2720 case CP_UTF8:
2721 {
2722 DWORD dwMode = 0;
2723 INT lenW = len - 1;
2724 INT needed = dstlen - 1;
2725 HRESULT hr;
2726
2727 /* try the user supplied buffer first */
2728 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &lenW, lpDstStr, &needed);
2729 if (hr == S_OK)
2730 {
2731 lpDstStr[needed] = '\0';
2732 return needed + 1;
2733 }
2734
2735 /* user buffer too small. exclude termination and copy as much as possible */
2736 lenW = len;
2737 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &lenW, NULL, &needed);
2738 needed++;
2739 mem = HeapAlloc(GetProcessHeap(), 0, needed);
2740 if (!mem)
2741 return 0;
2742
2743 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &len, mem, &needed);
2744 if (hr == S_OK)
2745 {
2746 reqLen = SHTruncateString(mem, dstlen);
2747 if (reqLen > 0) memcpy(lpDstStr, mem, reqLen-1);
2748 }
2750 return 0;
2751 }
2752 default:
2753 break;
2754 }
2755
2756 /* try the user supplied buffer first */
2757 reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, lpDstStr, dstlen, NULL, NULL);
2758
2759 if (!reqLen && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
2760 {
2761 reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, NULL, 0, NULL, NULL);
2762 if (reqLen)
2763 {
2764 mem = HeapAlloc(GetProcessHeap(), 0, reqLen);
2765 if (mem)
2766 {
2767 WideCharToMultiByte(CodePage, 0, lpSrcStr, len, mem, reqLen, NULL, NULL);
2768
2769 reqLen = SHTruncateString(mem, dstlen -1);
2770 reqLen++;
2771
2772 lstrcpynA(lpDstStr, mem, reqLen);
2774 lpDstStr[reqLen-1] = '\0';
2775 }
2776 }
2777 }
2778 return reqLen;
2779}
#define CP_WINUNICODE
Definition: ddeml.h:33
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define lstrcpynA
Definition: compat.h:751
DWORD WINAPI SHTruncateString(LPSTR lpStr, DWORD size)
Definition: string.c:2550
GLenum GLsizei len
Definition: glext.h:6722
static const WCHAR emptyW[]
Definition: navigate.c:40
static DWORD dstlen
Definition: directory.c:51
#define CP_UTF8
Definition: nls.h:20
Definition: mem.c:349
static CONVERTINETUNICODETOMULTIBYTE ConvertINetUnicodeToMultiByte
Definition: win_iconv.c:706
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by SHUnicodeToAnsi().

◆ SHWaitForSendMessageThread()

DWORD WINAPI SHWaitForSendMessageThread ( HANDLE  hand,
DWORD  dwTimeout 
)

Definition at line 2050 of file ordinal.c.

2051{
2052 DWORD dwEndTicks = GetTickCount() + dwTimeout;
2053 DWORD dwRet;
2054
2055 while ((dwRet = MsgWaitForMultipleObjectsEx(1, &hand, dwTimeout, QS_SENDMESSAGE, 0)) == 1)
2056 {
2057 MSG msg;
2058
2059 PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE);
2060
2061 if (dwTimeout != INFINITE)
2062 {
2063 if ((int)(dwTimeout = dwEndTicks - GetTickCount()) <= 0)
2064 return WAIT_TIMEOUT;
2065 }
2066 }
2067
2068 return dwRet;
2069}
#define WAIT_TIMEOUT
Definition: dderror.h:14
ULONG WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
Definition: sync.c:182
#define INFINITE
Definition: serial.h:102
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6081
#define QS_SENDMESSAGE
Definition: winuser.h:891
DWORD WINAPI MsgWaitForMultipleObjectsEx(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask, _In_ DWORD dwFlags)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define PM_NOREMOVE
Definition: winuser.h:1206

◆ SHWriteDataBlockList()

HRESULT WINAPI SHWriteDataBlockList ( IStream lpStream,
LPDBLIST  lpList 
)

Definition at line 179 of file clist.c.

180{
181 ULONG ulSize;
182 HRESULT hRet = S_OK;
183
184 TRACE("(%p,%p)\n", lpStream, lpList);
185
186 if(lpList)
187 {
188 while (lpList->cbSize)
189 {
190 LPDATABLOCK_HEADER lpItem = lpList;
191
192 if(lpList->dwSignature == CLIST_ID_CONTAINER)
193 lpItem++;
194
195 hRet = IStream_Write(lpStream,lpItem,lpItem->cbSize,&ulSize);
196 if (FAILED(hRet))
197 return hRet;
198
199 if(lpItem->cbSize != ulSize)
200 return STG_E_MEDIUMFULL;
201
202 lpList = NextItem(lpList);
203 }
204 }
205
206 if(SUCCEEDED(hRet))
207 {
208 ULONG ulDummy;
209 ulSize = 0;
210
211 /* Write a terminating list entry with zero size */
212 hRet = IStream_Write(lpStream, &ulSize,sizeof(ulSize),&ulDummy);
213 }
214
215 return hRet;
216}
#define STG_E_MEDIUMFULL
Definition: winerror.h:2581

Referenced by CShellLink::Save().

◆ STDMETHOD_() [1/2]

STDMETHOD_ ( ULONG  ,
AddRef   
)

◆ STDMETHOD_() [2/2]

STDMETHOD_ ( ULONG  ,
Release   
)