ReactOS  0.4.15-dev-980-ge160524
shellord.c File Reference
#include <wine/config.h>
#include <windef.h>
#include <winbase.h>
#include <wine/winternl.h>
#include <shlobj.h>
#include <undocshell.h>
#include <shlwapi.h>
#include <commdlg.h>
#include <commoncontrols.h>
#include "../shellrecyclebin/recyclebin.h"
#include <wine/debug.h>
#include <wine/unicode.h>
#include "pidl.h"
#include "shell32_main.h"
Include dependency graph for shellord.c:

Go to the source code of this file.

Classes

struct  tagCREATEMRULIST
 
struct  _PSXA
 
struct  _PSXA_CALL
 
struct  UxSubclassInfo
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COBJMACROS
 
#define MRUF_STRING_LIST   0 /* list will contain strings */
 
#define MRUF_BINARY_LIST   1 /* list will contain binary data */
 
#define MRUF_DELAYED_SAVE   2 /* only save list order to reg. is FreeMRUList */
 

Typedefs

typedef struct tagCREATEMRULIST CREATEMRULISTA
 
typedef struct tagCREATEMRULISTLPCREATEMRULISTA
 
typedef struct _PSXA PSXA
 
typedef struct _PSXAPPSXA
 
typedef struct _PSXA_CALL PSXA_CALL
 
typedef struct _PSXA_CALLPPSXA_CALL
 
typedef struct UxSubclassInfo UxSubclassInfo
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
 WINE_DECLARE_DEBUG_CHANNEL (pidl)
 
HANDLE WINAPI CreateMRUListA (LPCREATEMRULISTA lpcml)
 
VOID WINAPI FreeMRUList (HANDLE hMRUList)
 
INT WINAPI AddMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData)
 
INT WINAPI FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum)
 
INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer, DWORD nBufferSize)
 
DWORD WINAPI ParseFieldA (LPCSTR src, DWORD nField, LPSTR dst, DWORD len)
 
DWORD WINAPI ParseFieldW (LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len)
 
DWORD WINAPI ParseFieldAW (LPCVOID src, DWORD nField, LPVOID dst, DWORD len)
 
BOOL WINAPI GetFileNameFromBrowse (HWND hwndOwner, LPWSTR lpstrFile, UINT nMaxFile, LPCWSTR lpstrInitialDir, LPCWSTR lpstrDefExt, LPCWSTR lpstrFilter, LPCWSTR lpstrTitle)
 
VOID WINAPI SHGetSetSettings (LPSHELLSTATE lpss, DWORD dwMask, BOOL bSet)
 
VOID WINAPI SHGetSettings (LPSHELLFLAGSTATE lpsfs, DWORD dwMask)
 
LRESULT WINAPI SHShellFolderView_Message (HWND hwndCabinet, UINT uMessage, LPARAM lParam)
 
BOOL WINAPI RegisterShellHook (HWND hWnd, DWORD dwType)
 
int ShellMessageBoxW (HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,...)
 
int ShellMessageBoxA (HINSTANCE hInstance, HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,...)
 
HRESULT WINAPI SHRegisterDragDrop (HWND hWnd, LPDROPTARGET pDropTarget)
 
HRESULT WINAPI SHRevokeDragDrop (HWND hWnd)
 
HRESULT WINAPI SHDoDragDrop (HWND hWnd, LPDATAOBJECT lpDataObject, LPDROPSOURCE lpDropSource, DWORD dwOKEffect, LPDWORD pdwEffect)
 
WORD WINAPI ArrangeWindows (HWND hwndParent, DWORD dwReserved, const RECT *lpRect, WORD cKids, const HWND *lpKids)
 
BOOL WINAPI SignalFileOpen (PCIDLIST_ABSOLUTE pidl)
 
static INT SHADD_get_policy (LPCSTR policy, LPDWORD type, LPVOID buffer, LPDWORD len)
 
static INT CALLBACK SHADD_compare_mru (LPCVOID data1, LPCVOID data2, DWORD cbData)
 
static INT SHADD_create_add_mru_data (HANDLE mruhandle, LPCSTR doc_name, LPCSTR new_lnk_name, LPSTR buffer, INT *len)
 
void WINAPI SHAddToRecentDocs (UINT uFlags, LPCVOID pv)
 
HRESULT WINAPI SHCreateShellFolderViewEx (LPCSFV psvcbi, IShellView **ppv)
 
HRESULT WINAPI SHWinHelp (HWND hwnd, LPCWSTR pszHelp, UINT uCommand, ULONG_PTR dwData)
 
BOOL WINAPI SHRunControlPanel (LPCWSTR commandLine, HWND parent)
 
VOID WINAPI SHSetInstanceExplorer (LPUNKNOWN lpUnknown)
 
HRESULT WINAPI SHGetInstanceExplorer (IUnknown **lpUnknown)
 
void WINAPI SHFreeUnusedLibraries (void)
 
BOOL WINAPI DAD_AutoScroll (HWND hwnd, AUTO_SCROLL_DATA *samples, const POINT *pt)
 
BOOL WINAPI DAD_DragEnter (HWND hwnd)
 
BOOL WINAPI DAD_DragEnterEx (HWND hwnd, POINT p)
 
BOOL WINAPI DAD_DragMove (POINT p)
 
BOOL WINAPI DAD_DragLeave (VOID)
 
BOOL WINAPI DAD_SetDragImage (HIMAGELIST himlTrack, LPPOINT lppt)
 
BOOL WINAPI DAD_ShowDragImage (BOOL bShow)
 
BOOL WINAPI ReadCabinetState (CABINETSTATE *cs, int length)
 
BOOL WINAPI WriteCabinetState (CABINETSTATE *cs)
 
BOOL WINAPI FileIconInit (BOOL bFullInit)
 
HRESULT WINAPI SetAppStartingCursor (HWND u, DWORD v)
 
HRESULT WINAPI SHLoadOLE (LPARAM lParam)
 
int WINAPI DriveType (int DriveType)
 
int WINAPI InvalidateDriveType (int u)
 
HRESULT WINAPI SHAbortInvokeCommand (void)
 
int WINAPI SHOutOfMemoryMessageBox (HWND hwndOwner, LPCSTR lpCaption, UINT uType)
 
HRESULT WINAPI SHFlushClipboard (void)
 
BOOL WINAPI SHWaitForFileToOpen (LPCITEMIDLIST pidl, DWORD dwFlags, DWORD dwTimeout)
 
DWORD WINAPI RLBuildListOfPaths (void)
 
BOOL WINAPI SHValidateUNC (HWND hwndOwner, PWSTR pszFile, UINT fConnect)
 
DWORD WINAPI DoEnvironmentSubstA (LPSTR pszString, UINT cchString)
 
DWORD WINAPI DoEnvironmentSubstW (LPWSTR pszString, UINT cchString)
 
DWORD WINAPI DoEnvironmentSubstAW (LPVOID x, UINT y)
 
BOOL WINAPI GUIDFromStringA (LPCSTR str, LPGUID guid)
 
BOOL WINAPI GUIDFromStringW (LPCWSTR str, LPGUID guid)
 
BOOL WINAPI PathIsTemporaryA (LPSTR Str)
 
BOOL WINAPI PathIsTemporaryW (LPWSTR Str)
 
static BOOL CALLBACK PsxaCall (HPROPSHEETPAGE hpage, LPARAM lParam)
 
UINT WINAPI SHAddFromPropSheetExtArray (HPSXA hpsxa, LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
 
HPSXA WINAPI SHCreatePropSheetExtArray (HKEY hKey, LPCWSTR pszSubKey, UINT max_iface)
 
HPSXA WINAPI SHCreatePropSheetExtArrayEx (HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, LPDATAOBJECT pDataObj)
 
UINT WINAPI SHReplaceFromPropSheetExtArray (HPSXA hpsxa, UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam)
 
void WINAPI SHDestroyPropSheetExtArray (HPSXA hpsxa)
 
HRESULT WINAPI CIDLData_CreateFromIDArray (PCIDLIST_ABSOLUTE pidlFolder, UINT cpidlFiles, PCUIDLIST_RELATIVE_ARRAY lppidlFiles, LPDATAOBJECT *ppdataObject)
 
HRESULT WINAPI SHCreateStdEnumFmtEtc (UINT cFormats, const FORMATETC *lpFormats, LPENUMFORMATETC *ppenumFormatetc)
 
BOOL WINAPI SHFindFiles (PCIDLIST_ABSOLUTE pidlFolder, PCIDLIST_ABSOLUTE pidlSaveFile)
 
void WINAPI SHUpdateImageW (LPCWSTR pszHashItem, int iIndex, UINT uFlags, int iImageIndex)
 
VOID WINAPI SHUpdateImageA (LPCSTR pszHashItem, INT iIndex, UINT uFlags, INT iImageIndex)
 
INT WINAPI SHHandleUpdateImage (PCIDLIST_ABSOLUTE pidlExtra)
 
BOOL WINAPI SHObjectProperties (HWND hwnd, DWORD dwType, LPCWSTR szObject, LPCWSTR szPage)
 
BOOL WINAPI SHGetNewLinkInfoA (LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, BOOL *pfMustCopy, UINT uFlags)
 
BOOL WINAPI SHGetNewLinkInfoW (LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags)
 
HRESULT WINAPI SHStartNetConnectionDialog (HWND hwnd, LPCSTR pszRemoteName, DWORD dwType)
 
HRESULT WINAPI SHSetLocalizedName (LPCWSTR pszPath, LPCWSTR pszResModule, int idsRes)
 
BOOL WINAPI LinkWindow_RegisterClass (void)
 
BOOL WINAPI LinkWindow_UnregisterClass (DWORD dwUnused)
 
void WINAPI SHFlushSFCache (void)
 
HRESULT WINAPI SHGetImageList (int iImageList, REFIID riid, void **ppv)
 
HRESULT WINAPI SHCreateShellFolderView (const SFV_CREATE *pcsfv, IShellView **ppsv)
 
EXTERN_C BOOL WINAPI SHTestTokenMembership (HANDLE TokenHandle, ULONG ulRID)
 
BOOL WINAPI IsUserAnAdmin (VOID)
 
static void UxSubclassInfo_Destroy (UxSubclassInfo *pInfo)
 
static BOOL DoSanitizeText (LPWSTR pszSanitized, LPCWSTR pszInvalidChars, LPCWSTR pszValidChars)
 
static void DoSanitizeClipboard (HWND hwnd, UxSubclassInfo *pInfo)
 
static LRESULT CALLBACK LimitEditWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static UxSubclassInfoUxSubclassInfo_Create (HWND hwnd, LPWSTR valid, LPWSTR invalid)
 
HRESULT WINAPI SHLimitInputEdit (HWND hWnd, IShellFolder *psf)
 

Variables

static LPUNKNOWN SHELL32_IExplorerInterface =0
 
static const WCHAR szwCabLocation []
 
static const WCHAR szwSettings [] = { 'S','e','t','t','i','n','g','s',0 }
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 26 of file shellord.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 27 of file shellord.c.

◆ MRUF_BINARY_LIST

#define MRUF_BINARY_LIST   1 /* list will contain binary data */

Definition at line 65 of file shellord.c.

◆ MRUF_DELAYED_SAVE

#define MRUF_DELAYED_SAVE   2 /* only save list order to reg. is FreeMRUList */

Definition at line 66 of file shellord.c.

◆ MRUF_STRING_LIST

#define MRUF_STRING_LIST   0 /* list will contain strings */

Definition at line 64 of file shellord.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 25 of file shellord.c.

Typedef Documentation

◆ CREATEMRULISTA

◆ LPCREATEMRULISTA

◆ PPSXA

typedef struct _PSXA * PPSXA

◆ PPSXA_CALL

◆ PSXA

typedef struct _PSXA PSXA

◆ PSXA_CALL

◆ UxSubclassInfo

Function Documentation

◆ AddMRUData()

INT WINAPI AddMRUData ( HANDLE  hList,
LPCVOID  lpData,
DWORD  cbData 
)

Definition at line 465 of file comctl32undoc.c.

466 {
467  LPWINEMRULIST mp = hList;
468  LPWINEMRUITEM witem;
469  INT i, replace;
470 
471  if ((replace = FindMRUData (hList, lpData, cbData, NULL)) >= 0) {
472  /* Item exists, just move it to the front */
473  LPWSTR pos = strchrW(mp->realMRU, replace + 'a');
474  while (pos > mp->realMRU)
475  {
476  pos[0] = pos[-1];
477  pos--;
478  }
479  }
480  else {
481  /* either add a new entry or replace oldest */
482  if (mp->cursize < mp->extview.uMax) {
483  /* Add in a new item */
484  replace = mp->cursize;
485  mp->cursize++;
486  }
487  else {
488  /* get the oldest entry and replace data */
489  replace = mp->realMRU[mp->cursize - 1] - 'a';
490  Free(mp->array[replace]);
491  }
492 
493  /* Allocate space for new item and move in the data */
494  mp->array[replace] = witem = Alloc(cbData + sizeof(WINEMRUITEM));
495  witem->itemFlag |= WMRUIF_CHANGED;
496  witem->size = cbData;
497  memcpy( &witem->datastart, lpData, cbData);
498 
499  /* now rotate MRU list */
500  for(i=mp->cursize-1; i>=1; i--)
501  mp->realMRU[i] = mp->realMRU[i-1];
502  }
503 
504  /* The new item gets the front spot */
505  mp->wineFlags |= WMRUF_CHANGED;
506  mp->realMRU[0] = replace + 'a';
507 
508  TRACE("(%p, %p, %d) adding data, /%c/ now most current\n",
509  hList, lpData, cbData, replace+'a');
510 
511  if (!(mp->extview.fFlags & MRU_CACHEWRITE)) {
512  /* save changed stuff right now */
513  MRU_SaveChanged( mp );
514  }
515 
516  return replace;
517 }
#define WMRUIF_CHANGED
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
int32_t INT
Definition: typedefs.h:58
LPVOID WINAPI Alloc(DWORD dwSize)
Definition: comctl32undoc.c:71
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
smooth NULL
Definition: ftsmooth.c:416
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
Definition: replace.c:47
#define TRACE(s)
Definition: solgame.cpp:4
#define MRU_CACHEWRITE
BOOL WINAPI Free(LPVOID lpMem)
LPWINEMRUITEM * array
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
INT WINAPI FindMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum)
HWND hList
Definition: livecd.c:10
#define WMRUF_CHANGED
MRUINFOW extview
static void MRU_SaveChanged(LPWINEMRULIST mp)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by SHADD_create_add_mru_data(), and SHAddToRecentDocs().

◆ ArrangeWindows()

WORD WINAPI ArrangeWindows ( HWND  hwndParent,
DWORD  dwReserved,
const RECT lpRect,
WORD  cKids,
const HWND lpKids 
)

Definition at line 610 of file shellord.c.

612 {
613  /* Unimplemented in WinXP SP3 */
614  TRACE("(%p 0x%08x %p 0x%04x %p):stub.\n",
615  hwndParent, dwReserved, lpRect, cKids, lpKids);
616  return 0;
617 }
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
static HWND hwndParent
Definition: cryptui.c:300
#define TRACE(s)
Definition: solgame.cpp:4

◆ CIDLData_CreateFromIDArray()

HRESULT WINAPI CIDLData_CreateFromIDArray ( PCIDLIST_ABSOLUTE  pidlFolder,
UINT  cpidlFiles,
PCUIDLIST_RELATIVE_ARRAY  lppidlFiles,
LPDATAOBJECT ppdataObject 
)

Definition at line 2166 of file shellord.c.

