ReactOS 0.4.17-dev-116-ga4b6fe9
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 PathIsValidChar   PathIsValidCharA
 
#define StrCpyNX   StrCpyNXA
 
#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
 
#define ZoneCheckUrlExCache   ZoneCheckUrlExCacheA
 
#define ZoneCheckPath   ZoneCheckPathA
 
#define ZoneCheckUrl   ZoneCheckUrlA
 
#define ZoneCheckUrlEx   ZoneCheckUrlExA
 

Typedefs

typedef DWORD ASSOCQUERY
 
typedef struct tagPOLICYDATA POLICYDATA
 
typedef struct tagPOLICYDATALPPOLICYDATA
 
typedef INT_PTR(CALLBACKSHDIALOGPROC) (PVOID pThis, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

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)
 
HRESULT WINAPI SHInvokeCommandsOnContextMenu (_In_opt_ HWND hwnd, _In_opt_ IUnknown *punkSite, _In_ IContextMenu *pCM, _In_ DWORD fMask, _In_reads_opt_(cVerbs) PCSTR *pVerbs, _In_ UINT cVerbs)
 
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)
 
HRESULT WINAPI IStream_ReadPidl (_In_ IStream *pstm, _Out_ LPITEMIDLIST *ppidlOut)
 
HRESULT WINAPI IStream_WritePidl (_In_ IStream *pstm, _In_ LPCITEMIDLIST pidlWrite)
 
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 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)
 
DECLSPEC_IMPORT BOOL WINAPI PathFileExistsAndAttributesA (LPCSTR lpszPath, DWORD *dwAttr)
 
DECLSPEC_IMPORT BOOL WINAPI PathFileExistsAndAttributesW (LPCWSTR lpszPath, DWORD *dwAttr)
 
LPSTR WINAPI StrCpyNXA (LPSTR lpszDest, LPCSTR lpszSrc, int iLen)
 
LPWSTR WINAPI StrCpyNXW (LPWSTR lpszDest, LPCWSTR lpszSrc, int iLen)
 
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)
 
HRESULT WINAPI IUnknown_QueryServiceForWebBrowserApp (_In_ IUnknown *lpUnknown, _In_ REFGUID riid, _Out_ LPVOID *lppOut)
 
INT_PTR WINAPI SHDialogBox (_In_opt_ HINSTANCE hInstance, _In_ PCSTR lpTemplateName, _In_opt_ HWND hWndParent, _In_opt_ SHDIALOGPROC fn, _In_opt_ PVOID pThis)
 
PSTR WINAPI CharLowerNoDBCSA (_Inout_ PSTR lpString)
 
PWSTR WINAPI CharLowerNoDBCSW (_Inout_ PWSTR lpString)
 
PSTR WINAPI CharUpperNoDBCSA (_Inout_ PSTR lpString)
 
PWSTR WINAPI CharUpperNoDBCSW (_Inout_ PWSTR lpString)
 
 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
 
HRESULT WINAPI ZoneCheckUrlExCacheA (_In_ PCSTR pszUrl, _Out_writes_bytes_opt_(cbPolicy) PBYTE pbPolicy, _In_ DWORD cbPolicy, _In_reads_bytes_opt_(cbContext) PBYTE pbContext, _In_ DWORD cbContext, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite, _In_opt_ IInternetSecurityManager *pISM)
 
HRESULT WINAPI ZoneCheckUrlExCacheW (_In_ PCWSTR pszUrl, _Out_writes_bytes_opt_(cbPolicy) PBYTE pbPolicy, _In_ DWORD cbPolicy, _In_reads_bytes_opt_(cbContext) PBYTE pbContext, _In_ DWORD cbContext, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite, _In_opt_ IInternetSecurityManager *pISM)
 
HRESULT WINAPI ZoneCheckPathA (_In_ PCSTR pszPath, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite)
 
HRESULT WINAPI ZoneCheckPathW (_In_ PCWSTR pszPath, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite)
 
HRESULT WINAPI ZoneCheckUrlA (_In_ PCSTR pszUrl, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite)
 
HRESULT WINAPI ZoneCheckUrlW (_In_ PCWSTR pszUrl, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite)
 
HRESULT WINAPI ZoneCheckUrlExA (_In_ PCSTR pszUrl, _Out_writes_bytes_opt_(cbPolicy) PBYTE pbPolicy, _In_ DWORD cbPolicy, _In_reads_bytes_opt_(cbContext) PBYTE pbContext, _In_ DWORD cbContext, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite)
 
HRESULT WINAPI ZoneCheckUrlExW (_In_ PCWSTR pszUrl, _Out_writes_bytes_opt_(cbPolicy) PBYTE pbPolicy, _In_ DWORD cbPolicy, _In_reads_bytes_opt_(cbContext) PBYTE pbContext, _In_ DWORD cbContext, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite)
 
HRESULT WINAPI ZoneCheckHost (_In_ IInternetSecurityManager *pISM, _In_ PCWSTR pszUrl, _In_ DWORD dwAction)
 
HRESULT WINAPI ZoneCheckHostEx (_In_ IInternetSecurityManager *pISM, _Out_writes_bytes_opt_(cbPolicy) PBYTE pbPolicy, _In_ DWORD cbPolicy, _In_reads_bytes_opt_(cbContext) PBYTE pbContext, _In_ DWORD cbContext, _In_ PCWSTR pszUrl, _In_ DWORD dwAction)
 

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 489 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_ANY

#define PATH_CHAR_CLASS_ANY   0xffffffff

Definition at line 381 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_ASTERIX

#define PATH_CHAR_CLASS_ASTERIX   0x00000002

Definition at line 371 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_BACKSLASH

#define PATH_CHAR_CLASS_BACKSLASH   0x00000008

Definition at line 373 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COLON

#define PATH_CHAR_CLASS_COLON   0x00000010

Definition at line 374 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COMMA

#define PATH_CHAR_CLASS_COMMA   0x00000040

Definition at line 376 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOT

#define PATH_CHAR_CLASS_DOT   0x00000004

Definition at line 372 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOUBLEQUOTE

#define PATH_CHAR_CLASS_DOUBLEQUOTE   0x00000200

Definition at line 379 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_INVALID

#define PATH_CHAR_CLASS_INVALID   0x00000000

Definition at line 380 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_LETTER

#define PATH_CHAR_CLASS_LETTER   0x00000001

Definition at line 370 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_OTHER_VALID

#define PATH_CHAR_CLASS_OTHER_VALID   0x00000100

Definition at line 378 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SEMICOLON

#define PATH_CHAR_CLASS_SEMICOLON   0x00000020

Definition at line 375 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SPACE

#define PATH_CHAR_CLASS_SPACE   0x00000080

Definition at line 377 of file shlwapi_undoc.h.

◆ PathIsValidChar

#define PathIsValidChar   PathIsValidCharA

Definition at line 411 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 439 of file shlwapi_undoc.h.

◆ SHACF_ANSIDISPLAYNAMES

#define SHACF_ANSIDISPLAYNAMES   0x00010000

Definition at line 448 of file shlwapi_undoc.h.

◆ SHACF_CONTEXTMENU

#define SHACF_CONTEXTMENU   0x00000001

Definition at line 429 of file shlwapi_undoc.h.

◆ SHACF_CORELINTERNETENUM

#define SHACF_CORELINTERNETENUM   0x00000004

Definition at line 432 of file shlwapi_undoc.h.

◆ SHACF_DOCOBJECT

#define SHACF_DOCOBJECT   0x00000002

Definition at line 431 of file shlwapi_undoc.h.

◆ SHACF_FILEOPENBOGUSCTRLID

#define SHACF_FILEOPENBOGUSCTRLID   0x00020000

Definition at line 449 of file shlwapi_undoc.h.

◆ SHACF_FILEOPENNEEDSEXT

#define SHACF_FILEOPENNEEDSEXT   0x00001000

Definition at line 444 of file shlwapi_undoc.h.

◆ SHACF_FLUSHNOWAITALWAYS

#define SHACF_FLUSHNOWAITALWAYS   SHACF_CONTEXTMENU

Definition at line 430 of file shlwapi_undoc.h.

◆ SHACF_FORCELFNIDLIST

#define SHACF_FORCELFNIDLIST   0x00040000

Definition at line 450 of file shlwapi_undoc.h.

◆ SHACF_IGNOREENUMRESET

