ReactOS 0.4.17-dev-357-ga8f14ff
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 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 NextPath   NextPathA
 
#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 FixSlashesAndColon   FixSlashesAndColonA
 
#define SHGetFileDescription   SHGetFileDescriptionA
 
#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 E_DATATYPE_MISMATCH   HRESULT_FROM_WIN32(ERROR_DATATYPE_MISMATCH)
 
#define ZoneCheckUrlExCache   ZoneCheckUrlExCacheA
 
#define ZoneCheckPath   ZoneCheckPathA
 
#define ZoneCheckUrl   ZoneCheckUrlA
 
#define ZoneCheckUrlEx   ZoneCheckUrlExA
 

Typedefs

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)
 
INT WINAPI SHRestrictedMessageBox (_In_ HWND hWnd)
 
BOOL WINAPI SHAboutInfoA (LPSTR lpszDest, DWORD dwDestLen)
 
BOOL WINAPI SHAboutInfoW (LPWSTR lpszDest, DWORD dwDestLen)
 
PSTR WINAPI NextPathA (_In_ PCSTR pszStart, _Out_writes_(cchDest) PSTR pszDest, _In_ UINT cchDest)
 
PWSTR WINAPI NextPathW (_In_ PCWSTR pszStart, _Out_writes_(cchDest) PWSTR pszDest, _In_ UINT cchDest)
 
HRESULT WINAPI IUnknown_ShowBrowserBar (_In_ IUnknown *punk, _In_ REFGUID rguid, _In_ BOOL bShow)
 
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)
 
HRESULT WINAPI QuerySourceCreateFromKey (_In_ HKEY hKey, _In_opt_ PCWSTR lpSubKey, _In_ BOOL bCreate, _In_ REFIID riid, _Outptr_ PVOID *ppv)
 
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 PathUnExpandEnvStringsForUserA (_In_ HANDLE hUserToken, _In_ PCSTR pszPath, _Out_writes_(cchBuff) PSTR pszBuff, _In_ INT cchBuff)
 
BOOL WINAPI PathUnExpandEnvStringsForUserW (_In_ HANDLE hUserToken, _In_ PCWSTR pwszPath, _Out_writes_(cchBuff) PWSTR pszBuff, _In_ INT cchBuff)
 
BOOL WINAPI PathFindOnPathExW (LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich)
 
VOID WINAPI FixSlashesAndColonA (_Inout_ LPSTR lpstr)
 
VOID WINAPI FixSlashesAndColonW (_Inout_ LPWSTR 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)
 
VOID WINAPI PrettifyFileDescriptionW (_Inout_ PWSTR pszTarget, _In_opt_ PCWSTR pszCutList)
 
BOOL WINAPI SHGetFileDescriptionA (_In_ PCSTR pszPath, _In_opt_ PCSTR pszVerKey, _In_opt_ PCSTR pszDisplayName, _Out_opt_ PSTR pszOut, _Inout_ PUINT pcchOut)
 
BOOL WINAPI SHGetFileDescriptionW (_In_ PCWSTR pszPath, _In_opt_ PCWSTR pszVerKey, _In_opt_ PCWSTR pszDisplayName, _Out_opt_ PWSTR pszOut, _Inout_ PUINT pcchOut)
 
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)
 
HRESULT WINAPI MapWin32ErrorToSTG (_In_ HRESULT hr)
 
PSTR WINAPI CharLowerNoDBCSA (_Inout_ PSTR lpString)
 
PWSTR WINAPI CharLowerNoDBCSW (_Inout_ PWSTR lpString)
 
PSTR WINAPI CharUpperNoDBCSA (_Inout_ PSTR lpString)
 
PWSTR WINAPI CharUpperNoDBCSW (_Inout_ PWSTR lpString)
 
HRESULT WINAPI SHWindowsPolicyGetValue (_In_ REFGUID rpolid, _Out_opt_ PVOID pvValue, _Out_opt_ PDWORD pcbValue)
 
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

◆ E_DATATYPE_MISMATCH

Definition at line 537 of file shlwapi_undoc.h.

◆ FixSlashesAndColon

#define FixSlashesAndColon   FixSlashesAndColonA

Definition at line 457 of file shlwapi_undoc.h.

◆ NextPath

#define NextPath   NextPathA

Definition at line 83 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_ANY

#define PATH_CHAR_CLASS_ANY   0xffffffff

Definition at line 392 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_ASTERIX

#define PATH_CHAR_CLASS_ASTERIX   0x00000002

Definition at line 382 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_BACKSLASH

#define PATH_CHAR_CLASS_BACKSLASH   0x00000008

Definition at line 384 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COLON

#define PATH_CHAR_CLASS_COLON   0x00000010

Definition at line 385 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COMMA

#define PATH_CHAR_CLASS_COMMA   0x00000040

Definition at line 387 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOT

#define PATH_CHAR_CLASS_DOT   0x00000004

Definition at line 383 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOUBLEQUOTE

#define PATH_CHAR_CLASS_DOUBLEQUOTE   0x00000200

Definition at line 390 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_INVALID

#define PATH_CHAR_CLASS_INVALID   0x00000000

Definition at line 391 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_LETTER

#define PATH_CHAR_CLASS_LETTER   0x00000001

Definition at line 381 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_OTHER_VALID

#define PATH_CHAR_CLASS_OTHER_VALID   0x00000100

Definition at line 389 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SEMICOLON

#define PATH_CHAR_CLASS_SEMICOLON   0x00000020

Definition at line 386 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SPACE

#define PATH_CHAR_CLASS_SPACE   0x00000080

Definition at line 388 of file shlwapi_undoc.h.

◆ PathIsValidChar

#define PathIsValidChar   PathIsValidCharA

Definition at line 455 of file shlwapi_undoc.h.

◆ SHAboutInfo

#define SHAboutInfo   SHAboutInfoA

Definition at line 82 of file shlwapi_undoc.h.

◆ SHACF_ANSI

#define SHACF_ANSI   0x00000080

Definition at line 485 of file shlwapi_undoc.h.

◆ SHACF_ANSIDISPLAYNAMES

#define SHACF_ANSIDISPLAYNAMES   0x00010000

Definition at line 494 of file shlwapi_undoc.h.

◆ SHACF_CONTEXTMENU

#define SHACF_CONTEXTMENU   0x00000001

Definition at line 475 of file shlwapi_undoc.h.

◆ SHACF_CORELINTERNETENUM

#define SHACF_CORELINTERNETENUM   0x00000004

Definition at line 478 of file shlwapi_undoc.h.

◆ SHACF_DOCOBJECT

#define SHACF_DOCOBJECT   0x00000002

Definition at line 477 of file shlwapi_undoc.h.

◆ SHACF_FILEOPENBOGUSCTRLID

#define SHACF_FILEOPENBOGUSCTRLID   0x00020000

Definition at line 495 of file shlwapi_undoc.h.

◆ SHACF_FILEOPENNEEDSEXT

#define SHACF_FILEOPENNEEDSEXT   0x00001000

Definition at line 490 of file shlwapi_undoc.h.

◆ SHACF_FLUSHNOWAITALWAYS

#define SHACF_FLUSHNOWAITALWAYS   SHACF_CONTEXTMENU

Definition at line 476 of file shlwapi_undoc.h.

◆ SHACF_FORCELFNIDLIST

#define SHACF_FORCELFNIDLIST   0x00040000

Definition at line 496 of file shlwapi_undoc.h.

◆ SHACF_IGNOREENUMRESET

#define SHACF_IGNOREENUMRESET   0x00004000

Definition at line 492 of file shlwapi_undoc.h.

◆ SHACF_LOADCOLUMNHANDLER

#define SHACF_LOADCOLUMNHANDLER   0x00000040

Definition at line 484 of file shlwapi_undoc.h.

◆ SHACF_MYCOMPUTERFIRST

#define SHACF_MYCOMPUTERFIRST   0x00000008

Definition at line 481 of file shlwapi_undoc.h.

◆ SHACF_NOVALIDATEFSIDS

#define SHACF_NOVALIDATEFSIDS   0x00000800

Definition at line 489 of file shlwapi_undoc.h.

◆ SHACF_OLDCREATEVIEWWND

#define SHACF_OLDCREATEVIEWWND   SHACF_CORELINTERNETENUM

Definition at line 479 of file shlwapi_undoc.h.

◆ SHACF_OLDREGITEMGDN

#define SHACF_OLDREGITEMGDN   0x00000010

Definition at line 482 of file shlwapi_undoc.h.

◆ SHACF_STAROFFICE5PRINTER

#define SHACF_STAROFFICE5PRINTER   0x00000400

Definition at line 488 of file shlwapi_undoc.h.

◆ SHACF_UNKNOWN1

#define SHACF_UNKNOWN1   0x00000100

Definition at line 486 of file shlwapi_undoc.h.

◆ SHACF_UNKNOWN2

#define SHACF_UNKNOWN2   0x01000000

Definition at line 498 of file shlwapi_undoc.h.

◆ SHACF_UNKNOWN3

#define SHACF_UNKNOWN3   0x80000000

Definition at line 499 of file shlwapi_undoc.h.

◆ SHACF_WIN95BINDTOOBJECT

#define SHACF_WIN95BINDTOOBJECT   0x00002000

Definition at line 491 of file shlwapi_undoc.h.

◆ SHACF_WIN95DEFVIEW

#define SHACF_WIN95DEFVIEW   SHACF_CORELINTERNETENUM

Definition at line 480 of file shlwapi_undoc.h.

◆ SHACF_WIN95SHLEXEC

#define SHACF_WIN95SHLEXEC   0x00000200

Definition at line 487 of file shlwapi_undoc.h.

◆ SHCreateWorkerWindow

#define SHCreateWorkerWindow   SHCreateWorkerWindowA

Definition at line 273 of file shlwapi_undoc.h.

◆ SHELL_GCOUNTER_DECLAREPARAMETERS

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

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

◆ SHELL_GCOUNTER_DEFINE_HANDLE

#define SHELL_GCOUNTER_DEFINE_HANDLE (   name)    HANDLE name = NULL

Definition at line 41 of file shlwapi_undoc.h.

◆ SHELL_GCOUNTER_PARAMETERS

#define SHELL_GCOUNTER_PARAMETERS (   handle,
  id 
)    handle

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

◆ SHELL_GlobalCounterGet

#define SHELL_GlobalCounterGet (   handle)    SHGlobalCounterGetValue(handle)

Definition at line 49 of file shlwapi_undoc.h.

◆ SHELL_GlobalCounterIncrement

#define SHELL_GlobalCounterIncrement (   handle)    SHGlobalCounterIncrement(handle)

Definition at line 50 of file shlwapi_undoc.h.

◆ SHELL_GlobalCounterIsInitialized

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

Definition at line 48 of file shlwapi_undoc.h.

◆ SHELL_NO_POLICY

#define SHELL_NO_POLICY   ((DWORD)-1)

Definition at line 17 of file shlwapi_undoc.h.

◆ SHExpandEnvironmentStrings

#define SHExpandEnvironmentStrings   SHExpandEnvironmentStringsA

Definition at line 189 of file shlwapi_undoc.h.

◆ SHGetFileDescription

#define SHGetFileDescription   SHGetFileDescriptionA

Definition at line 458 of file shlwapi_undoc.h.

◆ SHGetValueGoodBoot

#define SHGetValueGoodBoot   SHGetValueGoodBootA

Definition at line 305 of file shlwapi_undoc.h.

◆ SHLoadRegUIString

#define SHLoadRegUIString   SHLoadRegUIStringA

Definition at line 306 of file shlwapi_undoc.h.

◆ StrCpyNX

#define StrCpyNX   StrCpyNXA

Definition at line 456 of file shlwapi_undoc.h.

◆ WHICH_BAT

#define WHICH_BAT   (1 << 3)

Definition at line 373 of file shlwapi_undoc.h.

◆ WHICH_CMD

#define WHICH_CMD   (1 << 5)

Definition at line 375 of file shlwapi_undoc.h.

◆ WHICH_COM

#define WHICH_COM   (1 << 1)

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

◆ WHICH_EXE

#define WHICH_EXE   (1 << 2)

Definition at line 372 of file shlwapi_undoc.h.

◆ WHICH_LNK

#define WHICH_LNK   (1 << 4)

Definition at line 374 of file shlwapi_undoc.h.

◆ WHICH_OPTIONAL

#define WHICH_OPTIONAL   (1 << 6)

Definition at line 376 of file shlwapi_undoc.h.

◆ WHICH_PIF

#define WHICH_PIF   (1 << 0)

Definition at line 370 of file shlwapi_undoc.h.

◆ ZoneCheckPath

#define ZoneCheckPath   ZoneCheckPathA

Definition at line 640 of file shlwapi_undoc.h.

◆ ZoneCheckUrl

#define ZoneCheckUrl   ZoneCheckUrlA