2171 {
2172  UINT i;
2173  HWND hwnd = 0; /*FIXME: who should be hwnd of owner? set to desktop */
2174  HRESULT hResult;
2175 
2176  TRACE("(%p, %d, %p, %p)\n", pidlFolder, cpidlFiles, lppidlFiles, ppdataObject);
2177  if (TRACE_ON(pidl))
2178  {
2179  pdump (pidlFolder);
2180  for (i=0; i<cpidlFiles; i++) pdump (lppidlFiles[i]);
2181  }
2182  hResult = IDataObject_Constructor(hwnd, pidlFolder, lppidlFiles, cpidlFiles, FALSE, ppdataObject);
2183  return hResult;
2184 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
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
#define FALSE
Definition: types.h:117
HRESULT IDataObject_Constructor(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl, PCUIDLIST_RELATIVE_ARRAY apidl, UINT cidl, BOOL bExtendedObject, IDataObject **dataObject)
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
void pdump(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:248
unsigned int UINT
Definition: ndis.h:50
#define TRACE_ON(x)
Definition: compat.h:75

Referenced by _CDataObject_CreateInstance(), CZipFolder::GetUIObjectOf(), CCommonFolder< CRegistryFolder, RegPidlEntry, CRegistryFolderExtractIcon >::GetUIObjectOf(), TestAdviseAndCanonical(), TestDefaultFormat(), and TestSetAndGetExtraFormat().

◆ CreateMRUListA()

HANDLE WINAPI CreateMRUListA ( LPCREATEMRULISTA  lpcml)

Referenced by SHAddToRecentDocs().

◆ DAD_AutoScroll()

BOOL WINAPI DAD_AutoScroll ( HWND  hwnd,
AUTO_SCROLL_DATA samples,
const POINT pt 
)

Definition at line 1531 of file shellord.c.

1532 {
1533  FIXME("hwnd = %p %p %p\n",hwnd,samples,pt);
1534  return FALSE;
1535 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
GLsizei samples
Definition: glext.h:7006
#define pt(x, y)
Definition: drawing.c:79
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111

◆ DAD_DragEnter()

BOOL WINAPI DAD_DragEnter ( HWND  hwnd)

Definition at line 1540 of file shellord.c.

1541 {
1542  FIXME("hwnd = %p\n",hwnd);
1543  return FALSE;
1544 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111

◆ DAD_DragEnterEx()

BOOL WINAPI DAD_DragEnterEx ( HWND  hwnd,
POINT  p 
)

Definition at line 1549 of file shellord.c.

1550 {
1551  FIXME("hwnd = %p (%d,%d)\n",hwnd,p.x,p.y);
1552  return FALSE;
1553 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111
GLfloat GLfloat p
Definition: glext.h:8902

◆ DAD_DragLeave()

BOOL WINAPI DAD_DragLeave ( VOID  )

Definition at line 1567 of file shellord.c.

1568 {
1569  FIXME("\n");
1570  return FALSE;
1571 }
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111

◆ DAD_DragMove()

BOOL WINAPI DAD_DragMove ( POINT  p)

Definition at line 1558 of file shellord.c.

1559 {
1560  FIXME("(%d,%d)\n",p.x,p.y);
1561  return FALSE;
1562 }
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111
GLfloat GLfloat p
Definition: glext.h:8902

◆ DAD_SetDragImage()

BOOL WINAPI DAD_SetDragImage ( HIMAGELIST  himlTrack,
LPPOINT  lppt 
)

Definition at line 1578 of file shellord.c.

1581 {
1582  FIXME("%p %p stub\n",himlTrack, lppt);
1583  return FALSE;
1584 }
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111

◆ DAD_ShowDragImage()

BOOL WINAPI DAD_ShowDragImage ( BOOL  bShow)

Definition at line 1591 of file shellord.c.

1592 {
1593  FIXME("0x%08x stub\n",bShow);
1594  return FALSE;
1595 }
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111

◆ DoEnvironmentSubstA()

DWORD WINAPI DoEnvironmentSubstA ( LPSTR  pszString,
UINT  cchString 
)

Definition at line 1808 of file shellord.c.

1809 {
1810  LPSTR dst;
1811  BOOL res = FALSE;
1812  DWORD len = cchString;
1813 
1814  TRACE("(%s, %d)\n", debugstr_a(pszString), cchString);
1815  if (pszString == NULL) /* Really return 0? */
1816  return 0;
1817  if ((dst = (LPSTR)HeapAlloc(GetProcessHeap(), 0, cchString * sizeof(CHAR))))
1818  {
1819  len = ExpandEnvironmentStringsA(pszString, dst, cchString);
1820  /* len includes the terminating 0 */
1821  if (len && len < cchString)
1822  {
1823  res = TRUE;
1824  memcpy(pszString, dst, len);
1825  }
1826  else
1827  len = cchString;
1828 
1829  HeapFree(GetProcessHeap(), 0, dst);
1830  }
1831  return MAKELONG(len, res);
1832 }
#define TRUE
Definition: types.h:120
char CHAR
Definition: xmlstorage.h:175
char * LPSTR
Definition: xmlstorage.h:182
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define MAKELONG(a, b)
Definition: typedefs.h:249
smooth NULL
Definition: ftsmooth.c:416
DWORD WINAPI ExpandEnvironmentStringsA(IN LPCSTR lpSrc, IN LPSTR lpDst, IN DWORD nSize)
Definition: environ.c:399
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:484
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define debugstr_a
Definition: kernel32.h:31
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
GLenum GLenum dst
Definition: glext.h:6340
GLuint res
Definition: glext.h:9613
#define HeapFree(x, y, z)
Definition: compat.h:483
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4505

Referenced by DoEnvironmentSubstAW(), and test_DoEnvironmentSubst().

◆ DoEnvironmentSubstAW()

DWORD WINAPI DoEnvironmentSubstAW ( LPVOID  x,
UINT  y 
)

Definition at line 1883 of file shellord.c.

1884 {
1885  if (SHELL_OsIsUnicode())
1886  return DoEnvironmentSubstW(x, y);
1887  return DoEnvironmentSubstA(x, y);
1888 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static __inline BOOL SHELL_OsIsUnicode(void)
Definition: shell32_main.h:130
DWORD WINAPI DoEnvironmentSubstW(LPWSTR pszString, UINT cchString)
Definition: shellord.c:1853
DWORD WINAPI DoEnvironmentSubstA(LPSTR pszString, UINT cchString)
Definition: shellord.c:1808
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ DoEnvironmentSubstW()

DWORD WINAPI DoEnvironmentSubstW ( LPWSTR  pszString,
UINT  cchString 
)

Definition at line 1853 of file shellord.c.

1854 {
1855  LPWSTR dst;
1856  BOOL res = FALSE;
1857  DWORD len = cchString;
1858 
1859  TRACE("(%s, %d)\n", debugstr_w(pszString), cchString);
1860 
1861  if ((cchString < MAXLONG) && (dst = HeapAlloc(GetProcessHeap(), 0, cchString * sizeof(WCHAR))))
1862  {
1863  len = ExpandEnvironmentStringsW(pszString, dst, cchString);
1864  /* len includes the terminating 0 */
1865  if (len && len <= cchString)
1866  {
1867  res = TRUE;
1868  memcpy(pszString, dst, len * sizeof(WCHAR));
1869  }
1870  else
1871  len = cchString;
1872 
1873  HeapFree(GetProcessHeap(), 0, dst);
1874  }
1875  return MAKELONG(len, res);
1876 }
#define MAXLONG
Definition: umtypes.h:116
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:484
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
GLenum GLenum dst
Definition: glext.h:6340
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
GLuint res
Definition: glext.h:9613
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:483
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4505

Referenced by DoEnvironmentSubstAW(), and test_DoEnvironmentSubst().

◆ DoSanitizeClipboard()

static void DoSanitizeClipboard ( HWND  hwnd,
UxSubclassInfo pInfo 
)
static

Definition at line 2604 of file shellord.c.

2605 {
2606  HGLOBAL hData;
2607  LPWSTR pszText, pszSanitized;
2608  DWORD cbData;
2609 
2611  return;
2612  if (!OpenClipboard(hwnd))
2613  return;
2614 
2616  pszText = GlobalLock(hData);
2617  if (!pszText)
2618  {
2619  CloseClipboard();
2620  return;
2621  }
2622  SHStrDupW(pszText, &pszSanitized);
2623  GlobalUnlock(hData);
2624 
2625  if (pszSanitized &&
2626  DoSanitizeText(pszSanitized, pInfo->pwszInvalidChars, pInfo->pwszValidChars))
2627  {
2628  MessageBeep(0xFFFFFFFF);
2629 
2630  /* Update clipboard text */
2631  cbData = (lstrlenW(pszSanitized) + 1) * sizeof(WCHAR);
2632  hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, cbData);
2633  pszText = GlobalLock(hData);
2634  if (pszText)
2635  {
2636  CopyMemory(pszText, pszSanitized, cbData);
2637  GlobalUnlock(hData);
2638 
2640  }
2641  }
2642 
2643  CoTaskMemFree(pszSanitized);
2644  CloseClipboard();
2645 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
LPWSTR pwszValidChars
Definition: shellord.c:2550
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
#define ES_READONLY
Definition: pedump.c:675
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
Definition: string.c:2004
#define GetWindowLongPtrW
Definition: winuser.h:4804
#define GMEM_SHARE
Definition: winbase.h:302
#define lstrlenW
Definition: compat.h:498
HANDLE WINAPI SetClipboardData(_In_ UINT, _In_opt_ HANDLE)
static BOOL DoSanitizeText(LPWSTR pszSanitized, LPCWSTR pszInvalidChars, LPCWSTR pszValidChars)
Definition: shellord.c:2571
#define CF_UNICODETEXT
Definition: constants.h:408
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define CopyMemory
Definition: winbase.h:1646
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI CloseClipboard(void)
Definition: ntwrapper.h:178
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
BOOL WINAPI MessageBeep(_In_ UINT)
#define GWL_STYLE
Definition: winuser.h:846
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
HANDLE WINAPI GetClipboardData(_In_ UINT)
BOOL WINAPI OpenClipboard(_In_opt_ HWND)
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPWSTR pwszInvalidChars
Definition: shellord.c:2551
#define GMEM_MOVEABLE
Definition: winbase.h:291

Referenced by LimitEditWindowProc().

◆ DoSanitizeText()

static BOOL DoSanitizeText ( LPWSTR  pszSanitized,
LPCWSTR  pszInvalidChars,
LPCWSTR  pszValidChars 
)
static

Definition at line 2571 of file shellord.c.

2572 {
2573  LPWSTR pch1, pch2;
2574  BOOL bFound = FALSE;
2575 
2576  for (pch1 = pch2 = pszSanitized; *pch1; ++pch1)
2577  {
2578  if (pszInvalidChars)
2579  {
2580  if (wcschr(pszInvalidChars, *pch1) != NULL)
2581  {
2582  bFound = TRUE;
2583  continue;
2584  }
2585  }
2586  else if (pszValidChars)
2587  {
2588  if (wcschr(pszValidChars, *pch1) == NULL)
2589  {
2590  bFound = TRUE;
2591  continue;
2592  }
2593  }
2594 
2595  *pch2 = *pch1;
2596  ++pch2;
2597  }
2598  *pch2 = 0;
2599 
2600  return bFound;
2601 }
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by DoSanitizeClipboard().

◆ DriveType()

int WINAPI DriveType ( int  DriveType)

Definition at line 1726 of file shellord.c.

1727 {
1728  WCHAR root[] = L"A:\\";
1729  root[0] = L'A' + DriveType;
1730  return GetDriveTypeW(root);
1731 }
__wchar_t WCHAR
Definition: xmlstorage.h:180
int WINAPI DriveType(int DriveType)
Definition: shellord.c:1726
static const WCHAR L[]
Definition: oid.c:1250
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497

Referenced by DriveType().

◆ EnumMRUListA()

INT WINAPI EnumMRUListA ( HANDLE  hList,
INT  nItemPos,
LPVOID  lpBuffer,
DWORD  nBufferSize 
)

Definition at line 863 of file comctl32undoc.c.

865 {
866  const WINEMRULIST *mp = hList;
867  LPWINEMRUITEM witem;
869  DWORD lenA;
870 
871  if (!mp) return -1;
872  if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
873  if (nItemPos >= mp->cursize) return -1;
874  desired = mp->realMRU[nItemPos];
875  desired -= 'a';
876  TRACE("nItemPos=%d, desired=%d\n", nItemPos, desired);
877  witem = mp->array[desired];
878  if(mp->extview.fFlags & MRU_BINARY) {
879  datasize = min( witem->size, nBufferSize );
880  memcpy( lpBuffer, &witem->datastart, datasize);
881  } else {
882  lenA = WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
883  NULL, 0, NULL, NULL);
884  datasize = min( lenA, nBufferSize );
885  WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
887  ((char *)lpBuffer)[ datasize - 1 ] = '\0';
888  datasize = lenA - 1;
889  }
890  TRACE("(%p, %d, %p, %d): returning len=%d\n",
891  hList, nItemPos, lpBuffer, nBufferSize, datasize);
892  return datasize;
893 }
#define WideCharToMultiByte
Definition: compat.h:111
#define CP_ACP
Definition: compat.h:109
int desired
Definition: jpeglib.h:1119
#define MRU_BINARY
int32_t INT
Definition: typedefs.h:58
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
smooth NULL
Definition: ftsmooth.c:416
static SIZE_T datasize
Definition: asm.c:30
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
LPWINEMRUITEM * array
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
HWND hList
Definition: livecd.c:10
#define min(a, b)
Definition: monoChain.cc:55
MRUINFOW extview
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by SHAddToRecentDocs().

◆ FileIconInit()

BOOL WINAPI FileIconInit ( BOOL  bFullInit)

Definition at line 1686 of file shellord.c.

1687 {
1688  return SIC_Initialize();
1689 }
BOOL SIC_Initialize(void)
Definition: iconcache.cpp:484

Referenced by DisplayImageList(), and StartWithDesktop().

◆ FindMRUData()

INT WINAPI FindMRUData ( HANDLE  hList,
LPCVOID  lpData,
DWORD  cbData,
LPINT  lpRegNum 
)

Definition at line 391 of file comctl32undoc.c.

393 {
394  const WINEMRULIST *mp = hList;
395  INT ret;
396  UINT i;
397  LPSTR dataA = NULL;
398 
399  if (!mp || !mp->extview.u.string_cmpfn)
400  return -1;
401 
402  if(!(mp->extview.fFlags & MRU_BINARY) && !mp->isUnicode) {
403  DWORD len = WideCharToMultiByte(CP_ACP, 0, lpData, -1,
404  NULL, 0, NULL, NULL);
405  dataA = Alloc(len);
406  WideCharToMultiByte(CP_ACP, 0, lpData, -1, dataA, len, NULL, NULL);
407  }
408 
409  for(i=0; i<mp->cursize; i++) {
410  if (mp->extview.fFlags & MRU_BINARY) {
411  if (!mp->extview.u.binary_cmpfn(lpData, &mp->array[i]->datastart, cbData))
412  break;
413  }
414  else {
415  if(mp->isUnicode) {
416  if (!mp->extview.u.string_cmpfn(lpData, (LPWSTR)&mp->array[i]->datastart))
417  break;
418  } else {
420  (LPWSTR)&mp->array[i]->datastart, -1,
421  NULL, 0, NULL, NULL);
422  LPSTR itemA = Alloc(len);
423  INT cmp;
425  itemA, len, NULL, NULL);
426 
427  cmp = mp->extview.u.string_cmpfn((LPWSTR)dataA, (LPWSTR)itemA);
428  Free(itemA);
429  if(!cmp)
430  break;
431  }
432  }
433  }
434  Free(dataA);
435  if (i < mp->cursize)
436  ret = i;
437  else
438  ret = -1;
439  if (lpRegNum && (ret != -1))
440  *lpRegNum = 'a' + i;
441 
442  TRACE("(%p, %p, %d, %p) returning %d\n",
443  hList, lpData, cbData, lpRegNum, ret);
444 
445  return ret;
446 }
#define WideCharToMultiByte
Definition: compat.h:111
#define CP_ACP
Definition: compat.h:109
#define MRU_BINARY
#define cmp(status, error)
Definition: error.c:114
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:58
LPVOID WINAPI Alloc(DWORD dwSize)
Definition: comctl32undoc.c:71
union tagMRUINFOW::@333 u
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
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI Free(LPVOID lpMem)
int ret
LPWINEMRUITEM * array
GLenum GLsizei len
Definition: glext.h:6722
HWND hList
Definition: livecd.c:10
MRUBinaryCmpFn binary_cmpfn
unsigned int UINT
Definition: ndis.h:50
MRUINFOW extview
WCHAR * LPWSTR
Definition: xmlstorage.h:184
MRUStringCmpFnW string_cmpfn

Referenced by SHAddToRecentDocs().

◆ FreeMRUList()

VOID WINAPI FreeMRUList ( HANDLE  hMRUList)

Definition at line 351 of file comctl32undoc.c.

352 {
353  LPWINEMRULIST mp = hMRUList;
354  UINT i;
355 
356  TRACE("(%p)\n", hMRUList);
357  if (!hMRUList)
358  return;
359 
360  if (mp->wineFlags & WMRUF_CHANGED) {
361  /* need to open key and then save the info */
362  MRU_SaveChanged( mp );
363  }
364 
365  for(i=0; i<mp->extview.uMax; i++)
366  Free(mp->array[i]);
367 
368  Free(mp->realMRU);
369  Free(mp->array);
370  Free(mp->extview.lpszSubKey);
371  Free(mp);
372 }
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
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI Free(LPVOID lpMem)
LPWINEMRUITEM * array
LPWSTR lpszSubKey
unsigned int UINT
Definition: ndis.h:50
#define WMRUF_CHANGED
MRUINFOW extview
static void MRU_SaveChanged(LPWINEMRULIST mp)

Referenced by SHAddToRecentDocs().

◆ GetFileNameFromBrowse()

BOOL WINAPI GetFileNameFromBrowse ( HWND  hwndOwner,
LPWSTR  lpstrFile,
UINT  nMaxFile,
LPCWSTR  lpstrInitialDir,
LPCWSTR  lpstrDefExt,
LPCWSTR  lpstrFilter,
LPCWSTR  lpstrTitle 
)

Definition at line 153 of file shellord.c.

161 {
162 typedef BOOL (WINAPI *GetOpenFileNameProc)(OPENFILENAMEW *ofn);
164  GetOpenFileNameProc pGetOpenFileNameW;
166  BOOL ret;
167 
168  TRACE("%p, %s, %d, %s, %s, %s, %s)\n",
169  hwndOwner, debugstr_w(lpstrFile), nMaxFile, lpstrInitialDir, lpstrDefExt,
170  lpstrFilter, lpstrTitle);
171 
172  hmodule = LoadLibraryW(L"comdlg32.dll");
173  if(!hmodule) return FALSE;
174  pGetOpenFileNameW = (GetOpenFileNameProc)GetProcAddress(hmodule, "GetOpenFileNameW");
175  if(!pGetOpenFileNameW)
176  {
178  return FALSE;
179  }
180 
181  memset(&ofn, 0, sizeof(ofn));
182 
183  ofn.lStructSize = sizeof(ofn);
184  ofn.hwndOwner = hwndOwner;
185  ofn.lpstrFilter = lpstrFilter;
186  ofn.lpstrFile = lpstrFile;
187  ofn.nMaxFile = nMaxFile;
188  ofn.lpstrInitialDir = lpstrInitialDir;
189  ofn.lpstrTitle = lpstrTitle;
190  ofn.lpstrDefExt = lpstrDefExt;
192  ret = pGetOpenFileNameW(&ofn);
193 
195  return ret;
196 }
#define OFN_FILEMUSTEXIST
Definition: commdlg.h:106
#define OFN_EXPLORER
Definition: commdlg.h:104
HWND hwndOwner
Definition: commdlg.h:330
OPENFILENAME ofn
Definition: main.cpp:37
LPCSTR lpstrDefExt
Definition: commdlg.h:345
#define BOOL
Definition: nt_native.h:43
DWORD nMaxFile
Definition: commdlg.h:337
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
static HMODULE hmodule
Definition: rasapi.c:29
#define LoadLibraryW(x)
Definition: compat.h:495
#define TRACE(s)
Definition: solgame.cpp:4
#define FreeLibrary(x)
Definition: compat.h:496
LPCSTR lpstrInitialDir
Definition: commdlg.h:340
DWORD lStructSize
Definition: commdlg.h:329
#define WINAPI
Definition: msvc.h:6
int ret
static const WCHAR L[]
Definition: oid.c:1250
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
LPSTR lpstrFile
Definition: commdlg.h:336
LPCSTR lpstrFilter
Definition: commdlg.h:332
LPCSTR lpstrTitle
Definition: commdlg.h:341
#define GetProcAddress(x, y)
Definition: compat.h:501
#define memset(x, y, z)
Definition: compat.h:39
DWORD Flags
Definition: commdlg.h:342

◆ GUIDFromStringA()

BOOL WINAPI GUIDFromStringA ( LPCSTR  str,
LPGUID  guid 
)

Definition at line 1893 of file shellord.c.

1894 {
1895  TRACE("GUIDFromStringA() stub\n");
1896  return FALSE;
1897 }
#define FALSE
Definition: types.h:117
#define TRACE(s)
Definition: solgame.cpp:4

◆ GUIDFromStringW()

BOOL WINAPI GUIDFromStringW ( LPCWSTR  str,
LPGUID  guid 
)

Definition at line 1902 of file shellord.c.

1903 {
1904  UNICODE_STRING guid_str;
1905 
1906  RtlInitUnicodeString(&guid_str, str);
1907  return !RtlGUIDFromString(&guid_str, guid);
1908 }
const GUID * guid
const WCHAR * str
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)

◆ InvalidateDriveType()

int WINAPI InvalidateDriveType ( int  u)

Definition at line 1736 of file shellord.c.

1737 {
1738  TRACE("0x%08x stub\n",u);
1739  return 0;
1740 }
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 * u
Definition: glfuncs.h:240
#define TRACE(s)
Definition: solgame.cpp:4

◆ IsUserAnAdmin()

BOOL WINAPI IsUserAnAdmin ( VOID  )

Definition at line 2535 of file shellord.c.

2536 {
2538 }
EXTERN_C BOOL WINAPI SHTestTokenMembership(HANDLE TokenHandle, ULONG ulRID)
Definition: shellord.c:2483
smooth NULL
Definition: ftsmooth.c:416
#define DOMAIN_ALIAS_RID_ADMINS
Definition: setypes.h:624

Referenced by CStartMenuBtnCtxMenu::AddStartContextMenuItems().

◆ LimitEditWindowProc()

static LRESULT CALLBACK LimitEditWindowProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 2648 of file shellord.c.

2649 {
2650  WNDPROC fnWndProc;
2651  WCHAR wch;
2652  UxSubclassInfo *pInfo = GetPropW(hwnd, L"UxSubclassInfo");
2653  if (!pInfo)
2654  return DefWindowProcW(hwnd, uMsg, wParam, lParam);
2655 
2656  fnWndProc = pInfo->fnWndProc;
2657 
2658  switch (uMsg)
2659  {
2660  case WM_KEYDOWN:
2661  if (GetKeyState(VK_SHIFT) < 0 && wParam == VK_INSERT)
2662  DoSanitizeClipboard(hwnd, pInfo);
2663  else if (GetKeyState(VK_CONTROL) < 0 && wParam == L'V')
2664  DoSanitizeClipboard(hwnd, pInfo);
2665 
2666  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2667 
2668  case WM_PASTE:
2669  DoSanitizeClipboard(hwnd, pInfo);
2670  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2671 
2672  case WM_CHAR:
2673  if (GetKeyState(VK_CONTROL) < 0 && wParam == L'V')
2674  break;
2675 
2676  if (pInfo->pwszInvalidChars)
2677  {
2678  if (wcschr(pInfo->pwszInvalidChars, (WCHAR)wParam) != NULL)
2679  {
2680  MessageBeep(0xFFFFFFFF);
2681  break;
2682  }
2683  }
2684  else if (pInfo->pwszValidChars)
2685  {
2686  if (wcschr(pInfo->pwszValidChars, (WCHAR)wParam) == NULL)
2687  {
2688  MessageBeep(0xFFFFFFFF);
2689  break;
2690  }
2691  }
2692  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2693 
2694  case WM_UNICHAR:
2695  if (wParam == UNICODE_NOCHAR)
2696  return TRUE;
2697 
2698  /* FALL THROUGH */
2699 
2700  case WM_IME_CHAR:
2701  wch = (WCHAR)wParam;
2702  if (GetKeyState(VK_CONTROL) < 0 && wch == L'V')
2703  break;
2704 
2705  if (!IsWindowUnicode(hwnd) && HIBYTE(wch) != 0)
2706  {
2707  CHAR data[] = {HIBYTE(wch), LOBYTE(wch)};
2708  MultiByteToWideChar(CP_ACP, 0, data, 2, &wch, 1);
2709  }
2710 
2711  if (pInfo->pwszInvalidChars)
2712  {
2713  if (wcschr(pInfo->pwszInvalidChars, wch) != NULL)
2714  {
2715  MessageBeep(0xFFFFFFFF);
2716  break;
2717  }
2718  }
2719  else if (pInfo->pwszValidChars)
2720  {
2721  if (wcschr(pInfo->pwszValidChars, wch) == NULL)
2722  {
2723  MessageBeep(0xFFFFFFFF);
2724  break;
2725  }
2726  }
2727  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2728 
2729  case WM_NCDESTROY:
2730  UxSubclassInfo_Destroy(pInfo);
2731  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2732 
2733  default:
2734  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2735  }
2736 
2737  return 0;
2738 }
static void UxSubclassInfo_Destroy(UxSubclassInfo *pInfo)
Definition: shellord.c:2555
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
LPWSTR pwszValidChars
Definition: shellord.c:2550
#define WM_CHAR
Definition: winuser.h:1699
#define WM_IME_CHAR
Definition: winuser.h:1816
#define LOBYTE(W)
Definition: jmemdos.c:487
#define TRUE
Definition: types.h:120
#define CP_ACP
Definition: compat.h:109
WNDPROC fnWndProc
Definition: shellord.c:2549
char CHAR
Definition: xmlstorage.h:175
#define HIBYTE(W)
Definition: jmemdos.c:486
#define WM_PASTE
Definition: winuser.h:1845
#define VK_INSERT
Definition: winuser.h:2207
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define VK_SHIFT
Definition: winuser.h:2177
smooth NULL
Definition: ftsmooth.c:416
#define WM_KEYDOWN
Definition: winuser.h:1697
BOOL WINAPI IsWindowUnicode(_In_ HWND)
SHORT WINAPI GetKeyState(_In_ int)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WM_NCDESTROY
Definition: winuser.h:1666
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static const WCHAR L[]
Definition: oid.c:1250
BOOL WINAPI MessageBeep(_In_ UINT)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define MultiByteToWideChar
Definition: compat.h:110
#define VK_CONTROL
Definition: winuser.h:2178
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static void DoSanitizeClipboard(HWND hwnd, UxSubclassInfo *pInfo)
Definition: shellord.c:2604
LPWSTR pwszInvalidChars
Definition: shellord.c:2551
LPARAM lParam
Definition: combotst.c:139
#define WM_UNICHAR
Definition: richedit.h:67

Referenced by UxSubclassInfo_Create().

◆ LinkWindow_RegisterClass()

BOOL WINAPI LinkWindow_RegisterClass ( void  )

Definition at line 2363 of file shellord.c.

2364 {
2365  FIXME("()\n");
2366  return TRUE;
2367 }
#define TRUE
Definition: types.h:120
#define FIXME(fmt,...)
Definition: debug.h:111

◆ LinkWindow_UnregisterClass()

BOOL WINAPI LinkWindow_UnregisterClass ( DWORD  dwUnused)

Definition at line 2372 of file shellord.c.

2373 {
2374  FIXME("()\n");
2375  return TRUE;
2376 }
#define TRUE
Definition: types.h:120
#define FIXME(fmt,...)
Definition: debug.h:111

◆ ParseFieldA()

DWORD WINAPI ParseFieldA ( LPCSTR  src,
DWORD  nField,
LPSTR  dst,
DWORD  len 
)

Definition at line 82 of file shellord.c.

87 {
88  WARN("(%s,0x%08x,%p,%d) semi-stub.\n",debugstr_a(src),nField,dst,len);
89 
90  if (!src || !src[0] || !dst || !len)
91  return 0;
92 
93  /* skip n fields delimited by ',' */
94  while (nField > 1)
95  {
96  if (*src=='\0') return FALSE;
97  if (*(src++)==',') nField--;
98  }
99 
100  /* copy part till the next ',' to dst */
101  while ( *src!='\0' && *src!=',' && (len--)>0 ) *(dst++)=*(src++);
102 
103  /* finalize the string */
104  *dst=0x0;
105 
106  return TRUE;
107 }
#define TRUE
Definition: types.h:120
#define WARN(fmt,...)
Definition: debug.h:112
#define FALSE
Definition: types.h:117
#define debugstr_a
Definition: kernel32.h:31
GLenum GLsizei len
Definition: glext.h:6722
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340

Referenced by HCR_RegGetIconA(), and ParseFieldAW().

◆ ParseFieldAW()

DWORD WINAPI ParseFieldAW ( LPCVOID  src,
DWORD  nField,
LPVOID  dst,
DWORD  len 
)

Definition at line 142 of file shellord.c.

143 {
144  if (SHELL_OsIsUnicode())
145  return ParseFieldW(src, nField, dst, len);
146  return ParseFieldA(src, nField, dst, len);
147 }
DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len)
Definition: shellord.c:116
static __inline BOOL SHELL_OsIsUnicode(void)
Definition: shell32_main.h:130
DWORD WINAPI ParseFieldA(LPCSTR src, DWORD nField, LPSTR dst, DWORD len)
Definition: shellord.c:82
GLenum GLsizei len
Definition: glext.h:6722
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340

◆ ParseFieldW()

DWORD WINAPI ParseFieldW ( LPCWSTR  src,
DWORD  nField,
LPWSTR  dst,
DWORD  len 
)

Definition at line 116 of file shellord.c.

117 {
118  WARN("(%s,0x%08x,%p,%d) semi-stub.\n", debugstr_w(src), nField, dst, len);
119 
120  if (!src || !src[0] || !dst || !len)
121  return 0;
122 
123  /* skip n fields delimited by ',' */
124  while (nField > 1)
125  {
126  if (*src == 0x0) return FALSE;
127  if (*src++ == ',') nField--;
128  }
129 
130  /* copy part till the next ',' to dst */
131  while ( *src != 0x0 && *src != ',' && (len--)>0 ) *(dst++) = *(src++);
132 
133  /* finalize the string */
134  *dst = 0x0;
135 
136  return TRUE;
137 }
GLint x0
Definition: linetemp.h:95
#define TRUE
Definition: types.h:120
#define WARN(fmt,...)
Definition: debug.h:112
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
GLenum GLsizei len
Definition: glext.h:6722
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340

Referenced by CFSExtractIcon_CreateInstance(), HCR_RegGetIconW(), and ParseFieldAW().

◆ PathIsTemporaryA()

BOOL WINAPI PathIsTemporaryA ( LPSTR  Str)

Definition at line 1913 of file shellord.c.

1914 {
1915  FIXME("(%s)stub\n", debugstr_a(Str));
1916  return FALSE;
1917 }
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31

◆ PathIsTemporaryW()

BOOL WINAPI PathIsTemporaryW ( LPWSTR  Str)

Definition at line 1922 of file shellord.c.

1923 {
1924  FIXME("(%s)stub\n", debugstr_w(Str));
1925  return FALSE;
1926 }
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111

◆ PsxaCall()

static BOOL CALLBACK PsxaCall ( HPROPSHEETPAGE  hpage,
LPARAM  lParam 
)
static

Definition at line 1944 of file shellord.c.

1945 {
1946  PPSXA_CALL Call = (PPSXA_CALL)lParam;
1947 
1948  if (Call != NULL)
1949  {
1950  if ((Call->bMultiple || !Call->bCalled) &&
1951  Call->lpfnAddReplaceWith(hpage, Call->lParam))
1952  {
1953  Call->bCalled = TRUE;
1954  Call->uiCount++;
1955  return TRUE;
1956  }
1957  }
1958 
1959  return FALSE;
1960 }
#define TRUE
Definition: types.h:120
struct _PSXA_CALL * PPSXA_CALL
UINT uiCount
Definition: shellord.c:1941
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
BOOL bMultiple
Definition: shellord.c:1940
LPARAM lParam
Definition: shellord.c:1938
LPFNADDPROPSHEETPAGE lpfnAddReplaceWith
Definition: shellord.c:1937
BOOL bCalled
Definition: shellord.c:1939
LPARAM lParam
Definition: combotst.c:139

Referenced by SHAddFromPropSheetExtArray(), and SHReplaceFromPropSheetExtArray().

◆ ReadCabinetState()

BOOL WINAPI ReadCabinetState ( CABINETSTATE cs,
int  length 
)

Definition at line 1612 of file shellord.c.

1613 {
1614  HKEY hkey = 0;
1615  DWORD type, r;
1616 
1617  TRACE("%p %d\n", cs, length);
1618 
1619  if( (cs == NULL) || (length < (int)sizeof(*cs)) )
1620  return FALSE;
1621 
1623  if( r == ERROR_SUCCESS )
1624  {
1625  type = REG_BINARY;
1626  r = RegQueryValueExW( hkey, szwSettings,
1627  NULL, &type, (LPBYTE)cs, (LPDWORD)&length );
1628  RegCloseKey( hkey );
1629 
1630  }
1631 
1632  /* if we can't read from the registry, create default values */
1633  if ( (r != ERROR_SUCCESS) || (cs->cLength < sizeof(*cs)) ||
1634  (cs->cLength != length) )
1635  {
1636  TRACE("Initializing shell cabinet settings\n");
1637  memset(cs, 0, sizeof(*cs));
1638  cs->cLength = sizeof(*cs);
1639  cs->nVersion = 2;
1640  cs->fFullPathTitle = FALSE;
1641  cs->fSaveLocalView = TRUE;
1642  cs->fNotShell = FALSE;
1643  cs->fSimpleDefault = TRUE;
1644  cs->fDontShowDescBar = FALSE;
1645  cs->fNewWindowMode = FALSE;
1646  cs->fShowCompColor = FALSE;
1647  cs->fDontPrettyNames = FALSE;
1648  cs->fAdminsCreateCommonGroups = TRUE;
1649  cs->fMenuEnumFilter = 96;
1650  }
1651 
1652  return TRUE;
1653 }
static const WCHAR szwSettings[]
Definition: shellord.c:1606
#define ERROR_SUCCESS
Definition: deptool.c:10
#define REG_BINARY
Definition: nt_native.h:1496
#define TRUE
Definition: types.h:120
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define HKEY_CURRENT_USER
Definition: winreg.h:11
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
uint32_t cs
Definition: isohybrid.c:75
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3296
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
unsigned long DWORD
Definition: ntddk_ex.h:95
uint32_t * LPDWORD
Definition: typedefs.h:59
static const WCHAR szwCabLocation[]
Definition: shellord.c:1597
#define memset(x, y, z)
Definition: compat.h:39

Referenced by full_title(), CShellBrowser::Initialize(), IntGetNewWindowMode(), and IntSetNewWindowMode().

◆ RegisterShellHook()

BOOL WINAPI RegisterShellHook ( HWND  hWnd,
DWORD  dwType 
)

Definition at line 311 of file shellord.c.

314 {
315  if (dwType == 3)
316  {
319  }
320  else if (dwType == 0)
321  {
323  }
324 
325  ERR("Unsupported argument");
326  return FALSE;
327 }
HWND hWnd
Definition: settings.c:17
#define FALSE
Definition: types.h:117
BOOL WINAPI RegisterShellHookWindow(_In_ HWND)
#define ERR(fmt,...)
Definition: debug.h:110
HWND WINAPI SetTaskmanWindow(HWND)
Definition: window.c:1924
BOOL WINAPI DeregisterShellHookWindow(_In_ HWND)

Referenced by CTaskSwitchWnd::OnCreate(), and CTaskSwitchWnd::OnDestroy().

◆ RLBuildListOfPaths()

DWORD WINAPI RLBuildListOfPaths ( void  )

Definition at line 1789 of file shellord.c.

1790 { FIXME("stub\n");
1791  return 0;
1792 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SetAppStartingCursor()

HRESULT WINAPI SetAppStartingCursor ( HWND  u,
DWORD  v 
)

Definition at line 1694 of file shellord.c.

1695 { FIXME("hwnd=%p 0x%04x stub\n",u,v );
1696  return 0;
1697 }
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 * u
Definition: glfuncs.h:240
#define FIXME(fmt,...)
Definition: debug.h:111
const GLdouble * v
Definition: gl.h:2040

◆ SHAbortInvokeCommand()

HRESULT WINAPI SHAbortInvokeCommand ( void  )

Definition at line 1745 of file shellord.c.

1746 { FIXME("stub\n");
1747  return 1;
1748 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHADD_compare_mru()

static INT CALLBACK SHADD_compare_mru ( LPCVOID  data1,
LPCVOID  data2,
DWORD  cbData 
)
static

Definition at line 686 of file shellord.c.

687 {
688 #ifdef __REACTOS__
689  LPCWSTR psz1, psz2;
690  INT iCmp = lstrcmpiW(data1, data2);
691  if (iCmp != 0)
692  return iCmp;
693  psz1 = data1;
694  psz2 = data2;
695  psz1 += lstrlenW(psz1) + 1;
696  psz2 += lstrlenW(psz2) + 1;
697  return lstrcmpiW(psz1, psz2);
698 #else
699  return lstrcmpiA(data1, data2);
700 #endif
701 }
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
Definition: tftpd.h:125
#define lstrlenW
Definition: compat.h:498
int32_t INT
Definition: typedefs.h:58
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
static const WCHAR data1[]
Definition: db.c:2967
static const WCHAR data2[]
Definition: db.c:2971
Definition: tftpd.h:137

Referenced by SHAddToRecentDocs().

◆ SHADD_create_add_mru_data()

static INT SHADD_create_add_mru_data ( HANDLE  mruhandle,
LPCSTR  doc_name,
LPCSTR  new_lnk_name,
LPSTR  buffer,
INT len 
)
static

Definition at line 754 of file shellord.c.

756 {
757  LPSTR ptr;
758  INT wlen;
759 
760  /*FIXME: Document:
761  * RecentDocs MRU data structure seems to be:
762  * +0h document file name w/ terminating 0h
763  * +nh short int w/ size of remaining
764  * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown
765  * +n+4h 10 bytes zeros - unknown
766  * +n+eh shortcut file name w/ terminating 0h
767  * +n+e+nh 3 zero bytes - unknown
768  */
769 
770  /* Create the MRU data structure for "RecentDocs"
771  */
772  ptr = buffer;
773  lstrcpyA(ptr, doc_name);
774  ptr += (lstrlenA(buffer) + 1);
775  wlen= lstrlenA(new_lnk_name) + 1 + 12;
776  *((short int*)ptr) = wlen;
777  ptr += 2; /* step past the length */
778  *(ptr++) = 0x30; /* unknown reason */
779  *(ptr++) = 0; /* unknown, but can be 0x00, 0x01, 0x02 */
780  memset(ptr, 0, 10);
781  ptr += 10;
782  lstrcpyA(ptr, new_lnk_name);
783  ptr += (lstrlenA(new_lnk_name) + 1);
784  memset(ptr, 0, 3);
785  ptr += 3;
786  *len = ptr - buffer;
787 
788  /* Add the new entry into the MRU list
789  */
790  return AddMRUData(mruhandle, buffer, *len);
791 }
GLuint buffer
Definition: glext.h:5915
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:58
INT WINAPI AddMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData)
static PVOID ptr
Definition: dispmode.c:27
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
GLenum GLsizei len
Definition: glext.h:6722
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define memset(x, y, z)
Definition: compat.h:39

Referenced by SHAddToRecentDocs().

◆ SHADD_get_policy()

static INT SHADD_get_policy ( LPCSTR  policy,
LPDWORD  type,
LPVOID  buffer,
LPDWORD  len 
)
static

Definition at line 646 of file shellord.c.

647 {
648  HKEY Policy_basekey;
649  INT ret;
650 
651  /* Get the key for the policies location in the registry
652  */
654  "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
655  0, KEY_READ, &Policy_basekey)) {
656 
658  "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
659  0, KEY_READ, &Policy_basekey)) {
660  TRACE("No Explorer Policies location exists. Policy wanted=%s\n",
661  policy);
662  *len = 0;
663  return ERROR_FILE_NOT_FOUND;
664  }
665  }
666 
667  /* Retrieve the data if it exists
668  */
669  ret = SHQueryValueExA(Policy_basekey, policy, 0, type, buffer, len);
670  RegCloseKey(Policy_basekey);
671  return ret;
672 }
#define KEY_READ
Definition: nt_native.h:1023
#define HKEY_CURRENT_USER
Definition: winreg.h:11
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
Definition: reg.c:3331
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint buffer
Definition: glext.h:5915
int32_t INT
Definition: typedefs.h:58
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define TRACE(s)
Definition: solgame.cpp:4
DWORD WINAPI SHQueryValueExA(HKEY hKey, LPCSTR lpszValue, LPDWORD lpReserved, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
Definition: reg.c:1402
int ret
GLenum GLsizei len
Definition: glext.h:6722
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by SHAddToRecentDocs().

◆ SHAddFromPropSheetExtArray()

UINT WINAPI SHAddFromPropSheetExtArray ( HPSXA  hpsxa,
LPFNADDPROPSHEETPAGE  lpfnAddPage,
LPARAM  lParam 
)

Definition at line 1965 of file shellord.c.

1966 {
1967  PSXA_CALL Call;
1968  UINT i;
1969  PPSXA psxa = (PPSXA)hpsxa;
1970 
1971  TRACE("(%p,%p,%08lx)\n", hpsxa, lpfnAddPage, lParam);
1972 
1973  if (psxa)
1974  {
1975  ZeroMemory(&Call, sizeof(Call));
1976  Call.lpfnAddReplaceWith = lpfnAddPage;
1977  Call.lParam = lParam;
1978  Call.bMultiple = TRUE;
1979 
1980  /* Call the AddPage method of all registered IShellPropSheetExt interfaces */
1981  for (i = 0; i != psxa->uiCount; i++)
1982  {
1983  psxa->pspsx[i]->lpVtbl->AddPages(psxa->pspsx[i], PsxaCall, (LPARAM)&Call);
1984  }
1985 
1986  return Call.uiCount;
1987  }
1988 
1989  return 0;
1990 }
UINT uiCount
Definition: shellord.c:1930
HRESULT AddPages([in] LPFNSVADDPROPSHEETPAGE pfnAddPage, [in] LPARAM lParam)
#define TRUE
Definition: types.h:120
struct _PSXA * PPSXA
#define ZeroMemory
Definition: winbase.h:1648
UINT uiCount
Definition: shellord.c:1941
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
static BOOL CALLBACK PsxaCall(HPROPSHEETPAGE hpage, LPARAM lParam)
Definition: shellord.c:1944
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
IShellPropSheetExt * pspsx[1]
Definition: shellord.c:1932
BOOL bMultiple
Definition: shellord.c:1940
unsigned int UINT
Definition: ndis.h:50
LPARAM lParam
Definition: shellord.c:1938
LPFNADDPROPSHEETPAGE lpfnAddReplaceWith
Definition: shellord.c:1937
LPARAM lParam
Definition: combotst.c:139

Referenced by Applet1(), DisplayAdvancedSettings(), KeyboardApplet(), LoadPropSheetHandlers(), MouseApplet(), SH_ShowDriveProperties(), and SystemApplet().

◆ SHAddToRecentDocs()

void WINAPI SHAddToRecentDocs ( UINT  uFlags,
LPCVOID  pv 
)

Definition at line 809 of file shellord.c.

810 {
811 #ifdef __REACTOS__
812  static const WCHAR szExplorerKey[] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer";
813  INT ret;
814  WCHAR szTargetPath[MAX_PATH], szLinkDir[MAX_PATH], szLinkFile[MAX_PATH], szDescription[80];
816  DWORD cbBuffer, data[64], datalen, type;
817  HANDLE hFind;
819  HKEY hExplorerKey;
820  LONG error;
821  LPWSTR pchDotExt, pchTargetTitle, pchLinkTitle;
822  MRUINFOW mru;
823  HANDLE hMRUList = NULL;
824  IShellLinkW *psl = NULL;
825  IPersistFile *pPf = NULL;
826  HRESULT hr;
827  BYTE Buffer[(MAX_PATH + 64) * sizeof(WCHAR)];
828 
829  TRACE("%04x %p\n", uFlags, pv);
830 
831  /* check policy */
832  ret = SHADD_get_policy("NoRecentDocsHistory", &type, data, &datalen);
833  if (ret > 0 && ret != ERROR_FILE_NOT_FOUND)
834  {
835  ERR("Error %d getting policy \"NoRecentDocsHistory\"\n", ret);
836  }
837  else if (ret == ERROR_SUCCESS)
838  {
839  if (!(type == REG_DWORD || (type == REG_BINARY && datalen == 4)))
840  {
841  ERR("Error policy data for \"NoRecentDocsHistory\" not formatted correctly, type=%d, len=%d\n",
842  type, datalen);
843  return;
844  }
845 
846  TRACE("policy value for NoRecentDocsHistory = %08x\n", data[0]);
847  /* now test the actual policy value */
848  if (data[0] != 0)
849  return;
850  }
851 
852  /* store to szTargetPath */
853  szTargetPath[0] = 0;
854  if (pv)
855  {
856  switch (uFlags)
857  {
858  case SHARD_PATHA:
859  MultiByteToWideChar(CP_ACP, 0, pv, -1, szLinkDir, ARRAYSIZE(szLinkDir));
860  GetFullPathNameW(szLinkDir, ARRAYSIZE(szTargetPath), szTargetPath, NULL);
861  break;
862 
863  case SHARD_PATHW:
864  GetFullPathNameW(pv, ARRAYSIZE(szTargetPath), szTargetPath, NULL);
865  break;
866 
867  case SHARD_PIDL:
868  SHGetPathFromIDListW(pv, szLinkDir);
869  GetFullPathNameW(szLinkDir, ARRAYSIZE(szTargetPath), szTargetPath, NULL);
870  break;
871 
872  default:
873  FIXME("Unsupported flags: %u\n", uFlags);
874  return;
875  }
876  }
877 
878  /* get recent folder */
879  if (!SHGetSpecialFolderPathW(NULL, szLinkDir, CSIDL_RECENT, FALSE))
880  {
881  ERR("serious issues 1\n");
882  return;
883  }
884  TRACE("Users Recent dir %S\n", szLinkDir);
885 
886  /* open Explorer key */
887  error = RegCreateKeyExW(HKEY_CURRENT_USER, szExplorerKey, 0, NULL, 0,
888  KEY_READ | KEY_WRITE, NULL, &hExplorerKey, NULL);
889  if (error)
890  {
891  ERR("Failed to RegCreateKeyExW: 0x%08X\n", error);
892  return;
893  }
894 
895  if (!pv)
896  {
897  TRACE("pv is NULL, so delete all shortcut files in %S\n", szLinkDir);
898 
899  lstrcpynW(szLinkFile, szLinkDir, ARRAYSIZE(szLinkFile));
900  PathAppendW(szLinkFile, L"*.lnk");
901 
902  hFind = FindFirstFileW(szLinkFile, &find);
903  if (hFind != INVALID_HANDLE_VALUE)
904  {
905  do
906  {
907  lstrcpynW(szLinkFile, szLinkDir, ARRAYSIZE(szLinkFile));
908  PathAppendW(szLinkFile, find.cFileName);
909  DeleteFileW(szLinkFile);
910  } while (FindNextFile(hFind, &find));
911  FindClose(hFind);
912  }
913 
914  SHDeleteKeyW(hExplorerKey, L"RecentDocs");
915  RegCloseKey(hExplorerKey);
916  return;
917  }
918 
919  if (szTargetPath[0] == 0 || !PathFileExistsW(szTargetPath) ||
920  PathIsDirectoryW(szTargetPath))
921  {
922  /* path is not normal file */
923  RegCloseKey(hExplorerKey);
924  return;
925  }
926 
927  hr = CoInitialize(NULL);
928  if (FAILED(hr))
929  {
930  ERR("CoInitialize: %08X\n", hr);
931  RegCloseKey(hExplorerKey);
932  return;
933  }
934 
935  /* check if file is a shortcut */
936  ret = 0;
937  pchDotExt = PathFindExtensionW(szTargetPath);
938  while (lstrcmpiW(pchDotExt, L".lnk") == 0)
939  {
940  hr = IShellLink_ConstructFromPath(szTargetPath, &IID_IShellLinkW, (LPVOID*)&psl);
941  if (FAILED(hr))
942  {
943  ERR("IShellLink_ConstructFromPath: 0x%08X\n", hr);
944  goto Quit;
945  }
946 
947  IShellLinkW_GetPath(psl, szPath, ARRAYSIZE(szPath), NULL, 0);
948  IShellLinkW_Release(psl);
949  psl = NULL;
950 
951  lstrcpynW(szTargetPath, szPath, ARRAYSIZE(szTargetPath));
952  pchDotExt = PathFindExtensionW(szTargetPath);
953 
954  if (++ret >= 8)
955  {
956  ERR("Link loop?\n");
957  goto Quit;
958  }
959  }
960  if (!lstrcmpiW(pchDotExt, L".exe"))
961  {
962  /* executables are not added */
963  goto Quit;
964  }
965 
966  /* *** JOB 0: Build strings *** */
967 
968  pchTargetTitle = PathFindFileNameW(szTargetPath);
969 
970  lstrcpyW(szDescription, L"Shortcut to ");
972 
973  lstrcpynW(szLinkFile, szLinkDir, ARRAYSIZE(szLinkFile));
974  PathAppendW(szLinkFile, pchTargetTitle);
975  StrCatBuffW(szLinkFile, L".lnk", ARRAYSIZE(szLinkFile));
976  pchLinkTitle = PathFindFileNameW(szLinkFile);
977 
978  /* *** JOB 1: Update registry for ...\Explorer\RecentDocs list *** */
979 
980  /* store MRU data */
981  cbBuffer = sizeof(Buffer);
982  ret = DoStoreMRUData(Buffer, &cbBuffer, pchTargetTitle, szTargetPath, pchLinkTitle);
983  if (!ret)
984  {
985  ERR("DoStoreMRUData failed: %d\n", ret);
986  goto Quit;
987  }
988 
989  /* create MRU list */
990  mru.cbSize = sizeof(mru);
991  mru.uMax = 16;
993  mru.hKey = hExplorerKey;
994  mru.lpszSubKey = L"RecentDocs";
995  mru.lpfnCompare = (MRUCMPPROCW)SHADD_compare_mru;
996  hMRUList = CreateMRUListW(&mru);
997  if (!hMRUList)
998  {
999  ERR("CreateMRUListW failed\n");
1000  goto Quit;
1001  }
1002 
1003  /* already exists? */
1004  ret = FindMRUData(hMRUList, Buffer, cbBuffer, NULL);
1005  if (ret >= 0)
1006  {
1007  /* Just touch for speed */
1008  HANDLE hFile;
1009  hFile = CreateFileW(szLinkFile, GENERIC_READ | GENERIC_WRITE,
1011  if (hFile != INVALID_HANDLE_VALUE)
1012  {
1013  TRACE("Just touch file '%S'.\n", szLinkFile);
1014  CloseHandle(hFile);
1015  goto Quit;
1016  }
1017  }
1018 
1019  /* add MRU data */
1020  ret = AddMRUData(hMRUList, Buffer, cbBuffer);
1021  if (ret < 0)
1022  {
1023  ERR("AddMRUData failed: %d\n", ret);
1024  goto Quit;
1025  }
1026 
1027  /* *** JOB 2: Create shortcut in user's "Recent" directory *** */
1028 
1029  hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
1030  &IID_IShellLinkW, (LPVOID *)&psl);
1031  if (FAILED(hr))
1032  {
1033  ERR("CoInitialize for IID_IShellLinkW: %08X\n", hr);
1034  goto Quit;
1035  }
1036 
1037  hr = IShellLinkW_QueryInterface(psl, &IID_IPersistFile, (LPVOID *)&pPf);
1038  if (FAILED(hr))
1039  {
1040  ERR("IShellLinkW_QueryInterface: %08X\n", hr);
1041  goto Quit;
1042  }
1043 
1044  if (uFlags == SHARD_PIDL)
1045  hr = IShellLinkW_SetIDList(psl, pv);
1046  else
1047  hr = IShellLinkW_SetPath(psl, pv);
1048 
1049  IShellLinkW_SetDescription(psl, szDescription);
1050 
1051  hr = IPersistFile_Save(pPf, szLinkFile, TRUE);
1052  if (FAILED(hr))
1053  {
1054  ERR("IPersistFile_Save: 0x%08X\n", hr);
1055  }
1056 
1057  hr = IPersistFile_SaveCompleted(pPf, szLinkFile);
1058  if (FAILED(hr))
1059  {
1060  ERR("IPersistFile_SaveCompleted: 0x%08X\n", hr);
1061  }
1062 
1063 Quit:
1064  if (hMRUList)
1065  FreeMRUList(hMRUList);
1066  if (pPf)
1067  IPersistFile_Release(pPf);
1068  if (psl)
1069  IShellLinkW_Release(psl);
1070  CoUninitialize();
1071  RegCloseKey(hExplorerKey);
1072 #else
1073 /* If list is a string list lpfnCompare has the following prototype
1074  * int CALLBACK MRUCompareString(LPCSTR s1, LPCSTR s2)
1075  * for binary lists the prototype is
1076  * int CALLBACK MRUCompareBinary(LPCVOID data1, LPCVOID data2, DWORD cbData)
1077  * where cbData is the no. of bytes to compare.
1078  * Need to check what return value means identical - 0?
1079  */
1080 
1081 
1082  UINT olderrormode;
1083  HKEY HCUbasekey;
1084  CHAR doc_name[MAX_PATH];
1085  CHAR link_dir[MAX_PATH];
1086  CHAR new_lnk_filepath[MAX_PATH];
1087  CHAR new_lnk_name[MAX_PATH];
1088  CHAR * ext;
1089  IMalloc *ppM;
1090  LPITEMIDLIST pidl;
1091  HWND hwnd = 0; /* FIXME: get real window handle */
1092  INT ret;
1093  DWORD data[64], datalen, type;
1094 
1095  TRACE("%04x %p\n", uFlags, pv);
1096 
1097  /*FIXME: Document:
1098  * RecentDocs MRU data structure seems to be:
1099  * +0h document file name w/ terminating 0h
1100  * +nh short int w/ size of remaining
1101  * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown
1102  * +n+4h 10 bytes zeros - unknown
1103  * +n+eh shortcut file name w/ terminating 0h
1104  * +n+e+nh 3 zero bytes - unknown
1105  */
1106 
1107  /* See if we need to do anything.
1108  */
1109  datalen = 64;
1110  ret=SHADD_get_policy( "NoRecentDocsHistory", &type, data, &datalen);
1111  if ((ret > 0) && (ret != ERROR_FILE_NOT_FOUND)) {
1112  ERR("Error %d getting policy \"NoRecentDocsHistory\"\n", ret);
1113  return;
1114  }
1115  if (ret == ERROR_SUCCESS) {
1116  if (!( (type == REG_DWORD) ||
1117  ((type == REG_BINARY) && (datalen == 4)) )) {
1118  ERR("Error policy data for \"NoRecentDocsHistory\" not formatted correctly, type=%d, len=%d\n",
1119  type, datalen);
1120  return;
1121  }
1122 
1123  TRACE("policy value for NoRecentDocsHistory = %08x\n", data[0]);
1124  /* now test the actual policy value */
1125  if ( data[0] != 0)
1126  return;
1127  }
1128 
1129  /* Open key to where the necessary info is
1130  */
1131  /* FIXME: This should be done during DLL PROCESS_ATTACH (or THREAD_ATTACH)
1132  * and the close should be done during the _DETACH. The resulting
1133  * key is stored in the DLL global data.
1134  */
1136  "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
1137  0, 0, 0, KEY_READ, 0, &HCUbasekey, 0)) {
1138  ERR("Failed to create 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer'\n");
1139  return;
1140  }
1141 
1142  /* Get path to user's "Recent" directory
1143  */
1144  if(SUCCEEDED(SHGetMalloc(&ppM))) {
1146  &pidl))) {
1147  SHGetPathFromIDListA(pidl, link_dir);
1148  IMalloc_Free(ppM, pidl);
1149  }
1150  else {
1151  /* serious issues */
1152  link_dir[0] = 0;
1153  ERR("serious issues 1\n");
1154  }
1155  IMalloc_Release(ppM);
1156  }
1157  else {
1158  /* serious issues */
1159  link_dir[0] = 0;
1160  ERR("serious issues 2\n");
1161  }
1162  TRACE("Users Recent dir %s\n", link_dir);
1163 
1164  /* If no input, then go clear the lists */
1165  if (!pv) {
1166  /* clear user's Recent dir
1167  */
1168 
1169  /* FIXME: delete all files in "link_dir"
1170  *
1171  * while( more files ) {
1172  * lstrcpyA(old_lnk_name, link_dir);
1173  * PathAppendA(old_lnk_name, filenam);
1174  * DeleteFileA(old_lnk_name);
1175  * }
1176  */
1177  FIXME("should delete all files in %s\\\n", link_dir);
1178 
1179  /* clear MRU list
1180  */
1181  /* MS Bug ?? v4.72.3612.1700 of shell32 does the delete against
1182  * HKEY_LOCAL_MACHINE version of ...CurrentVersion\Explorer
1183  * and naturally it fails w/ rc=2. It should do it against
1184  * HKEY_CURRENT_USER which is where it is stored, and where
1185  * the MRU routines expect it!!!!
1186  */
1187  RegDeleteKeyA(HCUbasekey, "RecentDocs");
1188  RegCloseKey(HCUbasekey);
1189  return;
1190  }
1191 
1192  /* Have data to add, the jobs to be done:
1193  * 1. Add document to MRU list in registry "HKCU\Software\
1194  * Microsoft\Windows\CurrentVersion\Explorer\RecentDocs".
1195  * 2. Add shortcut to document in the user's Recent directory
1196  * (CSIDL_RECENT).
1197  * 3. Add shortcut to Start menu's Documents submenu.
1198  */
1199 
1200  /* Get the pure document name from the input
1201  */
1202  switch (uFlags)
1203  {
1204  case SHARD_PIDL:
1205  if (!SHGetPathFromIDListA(pv, doc_name))
1206  {
1207  WARN("can't get path from PIDL\n");
1208  return;
1209  }
1210  break;
1211 
1212  case SHARD_PATHA:
1213  lstrcpynA(doc_name, pv, MAX_PATH);
1214  break;
1215 
1216  case SHARD_PATHW:
1217  WideCharToMultiByte(CP_ACP, 0, pv, -1, doc_name, MAX_PATH, NULL, NULL);
1218  break;
1219 
1220  default:
1221  FIXME("Unsupported flags: %u\n", uFlags);
1222  return;
1223  }
1224 
1225  TRACE("full document name %s\n", debugstr_a(doc_name));
1226 
1227  PathStripPathA(doc_name);
1228  TRACE("stripped document name %s\n", debugstr_a(doc_name));
1229 
1230 
1231  /* *** JOB 1: Update registry for ...\Explorer\RecentDocs list *** */
1232 
1233  { /* on input needs:
1234  * doc_name - pure file-spec, no path
1235  * link_dir - path to the user's Recent directory
1236  * HCUbasekey - key of ...Windows\CurrentVersion\Explorer" node
1237  * creates:
1238  * new_lnk_name- pure file-spec, no path for new .lnk file
1239  * new_lnk_filepath
1240  * - path and file name of new .lnk file
1241  */
1242  CREATEMRULISTA mymru;
1243  HANDLE mruhandle;
1244  INT len, pos, bufused, err;
1245  INT i;
1246  DWORD attr;
1247  CHAR buffer[2048];
1248  CHAR *ptr;
1249  CHAR old_lnk_name[MAX_PATH];
1250  short int slen;
1251 
1252  mymru.cbSize = sizeof(CREATEMRULISTA);
1253  mymru.nMaxItems = 15;
1255  mymru.hKey = HCUbasekey;
1256  mymru.lpszSubKey = "RecentDocs";
1257  mymru.lpfnCompare = SHADD_compare_mru;
1258  mruhandle = CreateMRUListA(&mymru);
1259  if (!mruhandle) {
1260  /* MRU failed */
1261  ERR("MRU processing failed, handle zero\n");
1262  RegCloseKey(HCUbasekey);
1263  return;
1264  }
1265  len = lstrlenA(doc_name);
1266  pos = FindMRUData(mruhandle, doc_name, len, 0);
1267 
1268  /* Now get the MRU entry that will be replaced
1269  * and delete the .lnk file for it
1270  */
1271  if ((bufused = EnumMRUListA(mruhandle, (pos == -1) ? 14 : pos,
1272  buffer, 2048)) != -1) {
1273  ptr = buffer;
1274  ptr += (lstrlenA(buffer) + 1);
1275  slen = *((short int*)ptr);
1276  ptr += 2; /* skip the length area */
1277  if (bufused >= slen + (ptr-buffer)) {
1278  /* buffer size looks good */
1279  ptr += 12; /* get to string */
1280  len = bufused - (ptr-buffer); /* get length of buf remaining */
1281  if (ptr[0] && (lstrlenA(ptr) <= len-1)) {
1282  /* appears to be good string */
1283  lstrcpyA(old_lnk_name, link_dir);
1284  PathAppendA(old_lnk_name, ptr);
1285  if (!DeleteFileA(old_lnk_name)) {
1286  if ((attr = GetFileAttributesA(old_lnk_name)) == INVALID_FILE_ATTRIBUTES) {
1287  if ((err = GetLastError()) != ERROR_FILE_NOT_FOUND) {
1288  ERR("Delete for %s failed, err=%d, attr=%08x\n",
1289  old_lnk_name, err, attr);
1290  }
1291  else {
1292  TRACE("old .lnk file %s did not exist\n",
1293  old_lnk_name);
1294  }
1295  }
1296  else {
1297  ERR("Delete for %s failed, attr=%08x\n",
1298  old_lnk_name, attr);
1299  }
1300  }
1301  else {
1302  TRACE("deleted old .lnk file %s\n", old_lnk_name);
1303  }
1304  }
1305  }
1306  }
1307 
1308  /* Create usable .lnk file name for the "Recent" directory
1309  */
1310  wsprintfA(new_lnk_name, "%s.lnk", doc_name);
1311  lstrcpyA(new_lnk_filepath, link_dir);
1312  PathAppendA(new_lnk_filepath, new_lnk_name);
1313  i = 1;
1314  olderrormode = SetErrorMode(SEM_FAILCRITICALERRORS);
1315  while (GetFileAttributesA(new_lnk_filepath) != INVALID_FILE_ATTRIBUTES) {
1316  i++;
1317  wsprintfA(new_lnk_name, "%s (%u).lnk", doc_name, i);
1318  lstrcpyA(new_lnk_filepath, link_dir);
1319  PathAppendA(new_lnk_filepath, new_lnk_name);
1320  }
1321  SetErrorMode(olderrormode);
1322  TRACE("new shortcut will be %s\n", new_lnk_filepath);
1323 
1324  /* Now add the new MRU entry and data
1325  */
1326  pos = SHADD_create_add_mru_data(mruhandle, doc_name, new_lnk_name,
1327  buffer, &len);
1328  FreeMRUList(mruhandle);
1329  TRACE("Updated MRU list, new doc is position %d\n", pos);
1330  }
1331 
1332  /* *** JOB 2: Create shortcut in user's "Recent" directory *** */
1333 
1334  { /* on input needs:
1335  * doc_name - pure file-spec, no path
1336  * new_lnk_filepath
1337  * - path and file name of new .lnk file
1338  * uFlags[in] - flags on call to SHAddToRecentDocs
1339  * pv[in] - document path/pidl on call to SHAddToRecentDocs
1340  */
1341  IShellLinkA *psl = NULL;
1342  IPersistFile *pPf = NULL;
1343  HRESULT hres;
1344  CHAR desc[MAX_PATH];
1345  WCHAR widelink[MAX_PATH];
1346 
1347  CoInitialize(0);
1348 
1349  hres = CoCreateInstance( &CLSID_ShellLink,
1350  NULL,
1351  CLSCTX_INPROC_SERVER,
1352  &IID_IShellLinkA,
1353  (LPVOID )&psl);
1354  if(SUCCEEDED(hres)) {
1355 
1356  hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile,
1357  (LPVOID *)&pPf);
1358  if(FAILED(hres)) {
1359  /* bombed */
1360  ERR("failed QueryInterface for IPersistFile %08x\n", hres);
1361  goto fail;
1362  }
1363 
1364  /* Set the document path or pidl */
1365  if (uFlags == SHARD_PIDL) {
1366  hres = IShellLinkA_SetIDList(psl, pv);
1367  } else {
1368  hres = IShellLinkA_SetPath(psl, pv);
1369  }
1370  if(FAILED(hres)) {
1371  /* bombed */
1372  ERR("failed Set{IDList|Path} %08x\n", hres);
1373  goto fail;
1374  }
1375 
1376  lstrcpyA(desc, "Shortcut to ");
1377  lstrcatA(desc, doc_name);
1378  hres = IShellLinkA_SetDescription(psl, desc);
1379  if(FAILED(hres)) {
1380  /* bombed */
1381  ERR("failed SetDescription %08x\n", hres);
1382  goto fail;
1383  }
1384 
1385  MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1,
1386  widelink, MAX_PATH);
1387  /* create the short cut */
1388  hres = IPersistFile_Save(pPf, widelink, TRUE);
1389  if(FAILED(hres)) {
1390  /* bombed */
1391  ERR("failed IPersistFile::Save %08x\n", hres);
1392  IPersistFile_Release(pPf);
1393  IShellLinkA_Release(psl);
1394  goto fail;
1395  }
1396  hres = IPersistFile_SaveCompleted(pPf, widelink);
1397  IPersistFile_Release(pPf);
1398  IShellLinkA_Release(psl);
1399  TRACE("shortcut %s has been created, result=%08x\n",
1400  new_lnk_filepath, hres);
1401  }
1402  else {
1403  ERR("CoCreateInstance failed, hres=%08x\n", hres);
1404  }
1405  }
1406 
1407  fail:
1408  CoUninitialize();
1409 
1410  /* all done */
1411  RegCloseKey(HCUbasekey);
1412  return;
1413 #endif
1414 }
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1702
UINT WINAPI SetErrorMode(IN UINT uMode)
Definition: except.c:753
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define CloseHandle
Definition: compat.h:487
BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath)
Definition: pidl.c:1278
#define MRUF_DELAYED_SAVE
Definition: shellord.c:66
#define ERROR_SUCCESS
Definition: deptool.c:10
#define WideCharToMultiByte
Definition: compat.h:111
HRESULT hr
Definition: shlfolder.c:183
#define error(str)
Definition: mkdosfs.c:1605
#define SEM_FAILCRITICALERRORS
Definition: rtltypes.h:69
#define SHARD_PATHA
Definition: shlobj.h:1102
#define REG_BINARY
Definition: nt_native.h:1496
#define KEY_READ
Definition: nt_native.h:1023
#define TRUE
Definition: types.h:120
LPWSTR WINAPI StrCatBuffW(LPWSTR lpszStr, LPCWSTR lpszCat, INT cchMax)
Definition: string.c:1436
#define CP_ACP
Definition: compat.h:109
#define HKEY_CURRENT_USER
Definition: winreg.h:11
char CHAR
Definition: xmlstorage.h:175
BOOL WINAPI PathAppendA(LPSTR lpszPath, LPCSTR lpszAppend)
Definition: path.c:101
#define WARN(fmt,...)
Definition: debug.h:112
#define MRU_BINARY
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal)
Definition: shellole.c:290
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define INVALID_HANDLE_VALUE
Definition: compat.h:479
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1105
VOID WINAPI FreeMRUList(HANDLE hMRUList)
GLuint buffer
Definition: glext.h:5915
static INT SHADD_get_policy(LPCSTR policy, LPDWORD type, LPVOID buffer, LPDWORD len)
Definition: shellord.c:646
static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPCSTR doc_name, LPCSTR new_lnk_name, LPSTR buffer, INT *len)
Definition: shellord.c:754
UINT uFlags
Definition: api.c:59
int const JOCTET unsigned int datalen
Definition: jpeglib.h:1030
int32_t INT
Definition: typedefs.h:58
static INT CALLBACK SHADD_compare_mru(LPCVOID data1, LPCVOID data2, DWORD cbData)
Definition: shellord.c:686
#define FILE_SHARE_READ
Definition: compat.h:136
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:1091
#define lstrcpynW
Definition: compat.h:486
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:121
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
#define MRUF_BINARY_LIST
Definition: shellord.c:65
#define CSIDL_RECENT
Definition: shlobj.h:2020
struct tagCREATEMRULIST CREATEMRULISTA
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
HANDLE WINAPI CreateMRUListW(const MRUINFOW *infoW)
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
INT WINAPI AddMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:786
static const WCHAR desc[]
Definition: protectdata.c:36
#define GENERIC_WRITE
Definition: nt_native.h:90
#define FIXME(fmt,...)
Definition: debug.h:111
static PVOID ptr
Definition: dispmode.c:27
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
HANDLE WINAPI CreateMRUListA(LPCREATEMRULISTA lpcml)
smooth NULL
Definition: ftsmooth.c:416
char ext[3]
Definition: mkdosfs.c:358
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:389
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
LPCSTR lpszSubKey
Definition: shellord.c:59
Definition: bufpool.h:45
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1756
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:442
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define OPEN_EXISTING
Definition: compat.h:523
INT(CALLBACK * MRUCMPPROCW)(LPCWSTR, LPCWSTR)
#define KEY_WRITE
Definition: nt_native.h:1031
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:123
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MRU_CACHEWRITE
#define debugstr_a
Definition: kernel32.h:31
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2830
LONG HRESULT
Definition: typedefs.h:79
#define FindNextFile
Definition: winbase.h:3628
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: cookie.c:201
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
void WINAPI PathStripPathA(LPSTR lpszPath)
Definition: path.c:672
int ret
__u8 attr
Definition: mkdosfs.c:359
static const WCHAR L[]
Definition: oid.c:1250
LPWSTR lpszSubKey
GLenum GLsizei len
Definition: glext.h:6722
DWORD nMaxItems
Definition: shellord.c:56
#define GENERIC_READ
Definition: compat.h:135
#define err(...)
_In_ HANDLE hFile
Definition: mswsock.h:90
unsigned char BYTE
Definition: xxhash.c:193
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define ERR(fmt,...)
Definition: debug.h:110
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1222
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)
#define lstrcpyW
Definition: compat.h:497
BOOL WINAPI SHGetSpecialFolderPathW(HWND hwndOwner, LPWSTR szPath, int nFolder, BOOL bCreate)
Definition: shellpath.c:2709
LPCWSTR szPath
Definition: env.c:35
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
INT WINAPI FindMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum)
#define SHARD_PATHW
Definition: shlobj.h:1103
unsigned int UINT
Definition: ndis.h:50
#define lstrcpynA
Definition: compat.h:499
static IMalloc * ppM
Definition: shlfolder.c:47
#define MultiByteToWideChar
Definition: compat.h:110
#define CreateFileW
Definition: compat.h:489
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
static TAGID TAGID find
Definition: db.cpp:153
const GUID IID_IPersistFile
#define SHARD_PIDL
Definition: shlobj.h:1101
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
Definition: reg.c:1029
WCHAR * LPWSTR
Definition: xmlstorage.h:184
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define REG_DWORD
Definition: sdbapi.c:596
INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer, DWORD nBufferSize)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
Definition: reg.c:1546
static const WCHAR szDescription[]
Definition: provider.c:55
#define SUCCEEDED(hr)
Definition: intsafe.h:57
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502