#define SHACF_IGNOREENUMRESET   0x00004000

Definition at line 446 of file shlwapi_undoc.h.

◆ SHACF_LOADCOLUMNHANDLER

#define SHACF_LOADCOLUMNHANDLER   0x00000040

Definition at line 438 of file shlwapi_undoc.h.

◆ SHACF_MYCOMPUTERFIRST

#define SHACF_MYCOMPUTERFIRST   0x00000008

Definition at line 435 of file shlwapi_undoc.h.

◆ SHACF_NOVALIDATEFSIDS

#define SHACF_NOVALIDATEFSIDS   0x00000800

Definition at line 443 of file shlwapi_undoc.h.

◆ SHACF_OLDCREATEVIEWWND

#define SHACF_OLDCREATEVIEWWND   SHACF_CORELINTERNETENUM

Definition at line 433 of file shlwapi_undoc.h.

◆ SHACF_OLDREGITEMGDN

#define SHACF_OLDREGITEMGDN   0x00000010

Definition at line 436 of file shlwapi_undoc.h.

◆ SHACF_STAROFFICE5PRINTER

#define SHACF_STAROFFICE5PRINTER   0x00000400

Definition at line 442 of file shlwapi_undoc.h.

◆ SHACF_UNKNOWN1

#define SHACF_UNKNOWN1   0x00000100

Definition at line 440 of file shlwapi_undoc.h.

◆ SHACF_UNKNOWN2

#define SHACF_UNKNOWN2   0x01000000

Definition at line 452 of file shlwapi_undoc.h.

◆ SHACF_UNKNOWN3

#define SHACF_UNKNOWN3   0x80000000

Definition at line 453 of file shlwapi_undoc.h.

◆ SHACF_WIN95BINDTOOBJECT

#define SHACF_WIN95BINDTOOBJECT   0x00002000

Definition at line 445 of file shlwapi_undoc.h.

◆ SHACF_WIN95DEFVIEW

#define SHACF_WIN95DEFVIEW   SHACF_CORELINTERNETENUM

Definition at line 434 of file shlwapi_undoc.h.

◆ SHACF_WIN95SHLEXEC

#define SHACF_WIN95SHLEXEC   0x00000200

Definition at line 441 of file shlwapi_undoc.h.

◆ SHCreateWorkerWindow

#define SHCreateWorkerWindow   SHCreateWorkerWindowA

Definition at line 262 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 178 of file shlwapi_undoc.h.

◆ SHGetValueGoodBoot

#define SHGetValueGoodBoot   SHGetValueGoodBootA

Definition at line 294 of file shlwapi_undoc.h.

◆ SHLoadRegUIString

#define SHLoadRegUIString   SHLoadRegUIStringA

Definition at line 295 of file shlwapi_undoc.h.

◆ StrCpyNX

#define StrCpyNX   StrCpyNXA

Definition at line 412 of file shlwapi_undoc.h.

◆ WHICH_BAT

#define WHICH_BAT   (1 << 3)

Definition at line 362 of file shlwapi_undoc.h.

◆ WHICH_CMD

#define WHICH_CMD   (1 << 5)

Definition at line 364 of file shlwapi_undoc.h.

◆ WHICH_COM

#define WHICH_COM   (1 << 1)

Definition at line 360 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 367 of file shlwapi_undoc.h.

◆ WHICH_EXE

#define WHICH_EXE   (1 << 2)

Definition at line 361 of file shlwapi_undoc.h.

◆ WHICH_LNK

#define WHICH_LNK   (1 << 4)

Definition at line 363 of file shlwapi_undoc.h.

◆ WHICH_OPTIONAL

#define WHICH_OPTIONAL   (1 << 6)

Definition at line 365 of file shlwapi_undoc.h.

◆ WHICH_PIF

#define WHICH_PIF   (1 << 0)

Definition at line 359 of file shlwapi_undoc.h.

◆ ZoneCheckPath

#define ZoneCheckPath   ZoneCheckPathA

Definition at line 617 of file shlwapi_undoc.h.

◆ ZoneCheckUrl

#define ZoneCheckUrl   ZoneCheckUrlA

Definition at line 618 of file shlwapi_undoc.h.

◆ ZoneCheckUrlEx

#define ZoneCheckUrlEx   ZoneCheckUrlExA

Definition at line 619 of file shlwapi_undoc.h.

◆ ZoneCheckUrlExCache

#define ZoneCheckUrlExCache   ZoneCheckUrlExCacheA

Definition at line 616 of file shlwapi_undoc.h.

Typedef Documentation

◆ ASSOCQUERY

typedef DWORD ASSOCQUERY

Definition at line 23 of file shlwapi_undoc.h.

◆ LPPOLICYDATA

◆ POLICYDATA

◆ SHDIALOGPROC

typedef INT_PTR(CALLBACK * SHDIALOGPROC) (PVOID pThis, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

Definition at line 463 of file shlwapi_undoc.h.

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 328 of file shlwapi_undoc.h.

329{
330 SHKEY_Root_HKCU = 0x1,
331 SHKEY_Root_HKLM = 0x2,
332 SHKEY_Key_Explorer = 0x00,
333 SHKEY_Key_Shell = 0x10,
335 SHKEY_Key_Classes = 0x30,
336 SHKEY_Subkey_Default = 0x0000,
338 SHKEY_Subkey_Handlers = 0x2000,
340 SHKEY_Subkey_Volatile = 0x4000,
341 SHKEY_Subkey_MUICache = 0x5000,
342 SHKEY_Subkey_FileExts = 0x6000
343};
@ 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

◆ CharLowerNoDBCSA()

PSTR WINAPI CharLowerNoDBCSA ( _Inout_ PSTR  lpString)

Definition at line 73 of file utils.cpp.

74{
75 return CharLowerNoDBCSAWorker(lpString, 0, FALSE) ? lpString : NULL;
76}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
static BOOL CharLowerNoDBCSAWorker(PSTR lpString, INT cchMax, BOOL bUppercase)
Definition: utils.cpp:44

◆ CharLowerNoDBCSW()

PWSTR WINAPI CharLowerNoDBCSW ( _Inout_ PWSTR  lpString)

Definition at line 81 of file utils.cpp.

82{
83 return CharLowerNoDBCSWWorker(lpString, 0, FALSE) ? lpString : NULL;
84}
static BOOL CharLowerNoDBCSWWorker(PWSTR lpString, INT cchMax, BOOL bUppercase)
Definition: utils.cpp:57

◆ CharUpperNoDBCSA()

PSTR WINAPI CharUpperNoDBCSA ( _Inout_ PSTR  lpString)

Definition at line 89 of file utils.cpp.

90{
91 return CharLowerNoDBCSAWorker(lpString, 0, TRUE) ? lpString : NULL;
92}
#define TRUE
Definition: types.h:120

◆ CharUpperNoDBCSW()

PWSTR WINAPI CharUpperNoDBCSW ( _Inout_ PWSTR  lpString)

Definition at line 97 of file utils.cpp.

98{
99 return CharLowerNoDBCSWWorker(lpString, 0, TRUE) ? lpString : NULL;
100}

◆ 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
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 4735 of file ordinal.c.

4736{
4737 while (*lpwstr)
4738 {
4739 if (*lpwstr == '/')
4740 *lpwstr = '\\';
4741 lpwstr++;
4742 }
4743}

Referenced by PathQualifyExW().

◆ IContextMenu_Invoke()

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

Definition at line 355 of file utils.cpp.

360{
361 TRACE("(%p, %p, %s, %u)\n", pContextMenu, hwnd, debugstr_a(lpVerb), uFlags);
363 uFlags, lpVerb, NULL, false);
364 return !FAILED_UNEXPECTEDLY(hr);
365}
HRESULT hr
Definition: delayimp.cpp:573
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:103
#define FAILED_UNEXPECTEDLY
Definition: utils.cpp:30
#define debugstr_a
Definition: kernel32.h:31
#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_ReadPidl()

HRESULT WINAPI IStream_ReadPidl ( _In_ IStream pstm,
_Out_ LPITEMIDLIST ppidlOut 
)

◆ IStream_WritePidl()

HRESULT WINAPI IStream_WritePidl ( _In_ IStream pstm,
_In_ LPCITEMIDLIST  pidlWrite 
)

◆ 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
const CLSID * clsid
Definition: msctf.cpp:50
const GUID IID_IPersist
Definition: proxy.cpp:14
#define memset(x, y, z)
Definition: compat.h:39

