ReactOS  0.4.15-dev-439-g292f67a
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:57
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 524 of file shellord.c.

526 {
527  /* Unimplemented in WinXP SP3 */
528  TRACE("(%p 0x%08x %p 0x%04x %p):stub.\n",
529  hwndParent, dwReserved, lpRect, cKids, lpKids);
530  return 0;
531 }
_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 2080 of file shellord.c.

2085 {
2086  UINT i;
2087  HWND hwnd = 0; /*FIXME: who should be hwnd of owner? set to desktop */
2088  HRESULT hResult;
2089 
2090  TRACE("(%p, %d, %p, %p)\n", pidlFolder, cpidlFiles, lppidlFiles, ppdataObject);
2091  if (TRACE_ON(pidl))
2092  {
2093  pdump (pidlFolder);
2094  for (i=0; i<cpidlFiles; i++) pdump (lppidlFiles[i]);
2095  }
2096  hResult = IDataObject_Constructor(hwnd, pidlFolder, lppidlFiles, cpidlFiles, FALSE, ppdataObject);
2097  return hResult;
2098 }
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
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:78
void pdump(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:248
unsigned int UINT
Definition: ndis.h:50
#define TRACE_ON(x)
Definition: compat.h:65

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 1445 of file shellord.c.

1446 {
1447  FIXME("hwnd = %p %p %p\n",hwnd,samples,pt);
1448  return FALSE;
1449 }
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 FIXME(fmt,...)
Definition: debug.h:111

◆ DAD_DragEnter()

BOOL WINAPI DAD_DragEnter ( HWND  hwnd)

Definition at line 1454 of file shellord.c.

1455 {
1456  FIXME("hwnd = %p\n",hwnd);
1457  return FALSE;
1458 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define FIXME(fmt,...)
Definition: debug.h:111

◆ DAD_DragEnterEx()

BOOL WINAPI DAD_DragEnterEx ( HWND  hwnd,
POINT  p 
)

Definition at line 1463 of file shellord.c.

1464 {
1465  FIXME("hwnd = %p (%d,%d)\n",hwnd,p.x,p.y);
1466  return FALSE;
1467 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define FIXME(fmt,...)
Definition: debug.h:111
GLfloat GLfloat p
Definition: glext.h:8902

◆ DAD_DragLeave()

BOOL WINAPI DAD_DragLeave ( VOID  )

Definition at line 1481 of file shellord.c.

1482 {
1483  FIXME("\n");
1484  return FALSE;
1485 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ DAD_DragMove()

BOOL WINAPI DAD_DragMove ( POINT  p)

Definition at line 1472 of file shellord.c.

1473 {
1474  FIXME("(%d,%d)\n",p.x,p.y);
1475  return FALSE;
1476 }
#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 1492 of file shellord.c.

1495 {
1496  FIXME("%p %p stub\n",himlTrack, lppt);
1497  return FALSE;
1498 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ DAD_ShowDragImage()

BOOL WINAPI DAD_ShowDragImage ( BOOL  bShow)

Definition at line 1505 of file shellord.c.

1506 {
1507  FIXME("0x%08x stub\n",bShow);
1508  return FALSE;
1509 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ DoEnvironmentSubstA()

DWORD WINAPI DoEnvironmentSubstA ( LPSTR  pszString,
UINT  cchString 
)

Definition at line 1722 of file shellord.c.

1723 {
1724  LPSTR dst;
1725  BOOL res = FALSE;
1726  DWORD len = cchString;
1727 
1728  TRACE("(%s, %d)\n", debugstr_a(pszString), cchString);
1729  if (pszString == NULL) /* Really return 0? */
1730  return 0;
1731  if ((dst = (LPSTR)HeapAlloc(GetProcessHeap(), 0, cchString * sizeof(CHAR))))
1732  {
1733  len = ExpandEnvironmentStringsA(pszString, dst, cchString);
1734  /* len includes the terminating 0 */
1735  if (len && len < cchString)
1736  {
1737  res = TRUE;
1738  memcpy(pszString, dst, len);
1739  }
1740  else
1741  len = cchString;
1742 
1743  HeapFree(GetProcessHeap(), 0, dst);
1744  }
1745  return MAKELONG(len, res);
1746 }
#define TRUE
Definition: types.h:120
char CHAR
Definition: xmlstorage.h:175
char * LPSTR
Definition: xmlstorage.h:182
unsigned int BOOL
Definition: ntddk_ex.h:94
#define MAKELONG(a, b)
Definition: typedefs.h:248
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:404
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:403
_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 1797 of file shellord.c.

1798 {
1799  if (SHELL_OsIsUnicode())
1800  return DoEnvironmentSubstW(x, y);
1801  return DoEnvironmentSubstA(x, y);
1802 }
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:1767
DWORD WINAPI DoEnvironmentSubstA(LPSTR pszString, UINT cchString)
Definition: shellord.c:1722
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ DoEnvironmentSubstW()

DWORD WINAPI DoEnvironmentSubstW ( LPWSTR  pszString,
UINT  cchString 
)

Definition at line 1767 of file shellord.c.

1768 {
1769  LPWSTR dst;
1770  BOOL res = FALSE;
1771  DWORD len = cchString;
1772 
1773  TRACE("(%s, %d)\n", debugstr_w(pszString), cchString);
1774 
1775  if ((cchString < MAXLONG) && (dst = HeapAlloc(GetProcessHeap(), 0, cchString * sizeof(WCHAR))))
1776  {
1777  len = ExpandEnvironmentStringsW(pszString, dst, cchString);
1778  /* len includes the terminating 0 */
1779  if (len && len <= cchString)
1780  {
1781  res = TRUE;
1782  memcpy(pszString, dst, len * sizeof(WCHAR));
1783  }
1784  else
1785  len = cchString;
1786 
1787  HeapFree(GetProcessHeap(), 0, dst);
1788  }
1789  return MAKELONG(len, res);
1790 }
#define TRUE
Definition: types.h:120
#define MAXLONG
Definition: umtypes.h:116
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:404
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:403
_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 2518 of file shellord.c.

2519 {
2520  HGLOBAL hData;
2521  LPWSTR pszText, pszSanitized;
2522  DWORD cbData;
2523 
2525  return;
2526  if (!OpenClipboard(hwnd))
2527  return;
2528 
2530  pszText = GlobalLock(hData);
2531  if (!pszText)
2532  {
2533  CloseClipboard();
2534  return;
2535  }
2536  SHStrDupW(pszText, &pszSanitized);
2537  GlobalUnlock(hData);
2538 
2539  if (pszSanitized &&
2540  DoSanitizeText(pszSanitized, pInfo->pwszInvalidChars, pInfo->pwszValidChars))
2541  {
2542  MessageBeep(0xFFFFFFFF);
2543 
2544  /* Update clipboard text */
2545  cbData = (lstrlenW(pszSanitized) + 1) * sizeof(WCHAR);
2546  hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, cbData);
2547  pszText = GlobalLock(hData);
2548  if (pszText)
2549  {
2550  CopyMemory(pszText, pszSanitized, cbData);
2551  GlobalUnlock(hData);
2552 
2554  }
2555  }
2556 
2557  CoTaskMemFree(pszSanitized);
2558  CloseClipboard();
2559 }
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:2464
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:416
HANDLE WINAPI SetClipboardData(_In_ UINT, _In_opt_ HANDLE)
static BOOL DoSanitizeText(LPWSTR pszSanitized, LPCWSTR pszInvalidChars, LPCWSTR pszValidChars)
Definition: shellord.c:2485
#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:2465
#define GMEM_MOVEABLE
Definition: winbase.h:291

Referenced by LimitEditWindowProc().

◆ DoSanitizeText()

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

Definition at line 2485 of file shellord.c.

2486 {
2487  LPWSTR pch1, pch2;
2488  BOOL bFound = FALSE;
2489 
2490  for (pch1 = pch2 = pszSanitized; *pch1; ++pch1)
2491  {
2492  if (pszInvalidChars)
2493  {
2494  if (wcschr(pszInvalidChars, *pch1) != NULL)
2495  {
2496  bFound = TRUE;
2497  continue;
2498  }
2499  }
2500  else if (pszValidChars)
2501  {
2502  if (wcschr(pszValidChars, *pch1) == NULL)
2503  {
2504  bFound = TRUE;
2505  continue;
2506  }
2507  }
2508 
2509  *pch2 = *pch1;
2510  ++pch2;
2511  }
2512  *pch2 = 0;
2513 
2514  return bFound;
2515 }
#define TRUE
Definition: types.h:120
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 1640 of file shellord.c.

1641 {
1642  WCHAR root[] = L"A:\\";
1643  root[0] = L'A' + DriveType;
1644  return GetDriveTypeW(root);
1645 }
__wchar_t WCHAR
Definition: xmlstorage.h:180
int WINAPI DriveType(int DriveType)
Definition: shellord.c:1640
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:101
#define CP_ACP
Definition: compat.h:99
int desired
Definition: jpeglib.h:1119
#define MRU_BINARY
int32_t INT
Definition: typedefs.h:57
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 1600 of file shellord.c.

1601 {
1602  return SIC_Initialize();
1603 }
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:101
#define CP_ACP
Definition: compat.h:99
#define MRU_BINARY
#define cmp(status, error)
Definition: error.c:114
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:57
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
#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
union tagMRUINFOW::@332 u
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
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:413
#define TRACE(s)
Definition: solgame.cpp:4
#define FreeLibrary(x)
Definition: compat.h:414
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:419
#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 1807 of file shellord.c.

1808 {
1809  TRACE("GUIDFromStringA() stub\n");
1810  return FALSE;
1811 }
#define TRACE(s)
Definition: solgame.cpp:4

◆ GUIDFromStringW()

BOOL WINAPI GUIDFromStringW ( LPCWSTR  str,
LPGUID  guid 
)

Definition at line 1816 of file shellord.c.

1817 {
1818  UNICODE_STRING guid_str;
1819 
1820  RtlInitUnicodeString(&guid_str, str);
1821  return !RtlGUIDFromString(&guid_str, guid);
1822 }
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 1650 of file shellord.c.

1651 {
1652  TRACE("0x%08x stub\n",u);
1653  return 0;
1654 }
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 2449 of file shellord.c.

2450 {
2452 }
EXTERN_C BOOL WINAPI SHTestTokenMembership(HANDLE TokenHandle, ULONG ulRID)
Definition: shellord.c:2397
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 2562 of file shellord.c.

2563 {
2564  WNDPROC fnWndProc;
2565  WCHAR wch;
2566  UxSubclassInfo *pInfo = GetPropW(hwnd, L"UxSubclassInfo");
2567  if (!pInfo)
2568  return DefWindowProcW(hwnd, uMsg, wParam, lParam);
2569 
2570  fnWndProc = pInfo->fnWndProc;
2571 
2572  switch (uMsg)
2573  {
2574  case WM_KEYDOWN:
2575  if (GetKeyState(VK_SHIFT) < 0 && wParam == VK_INSERT)
2576  DoSanitizeClipboard(hwnd, pInfo);
2577  else if (GetKeyState(VK_CONTROL) < 0 && wParam == L'V')
2578  DoSanitizeClipboard(hwnd, pInfo);
2579 
2580  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2581 
2582  case WM_PASTE:
2583  DoSanitizeClipboard(hwnd, pInfo);
2584  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2585 
2586  case WM_CHAR:
2587  if (GetKeyState(VK_CONTROL) < 0 && wParam == L'V')
2588  break;
2589 
2590  if (pInfo->pwszInvalidChars)
2591  {
2592  if (wcschr(pInfo->pwszInvalidChars, (WCHAR)wParam) != NULL)
2593  {
2594  MessageBeep(0xFFFFFFFF);
2595  break;
2596  }
2597  }
2598  else if (pInfo->pwszValidChars)
2599  {
2600  if (wcschr(pInfo->pwszValidChars, (WCHAR)wParam) == NULL)
2601  {
2602  MessageBeep(0xFFFFFFFF);
2603  break;
2604  }
2605  }
2606  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2607 
2608  case WM_UNICHAR:
2609  if (wParam == UNICODE_NOCHAR)
2610  return TRUE;
2611 
2612  /* FALL THROUGH */
2613 
2614  case WM_IME_CHAR:
2615  wch = (WCHAR)wParam;
2616  if (GetKeyState(VK_CONTROL) < 0 && wch == L'V')
2617  break;
2618 
2619  if (!IsWindowUnicode(hwnd) && HIBYTE(wch) != 0)
2620  {
2621  CHAR data[] = {HIBYTE(wch), LOBYTE(wch)};
2622  MultiByteToWideChar(CP_ACP, 0, data, 2, &wch, 1);
2623  }
2624 
2625  if (pInfo->pwszInvalidChars)
2626  {
2627  if (wcschr(pInfo->pwszInvalidChars, wch) != NULL)
2628  {
2629  MessageBeep(0xFFFFFFFF);
2630  break;
2631  }
2632  }
2633  else if (pInfo->pwszValidChars)
2634  {
2635  if (wcschr(pInfo->pwszValidChars, wch) == NULL)
2636  {
2637  MessageBeep(0xFFFFFFFF);
2638  break;
2639  }
2640  }
2641  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2642 
2643  case WM_NCDESTROY:
2644  UxSubclassInfo_Destroy(pInfo);
2645  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2646 
2647  default:
2648  return CallWindowProcW(fnWndProc, hwnd, uMsg, wParam, lParam);
2649  }
2650 
2651  return 0;
2652 }
static void UxSubclassInfo_Destroy(UxSubclassInfo *pInfo)
Definition: shellord.c:2469
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
LPWSTR pwszValidChars
Definition: shellord.c:2464
#define WM_CHAR
Definition: winuser.h:1699
#define WM_IME_CHAR
Definition: winuser.h:1816
#define LOBYTE(W)
Definition: jmemdos.c:487
#define CP_ACP
Definition: compat.h:99
WNDPROC fnWndProc
Definition: shellord.c:2463
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:100
#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:2518
LPWSTR pwszInvalidChars
Definition: shellord.c:2465
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 2277 of file shellord.c.

2278 {
2279  FIXME("()\n");
2280  return TRUE;
2281 }
#define TRUE
Definition: types.h:120
#define FIXME(fmt,...)
Definition: debug.h:111

◆ LinkWindow_UnregisterClass()

BOOL WINAPI LinkWindow_UnregisterClass ( DWORD  dwUnused)

Definition at line 2286 of file shellord.c.

2287 {
2288  FIXME("()\n");
2289  return TRUE;
2290 }
#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 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 }
#define TRUE
Definition: types.h:120
GLint x0
Definition: linetemp.h:95
#define WARN(fmt,...)
Definition: debug.h:112
#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 1827 of file shellord.c.

1828 {
1829  FIXME("(%s)stub\n", debugstr_a(Str));
1830  return FALSE;
1831 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31

◆ PathIsTemporaryW()

BOOL WINAPI PathIsTemporaryW ( LPWSTR  Str)

Definition at line 1836 of file shellord.c.

1837 {
1838  FIXME("(%s)stub\n", debugstr_w(Str));
1839  return FALSE;
1840 }
#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 1858 of file shellord.c.

1859 {
1860  PPSXA_CALL Call = (PPSXA_CALL)lParam;
1861 
1862  if (Call != NULL)
1863  {
1864  if ((Call->bMultiple || !Call->bCalled) &&
1865  Call->lpfnAddReplaceWith(hpage, Call->lParam))
1866  {
1867  Call->bCalled = TRUE;
1868  Call->uiCount++;
1869  return TRUE;
1870  }
1871  }
1872 
1873  return FALSE;
1874 }
#define TRUE
Definition: types.h:120
struct _PSXA_CALL * PPSXA_CALL
UINT uiCount
Definition: shellord.c:1855
smooth NULL
Definition: ftsmooth.c:416
BOOL bMultiple
Definition: shellord.c:1854
LPARAM lParam
Definition: shellord.c:1852
LPFNADDPROPSHEETPAGE lpfnAddReplaceWith
Definition: shellord.c:1851
BOOL bCalled
Definition: shellord.c:1853
LPARAM lParam
Definition: combotst.c:139

Referenced by SHAddFromPropSheetExtArray(), and SHReplaceFromPropSheetExtArray().

◆ ReadCabinetState()

BOOL WINAPI ReadCabinetState ( CABINETSTATE cs,
int  length 
)

Definition at line 1526 of file shellord.c.

1527 {
1528  HKEY hkey = 0;
1529  DWORD type, r;
1530 
1531  TRACE("%p %d\n", cs, length);
1532 
1533  if( (cs == NULL) || (length < (int)sizeof(*cs)) )
1534  return FALSE;
1535 
1537  if( r == ERROR_SUCCESS )
1538  {
1539  type = REG_BINARY;
1540  r = RegQueryValueExW( hkey, szwSettings,
1541  NULL, &type, (LPBYTE)cs, (LPDWORD)&length );
1542  RegCloseKey( hkey );
1543 
1544  }
1545 
1546  /* if we can't read from the registry, create default values */
1547  if ( (r != ERROR_SUCCESS) || (cs->cLength < sizeof(*cs)) ||
1548  (cs->cLength != length) )
1549  {
1550  TRACE("Initializing shell cabinet settings\n");
1551  memset(cs, 0, sizeof(*cs));
1552  cs->cLength = sizeof(*cs);
1553  cs->nVersion = 2;
1554  cs->fFullPathTitle = FALSE;
1555  cs->fSaveLocalView = TRUE;
1556  cs->fNotShell = FALSE;
1557  cs->fSimpleDefault = TRUE;
1558  cs->fDontShowDescBar = FALSE;
1559  cs->fNewWindowMode = FALSE;
1560  cs->fShowCompColor = FALSE;
1561  cs->fDontPrettyNames = FALSE;
1562  cs->fAdminsCreateCommonGroups = TRUE;
1563  cs->fMenuEnumFilter = 96;
1564  }
1565 
1566  return TRUE;
1567 }
#define TRUE
Definition: types.h:120
static const WCHAR szwSettings[]
Definition: shellord.c:1520
#define ERROR_SUCCESS
Definition: deptool.c:10
#define REG_BINARY
Definition: nt_native.h:1496
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
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:58
static const WCHAR szwCabLocation[]
Definition: shellord.c:1511
#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
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 1703 of file shellord.c.

1704 { FIXME("stub\n");
1705  return 0;
1706 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SetAppStartingCursor()

HRESULT WINAPI SetAppStartingCursor ( HWND  u,
DWORD  v 
)

Definition at line 1608 of file shellord.c.

1609 { FIXME("hwnd=%p 0x%04x stub\n",u,v );
1610  return 0;
1611 }
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 1659 of file shellord.c.

1660 { FIXME("stub\n");
1661  return 1;
1662 }
#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 600 of file shellord.c.

601 {
602 #ifdef __REACTOS__
603  LPCWSTR psz1, psz2;
604  INT iCmp = lstrcmpiW(data1, data2);
605  if (iCmp != 0)
606  return iCmp;
607  psz1 = data1;
608  psz2 = data2;
609  psz1 += lstrlenW(psz1) + 1;
610  psz2 += lstrlenW(psz2) + 1;
611  return lstrcmpiW(psz1, psz2);
612 #else
613  return lstrcmpiA(data1, data2);
614 #endif
615 }
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:416
int32_t INT
Definition: typedefs.h:57
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 668 of file shellord.c.

670 {
671  LPSTR ptr;
672  INT wlen;
673 
674  /*FIXME: Document:
675  * RecentDocs MRU data structure seems to be:
676  * +0h document file name w/ terminating 0h
677  * +nh short int w/ size of remaining
678  * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown
679  * +n+4h 10 bytes zeros - unknown
680  * +n+eh shortcut file name w/ terminating 0h
681  * +n+e+nh 3 zero bytes - unknown
682  */
683 
684  /* Create the MRU data structure for "RecentDocs"
685  */
686  ptr = buffer;
687  lstrcpyA(ptr, doc_name);
688  ptr += (lstrlenA(buffer) + 1);
689  wlen= lstrlenA(new_lnk_name) + 1 + 12;
690  *((short int*)ptr) = wlen;
691  ptr += 2; /* step past the length */
692  *(ptr++) = 0x30; /* unknown reason */
693  *(ptr++) = 0; /* unknown, but can be 0x00, 0x01, 0x02 */
694  memset(ptr, 0, 10);
695  ptr += 10;
696  lstrcpyA(ptr, new_lnk_name);
697  ptr += (lstrlenA(new_lnk_name) + 1);
698  memset(ptr, 0, 3);
699  ptr += 3;
700  *len = ptr - buffer;
701 
702  /* Add the new entry into the MRU list
703  */
704  return AddMRUData(mruhandle, buffer, *len);
705 }
GLuint buffer
Definition: glext.h:5915
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:57
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 560 of file shellord.c.

561 {
562  HKEY Policy_basekey;
563  INT ret;
564 
565  /* Get the key for the policies location in the registry
566  */
568  "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
569  0, KEY_READ, &Policy_basekey)) {
570 
572  "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
573  0, KEY_READ, &Policy_basekey)) {
574  TRACE("No Explorer Policies location exists. Policy wanted=%s\n",
575  policy);
576  *len = 0;
577  return ERROR_FILE_NOT_FOUND;
578  }
579  }
580 
581  /* Retrieve the data if it exists
582  */
583  ret = SHQueryValueExA(Policy_basekey, policy, 0, type, buffer, len);
584  RegCloseKey(Policy_basekey);
585  return ret;
586 }
#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:57
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 1879 of file shellord.c.

1880 {
1881  PSXA_CALL Call;
1882  UINT i;
1883  PPSXA psxa = (PPSXA)hpsxa;
1884 
1885  TRACE("(%p,%p,%08lx)\n", hpsxa, lpfnAddPage, lParam);
1886 
1887  if (psxa)
1888  {
1889  ZeroMemory(&Call, sizeof(Call));
1890  Call.lpfnAddReplaceWith = lpfnAddPage;
1891  Call.lParam = lParam;
1892  Call.bMultiple = TRUE;
1893 
1894  /* Call the AddPage method of all registered IShellPropSheetExt interfaces */
1895  for (i = 0; i != psxa->uiCount; i++)
1896  {
1897  psxa->pspsx[i]->lpVtbl->AddPages(psxa->pspsx[i], PsxaCall, (LPARAM)&Call);
1898  }
1899 
1900  return Call.uiCount;
1901  }
1902 
1903  return 0;
1904 }
UINT uiCount
Definition: shellord.c:1844
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:1855
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:1858
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
IShellPropSheetExt * pspsx[1]
Definition: shellord.c:1846
BOOL bMultiple
Definition: shellord.c:1854
unsigned int UINT
Definition: ndis.h:50
LPARAM lParam
Definition: shellord.c:1852
LPFNADDPROPSHEETPAGE lpfnAddReplaceWith
Definition: shellord.c:1851
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 723 of file shellord.c.

724 {
725 #ifdef __REACTOS__
726  static const WCHAR szExplorerKey[] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer";
727  INT ret;
728  WCHAR szTargetPath[MAX_PATH], szLinkDir[MAX_PATH], szLinkFile[MAX_PATH], szDescription[80];
730  DWORD cbBuffer, data[64], datalen, type;
731  HANDLE hFind;
733  HKEY hExplorerKey;
734  LONG error;
735  LPWSTR pchDotExt, pchTargetTitle, pchLinkTitle;
736  MRUINFOW mru;
737  HANDLE hMRUList = NULL;
738  IShellLinkW *psl = NULL;
739  IPersistFile *pPf = NULL;
740  HRESULT hr;
741  BYTE Buffer[(MAX_PATH + 64) * sizeof(WCHAR)];
742 
743  TRACE("%04x %p\n", uFlags, pv);
744 
745  /* check policy */
746  ret = SHADD_get_policy("NoRecentDocsHistory", &type, data, &datalen);
747  if (ret > 0 && ret != ERROR_FILE_NOT_FOUND)
748  {
749  ERR("Error %d getting policy \"NoRecentDocsHistory\"\n", ret);
750  }
751  else if (ret == ERROR_SUCCESS)
752  {
753  if (!(type == REG_DWORD || (type == REG_BINARY && datalen == 4)))
754  {
755  ERR("Error policy data for \"NoRecentDocsHistory\" not formatted correctly, type=%d, len=%d\n",
756  type, datalen);
757  return;
758  }
759 
760  TRACE("policy value for NoRecentDocsHistory = %08x\n", data[0]);
761  /* now test the actual policy value */
762  if (data[0] != 0)
763  return;
764  }
765 
766  /* store to szTargetPath */
767  szTargetPath[0] = 0;
768  if (pv)
769  {
770  switch (uFlags)
771  {
772  case SHARD_PATHA:
773  MultiByteToWideChar(CP_ACP, 0, pv, -1, szLinkDir, ARRAYSIZE(szLinkDir));
774  GetFullPathNameW(szLinkDir, ARRAYSIZE(szTargetPath), szTargetPath, NULL);
775  break;
776 
777  case SHARD_PATHW:
778  GetFullPathNameW(pv, ARRAYSIZE(szTargetPath), szTargetPath, NULL);
779  break;
780 
781  case SHARD_PIDL:
782  SHGetPathFromIDListW(pv, szLinkDir);
783  GetFullPathNameW(szLinkDir, ARRAYSIZE(szTargetPath), szTargetPath, NULL);
784  break;
785 
786  default:
787  FIXME("Unsupported flags: %u\n", uFlags);
788  return;
789  }
790  }
791 
792  /* get recent folder */
793  if (!SHGetSpecialFolderPathW(NULL, szLinkDir, CSIDL_RECENT, FALSE))
794  {
795  ERR("serious issues 1\n");
796  return;
797  }
798  TRACE("Users Recent dir %S\n", szLinkDir);
799 
800  /* open Explorer key */
801  error = RegCreateKeyExW(HKEY_CURRENT_USER, szExplorerKey, 0, NULL, 0,
802  KEY_READ | KEY_WRITE, NULL, &hExplorerKey, NULL);
803  if (error)
804  {
805  ERR("Failed to RegCreateKeyExW: 0x%08X\n", error);
806  return;
807  }
808 
809  if (!pv)
810  {
811  TRACE("pv is NULL, so delete all shortcut files in %S\n", szLinkDir);
812 
813  lstrcpynW(szLinkFile, szLinkDir, ARRAYSIZE(szLinkFile));
814  PathAppendW(szLinkFile, L"*.lnk");
815 
816  hFind = FindFirstFileW(szLinkFile, &find);
817  if (hFind != INVALID_HANDLE_VALUE)
818  {
819  do
820  {
821  lstrcpynW(szLinkFile, szLinkDir, ARRAYSIZE(szLinkFile));
822  PathAppendW(szLinkFile, find.cFileName);
823  DeleteFileW(szLinkFile);
824  } while (FindNextFile(hFind, &find));
825  FindClose(hFind);
826  }
827 
828  SHDeleteKeyW(hExplorerKey, L"RecentDocs");
829  RegCloseKey(hExplorerKey);
830  return;
831  }
832 
833  if (szTargetPath[0] == 0 || !PathFileExistsW(szTargetPath) ||
834  PathIsDirectoryW(szTargetPath))
835  {
836  /* path is not normal file */
837  RegCloseKey(hExplorerKey);
838  return;
839  }
840 
841  hr = CoInitialize(NULL);
842  if (FAILED(hr))
843  {
844  ERR("CoInitialize: %08X\n", hr);
845  RegCloseKey(hExplorerKey);
846  return;
847  }
848 
849  /* check if file is a shortcut */
850  ret = 0;
851  pchDotExt = PathFindExtensionW(szTargetPath);
852  while (lstrcmpiW(pchDotExt, L".lnk") == 0)
853  {
854  hr = IShellLink_ConstructFromPath(szTargetPath, &IID_IShellLinkW, (LPVOID*)&psl);
855  if (FAILED(hr))
856  {
857  ERR("IShellLink_ConstructFromPath: 0x%08X\n", hr);
858  goto Quit;
859  }
860 
861  IShellLinkW_GetPath(psl, szPath, ARRAYSIZE(szPath), NULL, 0);
862  IShellLinkW_Release(psl);
863  psl = NULL;
864 
865  lstrcpynW(szTargetPath, szPath, ARRAYSIZE(szTargetPath));
866  pchDotExt = PathFindExtensionW(szTargetPath);
867 
868  if (++ret >= 8)
869  {
870  ERR("Link loop?\n");
871  goto Quit;
872  }
873  }
874  if (!lstrcmpiW(pchDotExt, L".exe"))
875  {
876  /* executables are not added */
877  goto Quit;
878  }
879 
880  /* *** JOB 0: Build strings *** */
881 
882  pchTargetTitle = PathFindFileNameW(szTargetPath);
883 
884  lstrcpyW(szDescription, L"Shortcut to ");
886 
887  lstrcpynW(szLinkFile, szLinkDir, ARRAYSIZE(szLinkFile));
888  PathAppendW(szLinkFile, pchTargetTitle);
889  StrCatBuffW(szLinkFile, L".lnk", ARRAYSIZE(szLinkFile));
890  pchLinkTitle = PathFindFileNameW(szLinkFile);
891 
892  /* *** JOB 1: Update registry for ...\Explorer\RecentDocs list *** */
893 
894  /* store MRU data */
895  cbBuffer = sizeof(Buffer);
896  ret = DoStoreMRUData(Buffer, &cbBuffer, pchTargetTitle, szTargetPath, pchLinkTitle);
897  if (!ret)
898  {
899  ERR("DoStoreMRUData failed: %d\n", ret);
900  goto Quit;
901  }
902 
903  /* create MRU list */
904  mru.cbSize = sizeof(mru);
905  mru.uMax = 16;
907  mru.hKey = hExplorerKey;
908  mru.lpszSubKey = L"RecentDocs";
909  mru.lpfnCompare = (MRUCMPPROCW)SHADD_compare_mru;
910  hMRUList = CreateMRUListW(&mru);
911  if (!hMRUList)
912  {
913  ERR("CreateMRUListW failed\n");
914  goto Quit;
915  }
916 
917  /* already exists? */
918  ret = FindMRUData(hMRUList, Buffer, cbBuffer, NULL);
919  if (ret >= 0)
920  {
921  /* Just touch for speed */
922  HANDLE hFile;
926  {
927  TRACE("Just touch file '%S'.\n", szLinkFile);
929  goto Quit;
930  }
931  }
932 
933  /* add MRU data */
934  ret = AddMRUData(hMRUList, Buffer, cbBuffer);
935  if (ret < 0)
936  {
937  ERR("AddMRUData failed: %d\n", ret);
938  goto Quit;
939  }
940 
941  /* *** JOB 2: Create shortcut in user's "Recent" directory *** */
942 
943  hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
944  &IID_IShellLinkW, (LPVOID *)&psl);
945  if (FAILED(hr))
946  {
947  ERR("CoInitialize for IID_IShellLinkW: %08X\n", hr);
948  goto Quit;
949  }
950 
951  hr = IShellLinkW_QueryInterface(psl, &IID_IPersistFile, (LPVOID *)&pPf);
952  if (FAILED(hr))
953  {
954  ERR("IShellLinkW_QueryInterface: %08X\n", hr);
955  goto Quit;
956  }
957 
958  if (uFlags == SHARD_PIDL)
959  hr = IShellLinkW_SetIDList(psl, pv);
960  else
961  hr = IShellLinkW_SetPath(psl, pv);
962 
963  IShellLinkW_SetDescription(psl, szDescription);
964 
965  hr = IPersistFile_Save(pPf, szLinkFile, TRUE);
966  if (FAILED(hr))
967  {
968  ERR("IPersistFile_Save: 0x%08X\n", hr);
969  }
970 
971  hr = IPersistFile_SaveCompleted(pPf, szLinkFile);
972  if (FAILED(hr))
973  {
974  ERR("IPersistFile_SaveCompleted: 0x%08X\n", hr);
975  }
976 
977 Quit:
978  if (hMRUList)
979  FreeMRUList(hMRUList);
980  if (pPf)
981  IPersistFile_Release(pPf);
982  if (psl)
983  IShellLinkW_Release(psl);
984  CoUninitialize();
985  RegCloseKey(hExplorerKey);
986 #else
987 /* If list is a string list lpfnCompare has the following prototype
988  * int CALLBACK MRUCompareString(LPCSTR s1, LPCSTR s2)
989  * for binary lists the prototype is
990  * int CALLBACK MRUCompareBinary(LPCVOID data1, LPCVOID data2, DWORD cbData)
991  * where cbData is the no. of bytes to compare.
992  * Need to check what return value means identical - 0?
993  */
994 
995 
996  UINT olderrormode;
997  HKEY HCUbasekey;
998  CHAR doc_name[MAX_PATH];
999  CHAR link_dir[MAX_PATH];
1000  CHAR new_lnk_filepath[MAX_PATH];
1001  CHAR new_lnk_name[MAX_PATH];
1002  CHAR * ext;
1003  IMalloc *ppM;
1004  LPITEMIDLIST pidl;
1005  HWND hwnd = 0; /* FIXME: get real window handle */
1006  INT ret;
1007  DWORD data[64], datalen, type;
1008 
1009  TRACE("%04x %p\n", uFlags, pv);
1010 
1011  /*FIXME: Document:
1012  * RecentDocs MRU data structure seems to be:
1013  * +0h document file name w/ terminating 0h
1014  * +nh short int w/ size of remaining
1015  * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown
1016  * +n+4h 10 bytes zeros - unknown
1017  * +n+eh shortcut file name w/ terminating 0h
1018  * +n+e+nh 3 zero bytes - unknown
1019  */
1020 
1021  /* See if we need to do anything.
1022  */
1023  datalen = 64;
1024  ret=SHADD_get_policy( "NoRecentDocsHistory", &type, data, &datalen);
1025  if ((ret > 0) && (ret != ERROR_FILE_NOT_FOUND)) {
1026  ERR("Error %d getting policy \"NoRecentDocsHistory\"\n", ret);
1027  return;
1028  }
1029  if (ret == ERROR_SUCCESS) {
1030  if (!( (type == REG_DWORD) ||
1031  ((type == REG_BINARY) && (datalen == 4)) )) {
1032  ERR("Error policy data for \"NoRecentDocsHistory\" not formatted correctly, type=%d, len=%d\n",
1033  type, datalen);
1034  return;
1035  }
1036 
1037  TRACE("policy value for NoRecentDocsHistory = %08x\n", data[0]);
1038  /* now test the actual policy value */
1039  if ( data[0] != 0)
1040  return;
1041  }
1042 
1043  /* Open key to where the necessary info is
1044  */
1045  /* FIXME: This should be done during DLL PROCESS_ATTACH (or THREAD_ATTACH)
1046  * and the close should be done during the _DETACH. The resulting
1047  * key is stored in the DLL global data.
1048  */
1050  "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
1051  0, 0, 0, KEY_READ, 0, &HCUbasekey, 0)) {
1052  ERR("Failed to create 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer'\n");
1053  return;
1054  }
1055 
1056  /* Get path to user's "Recent" directory
1057  */
1058  if(SUCCEEDED(SHGetMalloc(&ppM))) {
1060  &pidl))) {
1061  SHGetPathFromIDListA(pidl, link_dir);
1062  IMalloc_Free(ppM, pidl);
1063  }
1064  else {
1065  /* serious issues */
1066  link_dir[0] = 0;
1067  ERR("serious issues 1\n");
1068  }
1069  IMalloc_Release(ppM);
1070  }
1071  else {
1072  /* serious issues */
1073  link_dir[0] = 0;
1074  ERR("serious issues 2\n");
1075  }
1076  TRACE("Users Recent dir %s\n", link_dir);
1077 
1078  /* If no input, then go clear the lists */
1079  if (!pv) {
1080  /* clear user's Recent dir
1081  */
1082 
1083  /* FIXME: delete all files in "link_dir"
1084  *
1085  * while( more files ) {
1086  * lstrcpyA(old_lnk_name, link_dir);
1087  * PathAppendA(old_lnk_name, filenam);
1088  * DeleteFileA(old_lnk_name);
1089  * }
1090  */
1091  FIXME("should delete all files in %s\\\n", link_dir);
1092 
1093  /* clear MRU list
1094  */
1095  /* MS Bug ?? v4.72.3612.1700 of shell32 does the delete against
1096  * HKEY_LOCAL_MACHINE version of ...CurrentVersion\Explorer
1097  * and naturally it fails w/ rc=2. It should do it against
1098  * HKEY_CURRENT_USER which is where it is stored, and where
1099  * the MRU routines expect it!!!!
1100  */
1101  RegDeleteKeyA(HCUbasekey, "RecentDocs");
1102  RegCloseKey(HCUbasekey);
1103  return;
1104  }
1105 
1106  /* Have data to add, the jobs to be done:
1107  * 1. Add document to MRU list in registry "HKCU\Software\
1108  * Microsoft\Windows\CurrentVersion\Explorer\RecentDocs".
1109  * 2. Add shortcut to document in the user's Recent directory
1110  * (CSIDL_RECENT).
1111  * 3. Add shortcut to Start menu's Documents submenu.
1112  */
1113 
1114  /* Get the pure document name from the input
1115  */
1116  switch (uFlags)
1117  {
1118  case SHARD_PIDL:
1119  if (!SHGetPathFromIDListA(pv, doc_name))
1120  {
1121  WARN("can't get path from PIDL\n");
1122  return;
1123  }
1124  break;
1125 
1126  case SHARD_PATHA:
1127  lstrcpynA(doc_name, pv, MAX_PATH);
1128  break;
1129 
1130  case SHARD_PATHW:
1131  WideCharToMultiByte(CP_ACP, 0, pv, -1, doc_name, MAX_PATH, NULL, NULL);
1132  break;
1133 
1134  default:
1135  FIXME("Unsupported flags: %u\n", uFlags);
1136  return;
1137  }
1138 
1139  TRACE("full document name %s\n", debugstr_a(doc_name));
1140 
1141  PathStripPathA(doc_name);
1142  TRACE("stripped document name %s\n", debugstr_a(doc_name));
1143 
1144 
1145  /* *** JOB 1: Update registry for ...\Explorer\RecentDocs list *** */
1146 
1147  { /* on input needs:
1148  * doc_name - pure file-spec, no path
1149  * link_dir - path to the user's Recent directory
1150  * HCUbasekey - key of ...Windows\CurrentVersion\Explorer" node
1151  * creates:
1152  * new_lnk_name- pure file-spec, no path for new .lnk file
1153  * new_lnk_filepath
1154  * - path and file name of new .lnk file
1155  */
1156  CREATEMRULISTA mymru;
1157  HANDLE mruhandle;
1158  INT len, pos, bufused, err;
1159  INT i;
1160  DWORD attr;
1161  CHAR buffer[2048];
1162  CHAR *ptr;
1163  CHAR old_lnk_name[MAX_PATH];
1164  short int slen;
1165 
1166  mymru.cbSize = sizeof(CREATEMRULISTA);
1167  mymru.nMaxItems = 15;
1169  mymru.hKey = HCUbasekey;
1170  mymru.lpszSubKey = "RecentDocs";
1171  mymru.lpfnCompare = SHADD_compare_mru;
1172  mruhandle = CreateMRUListA(&mymru);
1173  if (!mruhandle) {
1174  /* MRU failed */
1175  ERR("MRU processing failed, handle zero\n");
1176  RegCloseKey(HCUbasekey);
1177  return;
1178  }
1179  len = lstrlenA(doc_name);
1180  pos = FindMRUData(mruhandle, doc_name, len, 0);
1181 
1182  /* Now get the MRU entry that will be replaced
1183  * and delete the .lnk file for it
1184  */
1185  if ((bufused = EnumMRUListA(mruhandle, (pos == -1) ? 14 : pos,
1186  buffer, 2048)) != -1) {
1187  ptr = buffer;
1188  ptr += (lstrlenA(buffer) + 1);
1189  slen = *((short int*)ptr);
1190  ptr += 2; /* skip the length area */
1191  if (bufused >= slen + (ptr-buffer)) {
1192  /* buffer size looks good */
1193  ptr += 12; /* get to string */
1194  len = bufused - (ptr-buffer); /* get length of buf remaining */
1195  if (ptr[0] && (lstrlenA(ptr) <= len-1)) {
1196  /* appears to be good string */
1197  lstrcpyA(old_lnk_name, link_dir);
1198  PathAppendA(old_lnk_name, ptr);
1199  if (!DeleteFileA(old_lnk_name)) {
1200  if ((attr = GetFileAttributesA(old_lnk_name)) == INVALID_FILE_ATTRIBUTES) {
1201  if ((err = GetLastError()) != ERROR_FILE_NOT_FOUND) {
1202  ERR("Delete for %s failed, err=%d, attr=%08x\n",
1203  old_lnk_name, err, attr);
1204  }
1205  else {
1206  TRACE("old .lnk file %s did not exist\n",
1207  old_lnk_name);
1208  }
1209  }
1210  else {
1211  ERR("Delete for %s failed, attr=%08x\n",
1212  old_lnk_name, attr);
1213  }
1214  }
1215  else {
1216  TRACE("deleted old .lnk file %s\n", old_lnk_name);
1217  }
1218  }
1219  }
1220  }
1221 
1222  /* Create usable .lnk file name for the "Recent" directory
1223  */
1224  wsprintfA(new_lnk_name, "%s.lnk", doc_name);
1225  lstrcpyA(new_lnk_filepath, link_dir);
1226  PathAppendA(new_lnk_filepath, new_lnk_name);
1227  i = 1;
1228  olderrormode = SetErrorMode(SEM_FAILCRITICALERRORS);
1229  while (GetFileAttributesA(new_lnk_filepath) != INVALID_FILE_ATTRIBUTES) {
1230  i++;
1231  wsprintfA(new_lnk_name, "%s (%u).lnk", doc_name, i);
1232  lstrcpyA(new_lnk_filepath, link_dir);
1233  PathAppendA(new_lnk_filepath, new_lnk_name);
1234  }
1235  SetErrorMode(olderrormode);
1236  TRACE("new shortcut will be %s\n", new_lnk_filepath);
1237 
1238  /* Now add the new MRU entry and data
1239  */
1240  pos = SHADD_create_add_mru_data(mruhandle, doc_name, new_lnk_name,
1241  buffer, &len);
1242  FreeMRUList(mruhandle);
1243  TRACE("Updated MRU list, new doc is position %d\n", pos);
1244  }
1245 
1246  /* *** JOB 2: Create shortcut in user's "Recent" directory *** */
1247 
1248  { /* on input needs:
1249  * doc_name - pure file-spec, no path
1250  * new_lnk_filepath
1251  * - path and file name of new .lnk file
1252  * uFlags[in] - flags on call to SHAddToRecentDocs
1253  * pv[in] - document path/pidl on call to SHAddToRecentDocs
1254  */
1255  IShellLinkA *psl = NULL;
1256  IPersistFile *pPf = NULL;
1257  HRESULT hres;
1258  CHAR desc[MAX_PATH];
1259  WCHAR widelink[MAX_PATH];
1260 
1261  CoInitialize(0);
1262 
1263  hres = CoCreateInstance( &CLSID_ShellLink,
1264  NULL,
1265  CLSCTX_INPROC_SERVER,
1266  &IID_IShellLinkA,
1267  (LPVOID )&psl);
1268  if(SUCCEEDED(hres)) {
1269 
1270  hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile,
1271  (LPVOID *)&pPf);
1272  if(FAILED(hres)) {
1273  /* bombed */
1274  ERR("failed QueryInterface for IPersistFile %08x\n", hres);
1275  goto fail;
1276  }
1277 
1278  /* Set the document path or pidl */
1279  if (uFlags == SHARD_PIDL) {
1280  hres = IShellLinkA_SetIDList(psl, pv);
1281  } else {
1282  hres = IShellLinkA_SetPath(psl, pv);
1283  }
1284  if(FAILED(hres)) {
1285  /* bombed */
1286  ERR("failed Set{IDList|Path} %08x\n", hres);
1287  goto fail;
1288  }
1289 
1290  lstrcpyA(desc, "Shortcut to ");
1291  lstrcatA(desc, doc_name);
1292  hres = IShellLinkA_SetDescription(psl, desc);
1293  if(FAILED(hres)) {
1294  /* bombed */
1295  ERR("failed SetDescription %08x\n", hres);
1296  goto fail;
1297  }
1298 
1299  MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1,
1300  widelink, MAX_PATH);
1301  /* create the short cut */
1302  hres = IPersistFile_Save(pPf, widelink, TRUE);
1303  if(FAILED(hres)) {
1304  /* bombed */
1305  ERR("failed IPersistFile::Save %08x\n", hres);
1306  IPersistFile_Release(pPf);
1307  IShellLinkA_Release(psl);
1308  goto fail;
1309  }
1310  hres = IPersistFile_SaveCompleted(pPf, widelink);
1311  IPersistFile_Release(pPf);
1312  IShellLinkA_Release(psl);
1313  TRACE("shortcut %s has been created, result=%08x\n",
1314  new_lnk_filepath, hres);
1315  }
1316  else {
1317  ERR("CoCreateInstance failed, hres=%08x\n", hres);
1318  }
1319  }
1320 
1321  fail:
1322  CoUninitialize();
1323 
1324  /* all done */
1325  RegCloseKey(HCUbasekey);
1326  return;
1327 #endif
1328 }
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 TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:407
BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath)
Definition: pidl.c:1272
#define MRUF_DELAYED_SAVE
Definition: shellord.c:66
#define ERROR_SUCCESS
Definition: deptool.c:10
#define WideCharToMultiByte
Definition: compat.h:101
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
LPWSTR WINAPI StrCatBuffW(LPWSTR lpszStr, LPCWSTR lpszCat, INT cchMax)
Definition: string.c:1436
#define CP_ACP
Definition: compat.h:99
#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:1288
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:400
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:560
static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPCSTR doc_name, LPCSTR new_lnk_name, LPSTR buffer, INT *len)
Definition: shellord.c:668
UINT uFlags
Definition: api.c:59
int const JOCTET unsigned int datalen
Definition: jpeglib.h:1030
int32_t INT
Definition: typedefs.h:57
static INT CALLBACK SHADD_compare_mru(LPCVOID data1, LPCVOID data2, DWORD cbData)
Definition: shellord.c:600
#define FILE_SHARE_READ
Definition: compat.h:125
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:406
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
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:435
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:78
#define FindNextFile
Definition: winbase.h:3628
#define MAX_PATH
Definition: compat.h:26
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:124
#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:415
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:417
static IMalloc * ppM
Definition: shlfolder.c:47
#define MultiByteToWideChar
Definition: compat.h:100
#define CreateFileW
Definition: compat.h:409
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 1909 of file shellord.c.