Referenced by StartMenu::ActivateEntry(), DoOpenFile(), DoSaveFile(), ShellEntry::launch_entry(), Entry::launch_entry(), pLoadImage(), SetFileName(), and RegistrySettings::SetMostRecentFile().

◆ SHCreatePropSheetExtArray()

HPSXA WINAPI SHCreatePropSheetExtArray ( HKEY  hKey,
LPCWSTR  pszSubKey,
UINT  max_iface 
)

Definition at line 1995 of file shellord.c.

1996 {
1997  return SHCreatePropSheetExtArrayEx(hKey, pszSubKey, max_iface, NULL);
1998 }
smooth NULL
Definition: ftsmooth.c:416
HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, LPDATAOBJECT pDataObj)
Definition: shellord.c:2003

Referenced by Applet1(), DisplayApplet(), KeyboardApplet(), MouseApplet(), and SystemApplet().

◆ SHCreatePropSheetExtArrayEx()

HPSXA WINAPI SHCreatePropSheetExtArrayEx ( HKEY  hKey,
LPCWSTR  pszSubKey,
UINT  max_iface,
LPDATAOBJECT  pDataObj 
)

Definition at line 2003 of file shellord.c.

2004 {
2005  static const WCHAR szPropSheetSubKey[] = {'s','h','e','l','l','e','x','\\','P','r','o','p','e','r','t','y','S','h','e','e','t','H','a','n','d','l','e','r','s',0};
2006  WCHAR szHandler[64];
2007  DWORD dwHandlerLen;
2008  WCHAR szClsidHandler[39];
2009  DWORD dwClsidSize;
2010  CLSID clsid;
2011  LONG lRet;
2012  DWORD dwIndex;
2013  IShellExtInit *psxi;
2014  IShellPropSheetExt *pspsx;
2015  HKEY hkBase, hkPropSheetHandlers;
2016  PPSXA psxa = NULL;
2017 
2018  TRACE("(%p,%s,%u)\n", hKey, debugstr_w(pszSubKey), max_iface);
2019 
2020  if (max_iface == 0)
2021  return NULL;
2022 
2023  /* Open the registry key */
2024  lRet = RegOpenKeyW(hKey, pszSubKey, &hkBase);
2025  if (lRet != ERROR_SUCCESS)
2026  return NULL;
2027 
2028  lRet = RegOpenKeyExW(hkBase, szPropSheetSubKey, 0, KEY_ENUMERATE_SUB_KEYS, &hkPropSheetHandlers);
2029  RegCloseKey(hkBase);
2030  if (lRet == ERROR_SUCCESS)
2031  {
2032  /* Create and initialize the Property Sheet Extensions Array */
2033  psxa = LocalAlloc(LMEM_FIXED, FIELD_OFFSET(PSXA, pspsx[max_iface]));
2034  if (psxa)
2035  {
2036  ZeroMemory(psxa, FIELD_OFFSET(PSXA, pspsx[max_iface]));
2037  psxa->uiAllocated = max_iface;
2038 
2039  /* Enumerate all subkeys and attempt to load the shell extensions */
2040  dwIndex = 0;
2041  do
2042  {
2043  dwHandlerLen = sizeof(szHandler) / sizeof(szHandler[0]);
2044  lRet = RegEnumKeyExW(hkPropSheetHandlers, dwIndex++, szHandler, &dwHandlerLen, NULL, NULL, NULL, NULL);
2045  if (lRet != ERROR_SUCCESS)
2046  {
2047  if (lRet == ERROR_MORE_DATA)
2048  continue;
2049 
2050  if (lRet == ERROR_NO_MORE_ITEMS)
2051  lRet = ERROR_SUCCESS;
2052  break;
2053  }
2054 
2055  /* The CLSID is stored either in the key itself or in its default value. */
2056  if (FAILED(lRet = SHCLSIDFromStringW(szHandler, &clsid)))
2057  {
2058  dwClsidSize = sizeof(szClsidHandler);
2059  if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS)
2060  {
2061  /* Force a NULL-termination and convert the string */
2062  szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0;
2063  lRet = SHCLSIDFromStringW(szClsidHandler, &clsid);
2064  }
2065  }
2066 
2067  if (SUCCEEDED(lRet))
2068  {
2069  /* Attempt to get an IShellPropSheetExt and an IShellExtInit instance.
2070  Only if both interfaces are supported it's a real shell extension.
2071  Then call IShellExtInit's Initialize method. */
2072  if (SUCCEEDED(CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER/* | CLSCTX_NO_CODE_DOWNLOAD */, &IID_IShellPropSheetExt, (LPVOID *)&pspsx)))
2073  {
2074  if (SUCCEEDED(pspsx->lpVtbl->QueryInterface(pspsx, &IID_IShellExtInit, (PVOID *)&psxi)))
2075  {
2076  if (SUCCEEDED(psxi->lpVtbl->Initialize(psxi, NULL, pDataObj, hKey)))
2077  {
2078  /* Add the IShellPropSheetExt instance to the array */
2079  psxa->pspsx[psxa->uiCount++] = pspsx;
2080  }
2081  else
2082  {
2083  psxi->lpVtbl->Release(psxi);
2084  pspsx->lpVtbl->Release(pspsx);
2085  }
2086  }
2087  else
2088  pspsx->lpVtbl->Release(pspsx);
2089  }
2090  }
2091 
2092  } while (psxa->uiCount != psxa->uiAllocated);
2093  }
2094  else
2095  lRet = ERROR_NOT_ENOUGH_MEMORY;
2096 
2097  RegCloseKey(hkPropSheetHandlers);
2098  }
2099 
2100  if (lRet != ERROR_SUCCESS && psxa)
2101  {
2102  SHDestroyPropSheetExtArray((HPSXA)psxa);
2103  psxa = NULL;
2104  }
2105 
2106  return (HPSXA)psxa;
2107 }
void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
Definition: shellord.c:2143
UINT uiCount
Definition: shellord.c:1930
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ZeroMemory
Definition: winbase.h:1648
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
long LONG
Definition: pedump.c:60
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3296
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define LMEM_FIXED
Definition: winbase.h:349
#define TRACE(s)
Definition: solgame.cpp:4
UINT uiAllocated
Definition: shellord.c:1931
__wchar_t WCHAR
Definition: xmlstorage.h:180
nsrefcnt Release()
unsigned long DWORD
Definition: ntddk_ex.h:95
IShellPropSheetExt * pspsx[1]
Definition: shellord.c:1932
DWORD WINAPI SHCLSIDFromStringW(LPCWSTR clsid, CLSID *id)
Definition: shellole.c:261
REFCLSID clsid
Definition: msctf.c:82
DWORD WINAPI SHGetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
Definition: reg.c:1236
#define ERROR_MORE_DATA
Definition: dderror.h:13
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2527
nsresult QueryInterface(nsIIDRef riid, void **result)
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019