Referenced by 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
static LPVOID LPUNKNOWN
Definition: dinput.c:53
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1501
unsigned long DWORD
Definition: ntddk_ex.h:95

◆ IUnknown_HasFocusIO()

HRESULT WINAPI IUnknown_HasFocusIO ( IUnknown punk)

Definition at line 4468 of file ordinal.c.

4469{
4470 IInputObject* lpInput = NULL;
4471 HRESULT hRet = E_INVALIDARG;
4472
4473 TRACE("(%p)\n", lpUnknown);
4474 if (lpUnknown)
4475 {
4476 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
4477 (void**)&lpInput);
4478 if (SUCCEEDED(hRet) && lpInput)
4479 {
4480 hRet = IInputObject_HasFocusIO(lpInput);
4481 IInputObject_Release(lpInput);
4482 }
4483 }
4484 return hRet;
4485}
#define IInputObject_HasFocusIO(p)
Definition: shlobj.h:721
#define IInputObject_Release(p)
Definition: shlobj.h:718

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 4988 of file ordinal.c.

4989{
4990 IInputObjectSite *pIOS = NULL;
4991 HRESULT hRet = E_INVALIDARG;
4992
4993 TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
4994
4995 if (lpUnknown)
4996 {
4997 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
4998 (void **)&pIOS);
4999 if (SUCCEEDED(hRet) && pIOS)
5000 {
5001 hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
5003 }
5004 }
5005 return hRet;
5006}
#define IInputObjectSite_Release(p)
Definition: shlobj.h:742
#define IInputObjectSite_OnFocusChangeIS(p, a, b)
Definition: shlobj.h:744

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
#define debugstr_guid
Definition: kernel32.h:35
Definition: tools.h:99

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

◆ IUnknown_QueryServiceForWebBrowserApp()

HRESULT WINAPI IUnknown_QueryServiceForWebBrowserApp ( _In_ IUnknown lpUnknown,
_In_ REFGUID  riid,
_Out_ LPVOID lppOut 
)

◆ 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
_In_opt_ IUnknown * punk
Definition: shlwapi.h:158

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_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:720

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 
)

◆ PathFileExistsAndAttributesA()

DECLSPEC_IMPORT BOOL WINAPI PathFileExistsAndAttributesA ( LPCSTR  lpszPath,
DWORD dwAttr 
)

Definition at line 1853 of file path.c.

1854{
1855 UINT iPrevErrMode;
1856 DWORD dwVal = 0;
1857
1858 TRACE("(%s %p)\n", debugstr_a(lpszPath), dwAttr);
1859
1860 if (dwAttr)
1861 *dwAttr = INVALID_FILE_ATTRIBUTES;
1862
1863 if (!lpszPath)
1864 return FALSE;
1865
1866 iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
1867 dwVal = GetFileAttributesA(lpszPath);
1868 SetErrorMode(iPrevErrMode);
1869 if (dwAttr)
1870 *dwAttr = dwVal;
1871 return (dwVal != INVALID_FILE_ATTRIBUTES);
1872}
UINT WINAPI SetErrorMode(IN UINT uMode)
Definition: except.c:751
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:620
unsigned int UINT
Definition: ndis.h:50
#define SEM_FAILCRITICALERRORS
Definition: rtltypes.h:69
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23

◆ PathFileExistsAndAttributesW()

DECLSPEC_IMPORT BOOL WINAPI PathFileExistsAndAttributesW ( LPCWSTR  lpszPath,
DWORD dwAttr 
)

Definition at line 1879 of file path.c.

1880{
1881 UINT iPrevErrMode;
1882 DWORD dwVal;
1883
1884 TRACE("(%s %p)\n", debugstr_w(lpszPath), dwAttr);
1885
1886 if (!lpszPath)
1887 return FALSE;
1888
1889 iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
1890 dwVal = GetFileAttributesW(lpszPath);
1891 SetErrorMode(iPrevErrMode);
1892 if (dwAttr)
1893 *dwAttr = dwVal;
1894 return (dwVal != INVALID_FILE_ATTRIBUTES);
1895}
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:636
#define debugstr_w
Definition: kernel32.h:32

◆ PathFileExistsDefExtAndAttributesW()

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

Definition at line 459 of file utils.cpp.

463{
464 TRACE("(%s, 0x%lX, %p)\n", debugstr_w(pszPath), dwWhich, pdwFileAttributes);
465
466 if (pdwFileAttributes)
467 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
468
469 if (!pszPath)
470 return FALSE;
471
472 if (!dwWhich || (*PathFindExtensionW(pszPath) && (dwWhich & WHICH_OPTIONAL)))
473 return PathFileExistsAndAttributesW(pszPath, pdwFileAttributes);
474
475 if (!PathFileExistsDefExtW(pszPath, dwWhich))
476 {
477 if (pdwFileAttributes)
478 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
479 return FALSE;
480 }
481
482 if (pdwFileAttributes)
483 *pdwFileAttributes = GetFileAttributesW(pszPath);
484
485 return TRUE;
486}
LPWSTR WINAPI PathFindExtensionW(const WCHAR *path)
Definition: path.c:1274
BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr)
Definition: path.c:1879
BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich)
Definition: path.c:1126
#define WHICH_OPTIONAL

Referenced by START_TEST().

◆ PathFileExistsDefExtW()

BOOL WINAPI PathFileExistsDefExtW ( LPWSTR  lpszPath,
DWORD  dwWhich 
)

Definition at line 1126 of file path.c.

1127{
1128 static const WCHAR pszExts[][5] = { { '.', 'p', 'i', 'f', 0},
1129 { '.', 'c', 'o', 'm', 0},
1130 { '.', 'e', 'x', 'e', 0},
1131 { '.', 'b', 'a', 't', 0},
1132 { '.', 'l', 'n', 'k', 0},
1133 { '.', 'c', 'm', 'd', 0},
1134 { 0, 0, 0, 0, 0} };
1135
1136 TRACE("(%s,%d)\n", debugstr_w(lpszPath), dwWhich);
1137
1138 if (!lpszPath || PathIsUNCServerW(lpszPath) || PathIsUNCServerShareW(lpszPath))
1139 return FALSE;
1140
1141 if (dwWhich)
1142 {
1143 LPCWSTR szExt = PathFindExtensionW(lpszPath);
1144#ifndef __REACTOS__
1145 if (!*szExt || dwWhich & 0x40)
1146#else
1147 if (!*szExt || dwWhich & WHICH_OPTIONAL)
1148#endif
1149 {
1150 size_t iChoose = 0;
1151 int iLen = lstrlenW(lpszPath);
1152 if (iLen > (MAX_PATH - 5))
1153 return FALSE;
1154#ifndef __REACTOS__
1155 while ( (dwWhich & 0x1) && pszExts[iChoose][0] )
1156#else
1157 while (pszExts[iChoose][0])
1158#endif
1159 {
1160#ifdef __REACTOS__
1161 if (dwWhich & 0x1)
1162 {
1164#endif
1165 lstrcpyW(lpszPath + iLen, pszExts[iChoose]);
1166 if (PathFileExistsW(lpszPath))
1167 return TRUE;
1168#ifdef __REACTOS__
1169 }
1170#endif
1171 iChoose++;
1172 dwWhich >>= 1;
1173 }
1174 *(lpszPath + iLen) = (WCHAR)'\0';
1175 return FALSE;
1176 }
1177 }
1178 return PathFileExistsW(lpszPath);
1179}
#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:2370
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:450
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1824
BOOL WINAPI PathIsUNCServerShareW(LPCWSTR lpszPath)
Definition: path.c:2425
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
short WCHAR
Definition: pedump.c:58
const uint16_t * LPCWSTR
Definition: typedefs.h:57
#define GetFileAttributes
Definition: winbase.h:3564

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

◆ PathFindOnPathExW()

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

Definition at line 1360 of file path.c.

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

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 409 of file utils.cpp.

410{
411 WCHAR szKey[MAX_PATH];
412 HRESULT hr;
413 if (pszSubKey)
414 hr = StringCchPrintfW(szKey, _countof(szKey), L"%s\\shell\\%s\\command", pszSubKey, pszVerb);
415 else
416 hr = StringCchPrintfW(szKey, _countof(szKey), L"shell\\%s\\command", pszVerb);
417 return SUCCEEDED(hr) ? RunRegCommand(hWnd, hKey, szKey) : hr;
418}
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:395
#define L(x)
Definition: resources.c:13
FxAutoRegKey hKey
_In_opt_ LPCSTR pszSubKey
Definition: shlwapi.h:783
#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 395 of file utils.cpp.

