ReactOS 0.4.15-dev-8417-gb6b82fe
shlwapi_undoc.h File Reference
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 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
 

Typedefs

typedef struct tagPOLICYDATA POLICYDATA
 
typedef struct tagPOLICYDATALPPOLICYDATA
 

Enumerations

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

Functions

HANDLE WINAPI SHGlobalCounterCreate (REFGUID guid)
 
PVOID WINAPI SHInterlockedCompareExchange (PVOID *dest, PVOID xchg, PVOID compare)
 
LONG WINAPI SHGlobalCounterGetValue (HANDLE hGlobalCounter)
 
LONG WINAPI SHGlobalCounterIncrement (HANDLE hGlobalCounter)
 
DWORD WINAPI SHRestrictionLookup (_In_ DWORD policy, _In_ LPCWSTR key, _In_ const POLICYDATA *polTable, _Inout_ LPDWORD polArr)
 
BOOL WINAPI SHAboutInfoA (LPSTR lpszDest, DWORD dwDestLen)
 
BOOL WINAPI SHAboutInfoW (LPWSTR lpszDest, DWORD dwDestLen)
 
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)
 
HMENU WINAPI SHGetMenuFromID (HMENU hMenu, UINT uID)
 
DWORD WINAPI SHGetCurColorRes (void)
 
DWORD WINAPI SHWaitForSendMessageThread (HANDLE hand, DWORD dwTimeout)
 