Referenced by SHCreatePropSheetExtArray().

◆ SHCreateShellFolderView()

HRESULT WINAPI SHCreateShellFolderView ( const SFV_CREATE pcsfv,
IShellView **  ppsv 
)

Definition at line 2449 of file shellord.c.

2451 {
2452  IShellView * psf;
2453  HRESULT hRes;
2454 
2455  *ppsv = NULL;
2456  if (!pcsfv || pcsfv->cbSize != sizeof(*pcsfv))
2457  return E_INVALIDARG;
2458 
2459  TRACE("sf=%p outer=%p callback=%p\n",
2460  pcsfv->pshf, pcsfv->psvOuter, pcsfv->psfvcb);
2461 
2462  hRes = IShellView_Constructor(pcsfv->pshf, &psf);
2463  if (FAILED(hRes))
2464  return hRes;
2465 
2466  hRes = IShellView_QueryInterface(psf, &IID_IShellView, (LPVOID *)ppsv);
2467  IShellView_Release(psf);
2468 
2469  return hRes;
2470 }
IShellFolderViewCB * psfvcb
Definition: shlobj.h:1285
IShellView * psvOuter
Definition: shlobj.h:1284
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
IShellFolder * pshf
Definition: shlobj.h:1283
UINT cbSize
Definition: shlobj.h:1282