396{
397 WCHAR szCmd[MAX_PATH * 2];
398 DWORD cb = sizeof(szCmd);
400 if (error)
403}
static MonoProfilerRuntimeShutdownBeginCallback cb
Definition: metahost.c:118
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:371
#define error(str)
Definition: mkdosfs.c:1605
#define SEE_MASK_FLAG_LOG_USAGE
Definition: shellapi.h:55
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define RRF_RT_REG_SZ
Definition: winreg.h:58

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:1278
static LPCWSTR szVersion
Definition: asmcache.c:748
#define KEY_READ
Definition: nt_native.h:1026
#define strlenW(s)
Definition: unicode.h:28
#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 LMEM_MOVEABLE
Definition: minwinbase.h:82
#define LMEM_ZEROINIT
Definition: minwinbase.h:85
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
struct tagDATABLOCKHEADER * LPDATABLOCK_HEADER
struct tagDATABLOCKHEADER DATABLOCK_HEADER
uint32_t ULONG
Definition: typedefs.h:59

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 2778 of file string.c.

2779{
2780 DWORD dwRet;
2781
2782 dwRet = MultiByteToWideChar(dwCp, 0, lpSrcStr, -1, lpDstStr, iLen);
2783 TRACE("%s->%s,ret=%d\n", debugstr_a(lpSrcStr), debugstr_w(lpDstStr), dwRet);
2784 return dwRet;
2785}
#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}
_In_ UINT uID
Definition: shlwapi.h:156
#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:4171
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:3167
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:945
uint16_t * PWCHAR
Definition: typedefs.h:56
_In_ LPCSTR lpFileName
Definition: winbase.h:2824

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:3278
HICON hIcon
Definition: winuser.h:3276
HINSTANCE hInstance
Definition: winuser.h:3275
HCURSOR hCursor
Definition: winuser.h:3277
int cbWndExtra
Definition: winuser.h:3274
UINT style
Definition: winuser.h:3271
LPCSTR lpszMenuName
Definition: winuser.h:3279
LPCSTR lpszClassName
Definition: winuser.h:3280
WNDPROC lpfnWndProc
Definition: winuser.h:3272
int cbClsExtra
Definition: winuser.h:3273
#define LONG_PTR
Definition: treelist.c:79
#define GWLP_WNDPROC
Definition: treelist.c:66
char * LPSTR
Definition: typedefs.h:51
#define SetWindowLongPtrA
Definition: winuser.h:5511
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:5512
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2459
#define COLOR_BTNFACE
Definition: winuser.h:939

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 3127 of file ordinal.c.

3129{
3130 static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', 0 };
3131 WNDCLASSW wc;
3132 HWND hWnd;
3133
3134 TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
3135 wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
3136
3137 /* If our OS is natively ANSI, use the ANSI version */
3138 if (GetVersion() & 0x80000000) /* not NT */
3139 {
3140 TRACE("fallback to ANSI, ver 0x%08x\n", GetVersion());
3141 return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
3142 }
3143
3144 /* Create Window class */
3145 wc.style = 0;
3147 wc.cbClsExtra = 0;
3148 wc.cbWndExtra = sizeof(LONG_PTR);
3150 wc.hIcon = NULL;
3152 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
3153 wc.lpszMenuName = NULL;
3154 wc.lpszClassName = szClass;
3155
3156 SHRegisterClassW(&wc);
3157
3158 hWnd = CreateWindowExW(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
3159 hWndParent, hMenu, shlwapi_hInstance, 0);
3160 if (hWnd)
3161 {
3162 SetWindowLongPtrW(hWnd, 0, wnd_extra);
3164 }
3165
3166 return hWnd;
3167}
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:3293
LPCWSTR lpszMenuName
Definition: winuser.h:3292
HBRUSH hbrBackground
Definition: winuser.h:3291
HICON hIcon
Definition: winuser.h:3289
HINSTANCE hInstance
Definition: winuser.h:3288
int cbClsExtra
Definition: winuser.h:3286
UINT style
Definition: winuser.h:3284
WNDPROC lpfnWndProc
Definition: winuser.h:3285
int cbWndExtra
Definition: winuser.h:3287
HCURSOR hCursor
Definition: winuser.h:3290
uint16_t * LPWSTR
Definition: typedefs.h:56
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2474
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)

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

◆ SHDialogBox()

INT_PTR WINAPI SHDialogBox ( _In_opt_ HINSTANCE  hInstance,
_In_ PCSTR  lpTemplateName,
_In_opt_ HWND  hWndParent,
_In_opt_ SHDIALOGPROC  fn,
_In_opt_ PVOID  pThis 
)

Definition at line 694 of file utils.cpp.

700{
701 SHDIALOG data = { fn, pThis };
702 return DialogBoxParamA(hInstance, lpTemplateName, hWndParent, SHDialogProc, (LPARAM)&data);
703}
HINSTANCE hInstance
Definition: charmap.c:19
static INT_PTR CALLBACK SHDialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: utils.cpp:640
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
LONG_PTR LPARAM
Definition: minwindef.h:175
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
INT_PTR WINAPI DialogBoxParamA(_In_opt_ HINSTANCE, _In_ LPCSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)

◆ 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:100
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:3451

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
#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:1156
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:1834

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:9400
DWORD cbSize
Definition: winuser.h:3892
#define MIIM_SUBMENU
Definition: winuser.h:734
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)

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

◆ SHGetObjectCompatFlags()

DWORD WINAPI SHGetObjectCompatFlags ( IUnknown pUnk,
const CLSID clsid 
)

Definition at line 6515 of file ordinal.c.

