ReactOS 0.4.16-dev-178-g8ba6102
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)
 
DWORD WINAPI SHGetCurColorRes (void)
 
HMENU WINAPI SHGetMenuFromID (HMENU hMenu, UINT uID)
 
DWORD WINAPI SHMenuIndexFromID (HMENU hMenu, UINT uID)
 
DWORD WINAPI SHWaitForSendMessageThread (HANDLE hand, DWORD dwTimeout)
 
DWORD WINAPI SHSendMessageBroadcastW (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT WINAPI SHIsExpandableFolder (LPSHELLFOLDER lpFolder, LPCITEMIDLIST pidl)
 
DWORD WINAPI SHFillRectClr (HDC hDC, LPCRECT pRect, COLORREF cRef)
 
int WINAPI SHSearchMapInt (const int *lpKeys, const int *lpValues, int iLen, int iKey)
 
VOID WINAPI IUnknown_Set (IUnknown **lppDest, IUnknown *lpUnknown)
 
HRESULT WINAPI MayQSForward (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 342 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_ASTERIX

#define PATH_CHAR_CLASS_ASTERIX   0x00000002

Definition at line 332 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_BACKSLASH

#define PATH_CHAR_CLASS_BACKSLASH   0x00000008

Definition at line 334 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COLON

#define PATH_CHAR_CLASS_COLON   0x00000010

Definition at line 335 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_COMMA

#define PATH_CHAR_CLASS_COMMA   0x00000040

Definition at line 337 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOT

#define PATH_CHAR_CLASS_DOT   0x00000004

Definition at line 333 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_DOUBLEQUOTE

#define PATH_CHAR_CLASS_DOUBLEQUOTE   0x00000200

Definition at line 340 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_INVALID

#define PATH_CHAR_CLASS_INVALID   0x00000000

Definition at line 341 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_LETTER

#define PATH_CHAR_CLASS_LETTER   0x00000001

Definition at line 331 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_OTHER_VALID

#define PATH_CHAR_CLASS_OTHER_VALID   0x00000100

Definition at line 339 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SEMICOLON

#define PATH_CHAR_CLASS_SEMICOLON   0x00000020

Definition at line 336 of file shlwapi_undoc.h.

◆ PATH_CHAR_CLASS_SPACE

#define PATH_CHAR_CLASS_SPACE   0x00000080

Definition at line 338 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 223 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 138 of file shlwapi_undoc.h.

◆ SHGetValueGoodBoot

#define SHGetValueGoodBoot   SHGetValueGoodBootA

Definition at line 255 of file shlwapi_undoc.h.

◆ SHLoadRegUIString

#define SHLoadRegUIString   SHLoadRegUIStringA

Definition at line 256 of file shlwapi_undoc.h.

◆ WHICH_BAT

#define WHICH_BAT   (1 << 3)

Definition at line 323 of file shlwapi_undoc.h.

◆ WHICH_CMD

#define WHICH_CMD   (1 << 5)

Definition at line 325 of file shlwapi_undoc.h.

◆ WHICH_COM

#define WHICH_COM   (1 << 1)

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

◆ WHICH_EXE

#define WHICH_EXE   (1 << 2)

Definition at line 322 of file shlwapi_undoc.h.

◆ WHICH_LNK

#define WHICH_LNK   (1 << 4)

Definition at line 324 of file shlwapi_undoc.h.

◆ WHICH_OPTIONAL

#define WHICH_OPTIONAL   (1 << 6)

Definition at line 326 of file shlwapi_undoc.h.

◆ WHICH_PIF

#define WHICH_PIF   (1 << 0)

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

290{
291 SHKEY_Root_HKCU = 0x1,
292 SHKEY_Root_HKLM = 0x2,
293 SHKEY_Key_Explorer = 0x00,
294 SHKEY_Key_Shell = 0x10,
296 SHKEY_Key_Classes = 0x30,
297 SHKEY_Subkey_Default = 0x0000,
299 SHKEY_Subkey_Handlers = 0x2000,
301 SHKEY_Subkey_Volatile = 0x4000,
302 SHKEY_Subkey_MUICache = 0x5000,
303 SHKEY_Subkey_FileExts = 0x6000
304};
@ 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 1193 of file ordinal.c.

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

Referenced by init_pointers().

◆ FixSlashesAndColonW()

VOID WINAPI FixSlashesAndColonW ( LPWSTR  lpwstr)

Definition at line 4530 of file ordinal.c.

4531{
4532 while (*lpwstr)
4533 {
4534 if (*lpwstr == '/')
4535 *lpwstr = '\\';
4536 lpwstr++;
4537 }
4538}

Referenced by PathQualifyExW().

◆ IContextMenu_Invoke()

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

Definition at line 201 of file utils.cpp.

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

◆ IsQSForward()

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

Definition at line 2235 of file ordinal.c.

2236{
2237 FIXME("(%p,%d,%p) - stub!\n", pguidCmdGroup, cCmds, prgCmds);
2239}
#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 1087 of file ordinal.c.

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

Referenced by CTrayBandSite::AddBand(), 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 1457 of file ordinal.c.

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

Referenced by CShellBrowser::BrowseToPIDL(), 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 1953 of file ordinal.c.

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

◆ IUnknown_HasFocusIO()

HRESULT WINAPI IUnknown_HasFocusIO ( IUnknown punk)

Definition at line 4311 of file ordinal.c.

4312{
4313 IInputObject* lpInput = NULL;
4314 HRESULT hRet = E_INVALIDARG;
4315
4316 TRACE("(%p)\n", lpUnknown);
4317 if (lpUnknown)
4318 {
4319 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
4320 (void**)&lpInput);
4321 if (SUCCEEDED(hRet) && lpInput)
4322 {
4323 hRet = IInputObject_HasFocusIO(lpInput);
4324 IInputObject_Release(lpInput);
4325 }
4326 }
4327 return hRet;
4328}
#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 4783 of file ordinal.c.

4784{
4785 IInputObjectSite *pIOS = NULL;
4786 HRESULT hRet = E_INVALIDARG;
4787
4788 TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
4789
4790 if (lpUnknown)
4791 {
4792 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
4793 (void **)&pIOS);
4794 if (SUCCEEDED(hRet) && pIOS)
4795 {
4796 hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
4798 }
4799 }
4800 return hRet;
4801}
#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(), CSearchBar::OnSetFocus(), and CAddressBand::UIActivateIO().