◆ SHCreateShellFolderViewEx()

HRESULT WINAPI SHCreateShellFolderViewEx ( LPCSFV  psvcbi,
IShellView **  ppv 
)

Definition at line 1430 of file shellord.c.

1433 {
1434  IShellView * psf;
1435  HRESULT hRes;
1436 
1437  TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n",
1438  psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback,
1439  psvcbi->fvm, psvcbi->psvOuter);
1440 
1441  *ppv = NULL;
1442  hRes = IShellView_Constructor(psvcbi->pshf, &psf);
1443 
1444  if (FAILED(hRes))
1445  return hRes;
1446 
1447  hRes = IShellView_QueryInterface(psf, &IID_IShellView, (LPVOID *)ppv);
1448  IShellView_Release(psf);
1449 
1450  return hRes;
1451 }
LPFNVIEWCALLBACK pfnCallback
Definition: shlobj.h:1208
REFIID LPVOID * ppv
Definition: atlbase.h:39
IShellView * psvOuter
Definition: shlobj.h:1205
smooth NULL
Definition: ftsmooth.c:416
PCIDLIST_ABSOLUTE pidl
Definition: shlobj.h:1206
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
FOLDERVIEWMODE fvm
Definition: shlobj.h:1209
IShellFolder * pshf
Definition: shlobj.h:1204