6516{
6517 static const WCHAR compatpathW[] =
6518 {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
6519 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
6520 'S','h','e','l','l','C','o','m','p','a','t','i','b','i','l','i','t','y','\\',
6521 'O','b','j','e','c','t','s','\\','%','s',0};
6522 WCHAR strW[sizeof(compatpathW)/sizeof(WCHAR) + 38 /* { CLSID } */];
6523 DWORD ret, length = sizeof(strW)/sizeof(WCHAR);
6524 OLECHAR *clsid_str;
6525 HKEY key;
6526 INT i;
6527
6528 TRACE("%p %s\n", pUnk, debugstr_guid(clsid));
6529
6530 if (!pUnk && !clsid) return 0;
6531
6532 if (pUnk && !clsid)
6533 {
6534 FIXME("iface not handled\n");
6535 return 0;
6536 }
6537
6538 StringFromCLSID(clsid, &clsid_str);
6539 sprintfW(strW, compatpathW, clsid_str);
6540 CoTaskMemFree(clsid_str);
6541
6543 if (ret != ERROR_SUCCESS) return 0;
6544
6545 /* now collect flag values */
6546 ret = 0;
6547 for (i = 0; RegEnumValueW(key, i, strW, &length, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; i++)
6548 {
6549 INT left, right, res, x;
6550
6551 /* search in table */
6552 left = 0;
6553 right = sizeof(objcompat_table) / sizeof(struct objcompat_entry) - 1;
6554
6555 while (right >= left) {
6556 x = (left + right) / 2;
6558 if (res == 0)
6559 {
6560 ret |= objcompat_table[x].value;
6561 break;
6562 }
6563 else if (res < 0)
6564 right = x - 1;
6565 else
6566 left = x + 1;
6567 }
6568
6569 length = sizeof(strW)/sizeof(WCHAR);
6570 }
6571
6572 return ret;
6573}
#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
HRESULT WINAPI StringFromCLSID(REFCLSID clsid, LPOLESTR *str)
Definition: combase.c:1515
WCHAR OLECHAR
Definition: compat.h:2292
static const struct objcompat_entry objcompat_table[]
Definition: ordinal.c:6473
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(void *ptr)
Definition: malloc.c:389
WCHAR strW[12]
Definition: clipboard.c:2216
Definition: copy.c:22
Definition: name.c:39
Definition: ordinal.c:6467
#define strcmpW(s1, s2)
Definition: unicode.h:38
#define sprintfW
Definition: unicode.h:58

Referenced by init_pointers(), and SHGetAttributes().

◆ SHGetPathFromIDListWrapW()

BOOL WINAPI SHGetPathFromIDListWrapW ( LPCITEMIDLIST  pidl,
LPWSTR  pszPath 
)

Definition at line 3595 of file ordinal.c.

3596{
3597 return SHGetPathFromIDListW(pidl, pszPath);
3598}
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1496

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 4806 of file ordinal.c.

4807{
4808#ifndef __REACTOS__
4809 enum _shellkey_flags {
4810 SHKEY_Root_HKCU = 0x1,
4811 SHKEY_Root_HKLM = 0x2,
4812 SHKEY_Key_Explorer = 0x00,
4813 SHKEY_Key_Shell = 0x10,
4814 SHKEY_Key_ShellNoRoam = 0x20,
4815 SHKEY_Key_Classes = 0x30,
4816 SHKEY_Subkey_Default = 0x0000,
4818 SHKEY_Subkey_Handlers = 0x2000,
4820 SHKEY_Subkey_Volatile = 0x4000,
4821 SHKEY_Subkey_MUICache = 0x5000,
4822 SHKEY_Subkey_FileExts = 0x6000
4823 };
4824#endif
4825
4826 static const WCHAR explorerW[] = {'S','o','f','t','w','a','r','e','\\',
4827 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4828 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
4829 'E','x','p','l','o','r','e','r','\\'};
4830 static const WCHAR shellW[] = {'S','o','f','t','w','a','r','e','\\',
4831 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4832 'S','h','e','l','l','\\'};
4833 static const WCHAR shell_no_roamW[] = {'S','o','f','t','w','a','r','e','\\',
4834 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4835 'S','h','e','l','l','N','o','R','o','a','m','\\'};
4836 static const WCHAR classesW[] = {'S','o','f','t','w','a','r','e','\\',
4837 'C','l','a','s','s','e','s','\\'};
4838
4839 static const WCHAR localized_resource_nameW[] = {'L','o','c','a','l','i','z','e','d',
4840 'R','e','s','o','u','r','c','e','N','a','m','e','\\'};
4841 static const WCHAR handlersW[] = {'H','a','n','d','l','e','r','s','\\'};
4842 static const WCHAR associationsW[] = {'A','s','s','o','c','i','a','t','i','o','n','s','\\'};
4843 static const WCHAR volatileW[] = {'V','o','l','a','t','i','l','e','\\'};
4844 static const WCHAR mui_cacheW[] = {'M','U','I','C','a','c','h','e','\\'};
4845 static const WCHAR file_extsW[] = {'F','i','l','e','E','x','t','s','\\'};
4846
4847 WCHAR *path;
4848 const WCHAR *key, *subkey;
4849 int size_key, size_subkey, size_user;
4850 HKEY hkey = NULL;
4851
4852 TRACE("(0x%08x, %s, %d)\n", flags, debugstr_w(sub_key), create);
4853
4854 /* For compatibility with Vista+ */
4855 if(flags == 0x1ffff)
4856 flags = 0x21;
4857
4858 switch(flags&0xff0) {
4859 case SHKEY_Key_Explorer:
4860 key = explorerW;
4861 size_key = sizeof(explorerW);
4862 break;
4863 case SHKEY_Key_Shell:
4864 key = shellW;
4865 size_key = sizeof(shellW);
4866 break;
4868 key = shell_no_roamW;
4869 size_key = sizeof(shell_no_roamW);
4870 break;
4871 case SHKEY_Key_Classes:
4872 key = classesW;
4873 size_key = sizeof(classesW);
4874 break;
4875 default:
4876 FIXME("unsupported flags (0x%08x)\n", flags);
4877 return NULL;
4878 }
4879
4880 switch(flags&0xff000) {
4882 subkey = NULL;
4883 size_subkey = 0;
4884 break;
4886 subkey = localized_resource_nameW;
4887 size_subkey = sizeof(localized_resource_nameW);
4888 break;
4890 subkey = handlersW;
4891 size_subkey = sizeof(handlersW);
4892 break;
4894 subkey = associationsW;
4895 size_subkey = sizeof(associationsW);
4896 break;
4898 subkey = volatileW;
4899 size_subkey = sizeof(volatileW);
4900 break;
4902 subkey = mui_cacheW;
4903 size_subkey = sizeof(mui_cacheW);
4904 break;
4906 subkey = file_extsW;
4907 size_subkey = sizeof(file_extsW);
4908 break;
4909 default:
4910 FIXME("unsupported flags (0x%08x)\n", flags);
4911 return NULL;
4912 }
4913
4914 if(sub_key)
4915 size_user = lstrlenW(sub_key)*sizeof(WCHAR);
4916 else
4917 size_user = 0;
4918
4919 path = HeapAlloc(GetProcessHeap(), 0, size_key+size_subkey+size_user+sizeof(WCHAR));
4920 if(!path) {
4921 ERR("Out of memory\n");
4922 return NULL;
4923 }
4924
4925 memcpy(path, key, size_key);
4926 if(subkey)
4927 memcpy(path+size_key/sizeof(WCHAR), subkey, size_subkey);
4928 if(sub_key)
4929 memcpy(path+(size_key+size_subkey)/sizeof(WCHAR), sub_key, size_user);
4930 path[(size_key+size_subkey+size_user)/sizeof(WCHAR)] = '\0';
4931
4932 if(create)
4934 path, 0, NULL, 0, MAXIMUM_ALLOWED, NULL, &hkey, NULL);
4935 else
4937 path, 0, MAXIMUM_ALLOWED, &hkey);
4938
4940 return hkey;
4941}
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:2804
@ SHKEY_Subkey_Handlers
Definition: ordinal.c:2813
@ SHKEY_Root_HKLM
Definition: ordinal.c:2806
@ SHKEY_Key_ShellNoRoam
Definition: ordinal.c:2809
@ SHKEY_Subkey_Volatile
Definition: ordinal.c:2815
@ SHKEY_Subkey_Associations
Definition: ordinal.c:2814
@ SHKEY_Key_Classes
Definition: ordinal.c:2810
@ SHKEY_Subkey_MUICache
Definition: ordinal.c:2816
@ SHKEY_Key_Explorer
Definition: ordinal.c:2807
@ SHKEY_Root_HKCU
Definition: ordinal.c:2805
@ SHKEY_Subkey_FileExts
Definition: ordinal.c:2817
@ SHKEY_Key_Shell
Definition: ordinal.c:2808
@ SHKEY_Subkey_Default
Definition: ordinal.c:2811
@ SHKEY_Subkey_ResourceName
Definition: ordinal.c:2812
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
#define HKEY_CURRENT_USER
Definition: winreg.h:11

Referenced by CViewStatePropertyBag::_GetHKey(), CDesktopUpgradePropertyBag::_GetOldDesktopViewStream(), init_pointers(), InitializeServerAdminUI(), IsOS(), 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 1919 of file reg.c.

1921{
1924 return SHGetValueA(hkey, pSubKey, pValue, pwType, pvData, pbData);
1925}
#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:1249
PWCHAR pValue
_In_ LPWSTR _In_ DWORD _In_ LPCVOID pvData
Definition: netsh.h:116
#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 1932 of file reg.c.

1934{
1937 return SHGetValueW(hkey, pSubKey, pValue, pwType, pvData, pbData);
1938}

◆ 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:491

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 3624 of file ordinal.c.

3625{
3627}
#define InterlockedCompareExchangePointer
Definition: interlocked.h:144
static char * dest
Definition: rtl.c:149
Definition: bug.cpp:8

◆ SHInvokeCommandsOnContextMenu()

HRESULT WINAPI SHInvokeCommandsOnContextMenu ( _In_opt_ HWND  hwnd,
_In_opt_ IUnknown punkSite,
_In_ IContextMenu pCM,
_In_ DWORD  fMask,
_In_reads_opt_(cVerbs) PCSTR pVerbs,
_In_ UINT  cVerbs 
)

Definition at line 234 of file utils.cpp.