1910 {
1911  return SHCreatePropSheetExtArrayEx(hKey, pszSubKey, max_iface, NULL);
1912 }
smooth NULL
Definition: ftsmooth.c:416
HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, LPDATAOBJECT pDataObj)
Definition: shellord.c:1917

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

◆ SHCreatePropSheetExtArrayEx()

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

Definition at line 1917 of file shellord.c.

1918 {
1919  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};
1920  WCHAR szHandler[64];
1921  DWORD dwHandlerLen;
1922  WCHAR szClsidHandler[39];
1923  DWORD dwClsidSize;
1924  CLSID clsid;
1925  LONG lRet;
1926  DWORD dwIndex;
1927  IShellExtInit *psxi;
1928  IShellPropSheetExt *pspsx;
1929  HKEY hkBase, hkPropSheetHandlers;
1930  PPSXA psxa = NULL;
1931 
1932  TRACE("(%p,%s,%u)\n", hKey, debugstr_w(pszSubKey), max_iface);
1933 
1934  if (max_iface == 0)
1935  return NULL;
1936 
1937  /* Open the registry key */
1938  lRet = RegOpenKeyW(hKey, pszSubKey, &hkBase);
1939  if (lRet != ERROR_SUCCESS)
1940  return NULL;
1941 
1942  lRet = RegOpenKeyExW(hkBase, szPropSheetSubKey, 0, KEY_ENUMERATE_SUB_KEYS, &hkPropSheetHandlers);
1943  RegCloseKey(hkBase);
1944  if (lRet == ERROR_SUCCESS)
1945  {
1946  /* Create and initialize the Property Sheet Extensions Array */
1947  psxa = LocalAlloc(LMEM_FIXED, FIELD_OFFSET(PSXA, pspsx[max_iface]));
1948  if (psxa)
1949  {
1950  ZeroMemory(psxa, FIELD_OFFSET(PSXA, pspsx[max_iface]));
1951  psxa->uiAllocated = max_iface;
1952 
1953  /* Enumerate all subkeys and attempt to load the shell extensions */
1954  dwIndex = 0;
1955  do
1956  {
1957  dwHandlerLen = sizeof(szHandler) / sizeof(szHandler[0]);
1958  lRet = RegEnumKeyExW(hkPropSheetHandlers, dwIndex++, szHandler, &dwHandlerLen, NULL, NULL, NULL, NULL);
1959  if (lRet != ERROR_SUCCESS)
1960  {
1961  if (lRet == ERROR_MORE_DATA)
1962  continue;
1963 
1964  if (lRet == ERROR_NO_MORE_ITEMS)
1965  lRet = ERROR_SUCCESS;
1966  break;
1967  }
1968 
1969  /* The CLSID is stored either in the key itself or in its default value. */
1970  if (FAILED(lRet = SHCLSIDFromStringW(szHandler, &clsid)))
1971  {
1972  dwClsidSize = sizeof(szClsidHandler);
1973  if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS)
1974  {
1975  /* Force a NULL-termination and convert the string */
1976  szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0;
1977  lRet = SHCLSIDFromStringW(szClsidHandler, &clsid);
1978  }
1979  }
1980 
1981  if (SUCCEEDED(lRet))
1982  {
1983  /* Attempt to get an IShellPropSheetExt and an IShellExtInit instance.
1984  Only if both interfaces are supported it's a real shell extension.
1985  Then call IShellExtInit's Initialize method. */
1986  if (SUCCEEDED(CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER/* | CLSCTX_NO_CODE_DOWNLOAD */, &IID_IShellPropSheetExt, (LPVOID *)&pspsx)))
1987  {
1988  if (SUCCEEDED(pspsx->lpVtbl->QueryInterface(pspsx, &IID_IShellExtInit, (PVOID *)&psxi)))
1989  {
1990  if (SUCCEEDED(psxi->lpVtbl->Initialize(psxi, NULL, pDataObj, hKey)))
1991  {
1992  /* Add the IShellPropSheetExt instance to the array */
1993  psxa->pspsx[psxa->uiCount++] = pspsx;
1994  }
1995  else
1996  {
1997  psxi->lpVtbl->Release(psxi);
1998  pspsx->lpVtbl->Release(pspsx);
1999  }
2000  }
2001  else
2002  pspsx->lpVtbl->Release(pspsx);
2003  }
2004  }
2005 
2006  } while (psxa->uiCount != psxa->uiAllocated);
2007  }
2008  else
2009  lRet = ERROR_NOT_ENOUGH_MEMORY;
2010 
2011  RegCloseKey(hkPropSheetHandlers);
2012  }
2013 
2014  if (lRet != ERROR_SUCCESS && psxa)
2015  {
2016  SHDestroyPropSheetExtArray((HPSXA)psxa);
2017  psxa = NULL;
2018  }
2019 
2020  return (HPSXA)psxa;
2021 }
void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
Definition: shellord.c:2057
UINT uiCount
Definition: shellord.c:1844
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:95
#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:1845
__wchar_t WCHAR
Definition: xmlstorage.h:180
nsrefcnt Release()
unsigned long DWORD
Definition: ntddk_ex.h:95
IShellPropSheetExt * pspsx[1]
Definition: shellord.c:1846
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:254
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 2363 of file shellord.c.