DWORD WINAPI SHSendMessageBroadcastW (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT WINAPI SHIsExpandableFolder (LPSHELLFOLDER lpFolder, LPCITEMIDLIST pidl)
 
DWORD WINAPI SHFillRectClr (HDC hDC, LPCRECT pRect, COLORREF cRef)
 
int WINAPI SHSearchMapInt (const int *lpKeys, const int *lpValues, int iLen, int iKey)
 
VOID WINAPI IUnknown_Set (IUnknown **lppDest, IUnknown *lpUnknown)
 
HRESULT WINAPI MayQSForward (IUnknown *lpUnknown, PVOID lpReserved, REFGUID riidCmdGrp, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
 
HRESULT WINAPI MayExecForward (IUnknown *lpUnknown, INT iUnk, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
HRESULT WINAPI IsQSForward (REFGUID pguidCmdGroup, ULONG cCmds, 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)
 
HRESULT WINAPI SHRegGetCLSIDKeyW (REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU, BOOL bCreate, PHKEY phKey)
 
BOOL WINAPI SHAddDataBlock (LPDBLIST *lppList, const DATABLOCK_HEADER *lpNewItem)
 
BOOL WINAPI SHRemoveDataBlock (LPDBLIST *lppList, DWORD dwSignature)
 
DATABLOCK_HEADER *WINAPI SHFindDataBlock (LPDBLIST lpList, DWORD dwSignature)
 
HRESULT WINAPI SHWriteDataBlockList (IStream *lpStream, LPDBLIST lpList)
 
HRESULT WINAPI SHReadDataBlockList (IStream *lpStream, LPDBLIST *lppList)
 
VOID WINAPI SHFreeDataBlockList (LPDBLIST lpList)
 
LONG WINAPI RegCreateKeyExWrapW (_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
 
DWORD WINAPI SHExpandEnvironmentStringsA (LPCSTR, LPSTR, DWORD)
 
DWORD WINAPI SHExpandEnvironmentStringsW (LPCWSTR, LPWSTR, DWORD)
 
BOOL WINAPI SHIsEmptyStream (IStream *)
 
HRESULT WINAPI IStream_Size (IStream *lpStream, ULARGE_INTEGER *lpulSize)
 
HRESULT WINAPI SHInvokeDefaultCommand (HWND, IShellFolder *, LPCITEMIDLIST)
 
HRESULT WINAPI SHPropertyBag_ReadType (IPropertyBag *ppb, LPCWSTR pszPropName, VARIANTARG *pvarg, VARTYPE vt)
 
HRESULT WINAPI SHPropertyBag_ReadBOOL (IPropertyBag *ppb, LPCWSTR pszPropName, BOOL *pbValue)
 
BOOL WINAPI SHPropertyBag_ReadBOOLOld (IPropertyBag *ppb, LPCWSTR pszPropName, BOOL bDefValue)
 
HRESULT WINAPI SHPropertyBag_ReadSHORT (IPropertyBag *ppb, LPCWSTR pszPropName, SHORT *psValue)
 
HRESULT WINAPI SHPropertyBag_ReadInt (IPropertyBag *ppb, LPCWSTR pszPropName, LPINT pnValue)
 
HRESULT WINAPI SHPropertyBag_ReadLONG (IPropertyBag *ppb, LPCWSTR pszPropName, LPLONG pValue)
 
HRESULT WINAPI SHPropertyBag_ReadDWORD (IPropertyBag *ppb, LPCWSTR pszPropName, DWORD *pdwValue)
 
HRESULT WINAPI SHPropertyBag_ReadBSTR (IPropertyBag *ppb, LPCWSTR pszPropName, BSTR *pbstr)
 
HRESULT WINAPI SHPropertyBag_ReadStr (IPropertyBag *ppb, LPCWSTR pszPropName, LPWSTR pszDst, int cchMax)
 
HRESULT WINAPI SHPropertyBag_ReadPOINTL (IPropertyBag *ppb, LPCWSTR pszPropName, POINTL *pptl)
 
HRESULT WINAPI SHPropertyBag_ReadPOINTS (IPropertyBag *ppb, LPCWSTR pszPropName, POINTS *ppts)
 
HRESULT WINAPI SHPropertyBag_ReadRECTL (IPropertyBag *ppb, LPCWSTR pszPropName, RECTL *prcl)
 
HRESULT WINAPI SHPropertyBag_ReadGUID (IPropertyBag *ppb, LPCWSTR pszPropName, GUID *pguid)
 
HRESULT WINAPI SHPropertyBag_ReadStream (IPropertyBag *ppb, LPCWSTR pszPropName, IStream **ppStream)
 
INT WINAPI SHGetPerScreenResName (_Out_writes_(cchBuffer) LPWSTR pszBuffer, _In_ INT cchBuffer, _In_ DWORD dwReserved)
 
HRESULT WINAPI SHPropertyBag_Delete (IPropertyBag *ppb, LPCWSTR pszPropName)
 
HRESULT WINAPI SHPropertyBag_WriteBOOL (IPropertyBag *ppb, LPCWSTR pszPropName, BOOL bValue)
 
HRESULT WINAPI SHPropertyBag_WriteSHORT (IPropertyBag *ppb, LPCWSTR pszPropName, SHORT sValue)
 
HRESULT WINAPI SHPropertyBag_WriteInt (IPropertyBag *ppb, LPCWSTR pszPropName, INT nValue)
 
HRESULT WINAPI SHPropertyBag_WriteLONG (IPropertyBag *ppb, LPCWSTR pszPropName, LONG lValue)
 
HRESULT WINAPI SHPropertyBag_WriteDWORD (IPropertyBag *ppb, LPCWSTR pszPropName, DWORD dwValue)
 
HRESULT WINAPI SHPropertyBag_WriteStr (IPropertyBag *ppb, LPCWSTR pszPropName, LPCWSTR pszValue)
 
HRESULT WINAPI SHPropertyBag_WriteGUID (IPropertyBag *ppb, LPCWSTR pszPropName, const GUID *pguid)
 
HRESULT WINAPI SHPropertyBag_WriteStream (IPropertyBag *ppb, LPCWSTR pszPropName, IStream *pStream)
 
HRESULT WINAPI SHPropertyBag_WritePOINTL (IPropertyBag *ppb, LPCWSTR pszPropName, const POINTL *pptl)
 
HRESULT WINAPI SHPropertyBag_WritePOINTS (IPropertyBag *ppb, LPCWSTR pszPropName, const POINTS *ppts)
 
HRESULT WINAPI SHPropertyBag_WriteRECTL (IPropertyBag *ppb, LPCWSTR pszPropName, const RECTL *prcl)
 
HRESULT WINAPI SHCreatePropertyBagOnMemory (_In_ DWORD dwMode, _In_ REFIID riid, _Out_ void **ppvObj)
 
HRESULT WINAPI SHCreatePropertyBagOnRegKey (_In_ HKEY hKey, _In_z_ LPCWSTR pszSubKey, _In_ DWORD dwMode, _In_ REFIID riid, _Out_ void **ppvObj)
 
HRESULT WINAPI SHCreatePropertyBagOnProfileSection (_In_z_ LPCWSTR lpFileName, _In_opt_z_ LPCWSTR pszSection, _In_ DWORD dwMode, _In_ REFIID riid, _Out_ void **ppvObj)
 
EXTERN_C HRESULT WINAPI IUnknown_QueryServicePropertyBag (_In_ IUnknown *punk, _In_ long flags, _In_ REFIID riid, _Outptr_ void **ppvObj)
 
HWND WINAPI SHCreateWorkerWindowA (WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
 
HWND WINAPI SHCreateWorkerWindowW (WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
 
HRESULT WINAPI IUnknown_SetOwner (IUnknown *iface, IUnknown *pUnk)
 
HRESULT WINAPI IUnknown_GetClassID (IUnknown *lpUnknown, CLSID *lpClassId)
 
HRESULT WINAPI IUnknown_QueryServiceExec (IUnknown *lpUnknown, REFIID service, const GUID *group, DWORD cmdId, DWORD cmdOpt, VARIANT *pIn, VARIANT *pOut)
 
HRESULT WINAPI IUnknown_UIActivateIO (IUnknown *unknown, BOOL activate, LPMSG msg)
 
HRESULT WINAPI IUnknown_TranslateAcceleratorOCS (IUnknown *lpUnknown, LPMSG lpMsg, DWORD dwModifiers)
 
HRESULT WINAPI IUnknown_OnFocusOCS (IUnknown *lpUnknown, BOOL fGotFocus)
 
HRESULT WINAPI IUnknown_HandleIRestrict (LPUNKNOWN lpUnknown, PVOID lpArg1, PVOID lpArg2, PVOID lpArg3, PVOID lpArg4)
 
HRESULT WINAPI IUnknown_HasFocusIO (IUnknown *punk)
 
HRESULT WINAPI IUnknown_TranslateAcceleratorIO (IUnknown *punk, MSG *pmsg)
 
HRESULT WINAPI IUnknown_OnFocusChangeIS (LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
 
DWORD WINAPI SHAnsiToUnicode (LPCSTR lpSrcStr, LPWSTR lpDstStr, INT iLen)
 
INT WINAPI SHUnicodeToAnsi (LPCWSTR lpSrcStr, LPSTR lpDstStr, INT iLen)
 
DWORD WINAPI SHAnsiToUnicodeCP (DWORD dwCp, LPCSTR lpSrcStr, LPWSTR lpDstStr, int iLen)
 
DWORD WINAPI SHUnicodeToAnsiCP (UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr, int dstlen)
 
PVOID WINAPI SHLockSharedEx (HANDLE hData, DWORD dwProcessId, BOOL bWriteAccess)
 
DWORD WINAPI SHGetValueGoodBootA (HKEY hkey, LPCSTR pSubKey, LPCSTR pValue, LPDWORD pwType, LPVOID pvData, LPDWORD pbData)
 
DWORD WINAPI SHGetValueGoodBootW (HKEY hkey, LPCWSTR pSubKey, LPCWSTR pValue, LPDWORD pwType, LPVOID pvData, LPDWORD pbData)
 
HRESULT WINAPI SHLoadRegUIStringA (HKEY hkey, LPCSTR value, LPSTR buf, DWORD size)
 
HRESULT WINAPI SHLoadRegUIStringW (HKEY hkey, LPCWSTR value, LPWSTR buf, DWORD size)
 
DWORD WINAPI SHGetIniStringW (_In_z_ LPCWSTR appName, _In_z_ LPCWSTR keyName, _Out_writes_to_(outLen, return+1) LPWSTR out, _In_ DWORD outLen, _In_z_ LPCWSTR filename)
 
BOOL WINAPI SHSetIniStringW (_In_z_ LPCWSTR appName, _In_z_ LPCWSTR keyName, _In_opt_z_ LPCWSTR str, _In_z_ LPCWSTR filename)
 
DWORD WINAPI SHGetIniStringUTF7W (_In_opt_z_ LPCWSTR lpAppName, _In_z_ LPCWSTR lpKeyName, _Out_writes_to_(nSize, return+1) _Post_z_ LPWSTR lpReturnedString, _In_ DWORD nSize, _In_z_ LPCWSTR lpFileName)
 
BOOL WINAPI SHSetIniStringUTF7W (_In_z_ LPCWSTR lpAppName, _In_z_ LPCWSTR lpKeyName, _In_opt_z_ LPCWSTR lpString, _In_z_ LPCWSTR lpFileName)
 
HKEY WINAPI SHGetShellKey (DWORD flags, LPCWSTR sub_key, BOOL create)
 
int WINAPIV ShellMessageBoxWrapW (_In_opt_ HINSTANCE hAppInst, _In_opt_ HWND hWnd, _In_ LPCWSTR lpcText, _In_opt_ LPCWSTR lpcTitle, _In_ UINT fuStyle,...)
 
BOOL WINAPI PathFileExistsDefExtW (LPWSTR lpszPath, DWORD dwWhich)
 
BOOL WINAPI PathFileExistsDefExtAndAttributesW (_Inout_ LPWSTR pszPath, _In_ DWORD dwWhich, _Out_opt_ LPDWORD pdwFileAttributes)
 
BOOL WINAPI PathFindOnPathExW (LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich)
 
VOID WINAPI FixSlashesAndColonW (LPWSTR)
 
BOOL WINAPI PathIsValidCharA (char c, DWORD dwClass)
 
BOOL WINAPI PathIsValidCharW (WCHAR c, DWORD dwClass)
 
BOOL WINAPI SHGetPathFromIDListWrapW (LPCITEMIDLIST pidl, LPWSTR pszPath)
 
BOOL WINAPI IContextMenu_Invoke (_In_ IContextMenu *pContextMenu, _In_ HWND hwnd, _In_ LPCSTR lpVerb, _In_ UINT uFlags)
 
DWORD WINAPI SHGetObjectCompatFlags (IUnknown *pUnk, const CLSID *clsid)
 

Macro Definition Documentation

◆ PATH_CHAR_CLASS_ANY

#define PATH_CHAR_CLASS_ANY   0xffffffff

Definition at line 341 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_ASTERIX

#define PATH_CHAR_CLASS_ASTERIX   0x00000002

Definition at line 331 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_BACKSLASH

#define PATH_CHAR_CLASS_BACKSLASH   0x00000008

Definition at line 333 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COLON

#define PATH_CHAR_CLASS_COLON   0x00000010

Definition at line 334 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COMMA

#define PATH_CHAR_CLASS_COMMA   0x00000040

Definition at line 336 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOT

#define PATH_CHAR_CLASS_DOT   0x00000004

Definition at line 332 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOUBLEQUOTE

#define PATH_CHAR_CLASS_DOUBLEQUOTE   0x00000200

Definition at line 339 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_INVALID

#define PATH_CHAR_CLASS_INVALID   0x00000000

Definition at line 340 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_LETTER

#define PATH_CHAR_CLASS_LETTER   0x00000001

Definition at line 330 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_OTHER_VALID

#define PATH_CHAR_CLASS_OTHER_VALID   0x00000100

Definition at line 338 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SEMICOLON

#define PATH_CHAR_CLASS_SEMICOLON   0x00000020

Definition at line 335 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SPACE

#define PATH_CHAR_CLASS_SPACE   0x00000080

Definition at line 337 of file shlwapi_undoc.h.

◆ SHAboutInfo

#define SHAboutInfo   SHAboutInfoA

Definition at line 77 of file shlwapi_undoc.h.

◆ SHCreateWorkerWindow

#define SHCreateWorkerWindow   SHCreateWorkerWindowA

Definition at line 222 of file shlwapi_undoc.h.

◆ SHELL_GCOUNTER_DECLAREPARAMETERS

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

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

◆ SHELL_GCOUNTER_DEFINE_HANDLE

#define SHELL_GCOUNTER_DEFINE_HANDLE (   name)    HANDLE name = NULL

Definition at line 52 of file shlwapi_undoc.h.

◆ SHELL_GCOUNTER_PARAMETERS

#define SHELL_GCOUNTER_PARAMETERS (   handle,
  id 
)    handle

Definition at line 53 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:86
Definition: scsiwmi.h:51

Definition at line 54 of file shlwapi_undoc.h.

◆ SHELL_GlobalCounterGet

#define SHELL_GlobalCounterGet (   handle)    SHGlobalCounterGetValue(handle)

Definition at line 60 of file shlwapi_undoc.h.

◆ SHELL_GlobalCounterIncrement

#define SHELL_GlobalCounterIncrement (   handle)    SHGlobalCounterIncrement(handle)

Definition at line 61 of file shlwapi_undoc.h.

◆ SHELL_GlobalCounterIsInitialized

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

Definition at line 59 of file shlwapi_undoc.h.

◆ SHELL_NO_POLICY

#define SHELL_NO_POLICY   ((DWORD)-1)

Definition at line 28 of file shlwapi_undoc.h.

◆ SHExpandEnvironmentStrings

#define SHExpandEnvironmentStrings   SHExpandEnvironmentStringsA

Definition at line 137 of file shlwapi_undoc.h.

◆ SHGetValueGoodBoot

#define SHGetValueGoodBoot   SHGetValueGoodBootA

Definition at line 254 of file shlwapi_undoc.h.

◆ SHLoadRegUIString

#define SHLoadRegUIString   SHLoadRegUIStringA

Definition at line 255 of file shlwapi_undoc.h.

◆ WHICH_BAT

#define WHICH_BAT   (1 << 3)

Definition at line 322 of file shlwapi_undoc.h.

◆ WHICH_CMD

#define WHICH_CMD   (1 << 5)

Definition at line 324 of file shlwapi_undoc.h.

◆ WHICH_COM

#define WHICH_COM   (1 << 1)

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

◆ WHICH_EXE

#define WHICH_EXE   (1 << 2)

Definition at line 321 of file shlwapi_undoc.h.

◆ WHICH_LNK

#define WHICH_LNK   (1 << 4)

Definition at line 323 of file shlwapi_undoc.h.

◆ WHICH_OPTIONAL

#define WHICH_OPTIONAL   (1 << 6)

Definition at line 325 of file shlwapi_undoc.h.

◆ WHICH_PIF

#define WHICH_PIF   (1 << 0)

Definition at line 319 of file shlwapi_undoc.h.

Typedef Documentation

◆ LPPOLICYDATA

◆ POLICYDATA

Enumeration Type Documentation

◆ _shellkey_flags

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

Definition at line 288 of file shlwapi_undoc.h.

289{
290 SHKEY_Root_HKCU = 0x1,
291 SHKEY_Root_HKLM = 0x2,
292 SHKEY_Key_Explorer = 0x00,
293 SHKEY_Key_Shell = 0x10,
295 SHKEY_Key_Classes = 0x30,
296 SHKEY_Subkey_Default = 0x0000,
298 SHKEY_Subkey_Handlers = 0x2000,
300 SHKEY_Subkey_Volatile = 0x4000,
301 SHKEY_Subkey_MUICache = 0x5000,
302 SHKEY_Subkey_FileExts = 0x6000
303};
@ 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

◆ ConnectToConnectionPoint()

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

Definition at line 1189 of file ordinal.c.

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

Referenced by init_pointers().

◆ FixSlashesAndColonW()

VOID WINAPI FixSlashesAndColonW ( LPWSTR  lpwstr)

Definition at line 4514 of file ordinal.c.

4515{
4516 while (*lpwstr)
4517 {
4518 if (*lpwstr == '/')
4519 *lpwstr = '\\';
4520 lpwstr++;
4521 }
4522}

Referenced by PathQualifyExW().

◆ IContextMenu_Invoke()

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

Definition at line 45 of file utils.cpp.

50{
51 CMINVOKECOMMANDINFO info;
52 BOOL ret = FALSE;
53 INT iDefItem = 0;
54 HMENU hMenu = NULL;
55 HCURSOR hOldCursor;
56
57 TRACE("(%p, %p, %s, %u)\n", pContextMenu, hwnd, debugstr_a(lpVerb), uFlags);
58
59 if (!pContextMenu)
60 return FALSE;
61
62 hOldCursor = SetCursor(LoadCursorW(NULL, (LPCWSTR)IDC_WAIT));
63
64 ZeroMemory(&info, sizeof(info));
65 info.cbSize = sizeof(info);
66 info.hwnd = hwnd;
67 info.nShow = SW_NORMAL;
68 info.lpVerb = lpVerb;
69
70 if (IS_INTRESOURCE(lpVerb))
71 {
72 hMenu = CreatePopupMenu();
73 if (hMenu)
74 {
75 pContextMenu->QueryContextMenu(hMenu, 0, 1, MAXSHORT, uFlags | CMF_DEFAULTONLY);
76 iDefItem = GetMenuDefaultItem(hMenu, 0, 0);
77 if (iDefItem != -1)
78 info.lpVerb = MAKEINTRESOURCEA(iDefItem - 1);
79 }
80 }
81
82 if (iDefItem != -1 || info.lpVerb)
83 {
84 if (!hwnd)
85 info.fMask |= CMIC_MASK_FLAG_NO_UI;
86 ret = SUCCEEDED(pContextMenu->InvokeCommand(&info));
87 }
88
89 /* Invoking itself doesn't need the menu object, but getting the command info
90 needs the menu. */
91 if (hMenu)
92 DestroyMenu(hMenu);
93
94 SetCursor(hOldCursor);
95
96 return ret;
97}
#define FALSE
Definition: types.h:117
UINT uFlags
Definition: api.c:59
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_a
Definition: kernel32.h:31
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define TRACE(s)
Definition: solgame.cpp:4
int32_t INT
Definition: typedefs.h:58
#define MAXSHORT
Definition: umtypes.h:114
int ret
#define ZeroMemory
Definition: winbase.h:1712
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
HICON HCURSOR
Definition: windef.h:299
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:838
UINT WINAPI GetMenuDefaultItem(_In_ HMENU hMenu, _In_ UINT fByPos, _In_ UINT gmdiFlags)
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2149
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define IDC_WAIT
Definition: winuser.h:689
#define SW_NORMAL
Definition: winuser.h:769
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ IsQSForward()

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

Definition at line 2231 of file ordinal.c.

2232{
2233 FIXME("(%p,%d,%p) - stub!\n", pguidCmdGroup, cCmds, prgCmds);
2235}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define DRAGDROP_E_NOTREGISTERED
Definition: winerror.h:2652

◆ IStream_Size()

HRESULT WINAPI IStream_Size ( IStream lpStream,
ULARGE_INTEGER lpulSize 
)

Definition at line 661 of file istream.c.

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

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

◆ IUnknown_Exec()

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

Definition at line 1083 of file ordinal.c.

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

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

◆ IUnknown_GetClassID()

HRESULT WINAPI IUnknown_GetClassID ( IUnknown lpUnknown,
CLSID lpClassId 
)

Definition at line 1453 of file ordinal.c.

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

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

◆ IUnknown_HandleIRestrict()

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

Definition at line 1949 of file ordinal.c.

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

◆ IUnknown_HasFocusIO()

HRESULT WINAPI IUnknown_HasFocusIO ( IUnknown punk)

Definition at line 4295 of file ordinal.c.

4296{
4297 IInputObject* lpInput = NULL;
4298 HRESULT hRet = E_INVALIDARG;
4299
4300 TRACE("(%p)\n", lpUnknown);
4301 if (lpUnknown)
4302 {
4303 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
4304 (void**)&lpInput);
4305 if (SUCCEEDED(hRet) && lpInput)
4306 {
4307 hRet = IInputObject_HasFocusIO(lpInput);
4308 IInputObject_Release(lpInput);
4309 }
4310 }
4311 return hRet;
4312}
#define IInputObject_HasFocusIO(p)
Definition: shlobj.h:714
#define IInputObject_Release(p)
Definition: shlobj.h:711

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

4768{
4769 IInputObjectSite *pIOS = NULL;
4770 HRESULT hRet = E_INVALIDARG;
4771
4772 TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
4773
4774 if (lpUnknown)
4775 {
4776 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
4777 (void **)&pIOS);
4778 if (SUCCEEDED(hRet) && pIOS)
4779 {
4780 hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
4782 }
4783 }
4784 return hRet;
4785}
#define IInputObjectSite_Release(p)
Definition: shlobj.h:735
#define IInputObjectSite_OnFocusChangeIS(p, a, b)
Definition: shlobj.h:737

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

◆ IUnknown_OnFocusOCS()

HRESULT WINAPI IUnknown_OnFocusOCS ( IUnknown lpUnknown,
BOOL  fGotFocus 
)

Definition at line 1927 of file ordinal.c.

1928{
1929 IOleControlSite* lpCSite = NULL;
1930 HRESULT hRet = E_FAIL;
1931
1932 TRACE("(%p, %d)\n", lpUnknown, fGotFocus);
1933 if (lpUnknown)
1934 {
1935 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
1936 (void**)&lpCSite);
1937 if (SUCCEEDED(hRet) && lpCSite)
1938 {
1939 hRet = IOleControlSite_OnFocus(lpCSite, fGotFocus);
1940 IOleControlSite_Release(lpCSite);
1941 }
1942 }
1943 return hRet;
1944}
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 1549 of file ordinal.c.

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

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

◆ IUnknown_QueryServicePropertyBag()

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

Definition at line 1967 of file propbag.cpp.

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

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

◆ IUnknown_QueryStatus()

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

Definition at line 1044 of file ordinal.c.

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

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

◆ IUnknown_Set()

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

Definition at line 2186 of file ordinal.c.

2187{
2188 TRACE("(%p,%p)\n", lppDest, lpUnknown);
2189
2190 IUnknown_AtomicRelease(lppDest);
2191
2192 if (lpUnknown)
2193 {
2194 IUnknown_AddRef(lpUnknown);
2195 *lppDest = lpUnknown;
2196 }
2197}
void WINAPI IUnknown_AtomicRelease(IUnknown **lpUnknown)
Definition: ordinal.c:1241

◆ IUnknown_SetOwner()

HRESULT WINAPI IUnknown_SetOwner ( IUnknown iface,
IUnknown pUnk 
)

Definition at line 1381 of file ordinal.c.

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

Referenced by CTrayBandSite::AddContextMenus().

◆ IUnknown_TranslateAcceleratorIO()

HRESULT WINAPI IUnknown_TranslateAcceleratorIO ( IUnknown punk,
MSG pmsg 
)

◆ IUnknown_TranslateAcceleratorOCS()

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

Definition at line 1894 of file ordinal.c.

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

◆ IUnknown_UIActivateIO()

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

Definition at line 1629 of file ordinal.c.

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

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

◆ MayExecForward()

HRESULT WINAPI MayExecForward ( IUnknown lpUnknown,
INT  iUnk,
REFGUID  pguidCmdGroup,
DWORD  nCmdID,
DWORD  nCmdexecopt,
VARIANT pvaIn,
VARIANT pvaOut 
)

Definition at line 2218 of file ordinal.c.

2221{
2222 FIXME("(%p,%d,%p,%d,%d,%p,%p) - stub!\n", lpUnknown, iUnk, pguidCmdGroup,
2223 nCmdID, nCmdexecopt, pvaIn, pvaOut);
2225}

◆ MayQSForward()

HRESULT WINAPI MayQSForward ( IUnknown lpUnknown,
PVOID  lpReserved,
REFGUID  riidCmdGrp,
ULONG  cCmds,
OLECMD *  prgCmds,
OLECMDTEXT *  pCmdText 
)

Definition at line 2203 of file ordinal.c.

2206{
2207 FIXME("(%p,%p,%p,%d,%p,%p) - stub\n",
2208 lpUnknown, lpReserved, riidCmdGrp, cCmds, prgCmds, pCmdText);
2209
2210 /* FIXME: Calls IsQSForward & IUnknown_QueryStatus */
2212}

◆ PathFileExistsDefExtAndAttributesW()

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

Definition at line 108 of file utils.cpp.

112{
113 TRACE("(%s, 0x%lX, %p)\n", debugstr_w(pszPath), dwWhich, pdwFileAttributes);
114
115 if (pdwFileAttributes)
116 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
117
118 if (!pszPath)
119 return FALSE;
120
121 if (!dwWhich || (*PathFindExtensionW(pszPath) && (dwWhich & WHICH_OPTIONAL)))
122 return PathFileExistsAndAttributesW(pszPath, pdwFileAttributes);
123
124 if (!PathFileExistsDefExtW(pszPath, dwWhich))
125 {
126 if (pdwFileAttributes)
127 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
128 return FALSE;
129 }
130
131 if (pdwFileAttributes)
132 *pdwFileAttributes = GetFileAttributesW(pszPath);
133
134 return TRUE;
135}
#define TRUE
Definition: types.h:120
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr)
Definition: path.c:1832
BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich)
Definition: path.c:1117
#define debugstr_w
Definition: kernel32.h:32
#define WHICH_OPTIONAL
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23

Referenced by START_TEST().

◆ PathFileExistsDefExtW()

BOOL WINAPI PathFileExistsDefExtW ( LPWSTR  lpszPath,
DWORD  dwWhich 
)

Definition at line 1117 of file path.c.

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

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

◆ PathFindOnPathExW()

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

Definition at line 1351 of file path.c.

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

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

◆ PathIsValidCharA()

BOOL WINAPI PathIsValidCharA ( char  c,
DWORD  dwClass 
)

Definition at line 4406 of file path.c.

4407{
4408 if ((unsigned)c > 0x7e)
4409 return class & PATH_CHAR_CLASS_OTHER_VALID;
4410
4411 return class & SHELL_charclass[(unsigned)c];
4412}
#define PATH_CHAR_CLASS_OTHER_VALID
Definition: path.c:4326
static const DWORD SHELL_charclass[]
Definition: path.c:4333
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 4419 of file path.c.

4420{
4421 if (c > 0x7e)
4422 return class & PATH_CHAR_CLASS_OTHER_VALID;
4423
4424 return class & SHELL_charclass[c];
4425}
#define c
Definition: ke_i.h:80

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

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

◆ SHAboutInfoA()

BOOL WINAPI SHAboutInfoA ( LPSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 911 of file ordinal.c.

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

◆ SHAboutInfoW()

BOOL WINAPI SHAboutInfoW ( LPWSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 930 of file ordinal.c.

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

Referenced by SHAboutInfoA().

◆ SHAddDataBlock()

BOOL WINAPI SHAddDataBlock ( LPDBLIST lppList,
const DATABLOCK_HEADER lpNewItem 
)

Definition at line 68 of file clist.c.

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

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

2643{
2644 DWORD dwRet;
2645
2646 dwRet = MultiByteToWideChar(dwCp, 0, lpSrcStr, -1, lpDstStr, iLen);
2647 TRACE("%s->%s,ret=%d\n", debugstr_a(lpSrcStr), debugstr_w(lpDstStr), dwRet);
2648 return dwRet;
2649}
#define MultiByteToWideChar
Definition: compat.h:110

Referenced by SHAnsiToUnicode().

◆ SHCheckMenuItem()

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

Definition at line 1796 of file ordinal.c.

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

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

◆ SHCreatePropertyBagOnMemory()

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

Definition at line 254 of file propbag.cpp.

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

Referenced by SHCreatePropertyBag(), and SHPropertyBag_OnMemory().

◆ SHCreatePropertyBagOnProfileSection()

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

Definition at line 965 of file propbag.cpp.

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

Referenced by SHPropertyBag_OnIniFile().

◆ SHCreatePropertyBagOnRegKey()

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

Definition at line 575 of file propbag.cpp.

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

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

2677{
2678 static const char szClass[] = "WorkerA";
2679 WNDCLASSA wc;
2680 HWND hWnd;
2681
2682 TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
2683 wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2684
2685 /* Create Window class */
2686 wc.style = 0;
2688 wc.cbClsExtra = 0;
2689 wc.cbWndExtra = sizeof(LONG_PTR);
2691 wc.hIcon = NULL;
2693 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
2694 wc.lpszMenuName = NULL;
2695 wc.lpszClassName = szClass;
2696
2697 SHRegisterClassA(&wc);
2698
2699 hWnd = CreateWindowExA(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
2700 hWndParent, hMenu, shlwapi_hInstance, 0);
2701 if (hWnd)
2702 {
2703 SetWindowLongPtrW(hWnd, 0, wnd_extra);
2705 }
2706
2707 return hWnd;
2708}
HWND hWnd
Definition: settings.c:17
HINSTANCE shlwapi_hInstance
Definition: shlwapi_main.c:33
DWORD WINAPI SHRegisterClassA(WNDCLASSA *wndclass)
Definition: ordinal.c:1813
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:3170
HICON hIcon
Definition: winuser.h:3168
HINSTANCE hInstance
Definition: winuser.h:3167
HCURSOR hCursor
Definition: winuser.h:3169
int cbWndExtra
Definition: winuser.h:3166
UINT style
Definition: winuser.h:3163
LPCSTR lpszMenuName
Definition: winuser.h:3171
LPCSTR lpszClassName
Definition: winuser.h:3172
WNDPROC lpfnWndProc
Definition: winuser.h:3164
int cbClsExtra
Definition: winuser.h:3165
#define LONG_PTR
Definition: treelist.c:79
#define GWLP_WNDPROC
Definition: treelist.c:66
#define SetWindowLongPtrA
Definition: winuser.h:5354
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:687
#define SetWindowLongPtrW
Definition: winuser.h:5355
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2134
#define COLOR_BTNFACE
Definition: winuser.h:928
char * LPSTR
Definition: xmlstorage.h:182

Referenced by init_pointers(), and SHCreateWorkerWindowW().

◆ SHCreateWorkerWindowW()

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

Definition at line 3000 of file ordinal.c.

3002{
3003 static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', 0 };
3004 WNDCLASSW wc;
3005 HWND hWnd;
3006
3007 TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
3008 wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
3009
3010 /* If our OS is natively ANSI, use the ANSI version */
3011 if (GetVersion() & 0x80000000) /* not NT */
3012 {
3013 TRACE("fallback to ANSI, ver 0x%08x\n", GetVersion());
3014 return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
3015 }
3016
3017 /* Create Window class */
3018 wc.style = 0;
3020 wc.cbClsExtra = 0;
3021 wc.cbWndExtra = sizeof(LONG_PTR);
3023 wc.hIcon = NULL;
3025 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
3026 wc.lpszMenuName = NULL;
3027 wc.lpszClassName = szClass;
3028
3029 SHRegisterClassW(&wc);
3030
3031 hWnd = CreateWindowExW(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
3032 hWndParent, hMenu, shlwapi_hInstance, 0);
3033 if (hWnd)
3034 {
3035 SetWindowLongPtrW(hWnd, 0, wnd_extra);
3037 }
3038
3039 return hWnd;
3040}
DWORD WINAPI SHRegisterClassW(WNDCLASSW *lpWndClass)
Definition: ordinal.c:2555
HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2675
DWORD WINAPI GetVersion()
Definition: redirtest.c:5
LPCWSTR lpszClassName
Definition: winuser.h:3185
LPCWSTR lpszMenuName
Definition: winuser.h:3184
HBRUSH hbrBackground
Definition: winuser.h:3183
HICON hIcon
Definition: winuser.h:3181
HINSTANCE hInstance
Definition: winuser.h:3180
int cbClsExtra
Definition: winuser.h:3178
UINT style
Definition: winuser.h:3176
WNDPROC lpfnWndProc
Definition: winuser.h:3177
int cbWndExtra
Definition: winuser.h:3179
HCURSOR hCursor
Definition: winuser.h:3182
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

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

◆ ShellMessageBoxWrapW()

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

◆ SHEnableMenuItem()

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

Definition at line 1777 of file ordinal.c.

1778{
1779 TRACE("%p, %u, %d\n", hMenu, wItemID, bEnable);
1780 return EnableMenuItem(hMenu, wItemID, bEnable ? MF_ENABLED : MF_GRAYED);
1781}
_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 2129 of file ordinal.c.

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

◆ SHFindDataBlock()

DATABLOCK_HEADER *WINAPI SHFindDataBlock ( LPDBLIST  lpList,
DWORD  dwSignature 
)

Definition at line 424 of file clist.c.

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

Referenced by CShellLink::CopyDataBlock(), CShellLink::GetAdvertiseInfo(), CShellLink::GetIconLocation(), CShellLink::GetPath(), CShellLink::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 /* First try to use the IContextMenu3 interface */
19 hr = IUnknown_QueryInterface(pUnk, &IID_IContextMenu3, (void**)&pcmenu3);
20 if (SUCCEEDED(hr))
21 {
22 hr = IContextMenu3_HandleMenuMsg2(pcmenu3, uMsg, wParam, lParam, pResult);
23 IContextMenu3_Release(pcmenu3);
24 return hr;
25 }
26
27 /* Return failure if we can't use the IContextMenu2 interface */
28 if(!useIContextMenu2)
29 return hr;
30
31 /* Now try to use the IContextMenu2 interface */
32 hr = IUnknown_QueryInterface(pUnk, &IID_IContextMenu2, (void**)&pcmenu2);
33 if (FAILED(hr))
34 return hr;
35
36 hr = IContextMenu2_HandleMenuMsg(pcmenu2, uMsg, wParam, lParam);
37 IContextMenu2_Release(pcmenu2);
38 return hr;
39}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139

Referenced by BrFolderDlgProc(), DumpMenu(), CDefaultContextMenu::HandleMenuMsg2(), and CDefView::OnCustomItem().

◆ SHFreeDataBlockList()

VOID WINAPI SHFreeDataBlockList ( LPDBLIST  lpList)

Definition at line 331 of file clist.c.

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

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

◆ SHGetCurColorRes()

DWORD WINAPI SHGetCurColorRes ( void  )

Definition at line 2019 of file ordinal.c.

2020{
2021 HDC hdc;
2022 DWORD ret;
2023
2024 TRACE("()\n");
2025
2026 hdc = GetDC(0);
2028 ReleaseDC(0, hdc);
2029 return ret;
2030}
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
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().

◆ SHGetIniStringUTF7W()

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

Definition at line 722 of file propbag.cpp.

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

Referenced by CIniPropertyBag::Read().

◆ SHGetIniStringW()

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

Definition at line 602 of file propbag.cpp.

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

Referenced by SHGetIniStringUTF7W().

◆ SHGetMenuFromID()

HMENU WINAPI SHGetMenuFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 1993 of file ordinal.c.

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

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

◆ SHGetObjectCompatFlags()

DWORD WINAPI SHGetObjectCompatFlags ( IUnknown pUnk,
const CLSID clsid 
)

Definition at line 6278 of file ordinal.c.

6279{
6280 static const WCHAR compatpathW[] =
6281 {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
6282 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
6283 'S','h','e','l','l','C','o','m','p','a','t','i','b','i','l','i','t','y','\\',
6284 'O','b','j','e','c','t','s','\\','%','s',0};
6285 WCHAR strW[sizeof(compatpathW)/sizeof(WCHAR) + 38 /* { CLSID } */];
6286 DWORD ret, length = sizeof(strW)/sizeof(WCHAR);
6287 OLECHAR *clsid_str;
6288 HKEY key;
6289 INT i;
6290
6291 TRACE("%p %s\n", pUnk, debugstr_guid(clsid));
6292
6293 if (!pUnk && !clsid) return 0;
6294
6295 if (pUnk && !clsid)
6296 {
6297 FIXME("iface not handled\n");
6298 return 0;
6299 }
6300
6301 StringFromCLSID(clsid, &clsid_str);
6302 sprintfW(strW, compatpathW, clsid_str);
6303 CoTaskMemFree(clsid_str);
6304
6306 if (ret != ERROR_SUCCESS) return 0;
6307
6308 /* now collect flag values */
6309 ret = 0;
6310 for (i = 0; RegEnumValueW(key, i, strW, &length, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; i++)
6311 {
6312 INT left, right, res, x;
6313
6314 /* search in table */
6315 left = 0;
6316 right = sizeof(objcompat_table) / sizeof(struct objcompat_entry) - 1;
6317
6318 while (right >= left) {
6319 x = (left + right) / 2;
6321 if (res == 0)
6322 {
6323 ret |= objcompat_table[x].value;
6324 break;
6325 }
6326 else if (res < 0)
6327 right = x - 1;
6328 else
6329 left = x + 1;
6330 }
6331
6332 length = sizeof(strW)/sizeof(WCHAR);
6333 }
6334
6335 return ret;
6336}
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3268
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
Definition: reg.c:2830
WCHAR OLECHAR
Definition: compat.h:2292
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
static const struct objcompat_entry objcompat_table[]
Definition: ordinal.c:6236
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint res
Definition: glext.h:9613
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
WCHAR strW[12]
Definition: clipboard.c:2029
#define strcmpW(s1, s2)
Definition: unicode.h:44
#define sprintfW
Definition: unicode.h:64
Definition: copy.c:22
Definition: name.c:39
Definition: ordinal.c:6230

Referenced by init_pointers(), and SHGetAttributes().

◆ SHGetPathFromIDListWrapW()

BOOL WINAPI SHGetPathFromIDListWrapW ( LPCITEMIDLIST  pidl,
LPWSTR  pszPath 
)

Definition at line 3464 of file ordinal.c.

3465{
3466 return SHGetPathFromIDListW(pidl, pszPath);
3467}
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1342

Referenced by _ILIsNetworkPlace().

◆ SHGetPerScreenResName()

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

Definition at line 1938 of file propbag.cpp.

1942{
1943 if (dwReserved)
1944 return 0;
1945
1946 HDC hDC = ::GetDC(NULL);
1947 INT cxWidth = ::GetDeviceCaps(hDC, HORZRES);
1948 INT cyHeight = ::GetDeviceCaps(hDC, VERTRES);
1949 INT cMonitors = ::GetSystemMetrics(SM_CMONITORS);
1951
1952 StringCchPrintfW(pszBuffer, cchBuffer, L"%dx%d(%d)", cxWidth, cyHeight, cMonitors);
1953 return lstrlenW(pszBuffer);
1954}
static DWORD cchBuffer
Definition: fusion.c:85
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
#define HORZRES
Definition: wingdi.h:716
#define VERTRES
Definition: wingdi.h:717
#define SM_CMONITORS
Definition: winuser.h:1040
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 4585 of file ordinal.c.

4586{
4587#ifndef __REACTOS__
4588 enum _shellkey_flags {
4589 SHKEY_Root_HKCU = 0x1,
4590 SHKEY_Root_HKLM = 0x2,
4591 SHKEY_Key_Explorer = 0x00,
4592 SHKEY_Key_Shell = 0x10,
4593 SHKEY_Key_ShellNoRoam = 0x20,
4594 SHKEY_Key_Classes = 0x30,
4595 SHKEY_Subkey_Default = 0x0000,
4597 SHKEY_Subkey_Handlers = 0x2000,
4599 SHKEY_Subkey_Volatile = 0x4000,
4600 SHKEY_Subkey_MUICache = 0x5000,
4601 SHKEY_Subkey_FileExts = 0x6000
4602 };
4603#endif
4604
4605 static const WCHAR explorerW[] = {'S','o','f','t','w','a','r','e','\\',
4606 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4607 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
4608 'E','x','p','l','o','r','e','r','\\'};
4609 static const WCHAR shellW[] = {'S','o','f','t','w','a','r','e','\\',
4610 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4611 'S','h','e','l','l','\\'};
4612 static const WCHAR shell_no_roamW[] = {'S','o','f','t','w','a','r','e','\\',
4613 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
4614 'S','h','e','l','l','N','o','R','o','a','m','\\'};
4615 static const WCHAR classesW[] = {'S','o','f','t','w','a','r','e','\\',
4616 'C','l','a','s','s','e','s','\\'};
4617
4618 static const WCHAR localized_resource_nameW[] = {'L','o','c','a','l','i','z','e','d',
4619 'R','e','s','o','u','r','c','e','N','a','m','e','\\'};
4620 static const WCHAR handlersW[] = {'H','a','n','d','l','e','r','s','\\'};
4621 static const WCHAR associationsW[] = {'A','s','s','o','c','i','a','t','i','o','n','s','\\'};
4622 static const WCHAR volatileW[] = {'V','o','l','a','t','i','l','e','\\'};
4623 static const WCHAR mui_cacheW[] = {'M','U','I','C','a','c','h','e','\\'};
4624 static const WCHAR file_extsW[] = {'F','i','l','e','E','x','t','s','\\'};
4625
4626 WCHAR *path;
4627 const WCHAR *key, *subkey;
4628 int size_key, size_subkey, size_user;
4629 HKEY hkey = NULL;
4630
4631 TRACE("(0x%08x, %s, %d)\n", flags, debugstr_w(sub_key), create);
4632
4633 /* For compatibility with Vista+ */
4634 if(flags == 0x1ffff)
4635 flags = 0x21;
4636
4637 switch(flags&0xff0) {
4638 case SHKEY_Key_Explorer:
4639 key = explorerW;
4640 size_key = sizeof(explorerW);
4641 break;
4642 case SHKEY_Key_Shell:
4643 key = shellW;
4644 size_key = sizeof(shellW);
4645 break;
4647 key = shell_no_roamW;
4648 size_key = sizeof(shell_no_roamW);
4649 break;
4650 case SHKEY_Key_Classes:
4651 key = classesW;
4652 size_key = sizeof(classesW);
4653 break;
4654 default:
4655 FIXME("unsupported flags (0x%08x)\n", flags);
4656 return NULL;
4657 }
4658
4659 switch(flags&0xff000) {
4661 subkey = NULL;
4662 size_subkey = 0;
4663 break;
4665 subkey = localized_resource_nameW;
4666 size_subkey = sizeof(localized_resource_nameW);
4667 break;
4669 subkey = handlersW;
4670 size_subkey = sizeof(handlersW);
4671 break;
4673 subkey = associationsW;
4674 size_subkey = sizeof(associationsW);
4675 break;
4677 subkey = volatileW;
4678 size_subkey = sizeof(volatileW);
4679 break;
4681 subkey = mui_cacheW;
4682 size_subkey = sizeof(mui_cacheW);
4683 break;
4685 subkey = file_extsW;
4686 size_subkey = sizeof(file_extsW);
4687 break;
4688 default:
4689 FIXME("unsupported flags (0x%08x)\n", flags);
4690 return NULL;
4691 }
4692
4693 if(sub_key)
4694 size_user = lstrlenW(sub_key)*sizeof(WCHAR);
4695 else
4696 size_user = 0;
4697
4698 path = HeapAlloc(GetProcessHeap(), 0, size_key+size_subkey+size_user+sizeof(WCHAR));
4699 if(!path) {
4700 ERR("Out of memory\n");
4701 return NULL;
4702 }
4703
4704 memcpy(path, key, size_key);
4705 if(subkey)
4706 memcpy(path+size_key/sizeof(WCHAR), subkey, size_subkey);
4707 if(sub_key)
4708 memcpy(path+(size_key+size_subkey)/sizeof(WCHAR), sub_key, size_user);
4709 path[(size_key+size_subkey+size_user)/sizeof(WCHAR)] = '\0';
4710
4711 if(create)
4713 path, 0, NULL, 0, MAXIMUM_ALLOWED, NULL, &hkey, NULL);
4714 else
4716 path, 0, MAXIMUM_ALLOWED, &hkey);
4717
4719 return hkey;
4720}
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
static const struct access_res create[16]
Definition: package.c:7644
_shellkey_flags
Definition: ordinal.c:2803
@ SHKEY_Subkey_Handlers
Definition: ordinal.c:2812
@ SHKEY_Root_HKLM
Definition: ordinal.c:2805
@ SHKEY_Key_ShellNoRoam
Definition: ordinal.c:2808
@ SHKEY_Subkey_Volatile
Definition: ordinal.c:2814
@ SHKEY_Subkey_Associations
Definition: ordinal.c:2813
@ SHKEY_Key_Classes
Definition: ordinal.c:2809
@ SHKEY_Subkey_MUICache
Definition: ordinal.c:2815
@ SHKEY_Key_Explorer
Definition: ordinal.c:2806
@ SHKEY_Root_HKCU
Definition: ordinal.c:2804
@ SHKEY_Subkey_FileExts
Definition: ordinal.c:2816
@ SHKEY_Key_Shell
Definition: ordinal.c:2807
@ SHKEY_Subkey_Default
Definition: ordinal.c:2810
@ SHKEY_Subkey_ResourceName
Definition: ordinal.c:2811
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
#define HKEY_CURRENT_USER
Definition: winreg.h:11

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

◆ SHGetValueGoodBootA()

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

Definition at line 1877 of file reg.c.

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

◆ SHGetValueGoodBootW()

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

Definition at line 1890 of file reg.c.

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

◆ SHGlobalCounterCreate()

HANDLE WINAPI SHGlobalCounterCreate ( REFGUID  guid)

Definition at line 551 of file thread.c.

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

Referenced by SHELL_GetCachedGlobalCounter().

◆ SHGlobalCounterGetValue()

LONG WINAPI SHGlobalCounterGetValue ( HANDLE  hGlobalCounter)

Definition at line 432 of file thread.c.

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

Referenced by SHELL_QueryRestrictionsChanged(), and SHGlobalCounterDecrement().

◆ SHGlobalCounterIncrement()

LONG WINAPI SHGlobalCounterIncrement ( HANDLE  hGlobalCounter)

Definition at line 453 of file thread.c.

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

Referenced by SHSettingsChanged().

◆ SHInterlockedCompareExchange()

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

Definition at line 3493 of file ordinal.c.

3494{
3496}
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
static char * dest
Definition: rtl.c:135
Definition: bug.cpp:8

◆ SHInvokeDefaultCommand()

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

Definition at line 3056 of file ordinal.c.

3057{
3058 TRACE("%p %p %p\n", hWnd, lpFolder, lpApidl);
3059 return SHInvokeCommand(hWnd, lpFolder, lpApidl, 0);
3060}
HRESULT WINAPI SHInvokeCommand(HWND, IShellFolder *, LPCITEMIDLIST, DWORD)
Definition: ordinal.c:3618

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

◆ SHIsChildOrSelf()

BOOL WINAPI SHIsChildOrSelf ( HWND  hParent,
HWND  hChild 
)

Definition at line 2250 of file ordinal.c.

2251{
2252 TRACE("(%p,%p)\n", hParent, hChild);
2253
2254 if (!hParent || !hChild)
2255 return TRUE;
2256 else if(hParent == hChild)
2257 return FALSE;
2258 return !IsChild(hParent, hChild);
2259}
static HTREEITEM hChild
Definition: treeview.c:381
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)

◆ SHIsEmptyStream()

BOOL WINAPI SHIsEmptyStream ( IStream lpStream)

Definition at line 567 of file istream.c.

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

◆ SHIsExpandableFolder()

HRESULT WINAPI SHIsExpandableFolder ( LPSHELLFOLDER  lpFolder,
LPCITEMIDLIST  pidl 
)

Definition at line 2084 of file ordinal.c.

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

◆ SHIsSameObject()

BOOL WINAPI SHIsSameObject ( IUnknown lpInt1,
IUnknown lpInt2 
)

Definition at line 1285 of file ordinal.c.

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

◆ SHLoadMenuPopup()

BOOL WINAPI SHLoadMenuPopup ( HINSTANCE  hInst,
LPCWSTR  szName 
)

Definition at line 1662 of file ordinal.c.

1663{
1664 HMENU hMenu;
1665
1666 TRACE("%p %s\n", hInst, debugstr_w(szName));
1667
1668 if ((hMenu = LoadMenuW(hInst, szName)))
1669 {
1670 if (GetSubMenu(hMenu, 0))
1671 RemoveMenu(hMenu, 0, MF_BYPOSITION);
1672
1673 DestroyMenu(hMenu);
1674 return TRUE;
1675 }
1676 return FALSE;
1677}
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 4240 of file ordinal.c.