241{
242 HRESULT hr;
243 CMINVOKECOMMANDINFOEX ici;
244 WCHAR szVerbW[MAX_PATH];
245 HMENU hMenu = NULL;
246 UINT iVerb, idDefault = (UINT)-1;
247 PCSTR pszVerbA = NULL;
248
249 if (!pCM)
250 return E_INVALIDARG;
251
252 hMenu = CreatePopupMenu();
253 if (!hMenu)
254 return E_OUTOFMEMORY;
255
256 if (punkSite)
257 IUnknown_SetSite(pCM, punkSite);
258
259 hr = pCM->QueryContextMenu(hMenu, 0, 1, MAXSHORT, (cVerbs ? 0 : CMF_DEFAULTONLY));
260 if (FAILED(hr))
261 goto Cleanup;
262
263 if (!cVerbs)
264 {
265 idDefault = GetMenuDefaultItem(hMenu, FALSE, 0);
266 if (idDefault != (UINT)-1)
267 pszVerbA = MAKEINTRESOURCEA(idDefault - 1);
268 }
269
270 ZeroMemory(&ici, sizeof(ici));
271 ici.cbSize = sizeof(ici);
272 ici.hwnd = hwnd;
273 ici.nShow = SW_SHOWNORMAL;
274
275 iVerb = 0;
276 do
277 {
278 if (cVerbs)
279 pszVerbA = pVerbs[iVerb];
280
281 if (!pszVerbA && idDefault == (UINT)-1)
282 {
283 hr = E_FAIL;
284 break;
285 }
286
287 ici.fMask = fMask;
288 ici.lpVerb = pszVerbA;
289 ici.lpVerbW = NULL;
290
291 if (idDefault == (UINT)-1 && !IS_INTRESOURCE(pszVerbA) && IsTextAsciiOnly(pszVerbA))
292 {
293 size_t ich;
294 for (ich = 0; pszVerbA[ich] && ich + 1 < _countof(szVerbW); ++ich)
295 {
296 szVerbW[ich] = (BYTE)pszVerbA[ich];
297 }
298 szVerbW[ich] = UNICODE_NULL;
299
300 ici.lpVerbW = szVerbW;
301 ici.fMask |= CMIC_MASK_UNICODE;
302 }
303
304 hr = pCM->InvokeCommand((LPCMINVOKECOMMANDINFO)&ici);
305
307 break;
308
309 ++iVerb;
310 } while (iVerb < cVerbs);
311
312Cleanup:
313 if (punkSite)
315 DestroyMenu(hMenu);
316 return hr;
317}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define IS_INTRESOURCE(x)
Definition: loader.c:613
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
Definition: ordinal.c:1411
static BOOL IsTextAsciiOnly(PCSTR psz)
Definition: utils.cpp:219
static const WCHAR Cleanup[]
Definition: register.c:80
#define ZeroMemory
Definition: minwinbase.h:31
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
const char * PCSTR
Definition: typedefs.h:52
#define MAXSHORT
Definition: umtypes.h:114
#define ERROR_CANCELLED
Definition: winerror.h:1055
#define SW_SHOWNORMAL
Definition: winuser.h:781
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:838
UINT WINAPI GetMenuDefaultItem(_In_ HMENU hMenu, _In_ UINT fByPos, _In_ UINT gmdiFlags)
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
BOOL WINAPI DestroyMenu(_In_ HMENU)
unsigned char BYTE
Definition: xxhash.c:193

◆ SHInvokeDefaultCommand()

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

Definition at line 3183 of file ordinal.c.

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

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 570 of file istream.c.

571{
572 STATSTG statstg;
573 BOOL bRet = TRUE;
574
575 TRACE("(%p)\n", lpStream);
576
577 memset(&statstg, 0, sizeof(statstg));
578
579 if(SUCCEEDED(IStream_Stat(lpStream, &statstg, 1)))
580 {
581 if(statstg.cbSize.QuadPart)
582 bRet = FALSE; /* Non-Zero */
583 }
584 else
585 {
586 DWORD dwDummy;
587
588 /* Try to read from the stream */
589 if(SUCCEEDED(SHIStream_Read(lpStream, &dwDummy, sizeof(dwDummy))))
590 {
592 zero.QuadPart = 0;
593
594 IStream_Seek(lpStream, zero, 0, NULL);
595 bRet = FALSE; /* Non-Zero */
596 }
597 }
598 return bRet;
599}
HRESULT WINAPI SHIStream_Read(IStream *lpStream, LPVOID lpvDest, ULONG ulSize)
Definition: istream.c:544
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}
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define IQueryInfo_Release(p)
Definition: shlobj.h:693
#define IQueryInfo_GetInfoFlags(p, a)
Definition: shlobj.h:696

◆ 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
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define MF_BYPOSITION
Definition: winuser.h:203
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
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 4413 of file ordinal.c.

4414{
4415 DWORD type, sz = size * sizeof(WCHAR);
4416
4417 if(RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)buf, &sz) != ERROR_SUCCESS)
4418 return E_FAIL;
4419
4421}
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 4725 of file ordinal.c.

4726{
4727 TRACE("%p %u\n", hMenu, uID);
4728 return GetMenuPosFromID(hMenu, uID);
4729}
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
Definition: ordinal.c:4698

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
char CHAR
Definition: pedump.c:57
strcat
Definition: string.h:92
strcpy
Definition: string.h:131
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10

Referenced by SHAutoComplete(), and SHLWAPI_GetCachedZonesManagerInner().

◆ 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 5822 of file ordinal.c.