2365 {
2366  IShellView * psf;
2367  HRESULT hRes;
2368 
2369  *ppsv = NULL;
2370  if (!pcsfv || pcsfv->cbSize != sizeof(*pcsfv))
2371  return E_INVALIDARG;
2372 
2373  TRACE("sf=%p outer=%p callback=%p\n",
2374  pcsfv->pshf, pcsfv->psvOuter, pcsfv->psfvcb);
2375 
2376  hRes = IShellView_Constructor(pcsfv->pshf, &psf);
2377  if (FAILED(hRes))
2378  return hRes;
2379 
2380  hRes = IShellView_QueryInterface(psf, &IID_IShellView, (LPVOID *)ppsv);
2381  IShellView_Release(psf);
2382 
2383  return hRes;
2384 }
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:78
IShellFolder * pshf
Definition: shlobj.h:1283
UINT cbSize
Definition: shlobj.h:1282

◆ SHCreateShellFolderViewEx()

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

Definition at line 1344 of file shellord.c.

1347 {
1348  IShellView * psf;
1349  HRESULT hRes;
1350 
1351  TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n",
1352  psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback,
1353  psvcbi->fvm, psvcbi->psvOuter);
1354 
1355  *ppv = NULL;
1356  hRes = IShellView_Constructor(psvcbi->pshf, &psf);
1357 
1358  if (FAILED(hRes))
1359  return hRes;
1360 
1361  hRes = IShellView_QueryInterface(psf, &IID_IShellView, (LPVOID *)ppv);
1362  IShellView_Release(psf);
1363 
1364  return hRes;
1365 }
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:78
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 2106 of file shellord.c.