4241{
4242 DWORD type, sz = size * sizeof(WCHAR);
4243
4244 if(RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)buf, &sz) != ERROR_SUCCESS)
4245 return E_FAIL;
4246
4248}
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(LPCWSTR src, LPWSTR dst, UINT dst_len, void **reserved)
Definition: string.c:2884
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:94

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

◆ SHLockSharedEx()

◆ SHPinDllOfCLSID()

HMODULE WINAPI SHPinDllOfCLSID ( REFIID  refiid)

Definition at line 2533 of file ordinal.c.

2534{
2535 HKEY newkey;
2536 DWORD type, count;
2537 CHAR value[MAX_PATH], string[MAX_PATH];
2538
2539 strcpy(string, "CLSID\\");
2540 SHStringFromGUIDA(refiid, string + 6, sizeof(string)/sizeof(char) - 6);
2541 strcat(string, "\\InProcServer32");
2542
2543 count = MAX_PATH;
2544 RegOpenKeyExA(HKEY_CLASSES_ROOT, string, 0, 1, &newkey);
2545 RegQueryValueExA(newkey, 0, 0, &type, (PBYTE)value, &count);
2546 RegCloseKey(newkey);
2547 return LoadLibraryExA(value, 0, 0);
2548}
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
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:624
GLuint GLuint GLsizei count
Definition: gl.h:1545
BYTE * PBYTE
Definition: pedump.c:66
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
char CHAR
Definition: xmlstorage.h:175