5823{
5824#ifdef __REACTOS__
5825 HRESULT hr;
5826 VARIANTARG varg;
5827
5828 TRACE("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5829
5830 if (!ppb || !pszPropName || !pValue)
5831 {
5832 ERR("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5833 return E_INVALIDARG;
5834 }
5835
5836 hr = SHPropertyBag_ReadType(ppb, pszPropName, &varg, VT_I4);
5837 if (SUCCEEDED(hr))
5838 *pValue = V_I4(&varg);
5839#else
5840 VARIANT var;
5841 HRESULT hr;
5842 TRACE("%p %s %p\n", ppb,debugstr_w(pszPropName),pValue);
5843 if (!pszPropName || !ppb || !pValue)
5844 return E_INVALIDARG;
5845 V_VT(&var) = VT_I4;
5846 hr = IPropertyBag_Read(ppb, pszPropName, &var, NULL);
5847 if (SUCCEEDED(hr))
5848 {
5849 if (V_VT(&var) == VT_I4)
5850 *pValue = V_I4(&var);
5851 else
5853 }
5854#endif
5855 return hr;
5856}
@ 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:3620

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}
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 2464 of file reg.c.

2466{
2467#ifndef __REACTOS__
2468 static const WCHAR szClassIdKey[] = { 'S','o','f','t','w','a','r','e','\\',
2469 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
2470 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
2471 'E','x','p','l','o','r','e','r','\\','C','L','S','I','D','\\' };
2472#endif
2473#define szClassIdKeyLen (sizeof(szClassIdKey)/sizeof(WCHAR))
2474 WCHAR szKey[MAX_PATH];
2475 DWORD dwRet;
2476 HKEY hkey;
2477
2478 /* Create the key string */
2479#ifdef __REACTOS__
2480 // https://www.geoffchappell.com/studies/windows/shell/shlwapi/api/reg/reggetclsidkey.htm
2481 WCHAR* ptr;
2482
2483 wcscpy(szKey, bUseHKCU ? L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\" : L"CLSID\\");
2484 ptr = szKey + wcslen(szKey);
2485 SHStringFromGUIDW(guid, ptr, 39); /* Append guid */
2486 if (lpszValue)
2487 {
2488 ptr = szKey + wcslen(szKey);
2489 wcscat(ptr, L"\\");
2490 wcscat(++ptr, lpszValue);
2491 }
2492#else
2493 memcpy(szKey, szClassIdKey, sizeof(szClassIdKey));
2494 SHStringFromGUIDW(guid, szKey + szClassIdKeyLen, 39); /* Append guid */
2495
2496 if(lpszValue)
2497 {
2498 szKey[szClassIdKeyLen + 39] = '\\';
2499 strcpyW(szKey + szClassIdKeyLen + 40, lpszValue); /* Append value name */
2500 }
2501#endif
2502
2503 hkey = bUseHKCU ? HKEY_CURRENT_USER : HKEY_CLASSES_ROOT;
2504
2505 if(bCreate)
2506 dwRet = RegCreateKeyW(hkey, szKey, phKey);
2507 else
2508 dwRet = RegOpenKeyExW(hkey, szKey, 0, KEY_READ, phKey);
2509
2510 return dwRet ? HRESULT_FROM_WIN32(dwRet) : S_OK;
2511}
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1201
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
INT WINAPI SHStringFromGUIDW(REFGUID, LPWSTR, INT)
Definition: ordinal.c:661
#define szClassIdKeyLen
static PVOID ptr
Definition: dispmode.c:27
wcscat
wcscpy
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1527

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 4195 of file ordinal.c.

4196{
4198 SMTO_ABORTIFHUNG, 2000, NULL);
4199}
#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}
UINT_PTR WPARAM
Definition: minwindef.h:174
LONG lfHeight
Definition: dimm.idl:59
BYTE lfCharSet
Definition: dimm.idl:67
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:1679
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SETFONT
Definition: winuser.h:1678
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(), CFontBackgroundMenu::InvokeCommand(), CCPLItemMenu::InvokeCommand(), CDefaultContextMenu::InvokeRegVerb(), and SH32_SimulateDropWithSite().

◆ SHUnicodeToAnsi()

◆ SHUnicodeToAnsiCP()

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

Definition at line 2828 of file string.c.

2829{
2830 static const WCHAR emptyW[] = { '\0' };
2831 int len , reqLen;
2832 LPSTR mem;
2833
2834 if (!lpDstStr || !dstlen)
2835 return 0;
2836
2837 if (!lpSrcStr)
2838 lpSrcStr = emptyW;
2839
2840 *lpDstStr = '\0';
2841
2842 len = strlenW(lpSrcStr) + 1;
2843
2844 switch (CodePage)
2845 {
2846 case CP_WINUNICODE:
2847 CodePage = CP_UTF8; /* Fall through... */
2848 case 0x0000C350: /* FIXME: CP_ #define */
2849 case CP_UTF7:
2850 case CP_UTF8:
2851 {
2852 DWORD dwMode = 0;
2853 INT lenW = len - 1;
2854 INT needed = dstlen - 1;
2855 HRESULT hr;
2856
2857 /* try the user supplied buffer first */
2858 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &lenW, lpDstStr, &needed);
2859 if (hr == S_OK)
2860 {
2861 lpDstStr[needed] = '\0';
2862 return needed + 1;
2863 }
2864
2865 /* user buffer too small. exclude termination and copy as much as possible */
2866 lenW = len;
2867 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &lenW, NULL, &needed);
2868 needed++;
2869 mem = HeapAlloc(GetProcessHeap(), 0, needed);
2870 if (!mem)
2871 return 0;
2872
2873 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &len, mem, &needed);
2874 if (hr == S_OK)
2875 {
2876 reqLen = SHTruncateString(mem, dstlen);
2877 if (reqLen > 0) memcpy(lpDstStr, mem, reqLen-1);
2878 }
2880 return 0;
2881 }
2882 default:
2883 break;
2884 }
2885
2886 /* try the user supplied buffer first */
2887 reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, lpDstStr, dstlen, NULL, NULL);
2888
2889 if (!reqLen && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
2890 {
2891 reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, NULL, 0, NULL, NULL);
2892 if (reqLen)
2893 {
2894 mem = HeapAlloc(GetProcessHeap(), 0, reqLen);
2895 if (mem)
2896 {
2897 WideCharToMultiByte(CodePage, 0, lpSrcStr, len, mem, reqLen, NULL, NULL);
2898
2899 reqLen = SHTruncateString(mem, dstlen -1);
2900 reqLen++;
2901
2902 lstrcpynA(lpDstStr, mem, reqLen);
2904 lpDstStr[reqLen-1] = '\0';
2905 }
2906 }
2907 }
2908 return reqLen;
2909}
#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:2680
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
#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:3676

Referenced by CShellLink::Save().

◆ STDMETHOD_() [1/2]

STDMETHOD_ ( ULONG  ,
AddRef   
)

◆ STDMETHOD_() [2/2]

STDMETHOD_ ( ULONG  ,
Release   
)

◆ StrCpyNXA()

LPSTR WINAPI StrCpyNXA ( LPSTR  lpszDest,
LPCSTR  lpszSrc,
int  iLen 
)

Definition at line 2393 of file string.c.

2394{
2395 TRACE("(%p,%s,%i)\n", lpszDest, debugstr_a(lpszSrc), iLen);
2396
2397 if (lpszDest && lpszSrc && iLen > 0)
2398 {
2399 while ((iLen-- > 1) && *lpszSrc)
2400 *lpszDest++ = *lpszSrc++;
2401 if (iLen >= 0)
2402 *lpszDest = '\0';
2403 }
2404 return lpszDest;
2405}

◆ StrCpyNXW()

LPWSTR WINAPI StrCpyNXW ( LPWSTR  lpszDest,
LPCWSTR  lpszSrc,
int  iLen 
)

Definition at line 2412 of file string.c.

2413{
2414 TRACE("(%p,%s,%i)\n", lpszDest, debugstr_w(lpszSrc), iLen);
2415
2416 if (lpszDest && lpszSrc && iLen > 0)
2417 {
2418 while ((iLen-- > 1) && *lpszSrc)
2419 *lpszDest++ = *lpszSrc++;
2420 if (iLen >= 0)
2421 *lpszDest = '\0';
2422 }
2423 return lpszDest;
2424}

◆ ZoneCheckHost()

HRESULT WINAPI ZoneCheckHost ( _In_ IInternetSecurityManager pISM,
_In_ PCWSTR  pszUrl,
_In_ DWORD  dwAction 
)

Definition at line 305 of file zonechk.c.

309{
310 return ZoneCheckHostEx(pISM, NULL, 0, NULL, 0, pszUrl, dwAction);
311}
HRESULT WINAPI ZoneCheckHostEx(_In_ IInternetSecurityManager *pISM, _Out_writes_bytes_opt_(cbPolicy) PBYTE pbPolicy, _In_ DWORD cbPolicy, _In_reads_bytes_opt_(cbContext) PBYTE pbContext, _In_ DWORD cbContext, _In_ PCWSTR pszUrl, _In_ DWORD dwAction)
Definition: zonechk.c:317

◆ ZoneCheckHostEx()

HRESULT WINAPI ZoneCheckHostEx ( _In_ IInternetSecurityManager pISM,
_Out_writes_bytes_opt_(cbPolicy) PBYTE  pbPolicy,
_In_ DWORD  cbPolicy,
_In_reads_bytes_opt_(cbContext) PBYTE  pbContext,
_In_ DWORD  cbContext,
_In_ PCWSTR  pszUrl,
_In_ DWORD  dwAction 
)

Definition at line 317 of file zonechk.c.

325{
326 DWORD dwPolicyBuf, dwContextBuf;
327
328 if (!pISM || !pszUrl)
329 return E_INVALIDARG;
330
331 if (!pbPolicy)
332 {
333 dwPolicyBuf = 0;
334 pbPolicy = (PBYTE)&dwPolicyBuf;
335 cbPolicy = sizeof(dwPolicyBuf);
336 }
337
338 if (!pbContext)
339 {
340 dwContextBuf = 0;
341 pbContext = (PBYTE)&dwContextBuf;
342 cbContext = sizeof(dwContextBuf);
343 }
344
345 return pISM->lpVtbl->ProcessUrlAction(pISM, pszUrl, dwAction, pbPolicy, cbPolicy,
346 pbContext, cbContext, 0, 0);
347}

Referenced by ZoneCheckHost().

◆ ZoneCheckPathA()

HRESULT WINAPI ZoneCheckPathA ( _In_ PCSTR  pszPath,
_In_ DWORD  dwAction,
_In_ DWORD  dwFlags,
_In_opt_ IInternetSecurityMgrSite pSecuritySite 
)

Definition at line 196 of file zonechk.c.

201{
202 WCHAR szPath[2048];
203 if (!pszPath)
204 {
205 ERR("pszPath was NULL\n");
206 return E_INVALIDARG;
207 }
209 return ZoneCheckPathW(szPath, dwAction, dwFlags, pSecuritySite);
210}
DWORD WINAPI SHAnsiToUnicode(LPCSTR lpSrcStr, LPWSTR lpDstStr, int iLen)
Definition: string.c:2803
LPCWSTR szPath
Definition: env.c:37
HRESULT WINAPI ZoneCheckPathW(_In_ PCWSTR pszPath, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite)
Definition: zonechk.c:216

◆ ZoneCheckPathW()

HRESULT WINAPI ZoneCheckPathW ( _In_ PCWSTR  pszPath,
_In_ DWORD  dwAction,
_In_ DWORD  dwFlags,
_In_opt_ IInternetSecurityMgrSite pSecuritySite 
)

Definition at line 216 of file zonechk.c.

221{
222 return ZoneCheckUrlW(pszPath, dwAction, dwFlags | PUAF_ISFILE, pSecuritySite);
223}
HRESULT WINAPI ZoneCheckUrlW(_In_ PCWSTR pszUrl, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite)
Definition: zonechk.c:249

Referenced by ZoneCheckPathA().

◆ ZoneCheckUrlA()

HRESULT WINAPI ZoneCheckUrlA ( _In_ PCSTR  pszUrl,
_In_ DWORD  dwAction,
_In_ DWORD  dwFlags,
_In_opt_ IInternetSecurityMgrSite pSecuritySite 
)

Definition at line 229 of file zonechk.c.

234{
235 WCHAR szUrl[2048];
236 if (!pszUrl)
237 {
238 ERR("pszUrl was NULL\n");
239 return E_INVALIDARG;
240 }
241 SHAnsiToUnicode(pszUrl, szUrl, _countof(szUrl));
242 return ZoneCheckUrlW(szUrl, dwAction, dwFlags, pSecuritySite);
243}

◆ ZoneCheckUrlExA()

HRESULT WINAPI ZoneCheckUrlExA ( _In_ PCSTR  pszUrl,
_Out_writes_bytes_opt_(cbPolicy) PBYTE  pbPolicy,
_In_ DWORD  cbPolicy,
_In_reads_bytes_opt_(cbContext) PBYTE  pbContext,
_In_ DWORD  cbContext,
_In_ DWORD  dwAction,
_In_ DWORD  dwFlags,
_In_opt_ IInternetSecurityMgrSite pSecuritySite 
)

Definition at line 262 of file zonechk.c.

271{
272 WCHAR szUrl[2048];
273 if (!pszUrl)
274 {
275 ERR("pszUrl was NULL\n");
276 return E_INVALIDARG;
277 }
278 SHAnsiToUnicode(pszUrl, szUrl, _countof(szUrl));
279 return ZoneCheckUrlExW(szUrl, pbPolicy, cbPolicy, pbContext, cbContext,
280 dwAction, dwFlags, pSecuritySite);
281}
HRESULT WINAPI ZoneCheckUrlExW(_In_ PCWSTR pszUrl, _Out_writes_bytes_opt_(cbPolicy) PBYTE pbPolicy, _In_ DWORD cbPolicy, _In_reads_bytes_opt_(cbContext) PBYTE pbContext, _In_ DWORD cbContext, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite)
Definition: zonechk.c:287

◆ ZoneCheckUrlExCacheA()

HRESULT WINAPI ZoneCheckUrlExCacheA ( _In_ PCSTR  pszUrl,
_Out_writes_bytes_opt_(cbPolicy) PBYTE  pbPolicy,
_In_ DWORD  cbPolicy,
_In_reads_bytes_opt_(cbContext) PBYTE  pbContext,
_In_ DWORD  cbContext,
_In_ DWORD  dwAction,
_In_ DWORD  dwFlags,
_In_opt_ IInternetSecurityMgrSite pSecuritySite,
_In_opt_ IInternetSecurityManager pISM 
)

Definition at line 107 of file zonechk.c.

117{
118 WCHAR szUrl[2048];
119 if (!pszUrl)
120 {
121 ERR("pszUrl was NULL\n");
122 return E_INVALIDARG;
123 }
124 SHAnsiToUnicode(pszUrl, szUrl, _countof(szUrl));
125 return ZoneCheckUrlExCacheW(szUrl, pbPolicy, cbPolicy, pbContext, cbContext,
126 dwAction, dwFlags, pSecuritySite, pISM);
127}
HRESULT WINAPI ZoneCheckUrlExCacheW(_In_ PCWSTR pszUrl, _Out_writes_bytes_opt_(cbPolicy) PBYTE pbPolicy, _In_ DWORD cbPolicy, _In_reads_bytes_opt_(cbContext) PBYTE pbContext, _In_ DWORD cbContext, _In_ DWORD dwAction, _In_ DWORD dwFlags, _In_opt_ IInternetSecurityMgrSite *pSecuritySite, _In_opt_ IInternetSecurityManager *pISM)
Definition: zonechk.c:133

◆ ZoneCheckUrlExCacheW()

HRESULT WINAPI ZoneCheckUrlExCacheW ( _In_ PCWSTR  pszUrl,
_Out_writes_bytes_opt_(cbPolicy) PBYTE  pbPolicy,
_In_ DWORD  cbPolicy,
_In_reads_bytes_opt_(cbContext) PBYTE  pbContext,
_In_ DWORD  cbContext,
_In_ DWORD  dwAction,
_In_ DWORD  dwFlags,
_In_opt_ IInternetSecurityMgrSite pSecuritySite,
_In_opt_ IInternetSecurityManager pISM 
)

Definition at line 133 of file zonechk.c.

143{
144 HRESULT hr;
145 IInternetSecurityManager *pWorkISM;
146 DWORD dwPolicyBuf, dwContextBuf;
147
148 if (!pszUrl)
149 {
150 ERR("pszUrl was NULL\n");
151 return E_INVALIDARG;
152 }
153
154 if (pISM && pISM->lpVtbl)
155 hr = pISM->lpVtbl->QueryInterface(pISM, &IID_IInternetSecurityManager, (PVOID *)&pWorkISM);
156 else
157 hr = SHLWAPI_GetCachedZonesManager(&IID_IInternetSecurityManager, (PVOID *)&pWorkISM);
158
159 if (FAILED(hr))
160 {
161 ERR("hr: 0x%lX\n", hr);
162 return hr;
163 }
164
165 if (pSecuritySite)
166 pWorkISM->lpVtbl->SetSecuritySite(pWorkISM, pSecuritySite);
167
168 if (!pbContext)
169 {
170 dwContextBuf = 0;
171 pbContext = (PBYTE)&dwContextBuf;
172 cbContext = sizeof(dwContextBuf);
173 }
174
175 if (!pbPolicy)
176 {
177 dwPolicyBuf = 0;
178 pbPolicy = (PBYTE)&dwPolicyBuf;
179 cbPolicy = sizeof(dwPolicyBuf);
180 }
181
182 hr = pWorkISM->lpVtbl->ProcessUrlAction(pWorkISM, pszUrl, dwAction, pbPolicy, cbPolicy,
183 pbContext, cbContext, dwFlags, 0);
184
185 if (pSecuritySite)
186 pWorkISM->lpVtbl->SetSecuritySite(pWorkISM, NULL);
187
188 pWorkISM->lpVtbl->Release(pWorkISM);
189 return hr;
190}
nsrefcnt Release()
static HRESULT SHLWAPI_GetCachedZonesManager(_In_ REFIID riid, _Out_ PVOID *ppv)
Definition: zonechk.c:53

Referenced by ZoneCheckUrlExCacheA(), and ZoneCheckUrlExW().

◆ ZoneCheckUrlExW()

HRESULT WINAPI ZoneCheckUrlExW ( _In_ PCWSTR  pszUrl,
_Out_writes_bytes_opt_(cbPolicy) PBYTE  pbPolicy,
_In_ DWORD  cbPolicy,
_In_reads_bytes_opt_(cbContext) PBYTE  pbContext,
_In_ DWORD  cbContext,
_In_ DWORD  dwAction,
_In_ DWORD  dwFlags,
_In_opt_ IInternetSecurityMgrSite pSecuritySite 
)

Definition at line 287 of file zonechk.c.

296{
297 return ZoneCheckUrlExCacheW(pszUrl, pbPolicy, cbPolicy, pbContext, cbContext,
298 dwAction, dwFlags, pSecuritySite, NULL);
299}

Referenced by ZoneCheckUrlExA(), and ZoneCheckUrlW().

◆ ZoneCheckUrlW()

HRESULT WINAPI ZoneCheckUrlW ( _In_ PCWSTR  pszUrl,
_In_ DWORD  dwAction,
_In_ DWORD  dwFlags,
_In_opt_ IInternetSecurityMgrSite pSecuritySite 
)

Definition at line 249 of file zonechk.c.

254{
255 return ZoneCheckUrlExW(pszUrl, NULL, 0, NULL, 0, dwAction, dwFlags, pSecuritySite);
256}

Referenced by ZoneCheckPathW(), and ZoneCheckUrlA().