Definition at line 641 of file shlwapi_undoc.h.

◆ ZoneCheckUrlEx

#define ZoneCheckUrlEx   ZoneCheckUrlExA

Definition at line 642 of file shlwapi_undoc.h.

◆ ZoneCheckUrlExCache

#define ZoneCheckUrlExCache   ZoneCheckUrlExCacheA

Definition at line 639 of file shlwapi_undoc.h.

Typedef Documentation

◆ LPPOLICYDATA

◆ POLICYDATA

◆ SHDIALOGPROC

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

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

340{
341 SHKEY_Root_HKCU = 0x1,
342 SHKEY_Root_HKLM = 0x2,
343 SHKEY_Key_Explorer = 0x00,
344 SHKEY_Key_Shell = 0x10,
346 SHKEY_Key_Classes = 0x30,
347 SHKEY_Subkey_Default = 0x0000,
349 SHKEY_Subkey_Handlers = 0x2000,
351 SHKEY_Subkey_Volatile = 0x4000,
352 SHKEY_Subkey_MUICache = 0x5000,
353 SHKEY_Subkey_FileExts = 0x6000
354};
@ 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 275 of file utils.cpp.

276{
277 return CharLowerNoDBCSAWorker(lpString, 0, FALSE) ? lpString : NULL;
278}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
static BOOL CharLowerNoDBCSAWorker(PSTR lpString, INT cchMax, BOOL bUppercase)
Definition: utils.cpp:246

◆ CharLowerNoDBCSW()

PWSTR WINAPI CharLowerNoDBCSW ( _Inout_ PWSTR  lpString)

Definition at line 283 of file utils.cpp.

284{
285 return CharLowerNoDBCSWWorker(lpString, 0, FALSE) ? lpString : NULL;
286}
static BOOL CharLowerNoDBCSWWorker(PWSTR lpString, INT cchMax, BOOL bUppercase)
Definition: utils.cpp:259

◆ CharUpperNoDBCSA()

PSTR WINAPI CharUpperNoDBCSA ( _Inout_ PSTR  lpString)

Definition at line 291 of file utils.cpp.

292{
293 return CharLowerNoDBCSAWorker(lpString, 0, TRUE) ? lpString : NULL;
294}
#define TRUE
Definition: types.h:120

◆ CharUpperNoDBCSW()

PWSTR WINAPI CharUpperNoDBCSW ( _Inout_ PWSTR  lpString)

Definition at line 299 of file utils.cpp.

300{
301 return CharLowerNoDBCSWWorker(lpString, 0, TRUE) ? lpString : NULL;
302}

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

871{
872 HRESULT hRet;
873 IConnectionPointContainer* lpContainer;
874 IConnectionPoint *lpCP;
875
876 if(!lpUnknown || (fConnect && !lpUnkSink))
877 return E_FAIL;
878
879 if(lppCP)
880 *lppCP = NULL;
881
882 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IConnectionPointContainer,
883 (void**)&lpContainer);
884 if (SUCCEEDED(hRet))
885 {
886 hRet = IConnectionPointContainer_FindConnectionPoint(lpContainer, riid, &lpCP);
887
888 if (SUCCEEDED(hRet))
889 {
890 if(!fConnect)
891 hRet = IConnectionPoint_Unadvise(lpCP, *lpCookie);
892 else
893 hRet = IConnectionPoint_Advise(lpCP, lpUnkSink, lpCookie);
894
895 if (FAILED(hRet))
896 *lpCookie = 0;
897
898 if (lppCP && SUCCEEDED(hRet))
899 *lppCP = lpCP; /* Caller keeps the interface */
900 else
901 IConnectionPoint_Release(lpCP); /* Release it */
902 }
903
904 IConnectionPointContainer_Release(lpContainer);
905 }
906 return hRet;
907}
#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().

◆ FixSlashesAndColonA()

VOID WINAPI FixSlashesAndColonA ( _Inout_ LPSTR  lpstr)

◆ FixSlashesAndColonW()

VOID WINAPI FixSlashesAndColonW ( _Inout_ LPWSTR  lpwstr)

◆ IContextMenu_Invoke()

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

Definition at line 557 of file utils.cpp.

562{
563 TRACE("(%p, %p, %s, %u)\n", pContextMenu, hwnd, debugstr_a(lpVerb), uFlags);
565 uFlags, lpVerb, NULL, false);
566 return !FAILED_UNEXPECTEDLY(hr);
567}
HRESULT hr
Definition: delayimp.cpp:582
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:305
#define FAILED_UNEXPECTEDLY
Definition: utils.cpp:33
#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 
)

◆ IUnknown_GetClassID()

HRESULT WINAPI IUnknown_GetClassID ( IUnknown lpUnknown,
CLSID lpClassId 
)

Definition at line 1071 of file ordinal.c.

1072{
1073 IPersist *persist;
1074 HRESULT hr;
1075
1076 TRACE("(%p, %p)\n", lpUnknown, clsid);
1077
1078 if (!lpUnknown)
1079 {
1080 memset(clsid, 0, sizeof(*clsid));
1081 return E_FAIL;
1082 }
1083
1084 hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersist, (void**)&persist);
1085 if (hr != S_OK)
1086 {
1087 hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersistFolder, (void**)&persist);
1088 if (hr != S_OK)
1089 return hr;
1090 }
1091
1092 hr = IPersist_GetClassID(persist, clsid);
1093 IPersist_Release(persist);
1094 return hr;
1095}
#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 1548 of file ordinal.c.

1550{
1551 /* FIXME: {D12F26B2-D90A-11D0-830D-00AA005B4383} - What object does this represent? */
1552 static const DWORD service_id[] = { 0xd12f26b2, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
1553 /* FIXME: {D12F26B1-D90A-11D0-830D-00AA005B4383} - Also Unknown/undocumented */
1554 static const DWORD function_id[] = { 0xd12f26b1, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
1555 HRESULT hRet = E_INVALIDARG;
1556 LPUNKNOWN lpUnkInner = NULL; /* FIXME: Real type is unknown */
1557
1558 TRACE("(%p,%p,%p,%p,%p)\n", lpUnknown, lpArg1, lpArg2, lpArg3, lpArg4);
1559
1560 if (lpUnknown && lpArg4)
1561 {
1562 hRet = iunknown_query_service(lpUnknown, (REFGUID)service_id,
1563 (REFGUID)function_id, (void**)&lpUnkInner);
1564
1565 if (SUCCEEDED(hRet) && lpUnkInner)
1566 {
1567 /* FIXME: The type of service object requested is unknown, however
1568 * testing shows that its first method is called with 4 parameters.
1569 * Fake this by using IParseDisplayName_ParseDisplayName since the
1570 * signature and position in the vtable matches our unknown object type.
1571 */
1572 hRet = IParseDisplayName_ParseDisplayName((LPPARSEDISPLAYNAME)lpUnkInner,
1573 lpArg1, lpArg2, lpArg3, lpArg4);
1574 IUnknown_Release(lpUnkInner);
1575 }
1576 }
1577 return hRet;
1578}
#define E_INVALIDARG
Definition: ddrawi.h:101
static LPVOID LPUNKNOWN
Definition: dinput.c:53
static HRESULT iunknown_query_service(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1097
unsigned long DWORD
Definition: ntddk_ex.h:95

◆ IUnknown_HasFocusIO()

HRESULT WINAPI IUnknown_HasFocusIO ( IUnknown punk)

Definition at line 3724 of file ordinal.c.

3725{
3726 IInputObject* lpInput = NULL;
3727 HRESULT hRet = E_INVALIDARG;
3728
3729 TRACE("(%p)\n", lpUnknown);
3730 if (lpUnknown)
3731 {
3732 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
3733 (void**)&lpInput);
3734 if (SUCCEEDED(hRet) && lpInput)
3735 {
3736 hRet = IInputObject_HasFocusIO(lpInput);
3737 IInputObject_Release(lpInput);
3738 }
3739 }
3740 return hRet;
3741}
#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 4231 of file ordinal.c.

4232{
4233 IInputObjectSite *pIOS = NULL;
4234 HRESULT hRet = E_INVALIDARG;
4235
4236 TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
4237
4238 if (lpUnknown)
4239 {
4240 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
4241 (void **)&pIOS);
4242 if (SUCCEEDED(hRet) && pIOS)
4243 {
4244 hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
4246 }
4247 }
4248 return hRet;
4249}
#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 1526 of file ordinal.c.

1527{
1528 IOleControlSite* lpCSite = NULL;
1529 HRESULT hRet = E_FAIL;
1530
1531 TRACE("(%p, %d)\n", lpUnknown, fGotFocus);
1532 if (lpUnknown)
1533 {
1534 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
1535 (void**)&lpCSite);
1536 if (SUCCEEDED(hRet) && lpCSite)
1537 {
1538 hRet = IOleControlSite_OnFocus(lpCSite, fGotFocus);
1539 IOleControlSite_Release(lpCSite);
1540 }
1541 }
1542 return hRet;
1543}
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 1148 of file ordinal.c.

1150{
1152 HRESULT hr;
1153
1154 TRACE("%p %s %s %ld %08lx %p %p\n", lpUnknown, debugstr_guid(service),
1155 debugstr_guid(group), cmdId, cmdOpt, pIn, pOut);
1156
1157 hr = iunknown_query_service(lpUnknown, service, &IID_IOleCommandTarget, (void**)&target);
1158 if (hr == S_OK)
1159 {
1160 hr = IOleCommandTarget_Exec(target, group, cmdId, cmdOpt, pIn, pOut);
1161 IOleCommandTarget_Release(target);
1162 }
1163
1164 TRACE("<-- hr=0x%08lx\n", hr);
1165
1166 return hr;
1167}
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 1986 of file propbag.cpp.

1991{
1992 TRACE("%p 0x%x %p %p\n", punk, flags, &riid, ppvObj);
1993
1995 HRESULT hr = IUnknown_QueryService(punk, SID_STopLevelBrowser, IID_IShellBrowserService,
1996 (void **)&pService);
1997 if (FAILED(hr))
1998 {
1999 ERR("0x%X\n", hr);
2000 return hr;
2001 }
2002
2003 return pService->GetPropertyBag(flags, riid, ppvObj);
2004}
#define ERR(fmt,...)
Definition: precomp.h:57
HRESULT WINAPI IUnknown_QueryService(IUnknown *obj, REFGUID sid, REFIID iid, void **out)
Definition: main.c:181
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 723 of file ordinal.c.

725{
726 HRESULT hRet = E_FAIL;
727
728 TRACE("(%p,%p,%ld,%p,%p)\n",lpUnknown, pguidCmdGroup, cCmds, prgCmds, pCmdText);
729
730 if (lpUnknown)
731 {
732 IOleCommandTarget* lpOle;
733
734 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleCommandTarget,
735 (void**)&lpOle);
736
737 if (SUCCEEDED(hRet) && lpOle)
738 {
739 hRet = IOleCommandTarget_QueryStatus(lpOle, pguidCmdGroup, cCmds,
740 prgCmds, pCmdText);
741 IOleCommandTarget_Release(lpOle);
742 }
743 }
744 return hRet;
745}

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

1038{
1039 IShellService *service;
1040 HRESULT hr;
1041
1042 TRACE("(%p, %p)\n", iface, pUnk);
1043
1044 if (!iface) return E_FAIL;
1045
1046 hr = IUnknown_QueryInterface(iface, &IID_IShellService, (void**)&service);
1047 if (hr == S_OK)
1048 {
1049 hr = IShellService_SetOwner(service, pUnk);
1050 IShellService_Release(service);
1051 }
1052
1053 return hr;
1054}
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30

Referenced by CTrayBandSite::AddContextMenus().

◆ IUnknown_ShowBrowserBar()

HRESULT WINAPI IUnknown_ShowBrowserBar ( _In_ IUnknown punk,
_In_ REFGUID  rguid,
_In_ BOOL  bShow 
)

Definition at line 1021 of file utils.cpp.

1025{
1027 HRESULT hr = IUnknown_QueryServiceForWebBrowserApp(punk, IID_IWebBrowser2, (PVOID*)&pWB2);
1028 if (FAILED(hr))
1029 return hr;
1030
1031 WCHAR szGUID[40];
1032 StringFromGUID2(rguid, szGUID, _countof(szGUID));
1033
1034 CComVariant varClsid(szGUID), varShow((bool)!!bShow), varSize;
1035 return pWB2->ShowBrowserBar(&varClsid, &varShow, &varSize);
1036}
INT WINAPI StringFromGUID2(REFGUID guid, LPOLESTR str, INT cmax)
Definition: combase.c:1525
HRESULT WINAPI IUnknown_QueryServiceForWebBrowserApp(IUnknown *lpUnknown, REFGUID riid, LPVOID *lppOut)
Definition: ordinal.c:4814
short WCHAR
Definition: pedump.c:58
#define _countof(array)
Definition: sndvol32.h:70

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