Referenced by SHAutoComplete().

◆ SHPropagateMessage()

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

Definition at line 1715 of file ordinal.c.

1716{
1718
1719 TRACE("(%p,%u,%ld,%ld,%d)\n", hWnd, uiMsgId, wParam, lParam, bSend);
1720
1721 if(hWnd)
1722 {
1723 data.uiMsgId = uiMsgId;
1724 data.wParam = wParam;
1725 data.lParam = lParam;
1726
1727 if (bSend)
1728 data.pfnPost = IsWindowUnicode(hWnd) ? (void*)SendMessageW : (void*)SendMessageA;
1729 else
1730 data.pfnPost = IsWindowUnicode(hWnd) ? (void*)PostMessageW : (void*)PostMessageA;
1731
1733 }
1734}
static BOOL CALLBACK SHLWAPI_EnumChildProc(HWND hWnd, LPARAM lParam)
Definition: ordinal.c:1688
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
LONG_PTR LPARAM
Definition: windef.h:208
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().

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

5586{
5587#ifdef __REACTOS__
5588 HRESULT hr;
5589 VARIANTARG varg;
5590
5591 TRACE("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5592
5593 if (!ppb || !pszPropName || !pValue)
5594 {
5595 ERR("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5596 return E_INVALIDARG;
5597 }
5598
5599 hr = SHPropertyBag_ReadType(ppb, pszPropName, &varg, VT_I4);
5600 if (SUCCEEDED(hr))
5601 *pValue = V_I4(&varg);
5602#else
5603 VARIANT var;
5604 HRESULT hr;
5605 TRACE("%p %s %p\n", ppb,debugstr_w(pszPropName),pValue);
5606 if (!pszPropName || !ppb || !pValue)
5607 return E_INVALIDARG;
5608 V_VT(&var) = VT_I4;
5609 hr = IPropertyBag_Read(ppb, pszPropName, &var, NULL);
5610 if (SUCCEEDED(hr))
5611 {
5612 if (V_VT(&var) == VT_I4)
5613 *pValue = V_I4(&var);
5614 else
5616 }
5617#endif
5618 return hr;
5619}
@ VT_I4
Definition: compat.h:2298
const char * var
Definition: shader.c:5666
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
HRESULT WINAPI SHPropertyBag_ReadType(IPropertyBag *ppb, LPCWSTR pszPropName, VARIANTARG *pvarg, VARTYPE vt)
#define DISP_E_BADVARTYPE
Definition: winerror.h:2517

Referenced by init_pointers(), and SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadPOINTL()

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

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadPOINTS()

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

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadRECTL()

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

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadSHORT()

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

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadStr()

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

◆ SHPropertyBag_ReadStream()

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

Referenced by CDefView::LoadViewState().

◆ SHPropertyBag_ReadType()

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

Referenced by SHPropertyBag_ReadLONG().

◆ SHPropertyBag_WriteBOOL()

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

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteDWORD()

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

◆ SHPropertyBag_WriteGUID()

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

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteInt()

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

◆ SHPropertyBag_WriteLONG()

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

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WritePOINTL()

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

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WritePOINTS()

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

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteRECTL()

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

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteSHORT()

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

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteStr()

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

Referenced by SHPropertyBag_WriteTest().

◆ SHPropertyBag_WriteStream()

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

Referenced by CDefView::SaveViewState().

◆ SHReadDataBlockList()

HRESULT WINAPI SHReadDataBlockList ( IStream lpStream,
LPDBLIST lppList 
)

Definition at line 235 of file clist.c.

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

Referenced by CShellLink::Load().

◆ SHRegGetCLSIDKeyW()

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

Definition at line 2422 of file reg.c.

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

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

◆ SHRegisterClassA()

DWORD WINAPI SHRegisterClassA ( WNDCLASSA wndclass)

Definition at line 1813 of file ordinal.c.

1814{
1815 WNDCLASSA wca;
1816 if (GetClassInfoA(wndclass->hInstance, wndclass->lpszClassName, &wca))
1817 return TRUE;
1818 return (DWORD)RegisterClassA(wndclass);
1819}
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 1748 of file ordinal.c.

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

◆ SHRemoveDataBlock()

BOOL WINAPI SHRemoveDataBlock ( LPDBLIST lppList,
DWORD  dwSignature 
)

Definition at line 355 of file clist.c.

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

Referenced by CShellLink::RemoveDataBlock().

◆ SHRestrictionLookup()

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

◆ SHSearchMapInt()

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

Definition at line 2157 of file ordinal.c.

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

Referenced by init_pointers().

◆ SHSendMessageBroadcastW()

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

Definition at line 4056 of file ordinal.c.

4057{
4059 SMTO_ABORTIFHUNG, 2000, NULL);
4060}
#define HWND_BROADCAST
Definition: winuser.h:1204
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:1223

Referenced by SHGetSetSettings().

◆ SHSetDefaultDialogFont()

VOID WINAPI SHSetDefaultDialogFont ( HWND  hWnd,
INT  id 
)

Definition at line 2453 of file ordinal.c.

2455{
2456#ifdef __REACTOS__
2457 HFONT hOldFont, hNewFont;
2458 LOGFONTW lfOldFont, lfNewFont;
2459 HWND hwndItem;
2460
2461 TRACE("(%p, %d)\n", hWnd, id);
2462
2463 hOldFont = (HFONT)SendMessageW(hWnd, WM_GETFONT, 0, 0);
2464 GetObjectW(hOldFont, sizeof(lfOldFont), &lfOldFont);
2465 SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(lfNewFont), &lfNewFont, 0);
2466
2467 if (lfOldFont.lfCharSet == lfNewFont.lfCharSet)
2468 return;
2469
2470 hNewFont = GetPropW(hWnd, L"PropDlgFont");
2471 if (!hNewFont)
2472 {
2473 /* Create the icon-title font of the same height */
2474 lfNewFont.lfHeight = lfOldFont.lfHeight;
2475 hNewFont = CreateFontIndirectW(&lfNewFont);
2476
2477 /* If creating the font is failed, then keep the old font */
2478 if (!hNewFont)
2479 hNewFont = hOldFont;
2480
2481 /* Set "PropDlgFont" property if the font is changed */
2482 if (hOldFont != hNewFont)
2483 SetPropW(hWnd, L"PropDlgFont", hNewFont);
2484 }
2485
2486 hwndItem = GetDlgItem(hWnd, id);
2487 SendMessageW(hwndItem, WM_SETFONT, (WPARAM)hNewFont, 0);
2488#else
2489 FIXME("(%p, %d) stub\n", hWnd, id);
2490 return S_OK;
2491#endif
2492}
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
LONG lfHeight
Definition: dimm.idl:59
BYTE lfCharSet
Definition: dimm.idl:67
UINT_PTR WPARAM
Definition: windef.h:207
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
#define SPI_GETICONTITLELOGFONT
Definition: winuser.h:1380
#define WM_GETFONT
Definition: winuser.h:1651
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SETFONT
Definition: winuser.h:1650
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)

◆ SHSetIniStringUTF7W()

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

Definition at line 748 of file propbag.cpp.

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

Referenced by CIniPropertyBag::Write().

◆ SHSetIniStringW()

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

Definition at line 658 of file propbag.cpp.

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

Referenced by SHSetIniStringUTF7W().

◆ SHSetParentHwnd()

HWND WINAPI SHSetParentHwnd ( HWND  hWnd,
HWND  hWndParent 
)

Definition at line 1154 of file ordinal.c.

1155{
1156 TRACE("%p, %p\n", hWnd, hWndParent);
1157
1158 if(GetParent(hWnd) == hWndParent)
1159 return NULL;
1160
1161 if(hWndParent)
1163 else
1165
1167}
LONG WINAPI SHSetWindowBits(HWND hwnd, INT offset, UINT mask, UINT flags)
Definition: ordinal.c:1126
#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:852

Referenced by init_pointers().

◆ SHSetWindowBits()

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

Definition at line 1126 of file ordinal.c.

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

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

◆ SHSimulateDrop()

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

Definition at line 1824 of file ordinal.c.

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

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

◆ SHUnicodeToAnsi()

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

Definition at line 2791 of file string.c.

2792{
2793 return SHUnicodeToAnsiCP(CP_ACP, lpSrcStr, lpDstStr, iLen);
2794}
DWORD WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr, int dstlen)
Definition: string.c:2692