2110 {
2111  IEnumFORMATETC *pef;
2112  HRESULT hRes;
2113  TRACE("cf=%d fe=%p pef=%p\n", cFormats, lpFormats, ppenumFormatetc);
2114 
2115  hRes = IEnumFORMATETC_Constructor(cFormats, lpFormats, &pef);
2116  if (FAILED(hRes))
2117  return hRes;
2118 
2119  IEnumFORMATETC_AddRef(pef);
2120  hRes = IEnumFORMATETC_QueryInterface(pef, &IID_IEnumFORMATETC, (LPVOID*)ppenumFormatetc);
2121  IEnumFORMATETC_Release(pef);
2122 
2123  return hRes;
2124 }
HRESULT IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[], IEnumFORMATETC **ppFormat)
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
const GUID IID_IEnumFORMATETC

Referenced by CDevSettings_EnumFormatEtc().

◆ SHDestroyPropSheetExtArray()

void WINAPI SHDestroyPropSheetExtArray ( HPSXA  hpsxa)

Definition at line 2057 of file shellord.c.

2058 {
2059  UINT i;
2060  PPSXA psxa = (PPSXA)hpsxa;
2061 
2062  TRACE("(%p)\n", hpsxa);
2063 
2064  if (psxa)
2065  {
2066  for (i = 0; i != psxa->uiCount; i++)
2067  {
2068  psxa->pspsx[i]->lpVtbl->Release(psxa->pspsx[i]);
2069  }
2070 
2071  LocalFree(psxa);
2072  }
2073 }
UINT uiCount
Definition: shellord.c:1844
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:1846
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 508 of file shellord.c.