1494{
1495 IOleControlSite* lpCSite = NULL;
1496 HRESULT hRet = E_INVALIDARG;
1497
1498 TRACE("(%p,%p,0x%08lx)\n", lpUnknown, lpMsg, dwModifiers);
1499 if (lpUnknown)
1500 {
1501 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
1502 (void**)&lpCSite);
1503 if (SUCCEEDED(hRet) && lpCSite)
1504 {
1505 hRet = IOleControlSite_TranslateAccelerator(lpCSite, lpMsg, dwModifiers);
1506 IOleControlSite_Release(lpCSite);
1507 }
1508 }
1509 return hRet;
1510}

◆ IUnknown_UIActivateIO()

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

Definition at line 1228 of file ordinal.c.

1229{
1230 IInputObject* object = NULL;
1231 HRESULT ret;
1232
1233 if (!unknown)
1234 return E_FAIL;
1235
1236 /* Get an IInputObject interface from the object */
1237 ret = IUnknown_QueryInterface(unknown, &IID_IInputObject, (LPVOID*) &object);
1238
1239 if (ret == S_OK)
1240 {
1241 ret = IInputObject_UIActivateIO(object, activate, msg);
1242 IInputObject_Release(object);
1243 }
1244
1245 return ret;
1246}
#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().

◆ MapWin32ErrorToSTG()

HRESULT WINAPI MapWin32ErrorToSTG ( _In_ HRESULT  hr)

Definition at line 229 of file utils.cpp.

230{
231 switch (hr)
232 {
241 default:
242 return hr;
243 }
244}
return
Definition: dirsup.c:529
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:228
#define STG_E_FILEALREADYEXISTS
Definition: winerror.h:3674
#define STG_E_FILENOTFOUND
Definition: winerror.h:3660
#define ERROR_FILE_EXISTS
Definition: winerror.h:287
#define STG_E_ACCESSDENIED
Definition: winerror.h:3663

◆ 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 
)

◆ NextPathA()

PSTR WINAPI NextPathA ( _In_ PCSTR  pszStart,
_Out_writes_(cchDest) PSTR  pszDest,
_In_ UINT  cchDest 
)

Definition at line 913 of file utils.cpp.

917{
918 if (!pszStart)
919 return NULL;
920
921 PCSTR pchStart = pszStart;
922 while (*pchStart == ';')
923 ++pchStart;
924
925 if (!*pchStart)
926 return NULL;
927
928 PSTR pchEnd = StrChrA(pchStart, ';');
929 if (!pchEnd)
930 pchEnd = (PSTR)(pchStart + lstrlenA(pchStart));
931
932 const UINT cchSegment = (UINT)(pchEnd - pchStart);
933 const UINT cchToCopy = min(cchSegment + 1, cchDest);
934 lstrcpynA(pszDest, pchStart, cchToCopy);
935 pszDest[cchSegment] = ANSI_NULL;
936
937 PathRemoveBlanksA(pszDest);
938 if (!*pszDest)
939 return NULL;
940
941 return (*pchEnd == ';') ? (pchEnd + 1) : pchEnd;
942}
LPSTR WINAPI StrChrA(LPCSTR lpszStr, WORD ch)
Definition: string.c:266
#define lstrcpynA
Definition: compat.h:751
void WINAPI PathRemoveBlanksA(char *path)
Definition: path.c:1862
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
#define ANSI_NULL
_In_ INT cchDest
Definition: shlwapi.h:1151
char * PSTR
Definition: typedefs.h:51
const char * PCSTR
Definition: typedefs.h:52

◆ NextPathW()

PWSTR WINAPI NextPathW ( _In_ PCWSTR  pszStart,
_Out_writes_(cchDest) PWSTR  pszDest,
_In_ UINT  cchDest 
)

Definition at line 955 of file utils.cpp.

959{
960 if (!pszStart)
961 return NULL;
962
963 PCWSTR pchStart = pszStart;
964 while (*pchStart == L';')
965 ++pchStart;
966
967 if (!*pchStart)
968 return NULL;
969
970 PWSTR pchEnd = StrChrW(pchStart, L';');
971 if (!pchEnd)
972 pchEnd = (PWSTR)(pchStart + lstrlenW(pchStart));
973
974 const UINT cchSegment = (UINT)(pchEnd - pchStart);
975 const UINT cchToCopy = min(cchSegment + 1, cchDest);
976 lstrcpynW(pszDest, pchStart, cchToCopy);
977 pszDest[cchSegment] = UNICODE_NULL;
978
979 PathRemoveBlanksW(pszDest);
980 if (!*pszDest)
981 return NULL;
982
983 return (*pchEnd == L';') ? (pchEnd + 1) : pchEnd;
984}
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
Definition: string.c:464
#define lstrcpynW
Definition: compat.h:738
#define lstrlenW
Definition: compat.h:750
void WINAPI PathRemoveBlanksW(WCHAR *path)
Definition: path.c:1886
#define L(x)
Definition: resources.c:13
#define UNICODE_NULL
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * PCWSTR
Definition: typedefs.h:57

◆ PathFileExistsAndAttributesA()

DECLSPEC_IMPORT BOOL WINAPI PathFileExistsAndAttributesA ( LPCSTR  lpszPath,
DWORD dwAttr 
)

Definition at line 721 of file path.c.

722{
723 UINT iPrevErrMode;
724 DWORD dwVal = 0;
725
726 TRACE("(%s %p)\n", debugstr_a(lpszPath), dwAttr);
727
728 if (dwAttr)
729 *dwAttr = INVALID_FILE_ATTRIBUTES;
730
731 if (!lpszPath)
732 return FALSE;
733
734 iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
735 dwVal = GetFileAttributesA(lpszPath);
736 SetErrorMode(iPrevErrMode);
737 if (dwAttr)
738 *dwAttr = dwVal;
739 return (dwVal != INVALID_FILE_ATTRIBUTES);
740}
UINT WINAPI SetErrorMode(IN UINT uMode)
Definition: except.c:751
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:620
#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 747 of file path.c.

748{
749 UINT iPrevErrMode;
750 DWORD dwVal;
751
752 TRACE("(%s %p)\n", debugstr_w(lpszPath), dwAttr);
753
754 if (!lpszPath)
755 return FALSE;
756
757 iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
758 dwVal = GetFileAttributesW(lpszPath);
759 SetErrorMode(iPrevErrMode);
760 if (dwAttr)
761 *dwAttr = dwVal;
762 return (dwVal != INVALID_FILE_ATTRIBUTES);
763}
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 661 of file utils.cpp.

665{
666 TRACE("(%s, 0x%lX, %p)\n", debugstr_w(pszPath), dwWhich, pdwFileAttributes);
667
668 if (pdwFileAttributes)
669 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
670
671 if (!pszPath)
672 return FALSE;
673
674 if (!dwWhich || (*PathFindExtensionW(pszPath) && (dwWhich & WHICH_OPTIONAL)))
675 return PathFileExistsAndAttributesW(pszPath, pdwFileAttributes);
676
677 if (!PathFileExistsDefExtW(pszPath, dwWhich))
678 {
679 if (pdwFileAttributes)
680 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
681 return FALSE;
682 }
683
684 if (pdwFileAttributes)
685 *pdwFileAttributes = GetFileAttributesW(pszPath);
686
687 return TRUE;
688}
LPWSTR WINAPI PathFindExtensionW(const WCHAR *path)
Definition: path.c:1250
BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr)
Definition: path.c:747
BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich)
Definition: path.c:170
#define WHICH_OPTIONAL

Referenced by START_TEST().

◆ PathFileExistsDefExtW()

BOOL WINAPI PathFileExistsDefExtW ( LPWSTR  lpszPath,
DWORD  dwWhich 
)

Definition at line 170 of file path.c.

171{
172 static const WCHAR pszExts[][5] = { { '.', 'p', 'i', 'f', 0},
173 { '.', 'c', 'o', 'm', 0},
174 { '.', 'e', 'x', 'e', 0},
175 { '.', 'b', 'a', 't', 0},
176 { '.', 'l', 'n', 'k', 0},
177 { '.', 'c', 'm', 'd', 0},
178 { 0, 0, 0, 0, 0} };
179
180 TRACE("(%s,%ld)\n", debugstr_w(lpszPath), dwWhich);
181
182 if (!lpszPath || PathIsUNCServerW(lpszPath) || PathIsUNCServerShareW(lpszPath))
183 return FALSE;
184
185 if (dwWhich)
186 {
187 LPCWSTR szExt = PathFindExtensionW(lpszPath);
188#ifndef __REACTOS__
189 if (!*szExt || dwWhich & 0x40)
190#else
191 if (!*szExt || dwWhich & WHICH_OPTIONAL)
192#endif
193 {
194 size_t iChoose = 0;
195 int iLen = lstrlenW(lpszPath);
196 if (iLen > (MAX_PATH - 5))
197 return FALSE;
198#ifndef __REACTOS__
199 while ( (dwWhich & 0x1) && pszExts[iChoose][0] )
200#else
201 while (pszExts[iChoose][0])
202#endif
203 {
204#ifdef __REACTOS__
205 if (dwWhich & 0x1)
206 {
208#endif
209 lstrcpyW(lpszPath + iLen, pszExts[iChoose]);
210 if (PathFileExistsW(lpszPath))
211 return TRUE;
212#ifdef __REACTOS__
213 }
214#endif
215 iChoose++;
216 dwWhich >>= 1;
217 }
218 *(lpszPath + iLen) = (WCHAR)'\0';
219 return FALSE;
220 }
221 }
222 return PathFileExistsW(lpszPath);
223}
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
BOOL WINAPI PathIsUNCServerShareW(const WCHAR *path)
Definition: path.c:1040
BOOL WINAPI PathIsUNCServerW(const WCHAR *path)
Definition: path.c:1852
BOOL WINAPI PathFileExistsW(const WCHAR *path)
Definition: path.c:2583
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
const uint16_t * LPCWSTR
Definition: typedefs.h:57
#define GetFileAttributes
Definition: winbase.h:3536

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

◆ PathFindOnPathExW()

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

Definition at line 404 of file path.c.

405{
407
408 TRACE("(%s,%p,%08lx)\n", debugstr_w(lpszFile), lppszOtherDirs, dwWhich);
409
410 if (!lpszFile || !PathIsFileSpecW(lpszFile))
411 return FALSE;
412
413 /* Search provided directories first */
414 if (lppszOtherDirs && *lppszOtherDirs)
415 {
416 LPCWSTR *lpszOtherPath = lppszOtherDirs;
417 while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
418 {
419 PathCombineW(buff, *lpszOtherPath, lpszFile);
420 if (PathFileExistsDefExtW(buff, dwWhich))
421 {
422 lstrcpyW(lpszFile, buff);
423 return TRUE;
424 }
425 lpszOtherPath++;
426 }
427 }
428 /* Not found, try system and path dirs */
429 return SHLWAPI_PathFindInOtherDirs(lpszFile, dwWhich);
430}
BOOL WINAPI PathIsFileSpecW(const WCHAR *path)
Definition: path.c:1818
static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
Definition: path.c:270
#define PathCombineW
Definition: pathcch.h:318
static const char *static const char const char DWORD void DWORD *static const char const char DWORD void DWORD *static const char DWORD DWORD void * buff
Definition: shcore.c:41

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

◆ PathIsValidCharA()

BOOL WINAPI PathIsValidCharA ( char  c,
DWORD  dwClass 
)

Definition at line 2189 of file path.c.

2190{
2191 if ((unsigned)c > 0x7e)
2192 return class & PATH_CHAR_CLASS_OTHER_VALID;
2193
2194 return class & path_charclass[(unsigned)c];
2195}
#define PATH_CHAR_CLASS_OTHER_VALID
Definition: path.c:2115
static const DWORD path_charclass[]
Definition: path.c:2121
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 2197 of file path.c.

2198{
2199 if (c > 0x7e)
2200 return class & PATH_CHAR_CLASS_OTHER_VALID;
2201
2202 return class & path_charclass[c];
2203}
#define c
Definition: ke_i.h:80

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

◆ PathUnExpandEnvStringsForUserA()

BOOL WINAPI PathUnExpandEnvStringsForUserA ( _In_ HANDLE  hUserToken,
_In_ PCSTR  pszPath,
_Out_writes_(cchBuff) PSTR  pszBuff,
_In_ INT  cchBuff 
)

Definition at line 138 of file utils.cpp.