◆ IUnknown_OnFocusOCS()

HRESULT WINAPI IUnknown_OnFocusOCS ( IUnknown lpUnknown,
BOOL  fGotFocus 
)

Definition at line 1931 of file ordinal.c.

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

◆ IUnknown_QueryServiceExec()

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

Definition at line 1553 of file ordinal.c.

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

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

◆ IUnknown_QueryServicePropertyBag()

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

Definition at line 1967 of file propbag.cpp.

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

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

◆ IUnknown_QueryStatus()

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

Definition at line 1048 of file ordinal.c.

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

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

◆ IUnknown_Set()

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

Definition at line 2190 of file ordinal.c.

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

Referenced by CObjectWithSiteBase::SetSite().

◆ IUnknown_SetOwner()

HRESULT WINAPI IUnknown_SetOwner ( IUnknown iface,
IUnknown pUnk 
)

Definition at line 1385 of file ordinal.c.

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

Referenced by CTrayBandSite::AddContextMenus().

◆ IUnknown_TranslateAcceleratorIO()

HRESULT WINAPI IUnknown_TranslateAcceleratorIO ( IUnknown punk,
MSG pmsg 
)

◆ IUnknown_TranslateAcceleratorOCS()

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

Definition at line 1898 of file ordinal.c.

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

◆ IUnknown_UIActivateIO()

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

Definition at line 1633 of file ordinal.c.

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

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

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

◆ MayQSForward()

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

Definition at line 2207 of file ordinal.c.

2210{
2211 FIXME("(%p,%p,%p,%d,%p,%p) - stub\n",
2212 lpUnknown, lpReserved, riidCmdGrp, cCmds, prgCmds, pCmdText);
2213
2214 /* FIXME: Calls IsQSForward & IUnknown_QueryStatus */
2216}

◆ PathFileExistsDefExtAndAttributesW()

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

Definition at line 222 of file utils.cpp.