514 {
515  FIXME("(%p %p %p 0x%08x %p):stub.\n",
516  hWnd, lpDataObject, lpDropSource, dwOKEffect, pdwEffect);
517  return DoDragDrop(lpDataObject, lpDropSource, dwOKEffect, pdwEffect);
518 }
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 398 of file shellord.c.

405 {
406  char szText[100],szTitle[100];
407  LPCSTR pszText = szText, pszTitle = szTitle;
408  LPSTR pszTemp;
410  int ret;
411 
412  __ms_va_start(args, uType);
413  /* wvsprintfA(buf,fmt, args); */
414 
415  TRACE("(%p,%p,%p,%p,%08x)\n",
416  hInstance,hWnd,lpText,lpCaption,uType);
417 
418  if (IS_INTRESOURCE(lpCaption))
419  LoadStringA(hInstance, LOWORD(lpCaption), szTitle, sizeof(szTitle));
420  else
421  pszTitle = lpCaption;
422 
423  if (IS_INTRESOURCE(lpText))
424  LoadStringA(hInstance, LOWORD(lpText), szText, sizeof(szText));
425  else
426  pszText = lpText;
427 
429  pszText, 0, 0, (LPSTR)&pszTemp, 0, &args);
430 
431  __ms_va_end(args);
432 
433  ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType);
434  LocalFree(pszTemp);
435  return ret;
436 }
static static const char __ms_va_list
Definition: printf.c:76
#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
int WINAPI LoadStringA(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPSTR lpBuffer, _In_ int cchBufferMax)
HWND hWnd
Definition: settings.c:17
char * LPSTR
Definition: xmlstorage.h:182
Definition: match.c:390
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
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:400
const char * LPCSTR
Definition: xmlstorage.h:183
#define TRACE(s)
Definition: solgame.cpp:4
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
int ret
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
#define args
Definition: format.c:66
#define LOWORD(l)
Definition: pedump.c:82