143{
144 static const PCSTR c_varsA[] =
145 {
146 "%APPDATA%",
147 "%USERPROFILE%",
148 "%ALLUSERSPROFILE%",
149 "%ProgramFiles%",
150 "%SystemRoot%",
151 "%SystemDrive%",
152 };
153
154 if (!pszPath)
155 {
156 if (pszBuff && cchBuff)
157 *pszBuff = ANSI_NULL;
158
159 return FALSE;
160 }
161
162 if (!pszBuff)
163 return FALSE;
164
165 for (size_t iVar = 0; iVar < _countof(c_varsA); ++iVar)
166 {
167 if (UnExpandEnvironmentStringForUserA(hUserToken, pszPath, c_varsA[iVar],
168 pszBuff, cchBuff))
169 {
170 return TRUE;
171 }
172 }
173
174 return FALSE;
175}
HANDLE hUserToken
Definition: install.c:39
static BOOL UnExpandEnvironmentStringForUserA(_In_ HANDLE hUserToken, _In_ PCSTR lpString, _In_ PCSTR lpSrc, _Out_ PSTR pszDest, _In_ INT cchDest)
Definition: utils.cpp:48

◆ PathUnExpandEnvStringsForUserW()

BOOL WINAPI PathUnExpandEnvStringsForUserW ( _In_ HANDLE  hUserToken,
_In_ PCWSTR  pwszPath,
_Out_writes_(cchBuff) PWSTR  pszBuff,
_In_ INT  cchBuff 
)

Definition at line 184 of file utils.cpp.

189{
190 static const PCWSTR c_varsW[] =
191 {
192 L"%APPDATA%",
193 L"%USERPROFILE%",
194 L"%ALLUSERSPROFILE%",
195 L"%ProgramFiles%",
196 L"%SystemRoot%",
197 L"%SystemDrive%",
198 };
199
200 if (!pwszPath)
201 {
202 if (pszBuff && cchBuff)
203 *pszBuff = UNICODE_NULL;
204
205 return FALSE;
206 }
207
208 if (!pszBuff)
209 return FALSE;
210
211 for (size_t iVar = 0; iVar < _countof(c_varsW); ++iVar)
212 {
213 if (UnExpandEnvironmentStringForUserW(hUserToken, pwszPath, c_varsW[iVar],
214 pszBuff, cchBuff))
215 {
216 return TRUE;
217 }
218 }
219
220 return FALSE;
221}
static BOOL UnExpandEnvironmentStringForUserW(_In_ HANDLE hUserToken, _In_ PCWSTR lpString, _In_ PCWSTR lpSrc, _Out_ PWSTR pszDest, _In_ INT cchDest)
Definition: utils.cpp:90

◆ PrettifyFileDescriptionW()

VOID WINAPI PrettifyFileDescriptionW ( _Inout_ PWSTR  pszTarget,
_In_opt_ PCWSTR  pszCutList 
)

Definition at line 1044 of file utils.cpp.

1045{
1046 if (!pszTarget || !*pszTarget)
1047 return;
1048
1049 PWSTR pszFreeList = NULL;
1050 PCWSTR pszList = pszCutList;
1051 PCWSTR pszAssoc = L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileAssociation";
1052 if (_AllocValueString(HKEY_LOCAL_MACHINE, pszAssoc, L"CutList", &pszFreeList) == S_OK)
1053 pszList = pszFreeList;
1054
1055 if (pszList && *pszList)
1056 {
1057 for (PCWSTR pszEntry = pszList; *pszEntry; pszEntry += lstrlenW(pszEntry) + 1)
1058 {
1059 PWSTR pszMatch = StrRStrIW(pszTarget, NULL, pszEntry);
1060 if (!pszMatch)
1061 continue;
1062
1063 if (pszMatch[lstrlenW(pszEntry)])
1064 continue;
1065
1066 *pszMatch = UNICODE_NULL;
1067 while (pszMatch > pszTarget && pszMatch[-1] == L' ')
1068 {
1069 --pszMatch;
1070 *pszMatch = UNICODE_NULL;
1071 }
1072
1073 break;
1074 }
1075 }
1076
1077 if (pszFreeList)
1078 LocalFree(pszFreeList);
1079}
LPWSTR WINAPI StrRStrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, LPCWSTR lpszSearch)
Definition: string.c:702
static HRESULT _AllocValueString(HKEY hkey, PCWSTR pszSubKey, PCWSTR pszValue, PWSTR *ppszOut)
Definition: utils.cpp:987
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by SHGetFileDescriptionW().

◆ QuerySourceCreateFromKey()

HRESULT WINAPI QuerySourceCreateFromKey ( _In_ HKEY  hKey,
_In_opt_ PCWSTR  lpSubKey,
_In_ BOOL  bCreate,
_In_ REFIID  riid,
_Outptr_ PVOID ppv 
)

Definition at line 499 of file querysrc.cpp.

505{
506 *ppv = NULL;
507
508 CRegistrySource* pRS = new(std::nothrow) CRegistrySource();
509 if (!pRS)
510 return E_OUTOFMEMORY;
511
512 HRESULT hr = pRS->Init(hKey, lpSubKey, bCreate);
513 if (SUCCEEDED(hr))
514 hr = pRS->QueryInterface(riid, ppv);
515
516 pRS->Release();
517 return hr;
518}
HRESULT Init(HKEY hKey, PCWSTR pszSubKey, BOOL bCreate)
Definition: querysrc.cpp:260
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject) override
Definition: querysrc.cpp:271
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
FxAutoRegKey hKey
REFIID LPVOID * ppv
Definition: atlbase.h:39
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1527

Referenced by CRegistrySource::OpenSource().

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

612{
613 WCHAR szKey[MAX_PATH];
614 HRESULT hr;
615 if (pszSubKey)
616 hr = StringCchPrintfW(szKey, _countof(szKey), L"%s\\shell\\%s\\command", pszSubKey, pszVerb);
617 else
618 hr = StringCchPrintfW(szKey, _countof(szKey), L"shell\\%s\\command", pszVerb);
619 return SUCCEEDED(hr) ? RunRegCommand(hWnd, hKey, szKey) : hr;
620}
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:597
_In_opt_ LPCSTR pszSubKey
Definition: shlwapi.h:783
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 597 of file utils.cpp.

598{
599 WCHAR szCmd[MAX_PATH * 2];
600 DWORD cb = sizeof(szCmd);
602 if (error)
605}
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:573
#define error(str)
Definition: mkdosfs.c:1605
#define SEE_MASK_FLAG_LOG_USAGE
Definition: shellapi.h:55
#define RRF_RT_REG_SZ
Definition: winreg.h:58

Referenced by RunIndirectRegCommand().

◆ SHAboutInfoA()

BOOL WINAPI SHAboutInfoA ( LPSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 590 of file ordinal.c.

591{
592 WCHAR buff[2084];
593
594 TRACE("(%p,%ld)\n", lpszDest, dwDestLen);
595
596 if (lpszDest && SHAboutInfoW(buff, dwDestLen))
597 {
598 WideCharToMultiByte(CP_ACP, 0, buff, -1, lpszDest, dwDestLen, NULL, NULL);
599 return TRUE;
600 }
601 return FALSE;
602}
WCHAR lpszDest[260]
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
BOOL WINAPI SHAboutInfoW(LPWSTR, DWORD)
Definition: ordinal.c:609

◆ SHAboutInfoW()

BOOL WINAPI SHAboutInfoW ( LPWSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 609 of file ordinal.c.

610{
611 static const WCHAR szIEKey[] = { 'S','O','F','T','W','A','R','E','\\',
612 'M','i','c','r','o','s','o','f','t','\\','I','n','t','e','r','n','e','t',
613 ' ','E','x','p','l','o','r','e','r','\0' };
614 static const WCHAR szWinNtKey[] = { 'S','O','F','T','W','A','R','E','\\',
615 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',' ',
616 'N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0' };
617 static const WCHAR szWinKey[] = { 'S','O','F','T','W','A','R','E','\\',
618 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
619 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0' };
620 static const WCHAR szRegKey[] = { 'S','O','F','T','W','A','R','E','\\',
621 'M','i','c','r','o','s','o','f','t','\\','I','n','t','e','r','n','e','t',
622 ' ','E','x','p','l','o','r','e','r','\\',
623 'R','e','g','i','s','t','r','a','t','i','o','n','\0' };
624 static const WCHAR szVersion[] = { 'V','e','r','s','i','o','n','\0' };
625 static const WCHAR szCustomized[] = { 'C','u','s','t','o','m','i','z','e','d',
626 'V','e','r','s','i','o','n','\0' };
627 static const WCHAR szOwner[] = { 'R','e','g','i','s','t','e','r','e','d',
628 'O','w','n','e','r','\0' };
629 static const WCHAR szOrg[] = { 'R','e','g','i','s','t','e','r','e','d',
630 'O','r','g','a','n','i','z','a','t','i','o','n','\0' };
631 static const WCHAR szProduct[] = { 'P','r','o','d','u','c','t','I','d','\0' };
632 static const WCHAR szUpdate[] = { 'I','E','A','K',
633 'U','p','d','a','t','e','U','r','l','\0' };
634 static const WCHAR szHelp[] = { 'I','E','A','K',
635 'H','e','l','p','S','t','r','i','n','g','\0' };
636 WCHAR buff[2084];
637 HKEY hReg;
638 DWORD dwType, dwLen;
639
640 TRACE("(%p,%ld)\n", lpszDest, dwDestLen);
641
642 if (!lpszDest)
643 return FALSE;
644
645 *lpszDest = '\0';
646
647 /* Try the NT key first, followed by 95/98 key */
648 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szWinNtKey, 0, KEY_READ, &hReg) &&
649 RegOpenKeyExW(HKEY_LOCAL_MACHINE, szWinKey, 0, KEY_READ, &hReg))
650 return FALSE;
651
652 /* OS Version */
653 buff[0] = '\0';
654 dwLen = 30;
655 if (!SHGetValueW(HKEY_LOCAL_MACHINE, szIEKey, szVersion, &dwType, buff, &dwLen))
656 {
657 DWORD dwStrLen = lstrlenW(buff);
658 dwLen = 30 - dwStrLen;
660 szCustomized, &dwType, buff+dwStrLen, &dwLen);
661 }
662 StrCatBuffW(lpszDest, buff, dwDestLen);
663
664 /* ~Registered Owner */
665 buff[0] = '~';
666 dwLen = 256;
667 if (SHGetValueW(hReg, szOwner, 0, &dwType, buff+1, &dwLen))
668 buff[1] = '\0';
669 StrCatBuffW(lpszDest, buff, dwDestLen);
670
671 /* ~Registered Organization */
672 dwLen = 256;
673 if (SHGetValueW(hReg, szOrg, 0, &dwType, buff+1, &dwLen))
674 buff[1] = '\0';
675 StrCatBuffW(lpszDest, buff, dwDestLen);
676
677 /* FIXME: Not sure where this number comes from */
678 buff[0] = '~';
679 buff[1] = '0';
680 buff[2] = '\0';
681 StrCatBuffW(lpszDest, buff, dwDestLen);
682
683 /* ~Product Id */
684 dwLen = 256;
685 if (SHGetValueW(HKEY_LOCAL_MACHINE, szRegKey, szProduct, &dwType, buff+1, &dwLen))
686 buff[1] = '\0';
687 StrCatBuffW(lpszDest, buff, dwDestLen);
688
689 /* ~IE Update Url */
690 dwLen = 2048;
691 if(SHGetValueW(HKEY_LOCAL_MACHINE, szWinKey, szUpdate, &dwType, buff+1, &dwLen))
692 buff[1] = '\0';
693 StrCatBuffW(lpszDest, buff, dwDestLen);
694
695 /* ~IE Help String */
696 dwLen = 256;
697 if(SHGetValueW(hReg, szHelp, 0, &dwType, buff+1, &dwLen))
698 buff[1] = '\0';
699 StrCatBuffW(lpszDest, buff, dwDestLen);
700
701 RegCloseKey(hReg);
702 return TRUE;
703}
#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:1434
DWORD WINAPI SHGetValueW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, DWORD *type, void *data, DWORD *data_len)
Definition: main.c:2222
static LPCWSTR szVersion
Definition: asmcache.c:748
#define KEY_READ
Definition: nt_native.h:1026

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 = %ld\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 1111 of file string.c.

1112{
1113 DWORD dwRet;
1114
1115 dwRet = MultiByteToWideChar(dwCp, 0, lpSrcStr, -1, lpDstStr, iLen);
1116 TRACE("%s->%s,ret=%ld\n", debugstr_a(lpSrcStr), debugstr_w(lpDstStr), dwRet);
1117 return dwRet;
1118}
#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 1395 of file ordinal.c.

1396{
1397 TRACE("%p, %u, %d\n", hMenu, uID, bCheck);
1398 return CheckMenuItem(hMenu, uID, bCheck ? MF_CHECKED : MF_UNCHECKED);
1399}
_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 260 of file propbag.cpp.