Referenced by CheckEscapesA(), DoesStringRoundTripW(), CDefaultContextMenu::GetCommandString(), GetCommandStringA(), CDefView::InvokeContextMenuCommand(), MakeShellURLFromPathA(), CAutoComplete::OnNotify(), PathQualifyA(), PathResolveA(), SHBrowseForFolderA(), and SHELL_IsVerb().

◆ SHUnicodeToAnsiCP()

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

Definition at line 2692 of file string.c.

2693{
2694 static const WCHAR emptyW[] = { '\0' };
2695 int len , reqLen;
2696 LPSTR mem;
2697
2698 if (!lpDstStr || !dstlen)
2699 return 0;
2700
2701 if (!lpSrcStr)
2702 lpSrcStr = emptyW;
2703
2704 *lpDstStr = '\0';
2705
2706 len = strlenW(lpSrcStr) + 1;
2707
2708 switch (CodePage)
2709 {
2710 case CP_WINUNICODE:
2711 CodePage = CP_UTF8; /* Fall through... */
2712 case 0x0000C350: /* FIXME: CP_ #define */
2713 case CP_UTF7:
2714 case CP_UTF8:
2715 {
2716 DWORD dwMode = 0;
2717 INT lenW = len - 1;
2718 INT needed = dstlen - 1;
2719 HRESULT hr;
2720
2721 /* try the user supplied buffer first */
2722 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &lenW, lpDstStr, &needed);
2723 if (hr == S_OK)
2724 {
2725 lpDstStr[needed] = '\0';
2726 return needed + 1;
2727 }
2728
2729 /* user buffer too small. exclude termination and copy as much as possible */
2730 lenW = len;
2731 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &lenW, NULL, &needed);
2732 needed++;
2733 mem = HeapAlloc(GetProcessHeap(), 0, needed);
2734 if (!mem)
2735 return 0;
2736
2737 hr = ConvertINetUnicodeToMultiByte(&dwMode, CodePage, lpSrcStr, &len, mem, &needed);
2738 if (hr == S_OK)
2739 {
2740 reqLen = SHTruncateString(mem, dstlen);
2741 if (reqLen > 0) memcpy(lpDstStr, mem, reqLen-1);
2742 }
2744 return 0;
2745 }
2746 default:
2747 break;
2748 }
2749
2750 /* try the user supplied buffer first */
2751 reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, lpDstStr, dstlen, NULL, NULL);
2752
2753 if (!reqLen && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
2754 {
2755 reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, NULL, 0, NULL, NULL);
2756 if (reqLen)
2757 {
2758 mem = HeapAlloc(GetProcessHeap(), 0, reqLen);
2759 if (mem)
2760 {
2761 WideCharToMultiByte(CodePage, 0, lpSrcStr, len, mem, reqLen, NULL, NULL);
2762
2763 reqLen = SHTruncateString(mem, dstlen -1);
2764 reqLen++;
2765
2766 lstrcpynA(lpDstStr, mem, reqLen);
2768 lpDstStr[reqLen-1] = '\0';
2769 }
2770 }
2771 }
2772 return reqLen;
2773}
#define CP_WINUNICODE
Definition: ddeml.h:33
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define lstrcpynA
Definition: compat.h:751
DWORD WINAPI SHTruncateString(LPSTR lpStr, DWORD size)
Definition: string.c:2544
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:156
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 2046 of file ordinal.c.

2047{
2048 DWORD dwEndTicks = GetTickCount() + dwTimeout;
2049 DWORD dwRet;
2050
2051 while ((dwRet = MsgWaitForMultipleObjectsEx(1, &hand, dwTimeout, QS_SENDMESSAGE, 0)) == 1)
2052 {
2053 MSG msg;
2054
2055 PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE);
2056
2057 if (dwTimeout != INFINITE)
2058 {
2059 if ((int)(dwTimeout = dwEndTicks - GetTickCount()) <= 0)
2060 return WAIT_TIMEOUT;
2061 }
2062 }
2063
2064 return dwRet;
2065}
#define WAIT_TIMEOUT
Definition: dderror.h:14
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
#define INFINITE
Definition: serial.h:102
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6081
#define QS_SENDMESSAGE
Definition: winuser.h:880
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:1195

◆ SHWriteDataBlockList()

HRESULT WINAPI SHWriteDataBlockList ( IStream lpStream,
LPDBLIST  lpList 
)

Definition at line 179 of file clist.c.

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

Referenced by CShellLink::Save().