◆ ShellMessageBoxW()

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

Definition at line 340 of file shellord.c.

347 {
348  WCHAR szText[100],szTitle[100];
349  LPCWSTR pszText = szText, pszTitle = szTitle;
350  LPWSTR pszTemp;
352  int ret;
353 
354  __ms_va_start(args, uType);
355  /* wvsprintfA(buf,fmt, args); */
356 
357  TRACE("(%p,%p,%p,%p,%08x)\n",
358  hInstance,hWnd,lpText,lpCaption,uType);
359 
360  if (IS_INTRESOURCE(lpCaption))
361  LoadStringW(hInstance, LOWORD(lpCaption), szTitle, sizeof(szTitle)/sizeof(szTitle[0]));
362  else
363  pszTitle = lpCaption;
364 
365  if (IS_INTRESOURCE(lpText))
366  LoadStringW(hInstance, LOWORD(lpText), szText, sizeof(szText)/sizeof(szText[0]));
367  else
368  pszText = lpText;
369 
371  pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
372 
373  __ms_va_end(args);
374 
375  ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType);
376  LocalFree(pszTemp);
377  return ret;
378 }
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
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 FormatDriveDlg(), FormatExCB(), CSearchBar::OnSearchButtonClicked(), RunDlgProc(), SHCreateDirectoryExW(), SHEmptyRecycleBinW(), CAddressEditBox::ShowFileNotFoundError(), and SHWinHelp().