◆ SHCreateStdEnumFmtEtc()

HRESULT WINAPI SHCreateStdEnumFmtEtc ( UINT  cFormats,
const FORMATETC *  lpFormats,
LPENUMFORMATETC ppenumFormatetc 
)

Definition at line 2192 of file shellord.c.

2196 {
2197  IEnumFORMATETC *pef;
2198  HRESULT hRes;
2199  TRACE("cf=%d fe=%p pef=%p\n", cFormats, lpFormats, ppenumFormatetc);
2200 
2201  hRes = IEnumFORMATETC_Constructor(cFormats, lpFormats, &pef);
2202  if (FAILED(hRes))
2203  return hRes;
2204 
2205  IEnumFORMATETC_AddRef(pef);
2206  hRes = IEnumFORMATETC_QueryInterface(pef, &IID_IEnumFORMATETC, (LPVOID*)ppenumFormatetc);
2207  IEnumFORMATETC_Release(pef);
2208 
2209  return hRes;
2210 }
HRESULT IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[], IEnumFORMATETC **ppFormat)
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
const GUID IID_IEnumFORMATETC

Referenced by CDevSettings_EnumFormatEtc().

◆ SHDestroyPropSheetExtArray()

void WINAPI SHDestroyPropSheetExtArray ( HPSXA  hpsxa)

Definition at line 2143 of file shellord.c.

2144 {
2145  UINT i;
2146  PPSXA psxa = (PPSXA)hpsxa;
2147 
2148  TRACE("(%p)\n", hpsxa);
2149 
2150  if (psxa)
2151  {
2152  for (i = 0; i != psxa->uiCount; i++)
2153  {
2154  psxa->pspsx[i]->lpVtbl->Release(psxa->pspsx[i]);
2155  }
2156 
2157  LocalFree(psxa);
2158  }
2159 }
UINT uiCount
Definition: shellord.c:1930
struct _PSXA * PPSXA
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
ULONG Release()
#define TRACE(s)
Definition: solgame.cpp:4
IShellPropSheetExt * pspsx[1]
Definition: shellord.c:1932
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
unsigned int UINT
Definition: ndis.h:50

Referenced by Applet1(), DisplayAdvancedSettings(), DisplayApplet(), KeyboardApplet(), MouseApplet(), SH_ShowDriveProperties(), SH_ShowPropertiesDialog(), SHCreatePropSheetExtArrayEx(), and SystemApplet().

◆ SHDoDragDrop()

HRESULT WINAPI SHDoDragDrop ( HWND  hWnd,
LPDATAOBJECT  lpDataObject,
LPDROPSOURCE  lpDropSource,
DWORD  dwOKEffect,
LPDWORD  pdwEffect 
)

Definition at line 594 of file shellord.c.

600 {
601  FIXME("(%p %p %p 0x%08x %p):stub.\n",
602  hWnd, lpDataObject, lpDropSource, dwOKEffect, pdwEffect);
603  return DoDragDrop(lpDataObject, lpDropSource, dwOKEffect, pdwEffect);
604 }
HWND hWnd
Definition: settings.c:17
#define FIXME(fmt,...)
Definition: debug.h:111
HRESULT WINAPI DoDragDrop(IDataObject *pDataObject, IDropSource *pDropSource, DWORD dwOKEffect, DWORD *pdwEffect)
Definition: ole2.c:753

◆ ShellMessageBoxA()

int ShellMessageBoxA ( HINSTANCE  hInstance,
HWND  hWnd,
LPCSTR  lpText,
LPCSTR  lpCaption,
UINT  uType,
  ... 
)

Definition at line 427 of file shellord.c.