226{
227 TRACE("(%s, 0x%lX, %p)\n", debugstr_w(pszPath), dwWhich, pdwFileAttributes);
228
229 if (pdwFileAttributes)
230 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
231
232 if (!pszPath)
233 return FALSE;
234
235 if (!dwWhich || (*PathFindExtensionW(pszPath) && (dwWhich & WHICH_OPTIONAL)))
236 return PathFileExistsAndAttributesW(pszPath, pdwFileAttributes);
237
238 if (!PathFileExistsDefExtW(pszPath, dwWhich))
239 {
240 if (pdwFileAttributes)
241 *pdwFileAttributes = INVALID_FILE_ATTRIBUTES;
242 return FALSE;
243 }
244
245 if (pdwFileAttributes)
246 *pdwFileAttributes = GetFileAttributesW(pszPath);
247
248 return TRUE;
249}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
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
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

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

◆ PathFindOnPathExW()

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

Definition at line 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 915 of file ordinal.c.

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

◆ SHAboutInfoW()

BOOL WINAPI SHAboutInfoW ( LPWSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 934 of file ordinal.c.

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

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

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

◆ SHCreatePropertyBagOnMemory()

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

Definition at line 254 of file propbag.cpp.

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

Referenced by SHCreatePropertyBag(), and SHPropertyBag_OnMemory().

◆ SHCreatePropertyBagOnProfileSection()

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

Definition at line 965 of file propbag.cpp.

971{
973 PWCHAR pchFileTitle;
974 WCHAR szBuff[MAX_PATH];
975
976 if (dwMode & STGM_CREATE)
977 {
981 {
982 pchFileTitle = PathFindFileNameW(lpFileName);
983 if (lstrcmpiW(pchFileTitle, L"desktop.ini") == 0)
984 {
985 StrCpyNW(szBuff, lpFileName, _countof(szBuff));
986 if (PathRemoveFileSpecW(szBuff))
987 PathMakeSystemFolderW(szBuff);
988 }
990 }
991 }
992
993 *ppvObj = NULL;
994
997
998 CComPtr<CIniPropertyBag> pIniPB(new CIniPropertyBag(dwMode));
999
1000 HRESULT hr = pIniPB->Init(lpFileName, pszSection);
1001 if (FAILED(hr))
1002 {
1003 ERR("0x%08X\n", hr);
1004 return hr;
1005 }
1006
1007 return pIniPB->QueryInterface(riid, ppvObj);
1008}
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileW
Definition: compat.h:741
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4262
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 2679 of file ordinal.c.

2681{
2682 static const char szClass[] = "WorkerA";
2683 WNDCLASSA wc;
2684 HWND hWnd;
2685
2686 TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
2687 wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2688
2689 /* Create Window class */
2690 wc.style = 0;
2692 wc.cbClsExtra = 0;
2693 wc.cbWndExtra = sizeof(LONG_PTR);
2695 wc.hIcon = NULL;
2697 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
2698 wc.lpszMenuName = NULL;
2699 wc.lpszClassName = szClass;
2700
2701 SHRegisterClassA(&wc);
2702
2703 hWnd = CreateWindowExA(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
2704 hWndParent, hMenu, shlwapi_hInstance, 0);
2705 if (hWnd)
2706 {
2707 SetWindowLongPtrW(hWnd, 0, wnd_extra);
2709 }
2710
2711 return hWnd;
2712}
HWND hWnd
Definition: settings.c:17
HINSTANCE shlwapi_hInstance
Definition: shlwapi_main.c:33
DWORD WINAPI SHRegisterClassA(WNDCLASSA *wndclass)
Definition: ordinal.c:1817
static LRESULT WINAPI wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: imm32.c:185
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HBRUSH hbrBackground
Definition: winuser.h:3173
HICON hIcon
Definition: winuser.h:3171
HINSTANCE hInstance
Definition: winuser.h:3170
HCURSOR hCursor
Definition: winuser.h:3172
int cbWndExtra
Definition: winuser.h:3169
UINT style
Definition: winuser.h:3166
LPCSTR lpszMenuName
Definition: winuser.h:3174
LPCSTR lpszClassName
Definition: winuser.h:3175
WNDPROC lpfnWndProc
Definition: winuser.h:3167
int cbClsExtra
Definition: winuser.h:3168
#define LONG_PTR
Definition: treelist.c:79
#define GWLP_WNDPROC
Definition: treelist.c:66
#define SetWindowLongPtrA
Definition: winuser.h:5357
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:5358
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2142
#define COLOR_BTNFACE
Definition: winuser.h:931
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 3004 of file ordinal.c.

3006{
3007 static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', 0 };
3008 WNDCLASSW wc;
3009 HWND hWnd;
3010
3011 TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
3012 wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
3013
3014 /* If our OS is natively ANSI, use the ANSI version */
3015 if (GetVersion() & 0x80000000) /* not NT */
3016 {
3017 TRACE("fallback to ANSI, ver 0x%08x\n", GetVersion());
3018 return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
3019 }
3020
3021 /* Create Window class */
3022 wc.style = 0;
3024 wc.cbClsExtra = 0;
3025 wc.cbWndExtra = sizeof(LONG_PTR);
3027 wc.hIcon = NULL;
3029 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
3030 wc.lpszMenuName = NULL;
3031 wc.lpszClassName = szClass;
3032
3033 SHRegisterClassW(&wc);
3034
3035 hWnd = CreateWindowExW(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
3036 hWndParent, hMenu, shlwapi_hInstance, 0);
3037 if (hWnd)
3038 {
3039 SetWindowLongPtrW(hWnd, 0, wnd_extra);
3041 }
3042
3043 return hWnd;
3044}
DWORD WINAPI SHRegisterClassW(WNDCLASSW *lpWndClass)
Definition: ordinal.c:2559
HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2679
DWORD WINAPI GetVersion()
Definition: redirtest.c:5
LPCWSTR lpszClassName
Definition: winuser.h:3188
LPCWSTR lpszMenuName
Definition: winuser.h:3187
HBRUSH hbrBackground
Definition: winuser.h:3186
HICON hIcon
Definition: winuser.h:3184
HINSTANCE hInstance
Definition: winuser.h:3183
int cbClsExtra
Definition: winuser.h:3181
UINT style
Definition: winuser.h:3179
WNDPROC lpfnWndProc
Definition: winuser.h:3180
int cbWndExtra
Definition: winuser.h:3182
HCURSOR hCursor
Definition: winuser.h:3185
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2157
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 1781 of file ordinal.c.

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

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

◆ SHExpandEnvironmentStringsA()

DWORD WINAPI SHExpandEnvironmentStringsA ( LPCSTR  ,
LPSTR  ,
DWORD   
)

◆ SHExpandEnvironmentStringsW()

◆ SHFillRectClr()

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

Definition at line 2133 of file ordinal.c.

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

Referenced by CDefView::OnPrintClient().

◆ SHFindDataBlock()

DATABLOCK_HEADER *WINAPI SHFindDataBlock ( LPDBLIST  lpList,
DWORD  dwSignature 
)

Definition at line 424 of file clist.c.

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

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

◆ SHForwardContextMenuMsg()

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

Definition at line 11 of file rosordinal.c.

13{
14 HRESULT hr;
15 IContextMenu3* pcmenu3;
16 IContextMenu2* pcmenu2;
17
18 /* 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 2023 of file ordinal.c.

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

Referenced by CBrandBand::SelectImage().

◆ 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
int32_t INT
Definition: typedefs.h:58
#define CP_UTF7
Definition: winnls.h:235

Referenced by SHGetIniStringUTF7W().

◆ SHGetMenuFromID()

HMENU WINAPI SHGetMenuFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 1997 of file ordinal.c.

1998{
2000
2001 TRACE("(%p,%u)\n", hMenu, uID);
2002
2003 mi.cbSize = sizeof(mi);
2004 mi.fMask = MIIM_SUBMENU;
2005
2006 if (!GetMenuItemInfoW(hMenu, uID, FALSE, &mi))
2007 return NULL;
2008
2009 return mi.hSubMenu;
2010}
DWORD cbSize
Definition: winuser.h:3787
static MONITORINFO mi
Definition: win.c:7338
#define MIIM_SUBMENU
Definition: winuser.h:726
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 6294 of file ordinal.c.

6295{
6296 static const WCHAR compatpathW[] =
6297 {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
6298 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
6299 'S','h','e','l','l','C','o','m','p','a','t','i','b','i','l','i','t','y','\\',
6300 'O','b','j','e','c','t','s','\\','%','s',0};
6301 WCHAR strW[sizeof(compatpathW)/sizeof(WCHAR) + 38 /* { CLSID } */];
6302 DWORD ret, length = sizeof(strW)/sizeof(WCHAR);
6303 OLECHAR *clsid_str;
6304 HKEY key;
6305 INT i;
6306
6307 TRACE("%p %s\n", pUnk, debugstr_guid(clsid));
6308
6309 if (!pUnk && !clsid) return 0;
6310
6311 if (pUnk && !clsid)
6312 {
6313 FIXME("iface not handled\n");
6314 return 0;
6315 }
6316
6317 StringFromCLSID(clsid, &clsid_str);
6318 sprintfW(strW, compatpathW, clsid_str);
6319 CoTaskMemFree(clsid_str);
6320
6322 if (ret != ERROR_SUCCESS) return 0;
6323
6324 /* now collect flag values */
6325 ret = 0;
6326 for (i = 0; RegEnumValueW(key, i, strW, &length, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; i++)
6327 {
6328 INT left, right, res, x;
6329
6330 /* search in table */
6331 left = 0;
6332 right = sizeof(objcompat_table) / sizeof(struct objcompat_entry) - 1;
6333
6334 while (right >= left) {
6335 x = (left + right) / 2;
6337 if (res == 0)
6338 {
6339 ret |= objcompat_table[x].value;
6340 break;
6341 }
6342 else if (res < 0)
6343 right = x - 1;
6344 else
6345 left = x + 1;
6346 }
6347
6348 length = sizeof(strW)/sizeof(WCHAR);
6349 }
6350
6351 return ret;
6352}
#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:6252
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:6246

Referenced by init_pointers(), and SHGetAttributes().

◆ SHGetPathFromIDListWrapW()

BOOL WINAPI SHGetPathFromIDListWrapW ( LPCITEMIDLIST  pidl,
LPWSTR  pszPath 
)

Definition at line 3472 of file ordinal.c.

3473{
3474 return SHGetPathFromIDListW(pidl, pszPath);
3475}
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1348

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:1043
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 4601 of file ordinal.c.

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

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

◆ SHGetValueGoodBootA()

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

Definition at line 1877 of file reg.c.

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

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

3502{
3504}
#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 3060 of file ordinal.c.

3061{
3062 TRACE("%p %p %p\n", hWnd, lpFolder, lpApidl);
3063#ifdef __REACTOS__
3064 return SHInvokeCommand(hWnd, lpFolder, lpApidl, NULL);
3065#else
3066 return SHInvokeCommand(hWnd, lpFolder, lpApidl, 0);
3067#endif
3068}
HRESULT WINAPI SHInvokeCommand(HWND, IShellFolder *, LPCITEMIDLIST, DWORD)
Definition: ordinal.c:3633

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

◆ SHIsChildOrSelf()

BOOL WINAPI SHIsChildOrSelf ( HWND  hParent,
HWND  hChild 
)

Definition at line 2254 of file ordinal.c.

2255{
2256 TRACE("(%p,%p)\n", hParent, hChild);
2257
2258 if (!hParent || !hChild)
2259 return TRUE;
2260 else if(hParent == hChild)
2261 return FALSE;
2262 return !IsChild(hParent, hChild);
2263}
static HTREEITEM hChild
Definition: treeview.c:383
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)

◆ SHIsEmptyStream()

BOOL WINAPI SHIsEmptyStream ( IStream lpStream)

Definition at line 567 of file istream.c.

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

◆ SHIsExpandableFolder()

HRESULT WINAPI SHIsExpandableFolder ( LPSHELLFOLDER  lpFolder,
LPCITEMIDLIST  pidl 
)

Definition at line 2088 of file ordinal.c.

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

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

◆ SHLoadMenuPopup()

BOOL WINAPI SHLoadMenuPopup ( HINSTANCE  hInst,
LPCWSTR  szName 
)

Definition at line 1666 of file ordinal.c.

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

◆ SHLoadRegUIStringA()

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

◆ SHLoadRegUIStringW()

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

Definition at line 4256 of file ordinal.c.

4257{
4258 DWORD type, sz = size * sizeof(WCHAR);
4259
4260 if(RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)buf, &sz) != ERROR_SUCCESS)
4261 return E_FAIL;
4262
4264}
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()

◆ SHMenuIndexFromID()

DWORD WINAPI SHMenuIndexFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 4520 of file ordinal.c.

4521{
4522 TRACE("%p %u\n", hMenu, uID);
4523 return GetMenuPosFromID(hMenu, uID);
4524}
INT WINAPI GetMenuPosFromID(HMENU hMenu, UINT wID)
Definition: ordinal.c:4493