◆ SHFindFiles()

BOOL WINAPI SHFindFiles ( PCIDLIST_ABSOLUTE  pidlFolder,
PCIDLIST_ABSOLUTE  pidlSaveFile 
)

Definition at line 2129 of file shellord.c.

2130 {
2131  FIXME("params ignored: %p %p\n", pidlFolder, pidlSaveFile);
2133  {
2134  return FALSE;
2135  }
2136  /* Open the search results folder */
2137  /* FIXME: CSearchBar should be opened as well */
2138  return ShellExecuteW(NULL, NULL, L"explorer.exe", L"::{E17D4FC0-5564-11D1-83F2-00A0C90DC849}", NULL, SW_SHOWNORMAL) > (HINSTANCE)32;
2139 }
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
HANDLE HINSTANCE
Definition: typedefs.h:76
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 1679 of file shellord.c.

1680 {
1681  return OleFlushClipboard();
1682 }
HRESULT WINAPI OleFlushClipboard(void)
Definition: clipboard.c:2293

◆ SHFlushSFCache()

void WINAPI SHFlushSFCache ( void  )

Definition at line 2301 of file shellord.c.

2302 {
2303 }

◆ SHFreeUnusedLibraries()

void WINAPI SHFreeUnusedLibraries ( void  )

Definition at line 1436 of file shellord.c.

1437 {
1438  FIXME("stub\n");
1440 }
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 2315 of file shellord.c.

2316 {
2317  HIMAGELIST hLarge, hSmall;
2318  HIMAGELIST hNew;
2319  HRESULT ret = E_FAIL;
2320 
2321  /* Wine currently only maintains large and small image lists */
2322  if ((iImageList != SHIL_LARGE) && (iImageList != SHIL_SMALL) && (iImageList != SHIL_SYSSMALL))
2323  {
2324  FIXME("Unsupported image list %i requested\n", iImageList);
2325  return E_FAIL;
2326  }
2327 
2328  Shell_GetImageLists(&hLarge, &hSmall);
2329 #ifndef __REACTOS__
2330  hNew = ImageList_Duplicate(iImageList == SHIL_LARGE ? hLarge : hSmall);
2331 
2332  /* Get the interface for the new image list */
2333  if (hNew)
2334  {
2336  ImageList_Destroy(hNew);
2337  }
2338 #else
2339  /* Duplicating the imagelist causes the start menu items not to draw on
2340  * the first show. Was the Duplicate necessary for some reason? I believe
2341  * Windows returns the raw pointer here. */
2342  hNew = (iImageList == SHIL_LARGE ? hLarge : hSmall);
2343  ret = IImageList2_QueryInterface((IImageList2 *) hNew, riid, ppv);
2344 #endif
2345 
2346  return ret;
2347 }
#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:78
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 1412 of file shellord.c.

1413 { TRACE("%p\n", lpUnknown);
1414 
1415  *lpUnknown = SHELL32_IExplorerInterface;
1416 
1418  return E_FAIL;
1419 
1420  IUnknown_AddRef(SHELL32_IExplorerInterface);
1421  return S_OK;
1422 }
#define E_FAIL
Definition: ddrawi.h:102
#define TRACE(s)
Definition: solgame.cpp:4
static LPUNKNOWN SHELL32_IExplorerInterface
Definition: shellord.c:1395
#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 2189 of file shellord.c.

2191 {
2192  WCHAR wszLinkTo[MAX_PATH];
2193  WCHAR wszDir[MAX_PATH];
2194  WCHAR wszName[MAX_PATH];
2195  BOOL res;
2196 
2197  MultiByteToWideChar(CP_ACP, 0, pszLinkTo, -1, wszLinkTo, MAX_PATH);
2198  MultiByteToWideChar(CP_ACP, 0, pszDir, -1, wszDir, MAX_PATH);
2199 
2200  res = SHGetNewLinkInfoW(wszLinkTo, wszDir, wszName, pfMustCopy, uFlags);
2201 
2202  if (res)
2203  WideCharToMultiByte(CP_ACP, 0, wszName, -1, pszName, MAX_PATH, NULL, NULL);
2204 
2205  return res;
2206 }
BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags)
Definition: shellord.c:2208
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
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:580
#define MAX_PATH
Definition: compat.h:26
_In_ LPCSTR _Out_ BOOL * pfMustCopy
Definition: shellapi.h:582
#define MultiByteToWideChar
Definition: compat.h:100
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 2208 of file shellord.c.

2210 {
2211  const WCHAR *basename;
2212  WCHAR *dst_basename;
2213  int i=2;
2214  static const WCHAR lnkformat[] = {'%','s','.','l','n','k',0};
2215  static const WCHAR lnkformatnum[] = {'%','s',' ','(','%','d',')','.','l','n','k',0};
2216 
2217  TRACE("(%s, %s, %p, %p, 0x%08x)\n", debugstr_w(pszLinkTo), debugstr_w(pszDir),
2218  pszName, pfMustCopy, uFlags);
2219 
2220  *pfMustCopy = FALSE;
2221 
2222  if (uFlags & SHGNLI_PIDL)
2223  {
2224  FIXME("SHGNLI_PIDL flag unsupported\n");
2225  return FALSE;
2226  }
2227 
2228  if (uFlags)
2229  FIXME("ignoring flags: 0x%08x\n", uFlags);
2230 
2231  /* FIXME: should test if the file is a shortcut or DOS program */
2232  if (GetFileAttributesW(pszLinkTo) == INVALID_FILE_ATTRIBUTES)
2233  return FALSE;
2234 
2235  basename = strrchrW(pszLinkTo, '\\');
2236  if (basename)
2237  basename = basename+1;
2238  else
2239  basename = pszLinkTo;
2240 
2241  lstrcpynW(pszName, pszDir, MAX_PATH);
2242  if (!PathAddBackslashW(pszName))
2243  return FALSE;
2244 
2245  dst_basename = pszName + strlenW(pszName);
2246 
2247  snprintfW(dst_basename, pszName + MAX_PATH - dst_basename, lnkformat, basename);
2248 
2249  while (GetFileAttributesW(pszName) != INVALID_FILE_ATTRIBUTES)
2250  {
2251  snprintfW(dst_basename, pszName + MAX_PATH - dst_basename, lnkformatnum, basename, i);
2252  i++;
2253  }
2254 
2255  return TRUE;
2256 }
#define TRUE
Definition: types.h:120
#define snprintfW
Definition: unicode.h:60
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
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:406
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
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:580
#define MAX_PATH
Definition: compat.h:26
#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:582

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 2175 of file shellord.c.