261{
262 TRACE("0x%08X, %s, %p\n", dwMode, debugstr_guid(&riid), ppvObj);
263
264 *ppvObj = NULL;
265
266 CComPtr<CMemPropertyBag> pMemBag(new(std::nothrow) CMemPropertyBag(dwMode));
267 if (!pMemBag)
268 return E_OUTOFMEMORY;
269
270 return pMemBag->QueryInterface(riid, ppvObj);
271}

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 975 of file propbag.cpp.

981{
983 PWCHAR pchFileTitle;
984 WCHAR szBuff[MAX_PATH];
985
986 if (dwMode & STGM_CREATE)
987 {
991 {
992 pchFileTitle = PathFindFileNameW(lpFileName);
993 if (lstrcmpiW(pchFileTitle, L"desktop.ini") == 0)
994 {
995 StrCpyNW(szBuff, lpFileName, _countof(szBuff));
996 if (PathRemoveFileSpecW(szBuff))
997 PathMakeSystemFolderW(szBuff);
998 }
1000 }
1001 }
1002
1003 *ppvObj = NULL;
1004
1007
1008 CComPtr<CIniPropertyBag> pIniPB(new(std::nothrow) CIniPropertyBag(dwMode));
1009 if (!pIniPB)
1010 return E_OUTOFMEMORY;
1011
1012 HRESULT hr = pIniPB->Init(lpFileName, pszSection);
1013 if (FAILED(hr))
1014 {
1015 ERR("0x%08X\n", hr);
1016 return hr;
1017 }
1018
1019 return pIniPB->QueryInterface(riid, ppvObj);
1020}
#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:1677
BOOL WINAPI PathRemoveFileSpecW(WCHAR *path)
Definition: path.c:1121
WCHAR *WINAPI StrCpyNW(WCHAR *dst, const WCHAR *src, int count)
Definition: string.c:470
BOOL WINAPI PathMakeSystemFolderW(LPCWSTR lpszPath)
Definition: path.c:1150
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define CREATE_NEW
Definition: disk.h:69
_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:2800

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 583 of file propbag.cpp.

589{
590 TRACE("%p, %s, 0x%08X, %s, %p\n", hKey, debugstr_w(pszSubKey), dwMode,
591 debugstr_guid(&riid), ppvObj);
592
593 *ppvObj = NULL;
594
595 CComPtr<CRegPropertyBag> pRegBag(new(std::nothrow) CRegPropertyBag(dwMode));
596 if (!pRegBag)
597 return E_OUTOFMEMORY;
598
599 HRESULT hr = pRegBag->Init(hKey, pszSubKey);
600 if (FAILED(hr))
601 return hr;
602
603 return pRegBag->QueryInterface(riid, ppvObj);
604}

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

2294{
2295 static const char szClass[] = "WorkerA";
2296 WNDCLASSA wc;
2297 HWND hWnd;
2298
2299 TRACE("(%p, %p, 0x%08lx, 0x%08lx, %p, 0x%08Ix)\n",
2300 wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2301
2302 /* Create Window class */
2303 wc.style = 0;
2305 wc.cbClsExtra = 0;
2306 wc.cbWndExtra = sizeof(LONG_PTR);
2308 wc.hIcon = NULL;
2310 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
2311 wc.lpszMenuName = NULL;
2312 wc.lpszClassName = szClass;
2313
2314 SHRegisterClassA(&wc);
2315
2316 hWnd = CreateWindowExA(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
2317 hWndParent, hMenu, shlwapi_hInstance, 0);
2318 if (hWnd)
2319 {
2320 SetWindowLongPtrW(hWnd, 0, wnd_extra);
2322 }
2323
2324 return hWnd;
2325}
HINSTANCE shlwapi_hInstance
Definition: shlwapi_main.c:33
DWORD WINAPI SHRegisterClassA(WNDCLASSA *wndclass)
Definition: ordinal.c:1412
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 2552 of file ordinal.c.

2554{
2555 static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', 0 };
2556 WNDCLASSW wc;
2557 HWND hWnd;
2558
2559 TRACE("(%p, %p, 0x%08lx, 0x%08lx, %p, 0x%08Ix)\n",
2560 wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2561
2562 /* If our OS is natively ANSI, use the ANSI version */
2563 if (GetVersion() & 0x80000000) /* not NT */
2564 {
2565 TRACE("fallback to ANSI, ver 0x%08lx\n", GetVersion());
2566 return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2567 }
2568
2569 /* Create Window class */
2570 wc.style = 0;
2572 wc.cbClsExtra = 0;
2573 wc.cbWndExtra = sizeof(LONG_PTR);
2575 wc.hIcon = NULL;
2577 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
2578 wc.lpszMenuName = NULL;
2579 wc.lpszClassName = szClass;
2580
2581 SHRegisterClassW(&wc);
2582
2583 hWnd = CreateWindowExW(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
2584 hWndParent, hMenu, shlwapi_hInstance, 0);
2585 if (hWnd)
2586 {
2587 SetWindowLongPtrW(hWnd, 0, wnd_extra);
2589 }
2590
2591 return hWnd;
2592}
DWORD WINAPI GetVersion(void)
Definition: version.c:1458
DWORD WINAPI SHRegisterClassW(WNDCLASSW *lpWndClass)
Definition: ordinal.c:2195
HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2292
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 896 of file utils.cpp.

902{
903 SHDIALOG data = { fn, pThis };
904 return DialogBoxParamA(hInstance, lpTemplateName, hWndParent, SHDialogProc, (LPARAM)&data);
905}
HINSTANCE hInstance
Definition: charmap.c:19
static INT_PTR CALLBACK SHDialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: utils.cpp:842
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 1376 of file ordinal.c.

1377{
1378 TRACE("%p, %u, %d\n", hMenu, wItemID, bEnable);
1379 return EnableMenuItem(hMenu, wItemID, bEnable ? MF_ENABLED : MF_GRAYED);
1380}
_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 1728 of file ordinal.c.

1729{
1730 COLORREF cOldColor = SetBkColor(hDC, cRef);
1731 ExtTextOutA(hDC, 0, 0, ETO_OPAQUE, pRect, 0, 0, 0);
1732 SetBkColor(hDC, cOldColor);
1733 return 0;
1734}
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,%ld)\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}

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:1155
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)

Referenced by ShellExecuteA(), and ShellExecuteW().

◆ SHGetCurColorRes()

DWORD WINAPI SHGetCurColorRes ( void  )

Definition at line 1618 of file ordinal.c.

1619{
1620 HDC hdc;
1621 DWORD ret;
1622
1623 TRACE("()\n");
1624
1625 hdc = GetDC(0);
1627 ReleaseDC(0, hdc);
1628 return ret;
1629}
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().

◆ SHGetFileDescriptionA()

BOOL WINAPI SHGetFileDescriptionA ( _In_ PCSTR  pszPath,
_In_opt_ PCSTR  pszVerKey,
_In_opt_ PCSTR  pszDisplayName,
_Out_opt_ PSTR  pszOut,
_Inout_ PUINT  pcchOut 
)

Definition at line 1199 of file utils.cpp.

1205{
1206 WCHAR szPathW[MAX_PATH], szVerKeyW[MAX_PATH], szDisplayNameW[MAX_PATH], szOutW[MAX_PATH];
1207 CHAR szOutA[MAX_PATH];
1208 BOOL ret;
1209 UINT cchOutW;
1210
1211 SHAnsiToUnicode(pszPath, szPathW, _countof(szPathW));
1212 szPathW[_countof(szPathW) - 1] = UNICODE_NULL;
1213
1214 if (pszVerKey)
1215 {
1216 SHAnsiToUnicode(pszVerKey, szVerKeyW, _countof(szVerKeyW));
1217 szVerKeyW[_countof(szVerKeyW) - 1] = UNICODE_NULL;
1218 }
1219
1220 if (pszDisplayName)
1221 {
1222 SHAnsiToUnicode(pszDisplayName, szDisplayNameW, _countof(szDisplayNameW));
1223 szDisplayNameW[_countof(szDisplayNameW) - 1] = UNICODE_NULL;
1224 }
1225
1226 cchOutW = (UINT)_countof(szOutW);
1227 ret = SHGetFileDescriptionW(szPathW, (pszVerKey ? szVerKeyW : NULL),
1228 (pszDisplayName ? szDisplayNameW : NULL), szOutW, &cchOutW);
1229 if (ret)
1230 {
1231 szOutW[_countof(szOutW) - 1] = UNICODE_NULL;
1232
1233 if (!pszOut)
1234 pszOut = szOutA;
1235
1236 SHUnicodeToAnsi(szOutW, pszOut, *pcchOut);
1237 if (*pcchOut > 0)
1238 pszOut[*pcchOut - 1] = ANSI_NULL;
1239 *pcchOut = lstrlenA(pszOut) + 1;
1240 }
1241
1242 return ret;
1243}
DWORD WINAPI SHAnsiToUnicode(const char *src, WCHAR *dest, int dest_len)
Definition: main.c:1801
DWORD WINAPI SHUnicodeToAnsi(const WCHAR *src, char *dest, int dest_len)
Definition: main.c:1756
BOOL WINAPI SHGetFileDescriptionW(_In_ PCWSTR pszPath, _In_opt_ PCWSTR pszVerKey, _In_opt_ PCWSTR pszDisplayName, _Out_opt_ PWSTR pszOut, _Inout_ PUINT pcchOut)
Definition: utils.cpp:1087
unsigned int BOOL
Definition: ntddk_ex.h:94
char CHAR
Definition: pedump.c:57

◆ SHGetFileDescriptionW()

BOOL WINAPI SHGetFileDescriptionW ( _In_ PCWSTR  pszPath,
_In_opt_ PCWSTR  pszVerKey,
_In_opt_ PCWSTR  pszDisplayName,
_Out_opt_ PWSTR  pszOut,
_Inout_ PUINT  pcchOut 
)

Definition at line 1087 of file utils.cpp.

1093{
1094 DWORD pdwAttrs = 0;
1095 if (!PathFileExistsAndAttributesW(pszPath, &pdwAttrs))
1096 return FALSE;
1097
1100
1101 PVOID pvDescription = NULL;
1102 UINT cchDescription = 0;
1103 PVOID pvBlock = NULL;
1104
1105 BOOL bIsFile = !(pdwAttrs & FILE_ATTRIBUTE_DIRECTORY) &&
1106 !PathIsUNCServerW(pszPath) &&
1107 !PathIsUNCServerShareW(pszPath);
1108 if (bIsFile)
1109 {
1110 DWORD dwHandle = 0;
1111 DWORD cbBlock = GetFileVersionInfoSizeW(szPath, &dwHandle);
1112 if (cbBlock)
1113 {
1114 pvBlock = LocalAlloc(LPTR, cbBlock);
1115 if (pvBlock && GetFileVersionInfoW(szPath, dwHandle, cbBlock, pvBlock))
1116 {
1117 WCHAR szSubBlock[60];
1118 BOOL ret = FALSE;
1119 if (pszVerKey)
1120 {
1121 StringCchCopyW(szSubBlock, _countof(szSubBlock), pszVerKey);
1122 ret = VerQueryValueW(pvBlock, szSubBlock, &pvDescription, &cchDescription);
1123 }
1124
1125 if (!ret)
1126 {
1127 PVOID pTranslation = NULL;
1128 UINT cbTranslation = 0;
1129 if (VerQueryValueW(pvBlock, L"\\VarFileInfo\\Translation", &pTranslation,
1130 &cbTranslation) && cbTranslation)
1131 {
1132 UINT langId = ((PWORD)pTranslation)[0];
1133 UINT codePage = ((PWORD)pTranslation)[1];
1134 StringCchPrintfW(szSubBlock, _countof(szSubBlock),
1135 L"\\StringFileInfo\\%04X%04X\\FileDescription",
1136 langId, codePage);
1137 ret = VerQueryValueW(pvBlock, szSubBlock, &pvDescription, &cchDescription);
1138 }
1139 }
1140
1141 if (!ret)
1142 {
1143 // 0x0409: English (United States), 0x04B0: UTF-16 codepage
1144 StringCchCopyW(szSubBlock, _countof(szSubBlock),
1145 L"\\StringFileInfo\\040904B0\\FileDescription");
1146 ret = VerQueryValueW(pvBlock, szSubBlock, &pvDescription, &cchDescription);
1147 }
1148 if (!ret)
1149 {
1150 // 0x0409: English (United States), 0x04E4: Latin 1 codepage
1151 StringCchCopyW(szSubBlock, _countof(szSubBlock),
1152 L"\\StringFileInfo\\040904E4\\FileDescription");
1153 ret = VerQueryValueW(pvBlock, szSubBlock, &pvDescription, &cchDescription);
1154 }
1155 if (!ret)
1156 {
1157 // 0x0409: English (United States), 0x0000: Neutral
1158 StringCchCopyW(szSubBlock, _countof(szSubBlock),
1159 L"\\StringFileInfo\\04090000\\FileDescription");
1160 ret = VerQueryValueW(pvBlock, szSubBlock, &pvDescription, &cchDescription);
1161 }
1162 }
1163 }
1164 }
1165
1166 PWSTR pszDescription = (PWSTR)pvDescription;
1167 if (!pszDescription || !*pszDescription)
1168 {
1170 pszDescription = PathFindFileNameW(szPath);
1171 cchDescription = lstrlenW(pszDescription);
1172 }
1173
1174 PrettifyFileDescriptionW(pszDescription, pszDisplayName);
1175
1176 UINT cchResult = lstrlenW(pszDescription) + 1;
1177 if (pszOut)
1178 {
1179 UINT cchCopy = min(cchResult, *pcchOut);
1180 StringCchCopyW(pszOut, cchCopy, pszDescription);
1181 *pcchOut = cchCopy;
1182 }
1183 else
1184 {
1185 *pcchOut = cchResult;
1186 }
1187
1188 if (pvBlock)
1189 LocalFree(pvBlock);
1190
1191 return TRUE;
1192}
void WINAPI PathRemoveExtensionW(WCHAR *path)
Definition: path.c:1922
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:967
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1171
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:738
VOID WINAPI PrettifyFileDescriptionW(_Inout_ PWSTR pszTarget, _In_opt_ PCWSTR pszCutList)
Definition: utils.cpp:1044
#define LPTR
Definition: minwinbase.h:93
LPCWSTR szPath
Definition: env.c:37
WORD * PWORD
Definition: pedump.c:67
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149

Referenced by SHGetFileDescriptionA().

◆ 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 732 of file propbag.cpp.

738{
739 if (*lpKeyName == L'@') // UTF-7
740 return SHGetIniStringW(lpAppName, lpKeyName + 1, lpReturnedString, nSize, lpFileName);
741
742 return GetPrivateProfileStringW(lpAppName, lpKeyName, L"", lpReturnedString, nSize, lpFileName);
743}
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:612
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:1811

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 612 of file propbag.cpp.

618{
619 TRACE("(%s,%s,%p,%08x,%s)\n", debugstr_w(appName), debugstr_w(keyName),
620 out, outLen, debugstr_w(filename));
621
622 if (outLen == 0)
623 return 0;
624
625 // Try ".W"-appended section name. See also SHSetIniStringW
626 CStringW szSection(appName);
627 szSection += L".W";
628 CStringW pszWideBuff;
629 const INT cchWideMax = 4 * MAX_PATH; // UTF-7 needs 4 times length buffer.
630 GetPrivateProfileStringW(szSection, keyName, NULL,
631 pszWideBuff.GetBuffer(cchWideMax), cchWideMax, filename);
632 pszWideBuff.ReleaseBuffer();
633
634 if (pszWideBuff.IsEmpty()) // It's empty or not found
635 {
636 // Try the normal section name
637 return GetPrivateProfileStringW(appName, keyName, NULL, out, outLen, filename);
638 }
639
640 // Okay, now ".W" version is valid. Its value is a UTF-7 string in UTF-16
641 CW2A wide2utf7(pszWideBuff);
642 MultiByteToWideChar(CP_UTF7, 0, wide2utf7, -1, out, outLen);
643 out[outLen - 1] = UNICODE_NULL;
644
645 return lstrlenW(out);
646}
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
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:263

Referenced by SHGetIniStringUTF7W().

◆ SHGetMenuFromID()

HMENU WINAPI SHGetMenuFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 1592 of file ordinal.c.

1593{
1595
1596 TRACE("(%p,%u)\n", hMenu, uID);
1597
1598 mi.cbSize = sizeof(mi);
1599 mi.fMask = MIIM_SUBMENU;
1600
1601 if (!GetMenuItemInfoW(hMenu, uID, FALSE, &mi))
1602 return NULL;
1603
1604 return mi.hSubMenu;
1605}
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 5727 of file ordinal.c.

5728{
5729 static const WCHAR compatpathW[] =
5730 {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
5731 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
5732 'S','h','e','l','l','C','o','m','p','a','t','i','b','i','l','i','t','y','\\',
5733 'O','b','j','e','c','t','s','\\','%','s',0};
5734 WCHAR strW[ARRAY_SIZE(compatpathW) + 38 /* { CLSID } */];
5736 OLECHAR *clsid_str;
5737 HKEY key;
5738 INT i;
5739
5740 TRACE("%p %s\n", pUnk, debugstr_guid(clsid));
5741
5742 if (!pUnk && !clsid) return 0;
5743
5744 if (pUnk && !clsid)
5745 {
5746 FIXME("iface not handled\n");
5747 return 0;
5748 }
5749
5750 StringFromCLSID(clsid, &clsid_str);
5751 swprintf(strW, ARRAY_SIZE(strW), compatpathW, clsid_str);
5752 CoTaskMemFree(clsid_str);
5753
5755 if (ret != ERROR_SUCCESS) return 0;
5756
5757 /* now collect flag values */
5758 ret = 0;
5759 for (i = 0; RegEnumValueW(key, i, strW, &length, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; i++)
5760 {
5761 INT left, right, res, x;
5762
5763 /* search in table */
5764 left = 0;
5766
5767 while (right >= left) {
5768 x = (left + right) / 2;
5770 if (res == 0)
5771 {
5772 ret |= objcompat_table[x].value;
5773 break;
5774 }
5775 else if (res < 0)
5776 right = x - 1;
5777 else
5778 left = x + 1;
5779 }
5780
5782 }
5783
5784 return ret;
5785}
#define ARRAY_SIZE(A)
Definition: main.h:20
#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
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
WCHAR OLECHAR
Definition: compat.h:2292
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1977
static const struct objcompat_entry objcompat_table[]
Definition: ordinal.c:5685
#define swprintf
Definition: precomp.h:40
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
WCHAR strW[12]
Definition: clipboard.c:2216
Definition: copy.c:22
Definition: name.c:39

Referenced by init_pointers(), and SHGetAttributes().

◆ SHGetPathFromIDListWrapW()

BOOL WINAPI SHGetPathFromIDListWrapW ( LPCITEMIDLIST  pidl,
LPWSTR  pszPath 
)

Definition at line 3016 of file ordinal.c.

3017{
3018 return SHGetPathFromIDListW(pidl, pszPath);
3019}
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 1957 of file propbag.cpp.

1961{
1962 if (dwReserved)
1963 return 0;
1964
1965 HDC hDC = ::GetDC(NULL);
1966 INT cxWidth = ::GetDeviceCaps(hDC, HORZRES);
1967 INT cyHeight = ::GetDeviceCaps(hDC, VERTRES);
1968 INT cMonitors = ::GetSystemMetrics(SM_CMONITORS);
1970
1971 StringCchPrintfW(pszBuffer, cchBuffer, L"%dx%d(%d)", cxWidth, cyHeight, cMonitors);
1972 return lstrlenW(pszBuffer);
1973}
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 4049 of file ordinal.c.

4050{
4051#ifndef __REACTOS__
4052 enum _shellkey_flags {
4053 SHKEY_Root_HKCU = 0x1,
4054 SHKEY_Root_HKLM = 0x2,
4055 SHKEY_Key_Explorer = 0x00,
4056 SHKEY_Key_Shell = 0x10,
4057 SHKEY_Key_ShellNoRoam = 0x20,
4058 SHKEY_Key_Classes = 0x30,
4059 SHKEY_Subkey_Default = 0x0000,
4061 SHKEY_Subkey_Handlers = 0x2000,
4063 SHKEY_Subkey_Volatile = 0x4000,
4064 SHKEY_Subkey_MUICache = 0x5000,
4065 SHKEY_Subkey_FileExts = 0x6000
4066 };
4067#endif
4068
4069 static const WCHAR explorerW[] = {'S','o','f','t','w','a','r','e','\\',
4070 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4071 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
4072 'E','x','p','l','o','r','e','r','\\'};
4073 static const WCHAR shellW[] = {'S','o','f','t','w','a','r','e','\\',
4074 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4075 'S','h','e','l','l','\\'};
4076 static const WCHAR shell_no_roamW[] = {'S','o','f','t','w','a','r','e','\\',
4077 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4078 'S','h','e','l','l','N','o','R','o','a','m','\\'};
4079 static const WCHAR classesW[] = {'S','o','f','t','w','a','r','e','\\',
4080 'C','l','a','s','s','e','s','\\'};
4081
4082 static const WCHAR localized_resource_nameW[] = {'L','o','c','a','l','i','z','e','d',
4083 'R','e','s','o','u','r','c','e','N','a','m','e','\\'};
4084 static const WCHAR handlersW[] = {'H','a','n','d','l','e','r','s','\\'};
4085 static const WCHAR associationsW[] = {'A','s','s','o','c','i','a','t','i','o','n','s','\\'};
4086 static const WCHAR volatileW[] = {'V','o','l','a','t','i','l','e','\\'};
4087 static const WCHAR mui_cacheW[] = {'M','U','I','C','a','c','h','e','\\'};
4088 static const WCHAR file_extsW[] = {'F','i','l','e','E','x','t','s','\\'};
4089
4090 WCHAR *path;
4091 const WCHAR *key, *subkey;
4092 int size_key, size_subkey, size_user;
4093 HKEY hkey = NULL;
4094
4095 TRACE("(0x%08lx, %s, %d)\n", flags, debugstr_w(sub_key), create);
4096
4097 /* For compatibility with Vista+ */
4098 if(flags == 0x1ffff)
4099 flags = 0x21;
4100
4101 switch(flags&0xff0) {
4102 case SHKEY_Key_Explorer:
4103 key = explorerW;
4104 size_key = sizeof(explorerW);
4105 break;
4106 case SHKEY_Key_Shell:
4107 key = shellW;
4108 size_key = sizeof(shellW);
4109 break;
4111 key = shell_no_roamW;
4112 size_key = sizeof(shell_no_roamW);
4113 break;
4114 case SHKEY_Key_Classes:
4115 key = classesW;
4116 size_key = sizeof(classesW);
4117 break;
4118 default:
4119 FIXME("unsupported flags (0x%08lx)\n", flags);
4120 return NULL;
4121 }
4122
4123 switch(flags&0xff000) {
4125 subkey = NULL;
4126 size_subkey = 0;
4127 break;
4129 subkey = localized_resource_nameW;
4130 size_subkey = sizeof(localized_resource_nameW);
4131 break;
4133 subkey = handlersW;
4134 size_subkey = sizeof(handlersW);
4135 break;
4137 subkey = associationsW;
4138 size_subkey = sizeof(associationsW);
4139 break;
4141 subkey = volatileW;
4142 size_subkey = sizeof(volatileW);
4143 break;
4145 subkey = mui_cacheW;
4146 size_subkey = sizeof(mui_cacheW);
4147 break;
4149 subkey = file_extsW;
4150 size_subkey = sizeof(file_extsW);
4151 break;
4152 default:
4153 FIXME("unsupported flags (0x%08lx)\n", flags);
4154 return NULL;
4155 }
4156
4157 if(sub_key)
4158 size_user = lstrlenW(sub_key)*sizeof(WCHAR);
4159 else
4160 size_user = 0;
4161
4162 path = malloc(size_key + size_subkey + size_user + sizeof(WCHAR));
4163 if(!path) {
4164 ERR("Out of memory\n");
4165 return NULL;
4166 }
4167
4168 memcpy(path, key, size_key);
4169 if(subkey)
4170 memcpy(path+size_key/sizeof(WCHAR), subkey, size_subkey);
4171 if(sub_key)
4172 memcpy(path+(size_key+size_subkey)/sizeof(WCHAR), sub_key, size_user);
4173 path[(size_key+size_subkey+size_user)/sizeof(WCHAR)] = '\0';
4174
4175 if(create)
4177 path, 0, NULL, 0, MAXIMUM_ALLOWED, NULL, &hkey, NULL);
4178 else
4180 path, 0, MAXIMUM_ALLOWED, &hkey);
4181
4182 free(path);
4183 return hkey;
4184}
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
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
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(), 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 234 of file reg.c.

236{
239 return SHGetValueA(hkey, pSubKey, pValue, pwType, pvData, pbData);
240}
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
DWORD WINAPI SHGetValueA(HKEY hkey, const char *subkey, const char *value, DWORD *type, void *data, DWORD *data_len)
Definition: main.c:2197
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 247 of file reg.c.

249{
252 return SHGetValueW(hkey, pSubKey, pValue, pwType, pvData, pbData);
253}

◆ SHGlobalCounterCreate()

HANDLE WINAPI SHGlobalCounterCreate ( REFGUID  guid)

Definition at line 240 of file thread.c.

241{
242 char szName[40];
243
244 TRACE("(%s)\n", debugstr_guid(guid));
245
246 /* Create a named semaphore using the GUID string */
247 SHStringFromGUIDA(guid, szName, sizeof(szName) - 1);
249}
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:215
static const WCHAR szName[]
Definition: powrprof.c:45

Referenced by CPolicyCache::Initialize(), and SHELL_GetCachedGlobalCounter().

◆ SHGlobalCounterGetValue()

LONG WINAPI SHGlobalCounterGetValue ( HANDLE  hGlobalCounter)

Definition at line 122 of file thread.c.

123{
124 LONG dwOldCount = 0;
125
126 TRACE("(%p)\n", hSem);
127 ReleaseSemaphore(hSem, 1, &dwOldCount); /* +1 */
128 WaitForSingleObject(hSem, 0); /* -1 */
129 return dwOldCount;
130}
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 CPolicyCache::_ValidateCachedResults(), SHELL_QueryRestrictionsChanged(), and SHGlobalCounterDecrement().

◆ SHGlobalCounterIncrement()

LONG WINAPI SHGlobalCounterIncrement ( HANDLE  hGlobalCounter)

Definition at line 143 of file thread.c.

144{
145 LONG dwOldCount = 0;
146
147 TRACE("(%p)\n", hSem);
148 ReleaseSemaphore(hSem, 1, &dwOldCount);
149 return dwOldCount + 1;
150}

Referenced by SHSettingsChanged().

◆ SHInterlockedCompareExchange()

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

Definition at line 3045 of file ordinal.c.

3046{
3048}
#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 436 of file utils.cpp.

443{
444 HRESULT hr;
445 CMINVOKECOMMANDINFOEX ici;
446 WCHAR szVerbW[MAX_PATH];
447 HMENU hMenu = NULL;
448 UINT iVerb, idDefault = (UINT)-1;
449 PCSTR pszVerbA = NULL;
450
451 if (!pCM)
452 return E_INVALIDARG;
453
454 hMenu = CreatePopupMenu();
455 if (!hMenu)
456 return E_OUTOFMEMORY;
457
458 if (punkSite)
459 IUnknown_SetSite(pCM, punkSite);
460
461 hr = pCM->QueryContextMenu(hMenu, 0, 1, MAXSHORT, (cVerbs ? 0 : CMF_DEFAULTONLY));
462 if (FAILED(hr))
463 goto Cleanup;
464
465 if (!cVerbs)
466 {
467 idDefault = GetMenuDefaultItem(hMenu, FALSE, 0);
468 if (idDefault != (UINT)-1)
469 pszVerbA = MAKEINTRESOURCEA(idDefault - 1);
470 }
471
472 ZeroMemory(&ici, sizeof(ici));
473 ici.cbSize = sizeof(ici);
474 ici.hwnd = hwnd;
475 ici.nShow = SW_SHOWNORMAL;
476
477 iVerb = 0;
478 do
479 {
480 if (cVerbs)
481 pszVerbA = pVerbs[iVerb];
482
483 if (!pszVerbA && idDefault == (UINT)-1)
484 {
485 hr = E_FAIL;
486 break;
487 }
488
489 ici.fMask = fMask;
490 ici.lpVerb = pszVerbA;
491 ici.lpVerbW = NULL;
492
493 if (idDefault == (UINT)-1 && !IS_INTRESOURCE(pszVerbA) && IsTextAsciiOnly(pszVerbA))
494 {
495 size_t ich;
496 for (ich = 0; pszVerbA[ich] && ich + 1 < _countof(szVerbW); ++ich)
497 {
498 szVerbW[ich] = (BYTE)pszVerbA[ich];
499 }
500 szVerbW[ich] = UNICODE_NULL;
501
502 ici.lpVerbW = szVerbW;
503 ici.fMask |= CMIC_MASK_UNICODE;
504 }
505
506 hr = pCM->InvokeCommand((LPCMINVOKECOMMANDINFO)&ici);
507
509 break;
510
511 ++iVerb;
512 } while (iVerb < cVerbs);
513
514Cleanup:
515 if (punkSite)
517 DestroyMenu(hMenu);
518 return hr;
519}
#define IS_INTRESOURCE(x)
Definition: loader.c:613
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
Definition: main.c:222
static BOOL IsTextAsciiOnly(PCSTR psz)
Definition: utils.cpp:421
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
#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 2608 of file ordinal.c.

2609{
2610 TRACE("%p %p %p\n", hWnd, lpFolder, lpApidl);
2611 return SHInvokeCommand(hWnd, lpFolder, lpApidl, 0);
2612}
HRESULT WINAPI SHInvokeCommand(HWND, IShellFolder *, LPCITEMIDLIST, DWORD)
Definition: ordinal.c:3177

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

◆ SHIsChildOrSelf()

BOOL WINAPI SHIsChildOrSelf ( HWND  hParent,
HWND  hChild 
)

Definition at line 1941 of file ordinal.c.

1942{
1943 TRACE("(%p,%p)\n", hParent, hChild);
1944
1945 if (!hParent || !hChild)
1946 return TRUE;
1947 else if(hParent == hChild)
1948 return FALSE;
1949 return !IsChild(hParent, hChild);
1950}
static HTREEITEM hChild
Definition: treeview.c:383
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)

◆ SHIsEmptyStream()

BOOL WINAPI SHIsEmptyStream ( IStream lpStream)

Definition at line 78 of file istream.c.

79{
80 STATSTG statstg;
81 BOOL bRet = TRUE;
82
83 TRACE("(%p)\n", lpStream);
84
85 memset(&statstg, 0, sizeof(statstg));
86
87 if(SUCCEEDED(IStream_Stat(lpStream, &statstg, 1)))
88 {
89 if(statstg.cbSize.QuadPart)
90 bRet = FALSE; /* Non-Zero */
91 }
92 else
93 {
94 DWORD dummy, read_len;
95
96 /* Try to read from the stream */
97 if (SUCCEEDED(IStream_Read(lpStream, &dummy, sizeof(dummy), &read_len)) && read_len == sizeof(dummy))
98 {
100 zero.QuadPart = 0;
101
102 IStream_Seek(lpStream, zero, 0, NULL);
103 bRet = FALSE; /* Non-Zero */
104 }
105 }
106 return bRet;
107}
int zero
Definition: sehframes.cpp:29

◆ SHIsExpandableFolder()

HRESULT WINAPI SHIsExpandableFolder ( LPSHELLFOLDER  lpFolder,
LPCITEMIDLIST  pidl 
)

Definition at line 1683 of file ordinal.c.

1684{
1685 HRESULT hRet = E_INVALIDARG;
1686 IQueryInfo *lpInfo;
1687
1688 if (lpFolder && pidl)
1689 {
1690 hRet = IShellFolder_GetUIObjectOf(lpFolder, NULL, 1, &pidl, &IID_IQueryInfo,
1691 NULL, (void**)&lpInfo);
1692 if (FAILED(hRet))
1693 hRet = S_FALSE; /* Doesn't expose IQueryInfo */
1694 else
1695 {
1696 DWORD dwFlags = 0;
1697
1698 /* MSDN states of IQueryInfo_GetInfoFlags() that "This method is not
1699 * currently used". Really? You wouldn't be holding out on me would you?
1700 */
1701 hRet = IQueryInfo_GetInfoFlags(lpInfo, &dwFlags);
1702
1703 if (SUCCEEDED(hRet))
1704 {
1705 /* 0x2 is an undocumented flag apparently indicating expandability */
1706 hRet = dwFlags & 0x2 ? S_OK : S_FALSE;
1707 }
1708
1709 IQueryInfo_Release(lpInfo);
1710 }
1711 }
1712 return hRet;
1713}
_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 941 of file ordinal.c.

942{
943 IUnknown *lpUnknown1, *lpUnknown2;
944 BOOL ret;
945
946 TRACE("(%p %p)\n", lpInt1, lpInt2);
947
948 if (!lpInt1 || !lpInt2)
949 return FALSE;
950
951 if (lpInt1 == lpInt2)
952 return TRUE;
953
954 if (IUnknown_QueryInterface(lpInt1, &IID_IUnknown, (void**)&lpUnknown1) != S_OK)
955 return FALSE;
956
957 if (IUnknown_QueryInterface(lpInt2, &IID_IUnknown, (void**)&lpUnknown2) != S_OK)
958 {
959 IUnknown_Release(lpUnknown1);
960 return FALSE;
961 }
962
963 ret = lpUnknown1 == lpUnknown2;
964
965 IUnknown_Release(lpUnknown1);
966 IUnknown_Release(lpUnknown2);
967
968 return ret;
969}
const GUID IID_IUnknown

◆ SHLoadMenuPopup()

BOOL WINAPI SHLoadMenuPopup ( HINSTANCE  hInst,
LPCWSTR  szName 
)

Definition at line 1261 of file ordinal.c.

1262{
1263 HMENU hMenu;
1264
1265 TRACE("%p %s\n", hInst, debugstr_w(szName));
1266
1267 if ((hMenu = LoadMenuW(hInst, szName)))
1268 {
1269 if (GetSubMenu(hMenu, 0))
1270 RemoveMenu(hMenu, 0, MF_BYPOSITION);
1271
1272 DestroyMenu(hMenu);
1273 return TRUE;
1274 }
1275 return FALSE;
1276}
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 3669 of file ordinal.c.

3670{
3671 DWORD type, sz = size * sizeof(WCHAR);
3672
3673 if(RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)buf, &sz) != ERROR_SUCCESS)
3674 return E_FAIL;
3675
3677}
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:1499
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 3951 of file ordinal.c.

3952{
3953 TRACE("%p %u\n", hMenu, uID);
3954 return GetMenuPosFromID(hMenu, uID);
3955}
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
Definition: ordinal.c:3924

Referenced by CDefView::FillViewMenu().

◆ SHPinDllOfCLSID()

HMODULE WINAPI SHPinDllOfCLSID ( REFIID  refiid)

Definition at line 2173 of file ordinal.c.

2174{
2175 HKEY newkey;
2176 DWORD type, count;
2177 CHAR value[MAX_PATH], string[MAX_PATH];
2178
2179 strcpy(string, "CLSID\\");
2180 SHStringFromGUIDA(refiid, string + 6, ARRAY_SIZE(string) - 6);
2181 strcat(string, "\\InProcServer32");
2182
2183 count = MAX_PATH;
2184 RegOpenKeyExA(HKEY_CLASSES_ROOT, string, 0, 1, &newkey);
2185 RegQueryValueExA(newkey, 0, 0, &type, (PBYTE)value, &count);
2186 RegCloseKey(newkey);
2187 return LoadLibraryExA(value, 0, 0);
2188}
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:513
GLuint GLuint GLsizei count
Definition: gl.h:1545
BYTE * PBYTE
Definition: pedump.c:66
strcat
Definition: string.h:92
strcpy
Definition: string.h:131
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10

Referenced by SHAutoComplete(), and SHLWAPI_GetCachedZonesManagerInner().

◆ SHPropagateMessage()

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

Definition at line 1314 of file ordinal.c.

1315{
1317
1318 TRACE("(%p,%u,%Id,%Id,%d)\n", hWnd, uiMsgId, wParam, lParam, bSend);
1319
1320 if(hWnd)
1321 {
1322 data.uiMsgId = uiMsgId;
1323 data.wParam = wParam;
1324 data.lParam = lParam;
1325
1326 if (bSend)
1327 data.pfnPost = IsWindowUnicode(hWnd) ? (void*)SendMessageW : (void*)SendMessageA;
1328 else
1329 data.pfnPost = IsWindowUnicode(hWnd) ? (void*)PostMessageW : (void*)PostMessageA;
1330
1332 }
1333}
static BOOL CALLBACK SHLWAPI_EnumChildProc(HWND hWnd, LPARAM lParam)
Definition: ordinal.c:1287
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 5036 of file ordinal.c.

5037{
5038#ifdef __REACTOS__
5039 HRESULT hr;
5040 VARIANTARG varg;
5041
5042 TRACE("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5043
5044 if (!ppb || !pszPropName || !pValue)
5045 {
5046 ERR("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5047 return E_INVALIDARG;
5048 }
5049
5050 hr = SHPropertyBag_ReadType(ppb, pszPropName, &varg, VT_I4);
5051 if (SUCCEEDED(hr))
5052 *pValue = V_I4(&varg);
5053#else
5054 VARIANT var;
5055 HRESULT hr;
5056 TRACE("%p %s %p\n", ppb,debugstr_w(pszPropName),pValue);
5057 if (!pszPropName || !ppb || !pValue)
5058 return E_INVALIDARG;
5059 V_VT(&var) = VT_I4;
5060 hr = IPropertyBag_Read(ppb, pszPropName, &var, NULL);
5061 if (SUCCEEDED(hr))
5062 {
5063 if (V_VT(&var) == VT_I4)
5064 *pValue = V_I4(&var);
5065 else
5067 }
5068#endif
5069 return hr;
5070}
@ 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 595 of file reg.c.

597{
598#ifndef __REACTOS__
599 static const WCHAR szClassIdKey[] = { 'S','o','f','t','w','a','r','e','\\',
600 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
601 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
602 'E','x','p','l','o','r','e','r','\\','C','L','S','I','D','\\' };
603#endif
604 WCHAR szKey[MAX_PATH];
605 DWORD dwRet;
606 HKEY hkey;
607
608 /* Create the key string */
609#ifdef __REACTOS__
610 // https://www.geoffchappell.com/studies/windows/shell/shlwapi/api/reg/reggetclsidkey.htm
611 WCHAR* ptr;
612
613 wcscpy(szKey, bUseHKCU ? L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\" : L"CLSID\\");
614 ptr = szKey + wcslen(szKey);
615 SHStringFromGUIDW(guid, ptr, 39); /* Append guid */
616 if (lpszValue)
617 {
618 ptr = szKey + wcslen(szKey);
619 wcscat(ptr, L"\\");
620 wcscat(++ptr, lpszValue);
621 }
622#else
623 memcpy(szKey, szClassIdKey, sizeof(szClassIdKey));
624 SHStringFromGUIDW(guid, szKey + ARRAY_SIZE(szClassIdKey), 39); /* Append guid */
625
626 if(lpszValue)
627 {
628 szKey[ARRAY_SIZE(szClassIdKey) + 39] = '\\';
629 lstrcpyW(szKey + ARRAY_SIZE(szClassIdKey) + 40, lpszValue); /* Append value name */
630 }
631#endif
632
633 hkey = bUseHKCU ? HKEY_CURRENT_USER : HKEY_CLASSES_ROOT;
634
635 if(bCreate)
636 dwRet = RegCreateKeyW(hkey, szKey, phKey);
637 else
638 dwRet = RegOpenKeyExW(hkey, szKey, 0, KEY_READ, phKey);
639
640 return dwRet ? HRESULT_FROM_WIN32(dwRet) : S_OK;
641}
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1201
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2988
INT WINAPI SHStringFromGUIDW(REFGUID, LPWSTR, INT)
Definition: ordinal.c:546
static PVOID ptr
Definition: dispmode.c:27
wcscat
wcscpy

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

◆ SHRegisterClassA()

DWORD WINAPI SHRegisterClassA ( WNDCLASSA wndclass)

Definition at line 1412 of file ordinal.c.

1413{
1414 WNDCLASSA wca;
1415 if (GetClassInfoA(wndclass->hInstance, wndclass->lpszClassName, &wca))
1416 return TRUE;
1417 return (DWORD)RegisterClassA(wndclass);
1418}
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 1347 of file ordinal.c.

1348{
1349 int iItemCount = GetMenuItemCount(hMenu) - 1;
1350
1351 TRACE("%p\n", hMenu);
1352
1353 while (iItemCount >= 0)
1354 {
1355 HMENU hSubMenu = GetSubMenu(hMenu, iItemCount);
1356 if (hSubMenu)
1357 RemoveMenu(hMenu, iItemCount, MF_BYPOSITION);
1358 iItemCount--;
1359 }
1360 return iItemCount;
1361}
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 = 0;
358 LPDATABLOCK_HEADER lpItem = NULL;
359 LPDATABLOCK_HEADER lpNext;
360 ULONG ulNewSize;
361
362 TRACE("(%p,%ld)\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().

◆ SHRestrictedMessageBox()

INT WINAPI SHRestrictedMessageBox ( _In_ HWND  hWnd)

Definition at line 1251 of file utils.cpp.

1252{
1254 MAKEINTRESOURCEW(IDS_RESTRICTIONS), MB_ICONERROR);
1255}
#define ShellMessageBoxW
Definition: precomp.h:63
HINSTANCE shlwapi_hInstance
Definition: shlwapi_main.c:33
#define MB_ICONERROR
Definition: winuser.h:798
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by ShowFolderOptionsDialogThreadProc().

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

1757{
1758 if (lpKeys && lpValues)
1759 {
1760 int i = 0;
1761
1762 while (i < iLen)
1763 {
1764 if (lpKeys[i] == iKey)
1765 return lpValues[i]; /* Found */
1766 i++;
1767 }
1768 }
1769 return -1; /* Not found */
1770}

Referenced by init_pointers().

◆ SHSendMessageBroadcastW()

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

Definition at line 3616 of file ordinal.c.

3617{
3619 SMTO_ABORTIFHUNG, 2000, NULL);
3620}
#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 2093 of file ordinal.c.

2095{
2096#ifdef __REACTOS__
2097 HFONT hOldFont, hNewFont;
2098 LOGFONTW lfOldFont, lfNewFont;
2099 HWND hwndItem;
2100
2101 TRACE("(%p, %d)\n", hWnd, id);
2102
2103 hOldFont = (HFONT)SendMessageW(hWnd, WM_GETFONT, 0, 0);
2104 GetObjectW(hOldFont, sizeof(lfOldFont), &lfOldFont);
2105 SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(lfNewFont), &lfNewFont, 0);
2106
2107 if (lfOldFont.lfCharSet == lfNewFont.lfCharSet)
2108 return;
2109
2110 hNewFont = GetPropW(hWnd, L"PropDlgFont");
2111 if (!hNewFont)
2112 {
2113 /* Create the icon-title font of the same height */
2114 lfNewFont.lfHeight = lfOldFont.lfHeight;
2115 hNewFont = CreateFontIndirectW(&lfNewFont);
2116
2117 /* If creating the font is failed, then keep the old font */
2118 if (!hNewFont)
2119 hNewFont = hOldFont;
2120
2121 /* Set "PropDlgFont" property if the font is changed */
2122 if (hOldFont != hNewFont)
2123 SetPropW(hWnd, L"PropDlgFont", hNewFont);
2124 }
2125
2126 hwndItem = GetDlgItem(hWnd, id);
2127 SendMessageW(hwndItem, WM_SETFONT, (WPARAM)hNewFont, 0);
2128#else
2129 FIXME("(%p, %d) stub\n", hWnd, id);
2130 return S_OK;
2131#endif
2132}
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 758 of file propbag.cpp.

763{
764 if (*lpKeyName == L'@') // UTF-7
765 return SHSetIniStringW(lpAppName, lpKeyName + 1, lpString, lpFileName);
766
767 return WritePrivateProfileStringW(lpAppName, lpKeyName, lpString, lpFileName);
768}
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:668

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 668 of file propbag.cpp.

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

Referenced by SHSetIniStringUTF7W().

◆ SHSetParentHwnd()

HWND WINAPI SHSetParentHwnd ( HWND  hWnd,
HWND  hWndParent 
)

Definition at line 833 of file ordinal.c.

834{
835 TRACE("%p, %p\n", hWnd, hWndParent);
836
838 return NULL;
839
840 if(hWndParent)
842 else
844
846}
LONG WINAPI SHSetWindowBits(HWND hwnd, INT offset, UINT mask, UINT flags)
Definition: ordinal.c:805
#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 805 of file ordinal.c.

806{
808 LONG new_flags = (flags & mask) | (ret & ~mask);
809
810 TRACE("%p %d %x %x\n", hwnd, offset, mask, flags);
811
812 if (new_flags != ret)
813 ret = SetWindowLongW(hwnd, offset, new_flags);
814 return ret;
815}
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 1423 of file ordinal.c.

1425{
1426 DWORD dwEffect = DROPEFFECT_LINK | DROPEFFECT_MOVE | DROPEFFECT_COPY;
1427 POINTL pt = { 0, 0 };
1428
1429 TRACE("%p %p 0x%08lx %p %p\n", pDrop, pDataObj, grfKeyState, lpPt, pdwEffect);
1430
1431 if (!lpPt)
1432 lpPt = &pt;
1433
1434 if (!pdwEffect)
1435 pdwEffect = &dwEffect;
1436
1437 IDropTarget_DragEnter(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
1438
1439 if (*pdwEffect != DROPEFFECT_NONE)
1440 return IDropTarget_Drop(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
1441
1442 IDropTarget_DragLeave(pDrop);
1443 return TRUE;
1444}
#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()

INT WINAPI SHUnicodeToAnsi ( LPCWSTR  lpSrcStr,
LPSTR  lpDstStr,
INT  iLen 
)

Definition at line 1260 of file string.c.

1261{
1262 return SHUnicodeToAnsiCP(CP_ACP, lpSrcStr, lpDstStr, iLen);
1263}
DWORD WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr, int dstlen)
Definition: string.c:1161

Referenced by DoesStringRoundTripW().

◆ SHUnicodeToAnsiCP()

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

Definition at line 1161 of file string.c.

1162{
1163 static const WCHAR emptyW[] = { '\0' };
1164 int len , reqLen;
1165 LPSTR mem;
1166
1167 if (!lpDstStr || !dstlen)
1168 return 0;
1169
1170 if (!lpSrcStr)
1171 lpSrcStr = emptyW;
1172
1173 *lpDstStr = '\0';
1174
1175 len = lstrlenW(lpSrcStr) + 1;
1176
1177 switch (CodePage)
1178 {
1179 case CP_WINUNICODE:
1180 CodePage = CP_UTF8; /* Fall through... */
1181 case 0x0000C350: /* FIXME: CP_ #define */
1182 case CP_UTF7:
1183 case CP_UTF8:
1184 {
1185 DWORD dwMode = 0;
1186 INT lenW = len - 1;
1187 INT needed = dstlen - 1;
1188 HRESULT hr;
1189
1190 /* try the user supplied buffer first */
1191 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &lenW, lpDstStr, &needed);
1192 if (hr == S_OK)
1193 {
1194 lpDstStr[needed] = '\0';
1195 return needed + 1;
1196 }
1197
1198 /* user buffer too small. exclude termination and copy as much as possible */
1199 lenW = len;
1200 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &lenW, NULL, &needed);
1201 needed++;
1202 mem = malloc(needed);
1203 if (!mem)
1204 return 0;
1205
1206 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &len, mem, &needed);
1207 if (hr == S_OK)
1208 {
1209 reqLen = SHTruncateString(mem, dstlen);
1210 if (reqLen > 0) memcpy(lpDstStr, mem, reqLen-1);
1211 }
1212 free(mem);
1213 return 0;
1214 }
1215 default:
1216 break;
1217 }
1218
1219 /* try the user supplied buffer first */
1220 reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, lpDstStr, dstlen, NULL, NULL);
1221
1222 if (!reqLen && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
1223 {
1224 reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, NULL, 0, NULL, NULL);
1225 if (reqLen)
1226 {
1227 mem = malloc(reqLen);
1228 if (mem)
1229 {
1230 WideCharToMultiByte(CodePage, 0, lpSrcStr, len, mem, reqLen, NULL, NULL);
1231
1232 reqLen = SHTruncateString(mem, dstlen -1);
1233 reqLen++;
1234
1235 lstrcpynA(lpDstStr, mem, reqLen);
1236 free(mem);
1237 lpDstStr[reqLen-1] = '\0';
1238 }
1239 }
1240 }
1241 return reqLen;
1242}
#define CP_WINUNICODE
Definition: ddeml.h:33
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
DWORD WINAPI SHTruncateString(LPSTR lpStr, DWORD size)
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 1645 of file ordinal.c.

1646{
1647 DWORD dwEndTicks = GetTickCount() + dwTimeout;
1648 DWORD dwRet;
1649
1650 while ((dwRet = MsgWaitForMultipleObjectsEx(1, &hand, dwTimeout, QS_SENDMESSAGE, 0)) == 1)
1651 {
1652 MSG msg;
1653
1654 PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE);
1655
1656 if (dwTimeout != INFINITE)
1657 {
1658 if ((int)(dwTimeout = dwEndTicks - GetTickCount()) <= 0)
1659 return WAIT_TIMEOUT;
1660 }
1661 }
1662
1663 return dwRet;
1664}
#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

◆ SHWindowsPolicyGetValue()

HRESULT WINAPI SHWindowsPolicyGetValue ( _In_ REFGUID  rpolid,
_Out_opt_ PVOID  pvValue,
_Out_opt_ PDWORD  pcbValue 
)

Definition at line 289 of file policy.cpp.

293{
294 HRESULT hr = E_FAIL;
295
298 hr = g_pPolicyCache->GetValue(rpolid, pvValue, pcbValue);
300 return hr;
301}
HRESULT GetValue(_In_ REFGUID rpolid, _Out_opt_ PVOID pvValue, _Out_opt_ PDWORD pcbValue)
Definition: policy.cpp:143
static BOOL SHPolicyCache_Create(VOID)
Definition: policy.cpp:245
CPolicyCache * g_pPolicyCache
Definition: policy.cpp:241
CRITICAL_SECTION g_csPolicyLock
Definition: policy.cpp:242
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

◆ 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().

◆ StrCpyNXA()

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

◆ StrCpyNXW()

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

◆ 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}
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().