434 {
435 #ifdef __REACTOS__
436  CHAR *szText = NULL, szTitle[100];
437  LPCSTR pszText, pszTitle = szTitle;
438  LPSTR pszTemp;
440  int ret;
441 
442  __ms_va_start(args, uType);
443 
444  TRACE("(%p,%p,%p,%p,%08x)\n", hInstance, hWnd, lpText, lpCaption, uType);
445 
446  if (IS_INTRESOURCE(lpCaption))
448  else
449  pszTitle = lpCaption;
450 
451  if (IS_INTRESOURCE(lpText))
452  {
453  /* Retrieve the length of the Unicode string and obtain the maximum
454  * possible length for the corresponding ANSI string (not counting
455  * any possible NULL-terminator). */
456  const WCHAR *ptr;
457  UINT len = LoadStringW(hInstance, LOWORD(lpText), (LPWSTR)&ptr, 0);
458 
460  NULL, 0, NULL, NULL);
461 
462  if (len)
463  {
464  szText = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(CHAR));
465  if (szText) LoadStringA(hInstance, LOWORD(lpText), szText, len + 1);
466  }
467  pszText = szText;
468  if (!pszText) {
469  WARN("Failed to load id %d\n", LOWORD(lpText));
470  __ms_va_end(args);
471  return 0;
472  }
473  }
474  else
475  pszText = lpText;
476 
478  pszText, 0, 0, (LPSTR)&pszTemp, 0, &args);
479 
480  __ms_va_end(args);
481 
482  ret = MessageBoxA(hWnd, pszTemp, pszTitle, uType | MB_SETFOREGROUND);
483 
485  LocalFree(pszTemp);
486  return ret;
487 
488 #else // __REACTOS__
489 
490 // Wine version, broken.
491  char szText[100],szTitle[100];
492  LPCSTR pszText = szText, pszTitle = szTitle;
493  LPSTR pszTemp;
495  int ret;
496 
497  __ms_va_start(args, uType);
498  /* wvsprintfA(buf,fmt, args); */
499 
500  TRACE("(%p,%p,%p,%p,%08x)\n",
501  hInstance,hWnd,lpText,lpCaption,uType);
502 
503  if (IS_INTRESOURCE(lpCaption))
504  LoadStringA(hInstance, LOWORD(lpCaption), szTitle, sizeof(szTitle));
505  else
506  pszTitle = lpCaption;
507 
508  if (IS_INTRESOURCE(lpText))
509  LoadStringA(hInstance, LOWORD(lpText), szText, sizeof(szText));
510  else
511  pszText = lpText;
512 
514  pszText, 0, 0, (LPSTR)&pszTemp, 0, &args);
515 
516  __ms_va_end(args);
517 
518  ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType);
519  LocalFree(pszTemp);
520  return ret;
521 #endif
522 }
#define WideCharToMultiByte
Definition: compat.h:111
static static const char __ms_va_list
Definition: printf.c:76
#define CP_ACP
Definition: compat.h:109
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:402
DWORD WINAPI FormatMessageA(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:483
char CHAR
Definition: xmlstorage.h:175
int WINAPI LoadStringA(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPSTR lpBuffer, _In_ int cchBufferMax)
#define WARN(fmt,...)
Definition: debug.h:112
HWND hWnd
Definition: settings.c:17
char * LPSTR
Definition: xmlstorage.h:182
Definition: match.c:390
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int WINAPI MessageBoxA(_In_opt_ HWND, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_ UINT)
HINSTANCE hInstance
Definition: charmap.c:20
static const WCHAR szText[]
Definition: dialog.c:139
static PVOID ptr
Definition: dispmode.c:27
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:400
smooth NULL
Definition: ftsmooth.c:416
const char * LPCSTR
Definition: xmlstorage.h:183
#define TRACE(s)
Definition: solgame.cpp:4
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define GetProcessHeap()
Definition: compat.h:484
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
int ret
GLenum GLsizei len
Definition: glext.h:6722
#define ARRAY_SIZE(a)
Definition: main.h:24
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
unsigned int UINT
Definition: ndis.h:50
#define __ms_va_end(list)
Definition: windef.h:458
#define __ms_va_start(list, arg)
Definition: windef.h:457
#define MB_SETFOREGROUND
Definition: winuser.h:808
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define args
Definition: format.c:66
#define LOWORD(l)
Definition: pedump.c:82
#define HeapFree(x, y, z)
Definition: compat.h:483

◆ ShellMessageBoxW()

int ShellMessageBoxW ( HINSTANCE  hInstance,
HWND  hWnd,
LPCWSTR  lpText,
LPCWSTR  lpCaption,
UINT  uType,
  ... 
)

Definition at line 356 of file shellord.c.

363 {
364  WCHAR szText[100],szTitle[100];
365  LPCWSTR pszText = szText, pszTitle = szTitle;
366  LPWSTR pszTemp;
368  int ret;
369 
370  __ms_va_start(args, uType);
371  /* wvsprintfA(buf,fmt, args); */
372 
373  TRACE("(%p,%p,%p,%p,%08x)\n",
374  hInstance,hWnd,lpText,lpCaption,uType);
375 
376  if (IS_INTRESOURCE(lpCaption))
378  else
379  pszTitle = lpCaption;
380 
381  if (IS_INTRESOURCE(lpText))
383  else
384  pszText = lpText;
385 
387  pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
388 
389  __ms_va_end(args);
390 
391  ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType);
392  LocalFree(pszTemp);
393  return ret;
394 }
static static const char __ms_va_list
Definition: printf.c:76
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:402
HWND hWnd
Definition: settings.c:17
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
Definition: match.c:390
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HINSTANCE hInstance
Definition: charmap.c:20
static const WCHAR szText[]
Definition: dialog.c:139
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:400
#define TRACE(s)
Definition: solgame.cpp:4
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
__wchar_t WCHAR
Definition: xmlstorage.h:180
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
int ret
#define ARRAY_SIZE(a)
Definition: main.h:24
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
#define __ms_va_end(list)
Definition: windef.h:458
#define __ms_va_start(list, arg)
Definition: windef.h:457
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define args
Definition: format.c:66
#define LOWORD(l)
Definition: pedump.c:82

Referenced by SHWinHelp().

◆ SHFindFiles()

BOOL WINAPI SHFindFiles ( PCIDLIST_ABSOLUTE  pidlFolder,
PCIDLIST_ABSOLUTE  pidlSaveFile 
)

Definition at line 2215 of file shellord.c.

2216 {
2217  FIXME("params ignored: %p %p\n", pidlFolder, pidlSaveFile);
2219  {
2220  return FALSE;
2221  }
2222  /* Open the search results folder */
2223  /* FIXME: CSearchBar should be opened as well */
2224  return ShellExecuteW(NULL, NULL, L"explorer.exe", L"::{E17D4FC0-5564-11D1-83F2-00A0C90DC849}", NULL, SW_SHOWNORMAL) > (HINSTANCE)32;
2225 }
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
HANDLE HINSTANCE
Definition: typedefs.h:77
static const WCHAR L[]
Definition: oid.c:1250
#define SW_SHOWNORMAL
Definition: winuser.h:764
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2274
DWORD WINAPI SHRestricted(RESTRICTIONS policy)
Definition: shpolicy.c:836

Referenced by CTaskSwitchWnd::HandleAppCommand(), CTrayWindow::HandleCommand(), CTrayWindow::HandleHotKey(), CDesktopBrowser::OnCommand(), and StartMenuHandler::ShowSearchDialog().

◆ SHFlushClipboard()

HRESULT WINAPI SHFlushClipboard ( void  )

Definition at line 1765 of file shellord.c.

1766 {
1767  return OleFlushClipboard();
1768 }
HRESULT WINAPI OleFlushClipboard(void)
Definition: clipboard.c:2293

◆ SHFlushSFCache()

void WINAPI SHFlushSFCache ( void  )

Definition at line 2387 of file shellord.c.

2388 {
2389 }

◆ SHFreeUnusedLibraries()

void WINAPI SHFreeUnusedLibraries ( void  )

Definition at line 1522 of file shellord.c.

1523 {
1524  FIXME("stub\n");
1526 }
void WINAPI DECLSPEC_HOTPATCH CoFreeUnusedLibraries(void)
Definition: compobj.c:3701
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHGetImageList()

HRESULT WINAPI SHGetImageList ( int  iImageList,
REFIID  riid,
void **  ppv 
)

Definition at line 2401 of file shellord.c.

2402 {
2403  HIMAGELIST hLarge, hSmall;
2404  HIMAGELIST hNew;
2405  HRESULT ret = E_FAIL;
2406 
2407  /* Wine currently only maintains large and small image lists */
2408  if ((iImageList != SHIL_LARGE) && (iImageList != SHIL_SMALL) && (iImageList != SHIL_SYSSMALL))
2409  {
2410  FIXME("Unsupported image list %i requested\n", iImageList);
2411  return E_FAIL;
2412  }
2413 
2414  Shell_GetImageLists(&hLarge, &hSmall);
2415 #ifndef __REACTOS__
2416  hNew = ImageList_Duplicate(iImageList == SHIL_LARGE ? hLarge : hSmall);
2417 
2418  /* Get the interface for the new image list */
2419  if (hNew)
2420  {
2422  ImageList_Destroy(hNew);
2423  }
2424 #else
2425  /* Duplicating the imagelist causes the start menu items not to draw on
2426  * the first show. Was the Duplicate necessary for some reason? I believe
2427  * Windows returns the raw pointer here. */
2428  hNew = (iImageList == SHIL_LARGE ? hLarge : hSmall);
2429  ret = IImageList2_QueryInterface((IImageList2 *) hNew, riid, ppv);
2430 #endif
2431 
2432  return ret;
2433 }
#define SHIL_LARGE
Definition: shellapi.h:182
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST himl, REFIID riid, void **ppv)
Definition: imagelist.c:4038
#define E_FAIL
Definition: ddrawi.h:102
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
#define FIXME(fmt,...)
Definition: debug.h:111
LONG HRESULT
Definition: typedefs.h:79
int ret
HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST himlSrc)
Definition: imagelist.c:1801
BOOL WINAPI Shell_GetImageLists(HIMAGELIST *lpBigList, HIMAGELIST *lpSmallList)
Definition: iconcache.cpp:706
#define SHIL_SMALL
Definition: shellapi.h:183
#define SHIL_SYSSMALL
Definition: shellapi.h:185

Referenced by check_icon_size(), CISFBand::CreateSimpleToolbar(), CExplorerBand::InitializeExplorerBand(), CISFBand::InvokeCommand(), CSearchBar::OnInitDialog(), CAddressBand::SetSite(), test_get_file_info_iconlist(), test_SHGetImageList(), and CMenuToolbarBase::UpdateImageLists().

◆ SHGetInstanceExplorer()

HRESULT WINAPI SHGetInstanceExplorer ( IUnknown **  lpUnknown)

Definition at line 1498 of file shellord.c.

1499 { TRACE("%p\n", lpUnknown);
1500 
1501  *lpUnknown = SHELL32_IExplorerInterface;
1502 
1504  return E_FAIL;
1505 
1506  IUnknown_AddRef(SHELL32_IExplorerInterface);
1507  return S_OK;
1508 }
#define E_FAIL
Definition: ddrawi.h:102
#define TRACE(s)
Definition: solgame.cpp:4
static LPUNKNOWN SHELL32_IExplorerInterface
Definition: shellord.c:1481
#define S_OK
Definition: intsafe.h:59

Referenced by _SHGetInstanceExplorer(), and SHOpenFolderWindow().

◆ SHGetNewLinkInfoA()

BOOL WINAPI SHGetNewLinkInfoA ( LPCSTR  pszLinkTo,
LPCSTR  pszDir,
LPSTR  pszName,
BOOL pfMustCopy,
UINT  uFlags 
)

Definition at line 2275 of file shellord.c.

2277 {
2278  WCHAR wszLinkTo[MAX_PATH];
2279  WCHAR wszDir[MAX_PATH];
2280  WCHAR wszName[MAX_PATH];
2281  BOOL res;
2282 
2283  MultiByteToWideChar(CP_ACP, 0, pszLinkTo, -1, wszLinkTo, MAX_PATH);
2284  MultiByteToWideChar(CP_ACP, 0, pszDir, -1, wszDir, MAX_PATH);
2285 
2286  res = SHGetNewLinkInfoW(wszLinkTo, wszDir, wszName, pfMustCopy, uFlags);
2287 
2288  if (res)
2289  WideCharToMultiByte(CP_ACP, 0, wszName, -1, pszName, MAX_PATH, NULL, NULL);
2290 
2291  return res;
2292 }
BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags)
Definition: shellord.c:2294
#define WideCharToMultiByte
Definition: compat.h:111
#define CP_ACP
Definition: compat.h:109
UINT uFlags
Definition: api.c:59
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
_In_ LPCSTR pszDir
Definition: shellapi.h:582
#define MAX_PATH
Definition: compat.h:34
_In_ LPCSTR _Out_ BOOL * pfMustCopy
Definition: shellapi.h:584
#define MultiByteToWideChar
Definition: compat.h:110
GLuint res
Definition: glext.h:9613

Referenced by test_sh_new_link_info().

◆ SHGetNewLinkInfoW()

BOOL WINAPI SHGetNewLinkInfoW ( LPCWSTR  pszLinkTo,
LPCWSTR  pszDir,
LPWSTR  pszName,
BOOL pfMustCopy,
UINT  uFlags 
)

Definition at line 2294 of file shellord.c.

2296 {
2297  const WCHAR *basename;
2298  WCHAR *dst_basename;
2299  int i=2;
2300  static const WCHAR lnkformat[] = {'%','s','.','l','n','k',0};
2301  static const WCHAR lnkformatnum[] = {'%','s',' ','(','%','d',')','.','l','n','k',0};
2302 
2303  TRACE("(%s, %s, %p, %p, 0x%08x)\n", debugstr_w(pszLinkTo), debugstr_w(pszDir),
2304  pszName, pfMustCopy, uFlags);
2305 
2306  *pfMustCopy = FALSE;
2307 
2308  if (uFlags & SHGNLI_PIDL)
2309  {
2310  FIXME("SHGNLI_PIDL flag unsupported\n");
2311  return FALSE;
2312  }
2313 
2314  if (uFlags)
2315  FIXME("ignoring flags: 0x%08x\n", uFlags);
2316 
2317  /* FIXME: should test if the file is a shortcut or DOS program */
2318  if (GetFileAttributesW(pszLinkTo) == INVALID_FILE_ATTRIBUTES)
2319  return FALSE;
2320 
2321  basename = strrchrW(pszLinkTo, '\\');
2322  if (basename)
2323  basename = basename+1;
2324  else
2325  basename = pszLinkTo;
2326 
2327  lstrcpynW(pszName, pszDir, MAX_PATH);
2328  if (!PathAddBackslashW(pszName))
2329  return FALSE;
2330 
2331  dst_basename = pszName + strlenW(pszName);
2332 
2333  snprintfW(dst_basename, pszName + MAX_PATH - dst_basename, lnkformat, basename);
2334 
2335  while (GetFileAttributesW(pszName) != INVALID_FILE_ATTRIBUTES)
2336  {
2337  snprintfW(dst_basename, pszName + MAX_PATH - dst_basename, lnkformatnum, basename, i);
2338  i++;
2339  }
2340 
2341  return TRUE;
2342 }
#define snprintfW
Definition: unicode.h:60
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define TRUE
Definition: types.h:120
static void basename(LPCWSTR path, LPWSTR name)
Definition: profile.c:38
#define SHGNLI_PIDL
Definition: shellapi.h:402
UINT uFlags
Definition: api.c:59
#define lstrcpynW
Definition: compat.h:486
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
#define FALSE
Definition: types.h:117
LPWSTR WINAPI PathAddBackslashW(LPWSTR lpszPath)
Definition: path.c:289
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:802
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
_In_ LPCSTR pszDir
Definition: shellapi.h:582
#define MAX_PATH
Definition: compat.h:34
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
WINE_UNICODE_INLINE WCHAR * strrchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:254
_In_ LPCSTR _Out_ BOOL * pfMustCopy
Definition: shellapi.h:584

Referenced by SHGetNewLinkInfoA(), and SHGetNewLinkInfoWrapW().

◆ SHGetSetSettings()

VOID WINAPI SHGetSetSettings ( LPSHELLSTATE  lpss,
DWORD  dwMask,
BOOL  bSet 
)

Definition at line 201 of file shellord.c.

202 {
203  if(bSet)
204  {
205  FIXME("%p 0x%08x TRUE\n", lpss, dwMask);
206  }
207  else
208  {
209  SHGetSettings((LPSHELLFLAGSTATE)lpss,dwMask);
210  }
211 }
#define FIXME(fmt,...)
Definition: debug.h:111
VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask)
Definition: shellord.c:221

Referenced by START_TEST(), and ViewDlg_Apply().

◆ SHGetSettings()

VOID WINAPI SHGetSettings ( LPSHELLFLAGSTATE  lpsfs,
DWORD  dwMask 
)

Definition at line 221 of file shellord.c.