2176 {
2177  FIXME("%p - stub\n", pidlExtra);
2178 
2179  return -1;
2180 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHLimitInputEdit()

HRESULT WINAPI SHLimitInputEdit ( HWND  hWnd,
IShellFolder psf 
)

Definition at line 2689 of file shellord.c.

2690 {
2691  IItemNameLimits *pLimits;
2692  HRESULT hr;
2693  LPWSTR pwszValidChars, pwszInvalidChars;
2694  UxSubclassInfo *pInfo;
2695 
2696  pInfo = GetPropW(hWnd, L"UxSubclassInfo");
2697  if (pInfo)
2698  {
2699  UxSubclassInfo_Destroy(pInfo);
2700  pInfo = NULL;
2701  }
2702 
2703  hr = psf->lpVtbl->QueryInterface(psf, &IID_IItemNameLimits, (LPVOID *)&pLimits);
2704  if (FAILED(hr))
2705  {
2706  ERR("hr: %x\n", hr);
2707  return hr;
2708  }
2709 
2710  pwszValidChars = pwszInvalidChars = NULL;
2711  hr = pLimits->lpVtbl->GetValidCharacters(pLimits, &pwszValidChars, &pwszInvalidChars);
2712  if (FAILED(hr))
2713  {
2714  ERR("hr: %x\n", hr);
2715  pLimits->lpVtbl->Release(pLimits);
2716  return hr;
2717  }
2718 
2719  pInfo = UxSubclassInfo_Create(hWnd, pwszValidChars, pwszInvalidChars);
2720  if (!pInfo)
2721  hr = E_FAIL;
2722 
2723  pLimits->lpVtbl->Release(pLimits);
2724 
2725  return hr;
2726 }
static void UxSubclassInfo_Destroy(UxSubclassInfo *pInfo)
Definition: shellord.c:2469
static UxSubclassInfo * UxSubclassInfo_Create(HWND hwnd, LPWSTR valid, LPWSTR invalid)
Definition: shellord.c:2655
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:78
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 1632 of file shellord.c.

1633 { FIXME("0x%08lx stub\n",lParam);
1634  return S_OK;
1635 }
#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 2182 of file shellord.c.

2183 {
2184  FIXME("%p, 0x%08x, %s, %s - stub\n", hwnd, dwType, debugstr_w(szObject), debugstr_w(szPage));
2185 
2186  return TRUE;
2187 }
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 1667 of file shellord.c.

1671 {
1672  FIXME("%p %s 0x%08x stub\n",hwndOwner, lpCaption, uType);
1673  return 0;
1674 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHRegisterDragDrop()

HRESULT WINAPI SHRegisterDragDrop ( HWND  hWnd,
LPDROPTARGET  pDropTarget 
)

Definition at line 454 of file shellord.c.

457 {
458  static BOOL ole_initialized = FALSE;
459  HRESULT hr;
460 
461  TRACE("(%p,%p)\n", hWnd, pDropTarget);
462 
463  if (!ole_initialized)
464  {
465  hr = OleInitialize(NULL);
466  if (FAILED(hr))
467  return hr;
468  ole_initialized = TRUE;
469  }
470  return RegisterDragDrop(hWnd, pDropTarget);
471 }
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
HWND hWnd
Definition: settings.c:17
HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
Definition: ole2.c:557
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:78
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 2026 of file shellord.c.

2027 {
2028  PSXA_CALL Call;
2029  UINT i;
2030  PPSXA psxa = (PPSXA)hpsxa;
2031 
2032  TRACE("(%p,%u,%p,%08lx)\n", hpsxa, uPageID, lpfnReplaceWith, lParam);
2033 
2034  if (psxa)
2035  {
2036  ZeroMemory(&Call, sizeof(Call));
2037  Call.lpfnAddReplaceWith = lpfnReplaceWith;
2038  Call.lParam = lParam;
2039 
2040  /* Call the ReplacePage method of all registered IShellPropSheetExt interfaces.
2041  Each shell extension is only allowed to call the callback once during the callback. */
2042  for (i = 0; i != psxa->uiCount; i++)
2043  {
2044  Call.bCalled = FALSE;
2045  psxa->pspsx[i]->lpVtbl->ReplacePage(psxa->pspsx[i], uPageID, PsxaCall, (LPARAM)&Call);
2046  }
2047 
2048  return Call.uiCount;
2049  }
2050 
2051  return 0;
2052 }
UINT uiCount
Definition: shellord.c:1844
struct _PSXA * PPSXA
#define ZeroMemory
Definition: winbase.h:1648
UINT uiCount
Definition: shellord.c:1855
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:1858
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
IShellPropSheetExt * pspsx[1]
Definition: shellord.c:1846
HRESULT ReplacePage([in] EXPPS uPageID, [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith, [in] LPARAM lParam)
unsigned int UINT
Definition: ndis.h:50
LPARAM lParam
Definition: shellord.c:1852
LPFNADDPROPSHEETPAGE lpfnAddReplaceWith
Definition: shellord.c:1851
BOOL bCalled
Definition: shellord.c:1853
LPARAM lParam
Definition: combotst.c:139

Referenced by DisplayApplet(), and MouseApplet().

◆ SHRevokeDragDrop()

HRESULT WINAPI SHRevokeDragDrop ( HWND  hWnd)

Definition at line 489 of file shellord.c.

490 {
491  TRACE("(%p)\n", hWnd);
492  return RevokeDragDrop(hWnd);
493 }
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 1389 of file shellord.c.

1390 {
1391  FIXME("(%s, %p): stub\n", debugstr_w(commandLine), parent);
1392  return FALSE;
1393 }
#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 1402 of file shellord.c.

1403 { TRACE("%p\n", lpUnknown);
1404  SHELL32_IExplorerInterface = lpUnknown;
1405 }
#define TRACE(s)
Definition: solgame.cpp:4
static LPUNKNOWN SHELL32_IExplorerInterface
Definition: shellord.c:1395

Referenced by SHCreateFromDesktop().

◆ SHSetLocalizedName()

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

Definition at line 2267 of file shellord.c.

2268 {
2269  FIXME("%p, %s, %d - stub\n", pszPath, debugstr_w(pszResModule), idsRes);
2270 
2271  return S_OK;
2272 }
#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 2258 of file shellord.c.

2259 {
2260  FIXME("%p, %s, 0x%08x - stub\n", hwnd, debugstr_a(pszRemoteName), dwType);
2261 
2262  return S_OK;
2263 }
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 2397 of file shellord.c.

2398 {
2400  DWORD nSubAuthority0, nSubAuthority1;
2401  DWORD nSubAuthorityCount;
2402  PSID SidToCheck;
2403  BOOL IsMember = FALSE;
2404 
2405  if ((ulRID == SECURITY_SERVICE_RID) || ulRID == SECURITY_LOCAL_SYSTEM_RID)
2406  {
2407  nSubAuthority0 = ulRID;
2408  nSubAuthority1 = 0;
2409  nSubAuthorityCount= 1;
2410  }
2411  else
2412  {
2413  nSubAuthority0 = SECURITY_BUILTIN_DOMAIN_RID;
2414  nSubAuthority1 = ulRID;
2415  nSubAuthorityCount= 2;
2416  }
2417 
2418  if (!AllocateAndInitializeSid(&ntAuth,
2419  nSubAuthorityCount,
2420  nSubAuthority0,
2421  nSubAuthority1,
2422  0, 0, 0, 0, 0, 0,
2423  &SidToCheck))
2424  {
2425  return FALSE;
2426  }
2427 
2428  if (!CheckTokenMembership(TokenHandle, SidToCheck, &IsMember))
2429  {
2430  IsMember = FALSE;
2431  }
2432 
2433  FreeSid(SidToCheck);
2434  return IsMember;
2435 }
#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
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 2170 of file shellord.c.

2171 {
2172  FIXME("%s, %d, 0x%x, %d - stub\n", debugstr_a(pszHashItem), iIndex, uFlags, iImageIndex);
2173 }
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 2160 of file shellord.c.

2161 {
2162  FIXME("%s, %d, 0x%x, %d - stub\n", debugstr_w(pszHashItem), iIndex, uFlags, iImageIndex);
2163 }
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 1711 of file shellord.c.

1712 {
1713  FIXME("(%p, %s, 0x%08x): stub\n", hwndOwner, debugstr_w(pszFile), fConnect);
1714  return FALSE;
1715 }
#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 1688 of file shellord.c.

1692 {
1693  FIXME("%p 0x%08x 0x%08x stub\n", pidl, dwFlags, dwTimeout);
1694  return FALSE;
1695 }
#define FIXME(fmt,...)
Definition: debug.h:111
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6077

◆ SHWinHelp()

HRESULT WINAPI SHWinHelp ( HWND  hwnd,
LPCWSTR  pszHelp,
UINT  uCommand,
ULONG_PTR  dwData 
)

Definition at line 1372 of file shellord.c.

1373 {
1374  TRACE("(%p, %s, 0x%08x, %p)\n", hwnd, debugstr_w(pszHelp), uCommand, dwData);
1375  if (!WinHelpW(hwnd, pszHelp, uCommand, dwData))
1376  {
1377 #if 0
1379  MAKEINTRESOURCEW(9116), MB_ICONSTOP);
1380 #endif
1381  return FALSE;
1382  }
1383  return TRUE;
1384 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
static HANDLE ULONG_PTR dwData
Definition: file.c:35
#define MB_ICONSTOP
Definition: winuser.h:797
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
int ShellMessageBoxW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,...)
Definition: shellord.c:340
BOOL WINAPI WinHelpW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_ UINT, _In_ ULONG_PTR)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

◆ SignalFileOpen()

BOOL WINAPI SignalFileOpen ( PCIDLIST_ABSOLUTE  pidl)

Definition at line 540 of file shellord.c.

541 {
542  FIXME("(%p):stub.\n", pidl);
543 
544  return FALSE;
545 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ UxSubclassInfo_Create()

static UxSubclassInfo* UxSubclassInfo_Create ( HWND  hwnd,
LPWSTR  valid,
LPWSTR  invalid 
)
static

Definition at line 2655 of file shellord.c.

2656 {
2657  UxSubclassInfo *pInfo;
2659  if (!pInfo)
2660  {
2661  ERR("HeapAlloc failed.\n");
2662  CoTaskMemFree(valid);
2664  return NULL;
2665  }
2666 
2668  if (!pInfo->fnWndProc)
2669  {
2670  ERR("SetWindowLongPtrW failed\n");
2671  CoTaskMemFree(valid);
2673  HeapFree(GetProcessHeap(), 0, pInfo);
2674  return NULL;
2675  }
2676 
2677  pInfo->hwnd = hwnd;
2678  pInfo->pwszValidChars = valid;
2679  pInfo->pwszInvalidChars = invalid;
2680  if (!SetPropW(hwnd, L"UxSubclassInfo", pInfo))
2681  {
2682  UxSubclassInfo_Destroy(pInfo);