Referenced by CDefView::FillViewMenu().

◆ SHPinDllOfCLSID()

HMODULE WINAPI SHPinDllOfCLSID ( REFIID  refiid)

Definition at line 2537 of file ordinal.c.

2538{
2539 HKEY newkey;
2540 DWORD type, count;
2541 CHAR value[MAX_PATH], string[MAX_PATH];
2542
2543 strcpy(string, "CLSID\\");
2544 SHStringFromGUIDA(refiid, string + 6, sizeof(string)/sizeof(char) - 6);
2545 strcat(string, "\\InProcServer32");
2546
2547 count = MAX_PATH;
2548 RegOpenKeyExA(HKEY_CLASSES_ROOT, string, 0, 1, &newkey);
2549 RegQueryValueExA(newkey, 0, 0, &type, (PBYTE)value, &count);
2550 RegCloseKey(newkey);
2551 return LoadLibraryExA(value, 0, 0);
2552}
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:628
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 1719 of file ordinal.c.

1720{
1722
1723 TRACE("(%p,%u,%ld,%ld,%d)\n", hWnd, uiMsgId, wParam, lParam, bSend);
1724
1725 if(hWnd)
1726 {
1727 data.uiMsgId = uiMsgId;
1728 data.wParam = wParam;
1729 data.lParam = lParam;
1730
1731 if (bSend)
1732 data.pfnPost = IsWindowUnicode(hWnd) ? (void*)SendMessageW : (void*)SendMessageA;
1733 else
1734 data.pfnPost = IsWindowUnicode(hWnd) ? (void*)PostMessageW : (void*)PostMessageA;
1735
1737 }
1738}
static BOOL CALLBACK SHLWAPI_EnumChildProc(HWND hWnd, LPARAM lParam)
Definition: ordinal.c:1692
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(), and CShellBrowser::OnSysColorChange().

◆ SHPropertyBag_Delete()

HRESULT WINAPI SHPropertyBag_Delete ( IPropertyBag ppb,
LPCWSTR  pszPropName 
)

◆ SHPropertyBag_ReadBOOL()

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

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadBOOLOld()

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

◆ SHPropertyBag_ReadBSTR()

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

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadDWORD()

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

◆ SHPropertyBag_ReadGUID()

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

Referenced by SHPropertyBag_ReadTest().

◆ SHPropertyBag_ReadInt()

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

◆ SHPropertyBag_ReadLONG()

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

Definition at line 5601 of file ordinal.c.

5602{
5603#ifdef __REACTOS__
5604 HRESULT hr;
5605 VARIANTARG varg;
5606
5607 TRACE("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5608
5609 if (!ppb || !pszPropName || !pValue)
5610 {
5611 ERR("%p %s %p\n", ppb, debugstr_w(pszPropName), pValue);
5612 return E_INVALIDARG;
5613 }
5614
5615 hr = SHPropertyBag_ReadType(ppb, pszPropName, &varg, VT_I4);
5616 if (SUCCEEDED(hr))
5617 *pValue = V_I4(&varg);
5618#else
5619 VARIANT var;
5620 HRESULT hr;
5621 TRACE("%p %s %p\n", ppb,debugstr_w(pszPropName),pValue);
5622 if (!pszPropName || !ppb || !pValue)
5623 return E_INVALIDARG;
5624 V_VT(&var) = VT_I4;
5625 hr = IPropertyBag_Read(ppb, pszPropName, &var, NULL);
5626 if (SUCCEEDED(hr))
5627 {
5628 if (V_VT(&var) == VT_I4)
5629 *pValue = V_I4(&var);
5630 else
5632 }
5633#endif
5634 return hr;
5635}
@ 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:661
#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:1520

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

◆ SHRegisterClassA()

DWORD WINAPI SHRegisterClassA ( WNDCLASSA wndclass)

Definition at line 1817 of file ordinal.c.

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

Referenced by SHCreateWorkerWindowA().

◆ SHRemoveAllSubMenus()

DWORD WINAPI SHRemoveAllSubMenus ( HMENU  hMenu)

Definition at line 1752 of file ordinal.c.

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

◆ SHRemoveDataBlock()

BOOL WINAPI SHRemoveDataBlock ( LPDBLIST lppList,
DWORD  dwSignature 
)

Definition at line 355 of file clist.c.

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

Referenced by CShellLink::RemoveDataBlock().

◆ SHRestrictionLookup()

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

◆ SHSearchMapInt()

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

Definition at line 2161 of file ordinal.c.

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

Referenced by init_pointers().

◆ SHSendMessageBroadcastW()

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

Definition at line 4072 of file ordinal.c.

4073{
4075 SMTO_ABORTIFHUNG, 2000, NULL);
4076}
#define HWND_BROADCAST
Definition: winuser.h:1207
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:1226

Referenced by SHGetSetSettings().

◆ SHSetDefaultDialogFont()

VOID WINAPI SHSetDefaultDialogFont ( HWND  hWnd,
INT  id 
)

Definition at line 2457 of file ordinal.c.

2459{
2460#ifdef __REACTOS__
2461 HFONT hOldFont, hNewFont;
2462 LOGFONTW lfOldFont, lfNewFont;
2463 HWND hwndItem;
2464
2465 TRACE("(%p, %d)\n", hWnd, id);
2466
2467 hOldFont = (HFONT)SendMessageW(hWnd, WM_GETFONT, 0, 0);
2468 GetObjectW(hOldFont, sizeof(lfOldFont), &lfOldFont);
2469 SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(lfNewFont), &lfNewFont, 0);
2470
2471 if (lfOldFont.lfCharSet == lfNewFont.lfCharSet)
2472 return;
2473
2474 hNewFont = GetPropW(hWnd, L"PropDlgFont");
2475 if (!hNewFont)
2476 {
2477 /* Create the icon-title font of the same height */
2478 lfNewFont.lfHeight = lfOldFont.lfHeight;
2479 hNewFont = CreateFontIndirectW(&lfNewFont);
2480
2481 /* If creating the font is failed, then keep the old font */
2482 if (!hNewFont)
2483 hNewFont = hOldFont;
2484
2485 /* Set "PropDlgFont" property if the font is changed */
2486 if (hOldFont != hNewFont)
2487 SetPropW(hWnd, L"PropDlgFont", hNewFont);
2488 }
2489
2490 hwndItem = GetDlgItem(hWnd, id);
2491 SendMessageW(hwndItem, WM_SETFONT, (WPARAM)hNewFont, 0);
2492#else
2493 FIXME("(%p, %d) stub\n", hWnd, id);
2494 return S_OK;
2495#endif
2496}
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:1383
#define WM_GETFONT
Definition: winuser.h:1654
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SETFONT
Definition: winuser.h:1653
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)

◆ SHSetIniStringUTF7W()

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

Definition at line 748 of file propbag.cpp.

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

Referenced by CIniPropertyBag::Write().

◆ SHSetIniStringW()

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

Definition at line 658 of file propbag.cpp.

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

Referenced by SHSetIniStringUTF7W().

◆ SHSetParentHwnd()

HWND WINAPI SHSetParentHwnd ( HWND  hWnd,
HWND  hWndParent 
)

Definition at line 1158 of file ordinal.c.

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

Referenced by init_pointers().

◆ SHSetWindowBits()

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

Definition at line 1130 of file ordinal.c.

1131{
1133 LONG new_flags = (flags & mask) | (ret & ~mask);
1134
1135 TRACE("%p %d %x %x\n", hwnd, offset, mask, flags);
1136
1137 if (new_flags != ret)
1138 ret = SetWindowLongW(hwnd, offset, new_flags);
1139 return ret;
1140}
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 1828 of file ordinal.c.

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

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

◆ SHUnicodeToAnsi()

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(), SHELL_IsVerb(), and SHInvokeCommandOnContextMenuInternal().

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

2051{
2052 DWORD dwEndTicks = GetTickCount() + dwTimeout;
2053 DWORD dwRet;
2054
2055 while ((dwRet = MsgWaitForMultipleObjectsEx(1, &hand, dwTimeout, QS_SENDMESSAGE, 0)) == 1)
2056 {
2057 MSG msg;
2058
2059 PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE);
2060
2061 if (dwTimeout != INFINITE)
2062 {
2063 if ((int)(dwTimeout = dwEndTicks - GetTickCount()) <= 0)
2064 return WAIT_TIMEOUT;
2065 }
2066 }
2067
2068 return dwRet;
2069}
#define WAIT_TIMEOUT
Definition: dderror.h:14
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:883
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:1198

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