222 {
223  HKEY hKey;
224  DWORD dwData;
225  DWORD dwDataSize = sizeof (DWORD);
226 
227  TRACE("(%p 0x%08x)\n",lpsfs,dwMask);
228 
229  if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
230  0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0))
231  return;
232 
233  if ( (SSF_SHOWEXTENSIONS & dwMask) && !RegQueryValueExA(hKey, "HideFileExt", 0, 0, (LPBYTE)&dwData, &dwDataSize))
234  lpsfs->fShowExtensions = ((dwData == 0) ? 0 : 1);
235 
236  if ( (SSF_SHOWINFOTIP & dwMask) && !RegQueryValueExA(hKey, "ShowInfoTip", 0, 0, (LPBYTE)&dwData, &dwDataSize))
237  lpsfs->fShowInfoTip = ((dwData == 0) ? 0 : 1);
238 
239  if ( (SSF_DONTPRETTYPATH & dwMask) && !RegQueryValueExA(hKey, "DontPrettyPath", 0, 0, (LPBYTE)&dwData, &dwDataSize))
240  lpsfs->fDontPrettyPath = ((dwData == 0) ? 0 : 1);
241 
242  if ( (SSF_HIDEICONS & dwMask) && !RegQueryValueExA(hKey, "HideIcons", 0, 0, (LPBYTE)&dwData, &dwDataSize))
243  lpsfs->fHideIcons = ((dwData == 0) ? 0 : 1);
244 
245  if ( (SSF_MAPNETDRVBUTTON & dwMask) && !RegQueryValueExA(hKey, "MapNetDrvBtn", 0, 0, (LPBYTE)&dwData, &dwDataSize))
246  lpsfs->fMapNetDrvBtn = ((dwData == 0) ? 0 : 1);
247 
248  if ( (SSF_SHOWATTRIBCOL & dwMask) && !RegQueryValueExA(hKey, "ShowAttribCol", 0, 0, (LPBYTE)&dwData, &dwDataSize))
249  lpsfs->fShowAttribCol = ((dwData == 0) ? 0 : 1);
250 
251  if (((SSF_SHOWALLOBJECTS | SSF_SHOWSYSFILES) & dwMask) && !RegQueryValueExA(hKey, "Hidden", 0, 0, (LPBYTE)&dwData, &dwDataSize))
252  { if (dwData == 0)
253  { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 0;
254  if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0;
255  }
256  else if (dwData == 1)
257  { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 1;
258  if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0;
259  }
260  else if (dwData == 2)
261  { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 0;
262  if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 1;
263  }
264  }
265  RegCloseKey (hKey);
266 
267  TRACE("-- 0x%04x\n", *(WORD*)lpsfs);
268 }
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:4023
#define SSF_HIDEICONS
Definition: shlobj.h:1539
#define SSF_DONTPRETTYPATH
Definition: shlobj.h:1535
#define SSF_MAPNETDRVBUTTON
Definition: shlobj.h:1537
BOOL fDontPrettyPath
Definition: shlobj.h:1515
#define HKEY_CURRENT_USER
Definition: winreg.h:11
BOOL fShowSysFiles
Definition: shlobj.h:1508
#define SSF_SHOWATTRIBCOL
Definition: shlobj.h:1532
static HANDLE ULONG_PTR dwData
Definition: file.c:35
#define SSF_SHOWEXTENSIONS
Definition: shlobj.h:1528
BOOL fShowInfoTip
Definition: shlobj.h:1518
BOOL fMapNetDrvBtn
Definition: shlobj.h:1517
#define DWORD
Definition: nt_native.h:44
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:53
#define SSF_SHOWALLOBJECTS
Definition: shlobj.h:1527
#define TRACE(s)
Definition: solgame.cpp:4
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL fShowAllObjects
Definition: shlobj.h:1505
BOOL fHideIcons
Definition: shlobj.h:1520
#define SSF_SHOWSYSFILES
Definition: shlobj.h:1530
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
BOOL fShowAttribCol
Definition: shlobj.h:1516
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
Definition: reg.c:1029
#define SSF_SHOWINFOTIP
Definition: shlobj.h:1536
BOOL fShowExtensions
Definition: shlobj.h:1506

Referenced by SHGetSetSettings(), and START_TEST().

◆ SHHandleUpdateImage()

INT WINAPI SHHandleUpdateImage ( PCIDLIST_ABSOLUTE  pidlExtra)

Definition at line 2261 of file shellord.c.

2262 {
2263  FIXME("%p - stub\n", pidlExtra);
2264 
2265  return -1;
2266 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHLimitInputEdit()

HRESULT WINAPI SHLimitInputEdit ( HWND  hWnd,
IShellFolder psf 
)

Definition at line 2775 of file shellord.c.

2776 {
2777  IItemNameLimits *pLimits;
2778  HRESULT hr;
2779  LPWSTR pwszValidChars, pwszInvalidChars;
2780  UxSubclassInfo *pInfo;
2781 
2782  pInfo = GetPropW(hWnd, L"UxSubclassInfo");
2783  if (pInfo)
2784  {
2785  UxSubclassInfo_Destroy(pInfo);
2786  pInfo = NULL;
2787  }
2788 
2789  hr = psf->lpVtbl->QueryInterface(psf, &IID_IItemNameLimits, (LPVOID *)&pLimits);
2790  if (FAILED(hr))
2791  {
2792  ERR("hr: %x\n", hr);
2793  return hr;
2794  }
2795 
2796  pwszValidChars = pwszInvalidChars = NULL;
2797  hr = pLimits->lpVtbl->GetValidCharacters(pLimits, &pwszValidChars, &pwszInvalidChars);
2798  if (FAILED(hr))
2799  {
2800  ERR("hr: %x\n", hr);
2801  pLimits->lpVtbl->Release(pLimits);
2802  return hr;
2803  }
2804 
2805  pInfo = UxSubclassInfo_Create(hWnd, pwszValidChars, pwszInvalidChars);
2806  if (!pInfo)
2807  hr = E_FAIL;
2808 
2809  pLimits->lpVtbl->Release(pLimits);
2810 
2811  return hr;
2812 }
static void UxSubclassInfo_Destroy(UxSubclassInfo *pInfo)
Definition: shellord.c:2555
static UxSubclassInfo * UxSubclassInfo_Create(HWND hwnd, LPWSTR valid, LPWSTR invalid)
Definition: shellord.c:2741
HRESULT hr
Definition: shlfolder.c:183
HWND hWnd
Definition: settings.c:17
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:79
nsrefcnt Release()
static const WCHAR L[]
Definition: oid.c:1250
#define ERR(fmt,...)
Definition: debug.h:110
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by DialogProc(), DoNullFolderTest(), CDefView::OnNotify(), START_TEST(), and test_SHLimitInputEdit().

◆ SHLoadOLE()

HRESULT WINAPI SHLoadOLE ( LPARAM  lParam)

Definition at line 1718 of file shellord.c.

1719 { FIXME("0x%08lx stub\n",lParam);
1720  return S_OK;
1721 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:59
LPARAM lParam
Definition: combotst.c:139

◆ SHObjectProperties()

BOOL WINAPI SHObjectProperties ( HWND  hwnd,
DWORD  dwType,
LPCWSTR  szObject,
LPCWSTR  szPage 
)

Definition at line 2268 of file shellord.c.

2269 {
2270  FIXME("%p, 0x%08x, %s, %s - stub\n", hwnd, dwType, debugstr_w(szObject), debugstr_w(szPage));
2271 
2272  return TRUE;
2273 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHOutOfMemoryMessageBox()

int WINAPI SHOutOfMemoryMessageBox ( HWND  hwndOwner,
LPCSTR  lpCaption,
UINT  uType 
)

Definition at line 1753 of file shellord.c.

1757 {
1758  FIXME("%p %s 0x%08x stub\n",hwndOwner, lpCaption, uType);
1759  return 0;
1760 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHRegisterDragDrop()

HRESULT WINAPI SHRegisterDragDrop ( HWND  hWnd,
LPDROPTARGET  pDropTarget 
)

Definition at line 540 of file shellord.c.

543 {
544  static BOOL ole_initialized = FALSE;
545  HRESULT hr;
546 
547  TRACE("(%p,%p)\n", hWnd, pDropTarget);
548 
549  if (!ole_initialized)
550  {
551  hr = OleInitialize(NULL);
552  if (FAILED(hr))
553  return hr;
554  ole_initialized = TRUE;
555  }
556  return RegisterDragDrop(hWnd, pDropTarget);
557 }
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
HWND hWnd
Definition: settings.c:17
HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
Definition: ole2.c:557
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
Definition: ole2.c:169

◆ SHReplaceFromPropSheetExtArray()

UINT WINAPI SHReplaceFromPropSheetExtArray ( HPSXA  hpsxa,
UINT  uPageID,
LPFNADDPROPSHEETPAGE  lpfnReplaceWith,
LPARAM  lParam 
)

Definition at line 2112 of file shellord.c.

2113 {
2114  PSXA_CALL Call;
2115  UINT i;
2116  PPSXA psxa = (PPSXA)hpsxa;
2117 
2118  TRACE("(%p,%u,%p,%08lx)\n", hpsxa, uPageID, lpfnReplaceWith, lParam);
2119 
2120  if (psxa)
2121  {
2122  ZeroMemory(&Call, sizeof(Call));
2123  Call.lpfnAddReplaceWith = lpfnReplaceWith;
2124  Call.lParam = lParam;
2125 
2126  /* Call the ReplacePage method of all registered IShellPropSheetExt interfaces.
2127  Each shell extension is only allowed to call the callback once during the callback. */
2128  for (i = 0; i != psxa->uiCount; i++)
2129  {
2130  Call.bCalled = FALSE;
2131  psxa->pspsx[i]->lpVtbl->ReplacePage(psxa->pspsx[i], uPageID, PsxaCall, (LPARAM)&Call);
2132  }
2133 
2134  return Call.uiCount;
2135  }
2136 
2137  return 0;
2138 }
UINT uiCount
Definition: shellord.c:1930
struct _PSXA * PPSXA
#define ZeroMemory
Definition: winbase.h:1648
UINT uiCount
Definition: shellord.c:1941
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
static BOOL CALLBACK PsxaCall(HPROPSHEETPAGE hpage, LPARAM lParam)
Definition: shellord.c:1944
#define FALSE
Definition: types.h:117
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
IShellPropSheetExt * pspsx[1]
Definition: shellord.c:1932
HRESULT ReplacePage([in] EXPPS uPageID, [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith, [in] LPARAM lParam)
unsigned int UINT
Definition: ndis.h:50
LPARAM lParam
Definition: shellord.c:1938
LPFNADDPROPSHEETPAGE lpfnAddReplaceWith
Definition: shellord.c:1937
BOOL bCalled
Definition: shellord.c:1939
LPARAM lParam
Definition: combotst.c:139

Referenced by DisplayApplet(), and MouseApplet().

◆ SHRevokeDragDrop()

HRESULT WINAPI SHRevokeDragDrop ( HWND  hWnd)

Definition at line 575 of file shellord.c.

576 {
577  TRACE("(%p)\n", hWnd);
578  return RevokeDragDrop(hWnd);
579 }
HWND hWnd
Definition: settings.c:17
HRESULT WINAPI RevokeDragDrop(HWND hwnd)
Definition: ole2.c:639
#define TRACE(s)
Definition: solgame.cpp:4

◆ SHRunControlPanel()

BOOL WINAPI SHRunControlPanel ( LPCWSTR  commandLine,
HWND  parent 
)

Definition at line 1475 of file shellord.c.

1476 {
1477  FIXME("(%s, %p): stub\n", debugstr_w(commandLine), parent);
1478  return FALSE;
1479 }
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
r parent
Definition: btrfs.c:2944

◆ SHSetInstanceExplorer()

VOID WINAPI SHSetInstanceExplorer ( LPUNKNOWN  lpUnknown)

Definition at line 1488 of file shellord.c.

1489 { TRACE("%p\n", lpUnknown);
1490  SHELL32_IExplorerInterface = lpUnknown;
1491 }
#define TRACE(s)
Definition: solgame.cpp:4
static LPUNKNOWN SHELL32_IExplorerInterface
Definition: shellord.c:1481

Referenced by SHCreateFromDesktop().

◆ SHSetLocalizedName()

HRESULT WINAPI SHSetLocalizedName ( LPCWSTR  pszPath,
LPCWSTR  pszResModule,
int  idsRes 
)

Definition at line 2353 of file shellord.c.

2354 {
2355  FIXME("%p, %s, %d - stub\n", pszPath, debugstr_w(pszResModule), idsRes);
2356 
2357  return S_OK;
2358 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:59

◆ SHShellFolderView_Message()

LRESULT WINAPI SHShellFolderView_Message ( HWND  hwndCabinet,
UINT  uMessage,
LPARAM  lParam 
)

Definition at line 290 of file shellord.c.

294 {
295  FIXME("%p %08x %08lx stub\n",hwndCabinet, uMessage, lParam);
296  return 0;
297 }
#define FIXME(fmt,...)
Definition: debug.h:111
LPARAM lParam
Definition: combotst.c:139

◆ SHStartNetConnectionDialog()

HRESULT WINAPI SHStartNetConnectionDialog ( HWND  hwnd,
LPCSTR  pszRemoteName,
DWORD  dwType 
)

Definition at line 2344 of file shellord.c.

2345 {
2346  FIXME("%p, %s, 0x%08x - stub\n", hwnd, debugstr_a(pszRemoteName), dwType);
2347 
2348  return S_OK;
2349 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31
#define S_OK
Definition: intsafe.h:59

◆ SHTestTokenMembership()

EXTERN_C BOOL WINAPI SHTestTokenMembership ( HANDLE  TokenHandle,
ULONG  ulRID 
)

Definition at line 2483 of file shellord.c.

2484 {
2486  DWORD nSubAuthority0, nSubAuthority1;
2487  DWORD nSubAuthorityCount;
2488  PSID SidToCheck;
2489  BOOL IsMember = FALSE;
2490 
2491  if ((ulRID == SECURITY_SERVICE_RID) || ulRID == SECURITY_LOCAL_SYSTEM_RID)
2492  {
2493  nSubAuthority0 = ulRID;
2494  nSubAuthority1 = 0;
2495  nSubAuthorityCount= 1;
2496  }
2497  else
2498  {
2499  nSubAuthority0 = SECURITY_BUILTIN_DOMAIN_RID;
2500  nSubAuthority1 = ulRID;
2501  nSubAuthorityCount= 2;
2502  }
2503 
2504  if (!AllocateAndInitializeSid(&ntAuth,
2505  nSubAuthorityCount,
2506  nSubAuthority0,
2507  nSubAuthority1,
2508  0, 0, 0, 0, 0, 0,
2509  &SidToCheck))
2510  {
2511  return FALSE;
2512  }
2513 
2514  if (!CheckTokenMembership(TokenHandle, SidToCheck, &IsMember))
2515  {
2516  IsMember = FALSE;
2517  }
2518 
2519  FreeSid(SidToCheck);
2520  return IsMember;
2521 }
#define SECURITY_LOCAL_SYSTEM_RID
Definition: setypes.h:546
BOOL WINAPI CheckTokenMembership(IN HANDLE ExistingTokenHandle, IN PSID SidToCheck, OUT PBOOL IsMember)
Definition: token.c:21
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
PVOID WINAPI FreeSid(PSID pSid)
Definition: security.c:577
_In_ ACCESS_MASK _In_ ULONG _Out_ PHANDLE TokenHandle
Definition: psfuncs.h:715
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:526
#define SECURITY_BUILTIN_DOMAIN_RID
Definition: setypes.h:553
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SECURITY_SERVICE_RID
Definition: setypes.h:534
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
Definition: security.c:553

Referenced by IsUserAnAdmin().

◆ SHUpdateImageA()

VOID WINAPI SHUpdateImageA ( LPCSTR  pszHashItem,
INT  iIndex,
UINT  uFlags,
INT  iImageIndex 
)

Definition at line 2256 of file shellord.c.

2257 {
2258  FIXME("%s, %d, 0x%x, %d - stub\n", debugstr_a(pszHashItem), iIndex, uFlags, iImageIndex);
2259 }
UINT uFlags
Definition: api.c:59
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31

◆ SHUpdateImageW()

void WINAPI SHUpdateImageW ( LPCWSTR  pszHashItem,
int  iIndex,
UINT  uFlags,
int  iImageIndex 
)

Definition at line 2246 of file shellord.c.

2247 {
2248  FIXME("%s, %d, 0x%x, %d - stub\n", debugstr_w(pszHashItem), iIndex, uFlags, iImageIndex);
2249 }
UINT uFlags
Definition: api.c:59
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHValidateUNC()

BOOL WINAPI SHValidateUNC ( HWND  hwndOwner,
PWSTR  pszFile,
UINT  fConnect 
)

Definition at line 1797 of file shellord.c.

1798 {
1799  FIXME("(%p, %s, 0x%08x): stub\n", hwndOwner, debugstr_w(pszFile), fConnect);
1800  return FALSE;
1801 }
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHWaitForFileToOpen()

BOOL WINAPI SHWaitForFileToOpen ( LPCITEMIDLIST  pidl,
DWORD  dwFlags,
DWORD  dwTimeout 
)

Definition at line 1774 of file shellord.c.

1778 {
1779  FIXME("%p 0x%08x 0x%08x stub\n", pidl, dwFlags, dwTimeout);
1780  return FALSE;
1781 }
#define FALSE
Definition: