ReactOS 0.4.15-dev-8614-gbc76250
ordinal.c File Reference
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winreg.h"
#include "wingdi.h"
#include "winuser.h"
#include "winver.h"
#include "winnetwk.h"
#include "mmsystem.h"
#include "objbase.h"
#include "exdisp.h"
#include "shdeprecated.h"
#include "shlobj.h"
#include "shlwapi.h"
#include "shellapi.h"
#include "commdlg.h"
#include "mlang.h"
#include "mshtmhst.h"
#include "wine/unicode.h"
#include "wine/debug.h"
Include dependency graph for ordinal.c:

Go to the source code of this file.

Classes

struct  _enumWndData
 
struct  FDSA_info
 
struct  tagPOLICYDATA
 
struct  SHELL_USER_SID
 
struct  SHELL_USER_PERMISSION
 
struct  objcompat_entry
 

Macros

#define COBJMACROS
 
#define FDSA_FLAG_INTERNAL_ALLOC   0x01 /* When set we have allocated mem internally */
 
#define SHELL_NO_POLICY   0xffffffff
 
#define IsIface(type)   SUCCEEDED((hRet = IUnknown_QueryInterface(lpUnknown, &IID_##type, (void**)&lpObj)))
 
#define IShellBrowser_EnableModeless   IShellBrowser_EnableModelessSB
 
#define EnableModeless(type)   type##_EnableModeless((type*)lpObj, bModeless)
 
#define GET_RGB(h)   (ConvertHue(h, wMid1, wMid2) * 255 + 120) / 240
 
#define ISOS_RETURN(x)
 
#define SHFORMATDT_UNSUPPORTED_FLAGS   (FDTF_RELATIVE | FDTF_LTRDATE | FDTF_RTLDATE | FDTF_NOAUTOREADINGORDER)
 
#define OBJCOMPAT_OTNEEDSSFCACHE   0x00000001
 
#define OBJCOMPAT_NO_WEBVIEW   0x00000002
 
#define OBJCOMPAT_UNBINDABLE   0x00000004
 
#define OBJCOMPAT_PINDLL   0x00000008
 
#define OBJCOMPAT_NEEDSFILESYSANCESTOR   0x00000010
 
#define OBJCOMPAT_NOTAFILESYSTEM   0x00000020
 
#define OBJCOMPAT_CTXMENU_NOVERBS   0x00000040
 
#define OBJCOMPAT_CTXMENU_LIMITEDQI   0x00000080
 
#define OBJCOMPAT_COCREATESHELLFOLDERONLY   0x00000100
 
#define OBJCOMPAT_NEEDSSTORAGEANCESTOR   0x00000200
 
#define OBJCOMPAT_NOLEGACYWEBVIEW   0x00000400
 
#define OBJCOMPAT_CTXMENU_XPQCMFLAGS   0x00001000
 
#define OBJCOMPAT_NOIPROPERTYSTORE   0x00002000
 

Typedefs

typedef struct _enumWndData enumWndData
 
typedef struct tagPOLICYDATA POLICYDATA
 
typedef struct tagPOLICYDATALPPOLICYDATA
 
typedef HRESULT(WINAPIDllGetVersion_func) (DLLVERSIONINFO *)
 
typedef struct SHELL_USER_SID SHELL_USER_SID
 
typedef struct SHELL_USER_SIDPSHELL_USER_SID
 
typedef struct SHELL_USER_PERMISSION SHELL_USER_PERMISSION
 
typedef struct SHELL_USER_PERMISSIONPSHELL_USER_PERMISSION
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
HRESULT WINAPI IUnknown_QueryService (IUnknown *, REFGUID, REFIID, LPVOID *)
 
HRESULT WINAPI SHInvokeCommand (HWND, IShellFolder *, LPCITEMIDLIST, DWORD)
 
BOOL WINAPI SHAboutInfoW (LPWSTR, DWORD)
 
HANDLE WINAPI SHMapHandle (HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId, DWORD dwAccess, DWORD dwOptions)
 
HANDLE WINAPI SHAllocShared (LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
 
PVOID WINAPI SHLockShared (HANDLE hShared, DWORD dwProcId)
 
BOOL WINAPI SHUnlockShared (LPVOID lpView)
 
BOOL WINAPI SHFreeShared (HANDLE hShared, DWORD dwProcId)
 
HRESULT WINAPI RegisterDefaultAcceptHeaders (LPBC lpBC, IUnknown *lpUnknown)
 
HRESULT WINAPI GetAcceptLanguagesW (LPWSTR langbuf, LPDWORD buflen)
 
HRESULT WINAPI GetAcceptLanguagesA (LPSTR langbuf, LPDWORD buflen)
 
INT WINAPI SHStringFromGUIDA (REFGUID guid, LPSTR lpszDest, INT cchMax)
 
INT WINAPI SHStringFromGUIDW (REFGUID guid, LPWSTR lpszDest, INT cchMax)
 
BOOL WINAPI IsCharBlankW (WCHAR wc)
 
BOOL WINAPI IsCharPunctW (WCHAR wc)
 
BOOL WINAPI IsCharCntrlW (WCHAR wc)
 
BOOL WINAPI IsCharDigitW (WCHAR wc)
 
BOOL WINAPI IsCharXDigitW (WCHAR wc)
 
BOOL WINAPI GetStringType3ExW (LPWSTR src, INT count, LPWORD type)
 
DWORD WINAPI StrCmpNCA (LPCSTR lpszSrc, LPCSTR lpszCmp, INT len)
 
DWORD WINAPI StrCmpNCW (LPCWSTR lpszSrc, LPCWSTR lpszCmp, INT len)
 
DWORD WINAPI StrCmpNICA (LPCSTR lpszSrc, LPCSTR lpszCmp, DWORD len)
 
DWORD WINAPI StrCmpNICW (LPCWSTR lpszSrc, LPCWSTR lpszCmp, DWORD len)
 
DWORD WINAPI StrCmpCA (LPCSTR lpszSrc, LPCSTR lpszCmp)
 
DWORD WINAPI StrCmpCW (LPCWSTR lpszSrc, LPCWSTR lpszCmp)
 
DWORD WINAPI StrCmpICA (LPCSTR lpszSrc, LPCSTR lpszCmp)
 
DWORD WINAPI StrCmpICW (LPCWSTR lpszSrc, LPCWSTR lpszCmp)
 
BOOL WINAPI SHAboutInfoA (LPSTR lpszDest, DWORD dwDestLen)
 
HRESULT WINAPI IUnknown_QueryStatus (IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
 
HRESULT WINAPI IUnknown_Exec (IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
LONG WINAPI SHSetWindowBits (HWND hwnd, INT offset, UINT mask, UINT flags)
 
HWND WINAPI SHSetParentHwnd (HWND hWnd, HWND hWndParent)
 
HRESULT WINAPI ConnectToConnectionPoint (IUnknown *lpUnkSink, REFIID riid, BOOL fConnect, IUnknown *lpUnknown, LPDWORD lpCookie, IConnectionPoint **lppCP)
 
void WINAPI IUnknown_AtomicRelease (IUnknown **lpUnknown)
 
LPCSTR WINAPI PathSkipLeadingSlashesA (LPCSTR lpszSrc)
 
BOOL WINAPI SHIsSameObject (IUnknown *lpInt1, IUnknown *lpInt2)
 
HRESULT WINAPI IUnknown_GetWindow (IUnknown *lpUnknown, HWND *lphWnd)
 
HRESULT WINAPI IUnknown_SetOwner (IUnknown *iface, IUnknown *pUnk)
 
HRESULT WINAPI IUnknown_SetSite (IUnknown *obj, IUnknown *site)
 
HRESULT WINAPI IUnknown_GetClassID (IUnknown *lpUnknown, CLSID *clsid)
 
HRESULT WINAPI IUnknown_QueryServiceExec (IUnknown *lpUnknown, REFIID service, const GUID *group, DWORD cmdId, DWORD cmdOpt, VARIANT *pIn, VARIANT *pOut)
 
HRESULT WINAPI IUnknown_ProfferService (IUnknown *lpUnknown, REFGUID service, IServiceProvider *pService, DWORD *pCookie)
 
HRESULT WINAPI IUnknown_UIActivateIO (IUnknown *unknown, BOOL activate, LPMSG msg)
 
BOOL WINAPI SHLoadMenuPopup (HINSTANCE hInst, LPCWSTR szName)
 
static BOOL CALLBACK SHLWAPI_EnumChildProc (HWND hWnd, LPARAM lParam)
 
void WINAPI SHPropagateMessage (HWND hWnd, UINT uiMsgId, WPARAM wParam, LPARAM lParam, BOOL bSend)
 
DWORD WINAPI SHRemoveAllSubMenus (HMENU hMenu)
 
UINT WINAPI SHEnableMenuItem (HMENU hMenu, UINT wItemID, BOOL bEnable)
 
DWORD WINAPI SHCheckMenuItem (HMENU hMenu, UINT uID, BOOL bCheck)
 
DWORD WINAPI SHRegisterClassA (WNDCLASSA *wndclass)
 
BOOL WINAPI SHSimulateDrop (IDropTarget *pDrop, IDataObject *pDataObj, DWORD grfKeyState, PPOINTL lpPt, DWORD *pdwEffect)
 
DWORD WINAPI SHLoadFromPropertyBag (IUnknown *lpUnknown, IPropertyBag *lpPropBag)
 
HRESULT WINAPI IUnknown_TranslateAcceleratorOCS (IUnknown *lpUnknown, LPMSG lpMsg, DWORD dwModifiers)
 
HRESULT WINAPI IUnknown_OnFocusOCS (IUnknown *lpUnknown, BOOL fGotFocus)
 
HRESULT WINAPI IUnknown_HandleIRestrict (LPUNKNOWN lpUnknown, PVOID lpArg1, PVOID lpArg2, PVOID lpArg3, PVOID lpArg4)
 
HMENU WINAPI SHGetMenuFromID (HMENU hMenu, UINT uID)
 
DWORD WINAPI SHGetCurColorRes (void)
 
DWORD WINAPI SHWaitForSendMessageThread (HANDLE hand, DWORD dwTimeout)
 
HRESULT WINAPI SHIsExpandableFolder (LPSHELLFOLDER lpFolder, LPCITEMIDLIST pidl)
 
DWORD WINAPI SHFillRectClr (HDC hDC, LPCRECT pRect, COLORREF cRef)
 
int WINAPI SHSearchMapInt (const int *lpKeys, const int *lpValues, int iLen, int iKey)
 
VOID WINAPI IUnknown_Set (IUnknown **lppDest, IUnknown *lpUnknown)
 
HRESULT WINAPI MayQSForward (IUnknown *lpUnknown, PVOID lpReserved, REFGUID riidCmdGrp, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
 
HRESULT WINAPI MayExecForward (IUnknown *lpUnknown, INT iUnk, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
HRESULT WINAPI IsQSForward (REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds)
 
BOOL WINAPI SHIsChildOrSelf (HWND hParent, HWND hChild)
 
BOOL WINAPI FDSA_Initialize (DWORD block_size, DWORD inc, FDSA_info *info, void *mem, DWORD init_blocks)
 
BOOL WINAPI FDSA_Destroy (FDSA_info *info)
 
DWORD WINAPI FDSA_InsertItem (FDSA_info *info, DWORD where, const void *block)
 
BOOL WINAPI FDSA_DeleteItem (FDSA_info *info, DWORD where)
 
HRESULT WINAPI QISearch (void *base, const QITAB *table, REFIID riid, void **ppv)
 
HRESULT WINAPI SHSetDefaultDialogFont (HWND hWnd, INT id)
 
HANDLE WINAPI SHRemoveDefaultDialogFont (HWND hWnd)
 
HMODULE WINAPI SHPinDllOfCLSID (REFIID refiid)
 
DWORD WINAPI SHRegisterClassW (WNDCLASSW *lpWndClass)
 
void WINAPI SHUnregisterClassesA (HINSTANCE hInst, LPCSTR *lppClasses, INT iCount)
 
void WINAPI SHUnregisterClassesW (HINSTANCE hInst, LPCWSTR *lppClasses, INT iCount)
 
LRESULT CALLBACK SHDefWindowProc (HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam)
 
HRESULT WINAPI IUnknown_GetSite (LPUNKNOWN lpUnknown, REFIID iid, PVOID *lppSite)
 
HWND WINAPI SHCreateWorkerWindowA (WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
 
DWORD WINAPI SHGetRestriction (LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpValue)
 
DWORD WINAPI SHRestrictionLookup (DWORD policy, LPCWSTR initial, LPPOLICYDATA polTable, LPDWORD polArr)
 
HRESULT WINAPI SHWeakQueryInterface (IUnknown *pUnk, IUnknown *pInner, IID *riid, LPVOID *ppv)
 
VOID WINAPI SHWeakReleaseInterface (IUnknown *lpDest, IUnknown **lppUnknown)
 
BOOL WINAPI GUIDFromStringA (LPCSTR idstr, CLSID *id)
 
BOOL WINAPI GUIDFromStringW (LPCWSTR idstr, CLSID *id)
 
DWORD WINAPI WhichPlatform (void)
 
HWND WINAPI SHCreateWorkerWindowW (WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
 
HRESULT WINAPI SHInvokeDefaultCommand (HWND hWnd, IShellFolder *lpFolder, LPCITEMIDLIST lpApidl)
 
HRESULT WINAPI SHPackDispParamsV (DISPPARAMS *params, VARIANTARG *args, UINT cnt, __ms_va_list valist)
 
HRESULT WINAPIV SHPackDispParams (DISPPARAMS *params, VARIANTARG *args, UINT cnt,...)
 
static HRESULT SHLWAPI_InvokeByIID (IConnectionPoint *iCP, REFIID iid, DISPID dispId, DISPPARAMS *dispParams)
 
HRESULT WINAPI IConnectionPoint_InvokeWithCancel (IConnectionPoint *iCP, DISPID dispId, DISPPARAMS *dispParams, DWORD unknown1, DWORD unknown2)
 
HRESULT WINAPI IConnectionPoint_SimpleInvoke (IConnectionPoint *iCP, DISPID dispId, DISPPARAMS *dispParams)
 
HRESULT WINAPI IConnectionPoint_OnChanged (IConnectionPoint *lpCP, DISPID dispID)
 
HRESULT WINAPIV IUnknown_CPContainerInvokeParam (IUnknown *container, REFIID riid, DISPID dispId, VARIANTARG *buffer, DWORD cParams,...)
 
HRESULT WINAPI IUnknown_CPContainerOnChanged (IUnknown *lpUnknown, DISPID dispID)
 
BOOL WINAPI PlaySoundWrapW (LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound)
 
DWORD WINAPI SHGetIniStringW (LPCWSTR appName, LPCWSTR keyName, LPWSTR out, DWORD outLen, LPCWSTR filename)
 
BOOL WINAPI SHSetIniStringW (LPCWSTR appName, LPCWSTR keyName, LPCWSTR str, LPCWSTR filename)
 
DWORD WINAPI SHGetFileInfoWrapW (LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
 
UINT WINAPI DragQueryFileWrapW (HDROP hDrop, UINT lFile, LPWSTR lpszFile, UINT lLength)
 
LPITEMIDLIST WINAPI SHBrowseForFolderWrapW (LPBROWSEINFOW lpBi)
 
BOOL WINAPI SHGetPathFromIDListWrapW (LPCITEMIDLIST pidl, LPWSTR pszPath)
 
BOOL WINAPI ShellExecuteExWrapW (LPSHELLEXECUTEINFOW lpExecInfo)
 
INT WINAPI SHFileOperationWrapW (LPSHFILEOPSTRUCTW lpFileOp)
 
PVOID WINAPI SHInterlockedCompareExchange (PVOID *dest, PVOID xchg, PVOID compare)
 
DWORD WINAPI GetFileVersionInfoSizeWrapW (LPCWSTR filename, LPDWORD handle)
 
BOOL WINAPI GetFileVersionInfoWrapW (LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
 
WORD WINAPI VerQueryValueWrapW (LPVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, UINT *puLen)
 
HRESULT WINAPI IUnknown_EnableModeless (IUnknown *lpUnknown, BOOL bModeless)
 
BOOL WINAPI SHGetNewLinkInfoWrapW (LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags)
 
UINT WINAPI SHDefExtractIconWrapW (LPCWSTR pszIconFile, int iIndex, UINT uFlags, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize)
 
HICON WINAPI ExtractIconWrapW (HINSTANCE hInstance, LPCWSTR lpszExeFileName, UINT nIconIndex)
 
HMODULE WINAPI MLLoadLibraryA (LPCSTR new_mod, HMODULE inst_hwnd, DWORD dwCrossCodePage)
 
HMODULE WINAPI MLLoadLibraryW (LPCWSTR new_mod, HMODULE inst_hwnd, DWORD dwCrossCodePage)
 
COLORREF WINAPI ColorAdjustLuma (COLORREF cRGB, int dwLuma, BOOL bUnknown)
 
BOOL WINAPI GetSaveFileNameWrapW (LPOPENFILENAMEW ofn)
 
DWORD WINAPI WNetRestoreConnectionWrapW (HWND hwndOwner, LPWSTR lpszDevice)
 
DWORD WINAPI WNetGetLastErrorWrapW (LPDWORD lpError, LPWSTR lpErrorBuf, DWORD nErrorBufSize, LPWSTR lpNameBuf, DWORD nNameBufSize)
 
BOOL WINAPI PageSetupDlgWrapW (LPPAGESETUPDLGW pagedlg)
 
BOOL WINAPI PrintDlgWrapW (LPPRINTDLGW printdlg)
 
BOOL WINAPI GetOpenFileNameWrapW (LPOPENFILENAMEW ofn)
 
HRESULT WINAPI SHIShellFolder_EnumObjects (LPSHELLFOLDER lpFolder, HWND hwnd, SHCONTF flags, IEnumIDList **ppenum)
 
static WORD ConvertHue (int wHue, WORD wMid1, WORD wMid2)
 
COLORREF WINAPI ColorHLSToRGB (WORD wHue, WORD wLuminosity, WORD wSaturation)
 
DWORD WINAPI SHGetMachineInfo (DWORD dwFlags)
 
DWORD WINAPI SHWinHelpOnDemandW (HWND hwnd, LPCWSTR helpfile, DWORD flags1, VOID *ptr1, DWORD flags2)
 
DWORD WINAPI SHWinHelpOnDemandA (HWND hwnd, LPCSTR helpfile, DWORD flags1, VOID *ptr1, DWORD flags2)
 
BOOL WINAPI MLFreeLibrary (HMODULE hModule)
 
BOOL WINAPI SHFlushSFCacheWrap (void)
 
BOOL WINAPI MLIsMLHInstance (HINSTANCE hInst)
 
DWORD WINAPI MLSetMLHInstance (HINSTANCE hInst, HANDLE hHeap)
 
DWORD WINAPI MLClearMLHInstance (DWORD x)
 
DWORD WINAPI SHSendMessageBroadcastA (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
DWORD WINAPI SHSendMessageBroadcastW (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT WINAPI CLSIDFromStringWrap (LPCWSTR idstr, CLSID *id)
 
BOOL WINAPI IsOS (DWORD feature)
 
HRESULT WINAPI SHLoadRegUIStringW (HKEY hkey, LPCWSTR value, LPWSTR buf, DWORD size)
 
HRESULT WINAPI IUnknown_TranslateAcceleratorIO (IUnknown *lpUnknown, LPMSG lpMsg)
 
HRESULT WINAPI IUnknown_HasFocusIO (IUnknown *lpUnknown)
 
VOID WINAPI ColorRGBToHLS (COLORREF cRGB, LPWORD pwHue, LPWORD pwLuminance, LPWORD pwSaturation)
 
HPALETTE WINAPI SHCreateShellPalette (HDC hdc)
 
HRESULT WINAPI SHGetInverseCMAP (LPDWORD dest, DWORD dwSize)
 
BOOL WINAPI SHIsLowMemoryMachine (DWORD dwType)
 
INT WINAPI GetMenuPosFromID (HMENU hMenu, UINT wID)
 
DWORD WINAPI SHMenuIndexFromID (HMENU hMenu, UINT uID)
 
VOID WINAPI FixSlashesAndColonW (LPWSTR lpwstr)
 
DWORD WINAPI SHGetAppCompatFlags (DWORD dwUnknown)
 
HRESULT WINAPI SHCoCreateInstanceAC (REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
 
BOOL WINAPI SHSkipJunction (IBindCtx *pbc, const CLSID *pclsid)
 
HKEY WINAPI SHGetShellKey (DWORD flags, LPCWSTR sub_key, BOOL create)
 
BOOL WINAPI SHQueueUserWorkItem (LPTHREAD_START_ROUTINE pfnCallback, LPVOID pContext, LONG lPriority, DWORD_PTR dwTag, DWORD_PTR *pdwId, LPCSTR pszModule, DWORD dwFlags)
 
HANDLE WINAPI SHSetTimerQueueTimer (HANDLE hQueue, WAITORTIMERCALLBACK pfnCallback, LPVOID pContext, DWORD dwDueTime, DWORD dwPeriod, LPCSTR lpszLibrary, DWORD dwFlags)
 
HRESULT WINAPI IUnknown_OnFocusChangeIS (LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
 
HRESULT WINAPI SKAllocValueW (DWORD flags, LPCWSTR subkey, LPCWSTR value, DWORD *type, LPVOID *data, DWORD *count)
 
HRESULT WINAPI SKDeleteValueW (DWORD flags, LPCWSTR subkey, LPCWSTR value)
 
HRESULT WINAPI SKGetValueW (DWORD flags, LPCWSTR subkey, LPCWSTR value, DWORD *type, void *data, DWORD *count)
 
HRESULT WINAPI SKSetValueW (DWORD flags, LPCWSTR subkey, LPCWSTR value, DWORD type, void *data, DWORD count)
 
DWORD WINAPI GetUIVersion (void)
 
INT WINAPIV ShellMessageBoxWrapW (HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,...)
 
UINT WINAPI ZoneComputePaneSize (HWND hwnd)
 
void WINAPI SHChangeNotifyWrap (LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
 
PSECURITY_DESCRIPTOR WINAPI GetShellSecurityDescriptor (const PSHELL_USER_PERMISSION *apUserPerm, int cUserPerm)
 
HRESULT WINAPI SHCreatePropertyBagOnRegKey (HKEY hKey, LPCWSTR subkey, DWORD grfMode, REFIID riid, void **ppv)
 
HRESULT WINAPI SHGetViewStatePropertyBag (LPCITEMIDLIST pidl, LPWSTR bag_name, DWORD flags, REFIID riid, void **ppv)
 
INT WINAPI SHFormatDateTimeW (const FILETIME UNALIGNED *fileTime, DWORD *flags, LPWSTR buf, UINT size)
 
INT WINAPI SHFormatDateTimeA (const FILETIME UNALIGNED *fileTime, DWORD *flags, LPSTR buf, UINT size)
 
INT WINAPI ZoneCheckUrlExW (LPWSTR szURL, PVOID pUnknown, DWORD dwUnknown2, DWORD dwUnknown3, DWORD dwUnknown4, DWORD dwUnknown5, DWORD dwUnknown6, DWORD dwUnknown7)
 
INT WINAPI SHVerbExistsNA (LPSTR verb, PVOID pUnknown, PVOID pUnknown2, DWORD dwUnknown3)
 
HRESULT WINAPI IUnknown_QueryServiceForWebBrowserApp (IUnknown *lpUnknown, REFGUID riid, LPVOID *lppOut)
 
HRESULT WINAPI SHPropertyBag_ReadLONG (IPropertyBag *ppb, LPCWSTR pszPropName, LPLONG pValue)
 
DWORD WINAPI SHGetObjectCompatFlags (IUnknown *pUnk, const CLSID *clsid)
 

Variables

HINSTANCE shlwapi_hInstance
 
DWORD SHLWAPI_ThreadRef_index
 
static const WCHAR strRegistryPolicyW []
 
static const struct objcompat_entry objcompat_table []
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 30 of file ordinal.c.

◆ EnableModeless

#define EnableModeless (   type)    type##_EnableModeless((type*)lpObj, bModeless)

Definition at line 3540 of file ordinal.c.

◆ FDSA_FLAG_INTERNAL_ALLOC

#define FDSA_FLAG_INTERNAL_ALLOC   0x01 /* When set we have allocated mem internally */

Definition at line 2279 of file ordinal.c.

◆ GET_RGB

#define GET_RGB (   h)    (ConvertHue(h, wMid1, wMid2) * 255 + 120) / 240

Definition at line 3902 of file ordinal.c.

◆ IShellBrowser_EnableModeless

#define IShellBrowser_EnableModeless   IShellBrowser_EnableModelessSB

Definition at line 3539 of file ordinal.c.

◆ IsIface

#define IsIface (   type)    SUCCEEDED((hRet = IUnknown_QueryInterface(lpUnknown, &IID_##type, (void**)&lpObj)))

Definition at line 3538 of file ordinal.c.

◆ ISOS_RETURN

#define ISOS_RETURN (   x)
Value:
TRACE("(0x%x) ret=%d\n",feature,(x)); \
return (x);
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
INTERNETFEATURELIST feature
Definition: misc.c:1719
#define TRACE(s)
Definition: solgame.cpp:4

◆ OBJCOMPAT_COCREATESHELLFOLDERONLY

#define OBJCOMPAT_COCREATESHELLFOLDERONLY   0x00000100

Definition at line 6239 of file ordinal.c.

◆ OBJCOMPAT_CTXMENU_LIMITEDQI

#define OBJCOMPAT_CTXMENU_LIMITEDQI   0x00000080

Definition at line 6238 of file ordinal.c.

◆ OBJCOMPAT_CTXMENU_NOVERBS

#define OBJCOMPAT_CTXMENU_NOVERBS   0x00000040

Definition at line 6237 of file ordinal.c.

◆ OBJCOMPAT_CTXMENU_XPQCMFLAGS

#define OBJCOMPAT_CTXMENU_XPQCMFLAGS   0x00001000

Definition at line 6242 of file ordinal.c.

◆ OBJCOMPAT_NEEDSFILESYSANCESTOR

#define OBJCOMPAT_NEEDSFILESYSANCESTOR   0x00000010

Definition at line 6235 of file ordinal.c.

◆ OBJCOMPAT_NEEDSSTORAGEANCESTOR

#define OBJCOMPAT_NEEDSSTORAGEANCESTOR   0x00000200

Definition at line 6240 of file ordinal.c.

◆ OBJCOMPAT_NO_WEBVIEW

#define OBJCOMPAT_NO_WEBVIEW   0x00000002

Definition at line 6232 of file ordinal.c.

◆ OBJCOMPAT_NOIPROPERTYSTORE

#define OBJCOMPAT_NOIPROPERTYSTORE   0x00002000

Definition at line 6243 of file ordinal.c.

◆ OBJCOMPAT_NOLEGACYWEBVIEW

#define OBJCOMPAT_NOLEGACYWEBVIEW   0x00000400

Definition at line 6241 of file ordinal.c.

◆ OBJCOMPAT_NOTAFILESYSTEM

#define OBJCOMPAT_NOTAFILESYSTEM   0x00000020

Definition at line 6236 of file ordinal.c.

◆ OBJCOMPAT_OTNEEDSSFCACHE

#define OBJCOMPAT_OTNEEDSSFCACHE   0x00000001

Definition at line 6231 of file ordinal.c.

◆ OBJCOMPAT_PINDLL

#define OBJCOMPAT_PINDLL   0x00000008

Definition at line 6234 of file ordinal.c.

◆ OBJCOMPAT_UNBINDABLE

#define OBJCOMPAT_UNBINDABLE   0x00000004

Definition at line 6233 of file ordinal.c.

◆ SHELL_NO_POLICY

#define SHELL_NO_POLICY   0xffffffff

Definition at line 2722 of file ordinal.c.

◆ SHFORMATDT_UNSUPPORTED_FLAGS

#define SHFORMATDT_UNSUPPORTED_FLAGS   (FDTF_RELATIVE | FDTF_LTRDATE | FDTF_RTLDATE | FDTF_NOAUTOREADINGORDER)

Typedef Documentation

◆ DllGetVersion_func

typedef HRESULT(WINAPI * DllGetVersion_func) (DLLVERSIONINFO *)

Definition at line 4904 of file ordinal.c.

◆ enumWndData

◆ LPPOLICYDATA

◆ POLICYDATA

◆ PSHELL_USER_PERMISSION

◆ PSHELL_USER_SID

◆ SHELL_USER_PERMISSION

◆ SHELL_USER_SID

Function Documentation

◆ CLSIDFromStringWrap()

HRESULT WINAPI CLSIDFromStringWrap ( LPCWSTR  idstr,
CLSID id 
)

Definition at line 4090 of file ordinal.c.

4091{
4092 return CLSIDFromString((LPCOLESTR)idstr, id);
4093}
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338

◆ ColorAdjustLuma()

COLORREF WINAPI ColorAdjustLuma ( COLORREF  cRGB,
int  dwLuma,
BOOL  bUnknown 
)

Definition at line 3786 of file ordinal.c.

3787{
3788 TRACE("(0x%8x,%d,%d)\n", cRGB, dwLuma, bUnknown);
3789
3790 if (dwLuma)
3791 {
3792 WORD wH, wL, wS;
3793
3794 ColorRGBToHLS(cRGB, &wH, &wL, &wS);
3795
3796 FIXME("Ignoring luma adjustment\n");
3797
3798 /* FIXME: The adjustment is not linear */
3799
3800 cRGB = ColorHLSToRGB(wH, wL, wS);
3801 }
3802 return cRGB;
3803}
#define FIXME(fmt,...)
Definition: precomp.h:53
COLORREF WINAPI ColorHLSToRGB(WORD wHue, WORD wLuminosity, WORD wSaturation)
Definition: ordinal.c:3920
VOID WINAPI ColorRGBToHLS(COLORREF cRGB, LPWORD pwHue, LPWORD pwLuminance, LPWORD pwSaturation)
Definition: ordinal.c:4349
unsigned short WORD
Definition: ntddk_ex.h:93

◆ ColorHLSToRGB()

COLORREF WINAPI ColorHLSToRGB ( WORD  wHue,
WORD  wLuminosity,
WORD  wSaturation 
)

Definition at line 3920 of file ordinal.c.

3921{
3922 WORD wRed;
3923
3924 if (wSaturation)
3925 {
3926 WORD wGreen, wBlue, wMid1, wMid2;
3927
3928 if (wLuminosity > 120)
3929 wMid2 = wSaturation + wLuminosity - (wSaturation * wLuminosity + 120) / 240;
3930 else
3931 wMid2 = ((wSaturation + 240) * wLuminosity + 120) / 240;
3932
3933 wMid1 = wLuminosity * 2 - wMid2;
3934
3935 wRed = GET_RGB(wHue + 80);
3936 wGreen = GET_RGB(wHue);
3937 wBlue = GET_RGB(wHue - 80);
3938
3939 return RGB(wRed, wGreen, wBlue);
3940 }
3941
3942 wRed = wLuminosity * 255 / 240;
3943 return RGB(wRed, wRed, wRed);
3944}
#define GET_RGB(h)
Definition: ordinal.c:3902
#define RGB(r, g, b)
Definition: precomp.h:71

Referenced by ColorAdjustLuma().

◆ ColorRGBToHLS()

VOID WINAPI ColorRGBToHLS ( COLORREF  cRGB,
LPWORD  pwHue,
LPWORD  pwLuminance,
LPWORD  pwSaturation 
)

Definition at line 4349 of file ordinal.c.

4351{
4352 int wR, wG, wB, wMax, wMin, wHue, wLuminosity, wSaturation;
4353
4354 TRACE("(%08x,%p,%p,%p)\n", cRGB, pwHue, pwLuminance, pwSaturation);
4355
4356 wR = GetRValue(cRGB);
4357 wG = GetGValue(cRGB);
4358 wB = GetBValue(cRGB);
4359
4360 wMax = max(wR, max(wG, wB));
4361 wMin = min(wR, min(wG, wB));
4362
4363 /* Luminosity */
4364 wLuminosity = ((wMax + wMin) * 240 + 255) / 510;
4365
4366 if (wMax == wMin)
4367 {
4368 /* Achromatic case */
4369 wSaturation = 0;
4370 /* Hue is now unrepresentable, but this is what native returns... */
4371 wHue = 160;
4372 }
4373 else
4374 {
4375 /* Chromatic case */
4376 int wDelta = wMax - wMin, wRNorm, wGNorm, wBNorm;
4377
4378 /* Saturation */
4379 if (wLuminosity <= 120)
4380 wSaturation = ((wMax + wMin)/2 + wDelta * 240) / (wMax + wMin);
4381 else
4382 wSaturation = ((510 - wMax - wMin)/2 + wDelta * 240) / (510 - wMax - wMin);
4383
4384 /* Hue */
4385 wRNorm = (wDelta/2 + wMax * 40 - wR * 40) / wDelta;
4386 wGNorm = (wDelta/2 + wMax * 40 - wG * 40) / wDelta;
4387 wBNorm = (wDelta/2 + wMax * 40 - wB * 40) / wDelta;
4388
4389 if (wR == wMax)
4390 wHue = wBNorm - wGNorm;
4391 else if (wG == wMax)
4392 wHue = 80 + wRNorm - wBNorm;
4393 else
4394 wHue = 160 + wGNorm - wRNorm;
4395 if (wHue < 0)
4396 wHue += 240;
4397 else if (wHue > 240)
4398 wHue -= 240;
4399 }
4400 if (pwHue)
4401 *pwHue = wHue;
4402 if (pwLuminance)
4403 *pwLuminance = wLuminosity;
4404 if (pwSaturation)
4405 *pwSaturation = wSaturation;
4406}
#define GetBValue(quad)
Definition: precomp.h:75
#define GetGValue(quad)
Definition: precomp.h:74
#define GetRValue(quad)
Definition: precomp.h:73
#define min(a, b)
Definition: monoChain.cc:55
#define max(a, b)
Definition: svc.c:63

Referenced by ColorAdjustLuma().

◆ ConnectToConnectionPoint()

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

Definition at line 1193 of file ordinal.c.

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

Referenced by init_pointers().

◆ ConvertHue()

static WORD ConvertHue ( int  wHue,
WORD  wMid1,
WORD  wMid2 
)
static

Definition at line 3887 of file ordinal.c.

3888{
3889 wHue = wHue > 240 ? wHue - 240 : wHue < 0 ? wHue + 240 : wHue;
3890
3891 if (wHue > 160)
3892 return wMid1;
3893 else if (wHue > 120)
3894 wHue = 160 - wHue;
3895 else if (wHue > 40)
3896 return wMid2;
3897
3898 return ((wHue * (wMid2 - wMid1) + 20) / 40) + wMid1;
3899}

◆ DragQueryFileWrapW()

UINT WINAPI DragQueryFileWrapW ( HDROP  hDrop,
UINT  lFile,
LPWSTR  lpszFile,
UINT  lLength 
)

Definition at line 3452 of file ordinal.c.

3453{
3454 return DragQueryFileW(hDrop, lFile, lpszFile, lLength);
3455}
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
Definition: shellole.c:622

◆ ExtractIconWrapW()

HICON WINAPI ExtractIconWrapW ( HINSTANCE  hInstance,
LPCWSTR  lpszExeFileName,
UINT  nIconIndex 
)

Definition at line 3692 of file ordinal.c.

3694{
3695 return ExtractIconW(hInstance, lpszExeFileName, nIconIndex);
3696}
HINSTANCE hInstance
Definition: charmap.c:19
HICON WINAPI ExtractIconW(HINSTANCE hInstance, LPCWSTR lpszFile, UINT nIconIndex)
Definition: shell32_main.c:873

◆ FDSA_DeleteItem()

BOOL WINAPI FDSA_DeleteItem ( FDSA_info info,
DWORD  where 
)

Definition at line 2368 of file ordinal.c.

2369{
2370 TRACE("(%p 0x%08x)\n", info, where);
2371
2372 if(where >= info->num_items)
2373 return FALSE;
2374
2375 if(where < info->num_items - 1)
2376 {
2377 memmove((char*)info->mem + where * info->block_size,
2378 (char*)info->mem + (where + 1) * info->block_size,
2379 (info->num_items - where - 1) * info->block_size);
2380 }
2381 memset((char*)info->mem + (info->num_items - 1) * info->block_size,
2382 0, info->block_size);
2383 info->num_items--;
2384 return TRUE;
2385}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
#define memset(x, y, z)
Definition: compat.h:39

◆ FDSA_Destroy()

BOOL WINAPI FDSA_Destroy ( FDSA_info info)

Definition at line 2312 of file ordinal.c.

2313{
2314 TRACE("(%p)\n", info);
2315
2316 if(info->flags & FDSA_FLAG_INTERNAL_ALLOC)
2317 {
2318 HeapFree(GetProcessHeap(), 0, info->mem);
2319 return FALSE;
2320 }
2321
2322 return TRUE;
2323}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
#define FDSA_FLAG_INTERNAL_ALLOC
Definition: ordinal.c:2279

◆ FDSA_Initialize()

BOOL WINAPI FDSA_Initialize ( DWORD  block_size,
DWORD  inc,
FDSA_info info,
void mem,
DWORD  init_blocks 
)

Definition at line 2286 of file ordinal.c.

2288{
2289 TRACE("(0x%08x 0x%08x %p %p 0x%08x)\n", block_size, inc, info, mem, init_blocks);
2290
2291 if(inc == 0)
2292 inc = 1;
2293
2294 if(mem)
2295 memset(mem, 0, block_size * init_blocks);
2296
2297 info->num_items = 0;
2298 info->inc = inc;
2299 info->mem = mem;
2300 info->blocks_alloced = init_blocks;
2301 info->block_size = block_size;
2302 info->flags = 0;
2303
2304 return TRUE;
2305}
static DWORD block_size(DWORD block)
Definition: jsutils.c:66
Definition: mem.c:156

◆ FDSA_InsertItem()

DWORD WINAPI FDSA_InsertItem ( FDSA_info info,
DWORD  where,
const void block 
)

Definition at line 2330 of file ordinal.c.

2331{
2332 TRACE("(%p 0x%08x %p)\n", info, where, block);
2333 if(where > info->num_items)
2334 where = info->num_items;
2335
2336 if(info->num_items >= info->blocks_alloced)
2337 {
2338 DWORD size = (info->blocks_alloced + info->inc) * info->block_size;
2339 if(info->flags & 0x1)
2341 else
2342 {
2343 void *old_mem = info->mem;
2345 memcpy(info->mem, old_mem, info->blocks_alloced * info->block_size);
2346 }
2347 info->blocks_alloced += info->inc;
2348 info->flags |= 0x1;
2349 }
2350
2351 if(where < info->num_items)
2352 {
2353 memmove((char*)info->mem + (where + 1) * info->block_size,
2354 (char*)info->mem + where * info->block_size,
2355 (info->num_items - where) * info->block_size);
2356 }
2357 memcpy((char*)info->mem + where * info->block_size, block, info->block_size);
2358
2359 info->num_items++;
2360 return where;
2361}
#define HeapAlloc
Definition: compat.h:733
#define HeapReAlloc
Definition: compat.h:734
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static unsigned int block
Definition: xmlmemory.c:101

◆ FixSlashesAndColonW()

VOID WINAPI FixSlashesAndColonW ( LPWSTR  lpwstr)

Definition at line 4530 of file ordinal.c.

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

Referenced by PathQualifyExW().

◆ GetAcceptLanguagesA()

HRESULT WINAPI GetAcceptLanguagesA ( LPSTR  langbuf,
LPDWORD  buflen 
)

Definition at line 577 of file ordinal.c.

578{
579 WCHAR *langbufW;
580 DWORD buflenW, convlen;
581 HRESULT retval;
582
583 TRACE("(%p, %p) *%p: %d\n", langbuf, buflen, buflen, buflen ? *buflen : -1);
584
585 if(!langbuf || !buflen || !*buflen) return E_FAIL;
586
587 buflenW = *buflen;
588 langbufW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * buflenW);
589 retval = GetAcceptLanguagesW(langbufW, &buflenW);
590
591 if (retval == S_OK)
592 {
593 convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, -1, langbuf, *buflen, NULL, NULL);
594 convlen--; /* do not count the terminating 0 */
595 }
596 else /* copy partial string anyway */
597 {
598 convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, *buflen, langbuf, *buflen, NULL, NULL);
599 if (convlen < *buflen)
600 {
601 langbuf[convlen] = 0;
602 convlen--; /* do not count the terminating 0 */
603 }
604 else
605 {
606 convlen = *buflen;
607 }
608 }
609 *buflen = buflenW ? convlen : 0;
610
611 HeapFree(GetProcessHeap(), 0, langbufW);
612 return retval;
613}
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
HRESULT WINAPI GetAcceptLanguagesW(LPWSTR langbuf, LPDWORD buflen)
Definition: ordinal.c:518
#define S_OK
Definition: intsafe.h:52
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by init_pointers().

◆ GetAcceptLanguagesW()

HRESULT WINAPI GetAcceptLanguagesW ( LPWSTR  langbuf,
LPDWORD  buflen 
)

Definition at line 518 of file ordinal.c.

519{
520 static const WCHAR szkeyW[] = {
521 'S','o','f','t','w','a','r','e','\\',
522 'M','i','c','r','o','s','o','f','t','\\',
523 'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\',
524 'I','n','t','e','r','n','a','t','i','o','n','a','l',0};
525 static const WCHAR valueW[] = {
526 'A','c','c','e','p','t','L','a','n','g','u','a','g','e',0};
527 DWORD mystrlen, mytype;
528 DWORD len;
529 HKEY mykey;
530 LCID mylcid;
531 WCHAR *mystr;
532 LONG lres;
533
534 TRACE("(%p, %p) *%p: %d\n", langbuf, buflen, buflen, buflen ? *buflen : -1);
535
536 if(!langbuf || !buflen || !*buflen)
537 return E_FAIL;
538
539 mystrlen = (*buflen > 20) ? *buflen : 20 ;
540 len = mystrlen * sizeof(WCHAR);
541 mystr = HeapAlloc(GetProcessHeap(), 0, len);
542 mystr[0] = 0;
543 RegOpenKeyW(HKEY_CURRENT_USER, szkeyW, &mykey);
544 lres = RegQueryValueExW(mykey, valueW, 0, &mytype, (PBYTE)mystr, &len);
545 RegCloseKey(mykey);
546 len = lstrlenW(mystr);
547
548 if (!lres && (*buflen > len)) {
549 lstrcpyW(langbuf, mystr);
550 *buflen = len;
551 HeapFree(GetProcessHeap(), 0, mystr);
552 return S_OK;
553 }
554
555 /* Did not find a value in the registry or the user buffer is too small */
556 mylcid = GetUserDefaultLCID();
557 LcidToRfc1766W(mylcid, mystr, mystrlen);
558 len = lstrlenW(mystr);
559
560 memcpy( langbuf, mystr, min(*buflen, len+1)*sizeof(WCHAR) );
561 HeapFree(GetProcessHeap(), 0, mystr);
562
563 if (*buflen > len) {
564 *buflen = len;
565 return S_OK;
566 }
567
568 *buflen = 0;
570}
#define RegCloseKey(hKey)
Definition: registry.h:49
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3268
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
static const WCHAR valueW[]
Definition: object.c:48
LCID WINAPI GetUserDefaultLCID(void)
Definition: locale.c:1210
HRESULT WINAPI LcidToRfc1766W(LCID lcid, LPWSTR pszRfc1766, INT nChar)
Definition: mlang.c:1265
GLenum GLsizei len
Definition: glext.h:6722
BYTE * PBYTE
Definition: pedump.c:66
long LONG
Definition: pedump.c:60
DWORD LCID
Definition: nls.h:13
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
#define HKEY_CURRENT_USER
Definition: winreg.h:11

Referenced by GetAcceptLanguagesA().

◆ GetFileVersionInfoSizeWrapW()

DWORD WINAPI GetFileVersionInfoSizeWrapW ( LPCWSTR  filename,
LPDWORD  handle 
)

Definition at line 3511 of file ordinal.c.

3512{
3514}
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:611
const char * filename
Definition: ioapi.h:137

◆ GetFileVersionInfoWrapW()

BOOL WINAPI GetFileVersionInfoWrapW ( LPCWSTR  filename,
DWORD  handle,
DWORD  datasize,
LPVOID  data 
)

Definition at line 3521 of file ordinal.c.

3523{
3525}
static SIZE_T datasize
Definition: asm.c:30
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:845
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950

◆ GetMenuPosFromID()

INT WINAPI GetMenuPosFromID ( HMENU  hMenu,
UINT  wID 
)

Definition at line 4493 of file ordinal.c.

4494{
4496 INT nCount = GetMenuItemCount(hMenu), nIter = 0;
4497
4498 TRACE("%p %u\n", hMenu, wID);
4499
4500 while (nIter < nCount)
4501 {
4502 mi.cbSize = sizeof(mi);
4503 mi.fMask = MIIM_ID;
4504 if (GetMenuItemInfoW(hMenu, nIter, TRUE, &mi) && mi.wID == wID)
4505 {
4506 TRACE("ret %d\n", nIter);
4507 return nIter;
4508 }
4509 nIter++;
4510 }
4511
4512 return -1;
4513}
DWORD cbSize
Definition: winuser.h:3787
int32_t INT
Definition: typedefs.h:58
static MONITORINFO mi
Definition: win.c:7338
#define MIIM_ID
Definition: winuser.h:725
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)

Referenced by SHMenuIndexFromID().

◆ GetOpenFileNameWrapW()

BOOL WINAPI GetOpenFileNameWrapW ( LPOPENFILENAMEW  ofn)

Definition at line 3861 of file ordinal.c.

3862{
3863 return GetOpenFileNameW(ofn);
3864}
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
Definition: filedlg.c:4736
OPENFILENAME ofn
Definition: sndrec32.cpp:56

◆ GetSaveFileNameWrapW()

BOOL WINAPI GetSaveFileNameWrapW ( LPOPENFILENAMEW  ofn)

Definition at line 3810 of file ordinal.c.

3811{
3812 return GetSaveFileNameW(ofn);
3813}
BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn)
Definition: filedlg.c:4801

◆ GetShellSecurityDescriptor()

PSECURITY_DESCRIPTOR WINAPI GetShellSecurityDescriptor ( const PSHELL_USER_PERMISSION apUserPerm,
int  cUserPerm 
)

Definition at line 5059 of file ordinal.c.

5060{
5061 PSID *sidlist;
5062 PSID cur_user = NULL;
5063 BYTE tuUser[2000];
5064 DWORD acl_size;
5065 int sid_count, i;
5067
5068 TRACE("%p %d\n", apUserPerm, cUserPerm);
5069
5070 if (apUserPerm == NULL || cUserPerm <= 0)
5071 return NULL;
5072
5073 sidlist = HeapAlloc(GetProcessHeap(), 0, cUserPerm * sizeof(PSID));
5074 if (!sidlist)
5075 return NULL;
5076
5077 acl_size = sizeof(ACL);
5078
5079 for(sid_count = 0; sid_count < cUserPerm; sid_count++)
5080 {
5081 static SHELL_USER_SID null_sid = {{SECURITY_NULL_SID_AUTHORITY}, 0, 0};
5082 PSHELL_USER_PERMISSION perm = apUserPerm[sid_count];
5083 PSHELL_USER_SID sid = &perm->susID;
5084 PSID pSid;
5085 BOOL ret = TRUE;
5086
5087 if (!memcmp((void*)sid, (void*)&null_sid, sizeof(SHELL_USER_SID)))
5088 { /* current user's SID */
5089 if (!cur_user)
5090 {
5091 HANDLE Token;
5092 DWORD bufsize = sizeof(tuUser);
5093
5095 if (ret)
5096 {
5097 ret = GetTokenInformation(Token, TokenUser, (void*)tuUser, bufsize, &bufsize );
5098 if (ret)
5099 cur_user = ((PTOKEN_USER)tuUser)->User.Sid;
5101 }
5102 }
5103 pSid = cur_user;
5104 } else if (sid->dwUserID==0) /* one sub-authority */
5105 ret = AllocateAndInitializeSid(&sid->sidAuthority, 1, sid->dwUserGroupID, 0,
5106 0, 0, 0, 0, 0, 0, &pSid);
5107 else
5108 ret = AllocateAndInitializeSid(&sid->sidAuthority, 2, sid->dwUserGroupID, sid->dwUserID,
5109 0, 0, 0, 0, 0, 0, &pSid);
5110 if (!ret)
5111 goto free_sids;
5112
5113 sidlist[sid_count] = pSid;
5114 /* increment acl_size (1 ACE for non-inheritable and 2 ACEs for inheritable records */
5115 acl_size += (sizeof(ACCESS_ALLOWED_ACE)-sizeof(DWORD) + GetLengthSid(pSid)) * (perm->fInherit ? 2 : 1);
5116 }
5117
5118 psd = LocalAlloc(0, sizeof(SECURITY_DESCRIPTOR) + acl_size);
5119
5120 if (psd != NULL)
5121 {
5122 PACL pAcl = (PACL)(((BYTE*)psd)+sizeof(SECURITY_DESCRIPTOR));
5123
5125 goto error;
5126
5127 if (!InitializeAcl(pAcl, acl_size, ACL_REVISION))
5128 goto error;
5129
5130 for(i = 0; i < sid_count; i++)
5131 {
5132 PSHELL_USER_PERMISSION sup = apUserPerm[i];
5133 PSID sid = sidlist[i];
5134
5135 switch(sup->dwAccessType)
5136 {
5139 goto error;
5140 if (sup->fInherit && !AddAccessAllowedAceEx(pAcl, ACL_REVISION,
5142 goto error;
5143 break;
5146 goto error;
5147 if (sup->fInherit && !AddAccessDeniedAceEx(pAcl, ACL_REVISION,
5149 goto error;
5150 break;
5151 default:
5152 goto error;
5153 }
5154 }
5155
5156 if (!SetSecurityDescriptorDacl(psd, TRUE, pAcl, FALSE))
5157 goto error;
5158 }
5159 goto free_sids;
5160
5161error:
5162 LocalFree(psd);
5163 psd = NULL;
5164free_sids:
5165 for(i = 0; i < sid_count; i++)
5166 {
5167 if (!cur_user || sidlist[i] != cur_user)
5168 FreeSid(sidlist[i]);
5169 }
5170 HeapFree(GetProcessHeap(), 0, sidlist);
5171
5172 return psd;
5173}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static void free_sids(PSID *sids, int count)
Definition: acl.c:155
FT_UInt sid
Definition: cffcmap.c:139
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
Definition: security.c:411
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:294
BOOL WINAPI AddAccessDeniedAceEx(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, PSID pSid)
Definition: security.c:1114
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:674
BOOL WINAPI InitializeAcl(PACL pAcl, DWORD nAclLength, DWORD dwAclRevision)
Definition: security.c:1006
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
Definition: security.c:929
BOOL WINAPI AddAccessAllowedAce(PACL pAcl, DWORD dwAceRevision, DWORD AccessMask, PSID pSid)
Definition: security.c:1039
BOOL WINAPI AddAccessAllowedAceEx(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, PSID pSid)
Definition: security.c:1063
DWORD WINAPI GetLengthSid(PSID pSid)
Definition: security.c:919
PVOID WINAPI FreeSid(PSID pSid)
Definition: security.c:698
BOOL WINAPI AddAccessDeniedAce(PACL pAcl, DWORD dwAceRevision, DWORD AccessMask, PSID pSid)
Definition: security.c:1090
#define CloseHandle
Definition: compat.h:739
#define GetCurrentProcess()
Definition: compat.h:759
unsigned int BOOL
Definition: ntddk_ex.h:94
GLenum GLuint GLsizei bufsize
Definition: glext.h:7473
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
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
#define error(str)
Definition: mkdosfs.c:1605
static PSID pSid
Definition: security.c:74
struct _ACL ACL
struct _SECURITY_DESCRIPTOR SECURITY_DESCRIPTOR
struct _ACL * PACL
Definition: security.c:105
struct _ACCESS_ALLOWED_ACE ACCESS_ALLOWED_ACE
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
Definition: sec.c:262
SHELL_USER_SID susID
Definition: ordinal.c:5034
int ret
struct _TOKEN_USER * PTOKEN_USER
#define ACCESS_ALLOWED_ACE_TYPE
Definition: setypes.h:717
#define TOKEN_QUERY
Definition: setypes.h:928
@ TokenUser
Definition: setypes.h:966
#define ACCESS_DENIED_ACE_TYPE
Definition: setypes.h:718
#define SECURITY_DESCRIPTOR_REVISION
Definition: setypes.h:58
#define SECURITY_NULL_SID_AUTHORITY
Definition: setypes.h:524
#define ACL_REVISION
Definition: setypes.h:39
unsigned char BYTE
Definition: xxhash.c:193

Referenced by init_pointers().

◆ GetStringType3ExW()

BOOL WINAPI GetStringType3ExW ( LPWSTR  src,
INT  count,
LPWORD  type 
)

Definition at line 783 of file ordinal.c.

784{
786}
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
Definition: locale.c:3094
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum src
Definition: glext.h:6340
#define CT_CTYPE3
Definition: winnls.h:239

◆ GetUIVersion()

DWORD WINAPI GetUIVersion ( void  )

Definition at line 4909 of file ordinal.c.

4910{
4911 static DWORD version;
4912
4913 if (!version)
4914 {
4915 DllGetVersion_func pDllGetVersion;
4916 HMODULE dll = LoadLibraryA("shell32.dll");
4917 if (!dll) return 0;
4918
4919 pDllGetVersion = (DllGetVersion_func)GetProcAddress(dll, "DllGetVersion");
4920 if (pDllGetVersion)
4921 {
4922 DLLVERSIONINFO dvi;
4923 dvi.cbSize = sizeof(DLLVERSIONINFO);
4924 if (pDllGetVersion(&dvi) == S_OK) version = dvi.dwMajorVersion;
4925 }
4926 FreeLibrary( dll );
4927 if (!version) version = 3; /* old shell dlls don't have DllGetVersion */
4928 }
4929 return version;
4930}
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
static const WCHAR version[]
Definition: asmname.c:66
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
HRESULT(WINAPI * DllGetVersion_func)(DLLVERSIONINFO *)
Definition: ordinal.c:4904
static HMODULE dll
Definition: str.c:188
struct _DllVersionInfo DLLVERSIONINFO
DWORD dwMajorVersion
Definition: shlwapi.h:1955

◆ GUIDFromStringA()

BOOL WINAPI GUIDFromStringA ( LPCSTR  idstr,
CLSID id 
)

Definition at line 2916 of file ordinal.c.

2917{
2918 WCHAR wClsid[40];
2919 MultiByteToWideChar(CP_ACP, 0, idstr, -1, wClsid, sizeof(wClsid)/sizeof(WCHAR));
2920 return SUCCEEDED(CLSIDFromString(wClsid, id));
2921}
#define MultiByteToWideChar
Definition: compat.h:110

Referenced by init_pointers().

◆ GUIDFromStringW()

BOOL WINAPI GUIDFromStringW ( LPCWSTR  idstr,
CLSID id 
)

Definition at line 2928 of file ordinal.c.

2929{
2930 return SUCCEEDED(CLSIDFromString((LPCOLESTR)idstr, id));
2931}

◆ IConnectionPoint_InvokeWithCancel()

HRESULT WINAPI IConnectionPoint_InvokeWithCancel ( IConnectionPoint iCP,
DISPID  dispId,
DISPPARAMS *  dispParams,
DWORD  unknown1,
DWORD  unknown2 
)

Definition at line 3184 of file ordinal.c.

3187{
3188 IID iid;
3190
3191 FIXME("(%p)->(0x%x %p %x %x) partial stub\n", iCP, dispId, dispParams, unknown1, unknown2);
3192
3193 result = IConnectionPoint_GetConnectionInterface(iCP, &iid);
3194 if (SUCCEEDED(result))
3195 result = SHLWAPI_InvokeByIID(iCP, &iid, dispId, dispParams);
3196 else
3197 result = SHLWAPI_InvokeByIID(iCP, NULL, dispId, dispParams);
3198
3199 return result;
3200}
static HRESULT SHLWAPI_InvokeByIID(IConnectionPoint *iCP, REFIID iid, DISPID dispId, DISPPARAMS *dispParams)
Definition: ordinal.c:3145
GLuint64EXT * result
Definition: glext.h:11304

Referenced by init_pointers().

◆ IConnectionPoint_OnChanged()

HRESULT WINAPI IConnectionPoint_OnChanged ( IConnectionPoint lpCP,
DISPID  dispID 
)

Definition at line 3241 of file ordinal.c.

3242{
3243 IEnumConnections *lpEnum;
3244 HRESULT hRet = E_NOINTERFACE;
3245
3246 TRACE("(%p,0x%8X)\n", lpCP, dispID);
3247
3248 /* Get an enumerator for the connections */
3249 if (lpCP)
3250 hRet = IConnectionPoint_EnumConnections(lpCP, &lpEnum);
3251
3252 if (SUCCEEDED(hRet))
3253 {
3254 IPropertyNotifySink *lpSink;
3255 CONNECTDATA connData;
3256 ULONG ulFetched;
3257
3258 /* Call OnChanged() for every notify sink in the connection point */
3259 while (IEnumConnections_Next(lpEnum, 1, &connData, &ulFetched) == S_OK)
3260 {
3261 if (SUCCEEDED(IUnknown_QueryInterface(connData.pUnk, &IID_IPropertyNotifySink, (void**)&lpSink)) &&
3262 lpSink)
3263 {
3264 IPropertyNotifySink_OnChanged(lpSink, dispID);
3265 IPropertyNotifySink_Release(lpSink);
3266 }
3267 IUnknown_Release(connData.pUnk);
3268 }
3269
3270 IEnumConnections_Release(lpEnum);
3271 }
3272 return hRet;
3273}
const GUID IID_IPropertyNotifySink
uint32_t ULONG
Definition: typedefs.h:59
#define E_NOINTERFACE
Definition: winerror.h:2364

Referenced by IUnknown_CPContainerOnChanged().

◆ IConnectionPoint_SimpleInvoke()

HRESULT WINAPI IConnectionPoint_SimpleInvoke ( IConnectionPoint iCP,
DISPID  dispId,
DISPPARAMS *  dispParams 
)

Definition at line 3208 of file ordinal.c.

3212{
3213 IID iid;
3215
3216 TRACE("(%p)->(0x%x %p)\n",iCP,dispId,dispParams);
3217
3218 result = IConnectionPoint_GetConnectionInterface(iCP, &iid);
3219 if (SUCCEEDED(result))
3220 result = SHLWAPI_InvokeByIID(iCP, &iid, dispId, dispParams);
3221 else
3222 result = SHLWAPI_InvokeByIID(iCP, NULL, dispId, dispParams);
3223
3224 return result;
3225}

Referenced by init_pointers().

◆ IsCharBlankW()

BOOL WINAPI IsCharBlankW ( WCHAR  wc)

Definition at line 696 of file ordinal.c.

697{
698 WORD CharType;
699
700 return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_BLANK);
701}
#define C1_BLANK
Definition: unicode.h:37
#define CT_CTYPE1
Definition: winnls.h:237

◆ IsCharCntrlW()

BOOL WINAPI IsCharCntrlW ( WCHAR  wc)

Definition at line 734 of file ordinal.c.

735{
736 WORD CharType;
737
738 return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_CNTRL);
739}
#define C1_CNTRL
Definition: unicode.h:36

◆ IsCharDigitW()

BOOL WINAPI IsCharDigitW ( WCHAR  wc)

Definition at line 753 of file ordinal.c.

754{
755 WORD CharType;
756
757 return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_DIGIT);
758}
#define C1_DIGIT
Definition: unicode.h:33

◆ IsCharPunctW()

BOOL WINAPI IsCharPunctW ( WCHAR  wc)

Definition at line 715 of file ordinal.c.

716{
717 WORD CharType;
718
719 return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_PUNCT);
720}
#define C1_PUNCT
Definition: unicode.h:35

◆ IsCharXDigitW()

BOOL WINAPI IsCharXDigitW ( WCHAR  wc)

Definition at line 772 of file ordinal.c.

773{
774 WORD CharType;
775
776 return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_XDIGIT);
777}
#define C1_XDIGIT
Definition: unicode.h:38

◆ IsOS()

BOOL WINAPI IsOS ( DWORD  feature)

Definition at line 4107 of file ordinal.c.

4108{
4110 DWORD platform, majorv, minorv;
4111
4113 if(!GetVersionExA(&osvi)) {
4114 ERR("GetVersionEx failed\n");
4115 return FALSE;
4116 }
4117
4118 majorv = osvi.dwMajorVersion;
4119 minorv = osvi.dwMinorVersion;
4121
4122#define ISOS_RETURN(x) \
4123 TRACE("(0x%x) ret=%d\n",feature,(x)); \
4124 return (x);
4125
4126 switch(feature) {
4127 case OS_WIN32SORGREATER:
4130 case OS_NT:
4132 case OS_WIN95ORGREATER:
4134 case OS_NT4ORGREATER:
4135 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 4)
4138 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
4139 case OS_WIN98ORGREATER:
4141 case OS_WIN98_GOLD:
4143 case OS_WIN2000PRO:
4144 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
4145 case OS_WIN2000SERVER:
4146 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
4148 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
4150 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
4151 case OS_WIN2000TERMINAL:
4152 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
4153 case OS_EMBEDDED:
4154 FIXME("(OS_EMBEDDED) What should we return here?\n");
4155 return FALSE;
4156 case OS_TERMINALCLIENT:
4157 FIXME("(OS_TERMINALCLIENT) What should we return here?\n");
4158 return FALSE;
4160 FIXME("(OS_TERMINALREMOTEADMIN) What should we return here?\n");
4161 return FALSE;
4162 case OS_WIN95_GOLD:
4164 case OS_MEORGREATER:
4166 case OS_XPORGREATER:
4167 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
4168 case OS_HOME:
4169 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
4170 case OS_PROFESSIONAL:
4172 case OS_DATACENTER:
4174 case OS_ADVSERVER:
4175 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
4176 case OS_SERVER:
4178 case OS_TERMINALSERVER:
4181 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && minorv >= 1 && majorv >= 5)
4183 FIXME("(OS_FASTUSERSWITCHING) What should we return here?\n");
4184 return TRUE;
4185 case OS_WELCOMELOGONUI:
4186 FIXME("(OS_WELCOMELOGONUI) What should we return here?\n");
4187 return FALSE;
4188 case OS_DOMAINMEMBER:
4189 FIXME("(OS_DOMAINMEMBER) What should we return here?\n");
4190 return TRUE;
4191 case OS_ANYSERVER:
4193 case OS_WOW6432:
4194 {
4195 BOOL is_wow64;
4197 return is_wow64;
4198 }
4199 case OS_WEBSERVER:
4203 case OS_TABLETPC:
4204 FIXME("(OS_TABLETPC) What should we return here?\n");
4205 return FALSE;
4206 case OS_SERVERADMINUI:
4207 FIXME("(OS_SERVERADMINUI) What should we return here?\n");
4208 return FALSE;
4209 case OS_MEDIACENTER:
4210 FIXME("(OS_MEDIACENTER) What should we return here?\n");
4211 return FALSE;
4212 case OS_APPLIANCE:
4213 FIXME("(OS_APPLIANCE) What should we return here?\n");
4214 return FALSE;
4215 case 0x25: /*OS_VISTAORGREATER*/
4216 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 6)
4217 }
4218
4219#undef ISOS_RETURN
4220
4221 WARN("(0x%x) unknown parameter\n",feature);
4222
4223 return FALSE;
4224}
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
return
Definition: dirsup.c:529
#define IsWow64Process
Definition: compat.h:760
BOOL WINAPI GetVersionExA(IN LPOSVERSIONINFOA lpVersionInformation)
Definition: version.c:69
BOOL is_wow64
Definition: msi.c:54
#define ISOS_RETURN(x)
GLdouble n
Definition: glext.h:7729
platform
Definition: msipriv.h:364
#define VER_PLATFORM_WIN32_NT
Definition: rtltypes.h:238
#define VER_PLATFORM_WIN32_WINDOWS
Definition: rtltypes.h:237
#define VER_PLATFORM_WIN32s
Definition: rtltypes.h:236
#define OS_WIN2000TERMINAL
Definition: shlwapi.h:2028
#define OS_WIN98_GOLD
Definition: shlwapi.h:2022
#define OS_APPLIANCE
Definition: shlwapi.h:2052
#define OS_WIN95ORGREATER
Definition: shlwapi.h:2018
#define OS_MEDIACENTER
Definition: shlwapi.h:2051
#define OS_WIN95_GOLD
Definition: shlwapi.h:2032
#define OS_WIN2000ORGREATER_ALT
Definition: shlwapi.h:2020
#define OS_SMALLBUSINESSSERVER
Definition: shlwapi.h:2048
#define OS_WIN98ORGREATER
Definition: shlwapi.h:2021
#define OS_NT
Definition: shlwapi.h:2017
#define OS_MEORGREATER
Definition: shlwapi.h:2033
#define OS_WIN2000ADVSERVER
Definition: shlwapi.h:2026
#define OS_XPORGREATER
Definition: shlwapi.h:2034
#define OS_WIN2000ORGREATER
Definition: shlwapi.h:2023
#define OS_WIN2000PRO
Definition: shlwapi.h:2024
#define OS_WIN2000SERVER
Definition: shlwapi.h:2025
#define OS_TERMINALSERVER
Definition: shlwapi.h:2040
#define OS_SERVERADMINUI
Definition: shlwapi.h:2050
#define OS_PROFESSIONAL
Definition: shlwapi.h:2036
#define OS_WOW6432
Definition: shlwapi.h:2046
#define OS_TERMINALCLIENT
Definition: shlwapi.h:2030
#define OS_DOMAINMEMBER
Definition: shlwapi.h:2044
#define OS_WIN32SORGREATER
Definition: shlwapi.h:2016
#define OS_WIN2000DATACENTER
Definition: shlwapi.h:2027
#define OS_NT4ORGREATER
Definition: shlwapi.h:2019
#define OS_TABLETPC
Definition: shlwapi.h:2049
#define OS_ADVSERVER
Definition: shlwapi.h:2038
#define OS_EMBEDDED
Definition: shlwapi.h:2029
#define OS_SERVER
Definition: shlwapi.h:2039
#define OS_TERMINALREMOTEADMIN
Definition: shlwapi.h:2031
#define OS_FASTUSERSWITCHING
Definition: shlwapi.h:2042
#define OS_PERSONALTERMINALSERVER
Definition: shlwapi.h:2041
#define OS_WELCOMELOGONUI
Definition: shlwapi.h:2043
#define OS_HOME
Definition: shlwapi.h:2035
#define OS_ANYSERVER
Definition: shlwapi.h:2045
#define OS_DATACENTER
Definition: shlwapi.h:2037
#define OS_WEBSERVER
Definition: shlwapi.h:2047
ULONG dwPlatformId
Definition: rtltypes.h:241
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:237
ULONG dwMajorVersion
Definition: rtltypes.h:238
ULONG dwMinorVersion
Definition: rtltypes.h:239
OSVERSIONINFO osvi
Definition: ver.c:28
struct _OSVERSIONINFOA OSVERSIONINFOA

Referenced by CDefView::GetDefaultViewMode(), CShellDispatch::GetSetting(), CShellDispatch::GetSystemInformation(), and IsSystem64Bit().

◆ IsQSForward()

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

Definition at line 2235 of file ordinal.c.

2236{
2237 FIXME("(%p,%d,%p) - stub!\n", pguidCmdGroup, cCmds, prgCmds);
2239}
#define DRAGDROP_E_NOTREGISTERED
Definition: winerror.h:2652

◆ IUnknown_AtomicRelease()

void WINAPI IUnknown_AtomicRelease ( IUnknown **  lpUnknown)

Definition at line 1245 of file ordinal.c.

1246{
1247 TRACE("(%p)\n", lpUnknown);
1248
1249 if(!lpUnknown || !*lpUnknown) return;
1250
1251 TRACE("doing Release\n");
1252
1253 IUnknown_Release(*lpUnknown);
1254 *lpUnknown = NULL;
1255}

Referenced by IUnknown_Set(), and SHWeakReleaseInterface().

◆ IUnknown_CPContainerInvokeParam()

HRESULT WINAPIV IUnknown_CPContainerInvokeParam ( IUnknown container,
REFIID  riid,
DISPID  dispId,
VARIANTARG buffer,
DWORD  cParams,
  ... 
)

Definition at line 3280 of file ordinal.c.

3286{
3288 IConnectionPoint *iCP;
3290 DISPPARAMS dispParams = {buffer, NULL, cParams, 0};
3292
3293 if (!container)
3294 return E_NOINTERFACE;
3295
3296 result = IUnknown_QueryInterface(container, &IID_IConnectionPointContainer,(LPVOID*) &iCPC);
3297 if (FAILED(result))
3298 return result;
3299
3300 result = IConnectionPointContainer_FindConnectionPoint(iCPC, riid, &iCP);
3301 IConnectionPointContainer_Release(iCPC);
3302 if(FAILED(result))
3303 return result;
3304
3305 __ms_va_start(valist, cParams);
3306 SHPackDispParamsV(&dispParams, buffer, cParams, valist);
3308
3309 result = SHLWAPI_InvokeByIID(iCP, riid, dispId, &dispParams);
3310 IConnectionPoint_Release(iCP);
3311
3312 return result;
3313}
HRESULT WINAPI SHPackDispParamsV(DISPPARAMS *params, VARIANTARG *args, UINT cnt, __ms_va_list valist)
Definition: ordinal.c:3075
GLuint buffer
Definition: glext.h:5915
static __ms_va_list valist
Definition: printf.c:66
struct stdole::DISPPARAMS DISPPARAMS
#define __ms_va_list
Definition: windef.h:456
#define __ms_va_end(list)
Definition: windef.h:458
#define __ms_va_start(list, arg)
Definition: windef.h:457

◆ IUnknown_CPContainerOnChanged()

HRESULT WINAPI IUnknown_CPContainerOnChanged ( IUnknown lpUnknown,
DISPID  dispID 
)

Definition at line 3329 of file ordinal.c.

3330{
3332 HRESULT hRet = E_NOINTERFACE;
3333
3334 TRACE("(%p,0x%8X)\n", lpUnknown, dispID);
3335
3336 if (lpUnknown)
3337 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IConnectionPointContainer, (void**)&lpCPC);
3338
3339 if (SUCCEEDED(hRet))
3340 {
3341 IConnectionPoint* lpCP;
3342
3343 hRet = IConnectionPointContainer_FindConnectionPoint(lpCPC, &IID_IPropertyNotifySink, &lpCP);
3344 IConnectionPointContainer_Release(lpCPC);
3345
3346 hRet = IConnectionPoint_OnChanged(lpCP, dispID);
3347 IConnectionPoint_Release(lpCP);
3348 }
3349 return hRet;
3350}
HRESULT WINAPI IConnectionPoint_OnChanged(IConnectionPoint *lpCP, DISPID dispID)
Definition: ordinal.c:3241

◆ IUnknown_EnableModeless()

HRESULT WINAPI IUnknown_EnableModeless ( IUnknown lpUnknown,
BOOL  bModeless 
)

Definition at line 3561 of file ordinal.c.

3562{
3563 IUnknown *lpObj;
3564 HRESULT hRet;
3565
3566 TRACE("(%p,%d)\n", lpUnknown, bModeless);
3567
3568 if (!lpUnknown)
3569 return E_FAIL;
3570
3573 else if (IsIface(IOleInPlaceFrame))
3575 else if (IsIface(IShellBrowser))
3579 else if (IsIface(IDocHostUIHandler))
3581 else
3582 return hRet;
3583
3584 IUnknown_Release(lpObj);
3585 return S_OK;
3586}
#define EnableModeless(type)
Definition: ordinal.c:3540
#define IsIface(type)
Definition: ordinal.c:3538

◆ IUnknown_Exec()

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

Definition at line 1087 of file ordinal.c.

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

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

◆ IUnknown_GetClassID()

HRESULT WINAPI IUnknown_GetClassID ( IUnknown lpUnknown,
CLSID clsid 
)

Definition at line 1457 of file ordinal.c.

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

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

◆ IUnknown_GetSite()

HRESULT WINAPI IUnknown_GetSite ( LPUNKNOWN  lpUnknown,
REFIID  iid,
PVOID lppSite 
)

Definition at line 2642 of file ordinal.c.

2643{
2644 HRESULT hRet = E_INVALIDARG;
2645 LPOBJECTWITHSITE lpSite = NULL;
2646
2647 TRACE("(%p,%s,%p)\n", lpUnknown, debugstr_guid(iid), lppSite);
2648
2649 if (lpUnknown && iid && lppSite)
2650 {
2651 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IObjectWithSite,
2652 (void**)&lpSite);
2653 if (SUCCEEDED(hRet) && lpSite)
2654 {
2655 hRet = IObjectWithSite_GetSite(lpSite, iid, lppSite);
2656 IObjectWithSite_Release(lpSite);
2657 }
2658 }
2659 return hRet;
2660}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define debugstr_guid
Definition: kernel32.h:35
const IID IID_IObjectWithSite

Referenced by CMenuDeskBar::_IsSubMenuParent(), CShellMenuCallback::OnInitMenu(), and CMenuFocusManager::UpdateFocus().

◆ IUnknown_GetWindow()

HRESULT WINAPI IUnknown_GetWindow ( IUnknown lpUnknown,
HWND lphWnd 
)

Definition at line 1336 of file ordinal.c.

1337{
1338 IUnknown *lpOle;
1339 HRESULT hRet = E_FAIL;
1340
1341 TRACE("(%p,%p)\n", lpUnknown, lphWnd);
1342
1343 if (!lpUnknown)
1344 return hRet;
1345
1346 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleWindow, (void**)&lpOle);
1347
1348 if (FAILED(hRet))
1349 {
1350 hRet = IUnknown_QueryInterface(lpUnknown,&IID_IShellView, (void**)&lpOle);
1351
1352 if (FAILED(hRet))
1353 {
1354 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInternetSecurityMgrSite,
1355 (void**)&lpOle);
1356 }
1357 }
1358
1359 if (SUCCEEDED(hRet))
1360 {
1361 /* Laziness here - Since GetWindow() is the first method for the above 3
1362 * interfaces, we use the same call for them all.
1363 */
1364 hRet = IOleWindow_GetWindow((IOleWindow*)lpOle, lphWnd);
1365 IUnknown_Release(lpOle);
1366 if (lphWnd)
1367 TRACE("Returning HWND=%p\n", *lphWnd);
1368 }
1369
1370 return hRet;
1371}
const GUID IID_IOleWindow

Referenced by CMenuDeskBar::_IsSubMenuParent(), CMenuSite::AddBand(), BindCtx_GetUIWindow(), CInternetToolbar::CreateMenuBar(), CFSDropTarget::Drop(), CAddressEditBox::Execute(), CShellBrowser::GetControlWindow(), CDockSite::Initialize(), CInternetToolbar::InitNew(), CTrayNotifyWnd::OnCreate(), CTrayWindow::OnCreate(), CShellMenuCallback::OnInitMenu(), CTrayWindow::OnOpenStartMenu(), CInternetToolbar::OnWinIniChange(), CAddressEditBox::ParseNow(), CShellBrowser::RepositionBars(), CMenuDeskBar::SetClient(), CMenuSite::SetDeskBarSite(), CISFBand::SetSite(), CTaskBand::SetSite(), CAddressBand::SetSite(), CInternetToolbar::SetSite(), CSearchBar::SetSite(), CToolsBand::SetSite(), and SHMultiFileProperties().

◆ IUnknown_HandleIRestrict()

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

Definition at line 1953 of file ordinal.c.

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

◆ IUnknown_HasFocusIO()

HRESULT WINAPI IUnknown_HasFocusIO ( IUnknown lpUnknown)

Definition at line 4311 of file ordinal.c.

4312{
4313 IInputObject* lpInput = NULL;
4314 HRESULT hRet = E_INVALIDARG;
4315
4316 TRACE("(%p)\n", lpUnknown);
4317 if (lpUnknown)
4318 {
4319 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
4320 (void**)&lpInput);
4321 if (SUCCEEDED(hRet) && lpInput)
4322 {
4323 hRet = IInputObject_HasFocusIO(lpInput);
4324 IInputObject_Release(lpInput);
4325 }
4326 }
4327 return hRet;
4328}
#define IInputObject_HasFocusIO(p)
Definition: shlobj.h:714
#define IInputObject_Release(p)
Definition: shlobj.h:711

Referenced by CBaseBarSite::HasFocusIO(), CInternetToolbar::HasFocusIO(), CBaseBar::HasFocusIO(), and CMenuDeskBar::HasFocusIO().

◆ IUnknown_OnFocusChangeIS()

HRESULT WINAPI IUnknown_OnFocusChangeIS ( LPUNKNOWN  lpUnknown,
LPUNKNOWN  pFocusObject,
BOOL  bFocus 
)

Definition at line 4783 of file ordinal.c.

4784{
4785 IInputObjectSite *pIOS = NULL;
4786 HRESULT hRet = E_INVALIDARG;
4787
4788 TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
4789
4790 if (lpUnknown)
4791 {
4792 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
4793 (void **)&pIOS);
4794 if (SUCCEEDED(hRet) && pIOS)
4795 {
4796 hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
4798 }
4799 }
4800 return hRet;
4801}
#define IInputObjectSite_Release(p)
Definition: shlobj.h:735
#define IInputObjectSite_OnFocusChangeIS(p, a, b)
Definition: shlobj.h:737

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

◆ IUnknown_OnFocusOCS()

HRESULT WINAPI IUnknown_OnFocusOCS ( IUnknown lpUnknown,
BOOL  fGotFocus 
)

Definition at line 1931 of file ordinal.c.

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

◆ IUnknown_ProfferService()

HRESULT WINAPI IUnknown_ProfferService ( IUnknown lpUnknown,
REFGUID  service,
IServiceProvider pService,
DWORD pCookie 
)

Definition at line 1592 of file ordinal.c.

1593{
1594 IProfferService *proffer;
1595 HRESULT hr;
1596
1597 TRACE("%p %s %p %p\n", lpUnknown, debugstr_guid(service), pService, pCookie);
1598
1599 hr = IUnknown_QueryService(lpUnknown, &IID_IProfferService, &IID_IProfferService, (void**)&proffer);
1600 if (hr == S_OK)
1601 {
1602 if (pService)
1603 hr = IProfferService_ProfferService(proffer, service, pService, pCookie);
1604 else
1605 {
1606 hr = IProfferService_RevokeService(proffer, *pCookie);
1607 *pCookie = 0;
1608 }
1609
1610 IProfferService_Release(proffer);
1611 }
1612
1613 return hr;
1614}

Referenced by init_pointers().

◆ IUnknown_QueryService()

HRESULT WINAPI IUnknown_QueryService ( IUnknown lpUnknown,
REFGUID  sid,
REFIID  riid,
LPVOID lppOut 
)

Definition at line 1501 of file ordinal.c.

1503{
1504 IServiceProvider* pService = NULL;
1505 HRESULT hRet;
1506
1507 if (!lppOut)
1508 return E_FAIL;
1509
1510 *lppOut = NULL;
1511
1512 if (!lpUnknown)
1513 return E_FAIL;
1514
1515 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IServiceProvider,
1516 (LPVOID*)&pService);
1517
1518 if (hRet == S_OK && pService)
1519 {
1520 TRACE("QueryInterface returned (IServiceProvider*)%p\n", pService);
1521
1522 /* Get a Service interface from the object */
1523 hRet = IServiceProvider_QueryService(pService, sid, riid, lppOut);
1524
1525 TRACE("(IServiceProvider*)%p returned (IUnknown*)%p\n", pService, *lppOut);
1526
1527 IServiceProvider_Release(pService);
1528 }
1529 return hRet;
1530}

Referenced by CDefViewBckgrndMenu::_bIsDesktopBrowserMenu(), CExplorerBand::_CreateTreeView(), CExplorerBand::_DestroyTreeView(), CDefView::_MergeToolbar(), CMenuDeskBar::_OnActivate(), CDefaultContextMenu::BrowserFlagsFromVerb(), CDefaultContextMenu::DoCreateNewFolder(), CDefaultContextMenu::DoRename(), CFSDropTarget::Drop(), CAddressEditBox::Execute(), CBandProxy::FindBrowserWindow(), CAddressEditBox::GetAbsolutePidl(), CShellBrowser::GetMenuBand(), CSearchBar::GetSearchResultsFolder(), CFolderOptions::HandleDefFolderSettings(), CAddressEditBox::Init(), CDefViewBckgrndMenu::InvokeCommand(), CNetConUiObject::InvokeCommand(), CMenuFocusManager::IsTrackedWindowOrParent(), IUnknown_HandleIRestrict(), IUnknown_ProfferService(), IUnknown_QueryServiceExec(), IUnknown_QueryServiceForWebBrowserApp(), IUnknown_QueryServicePropertyBag(), CSearchBar::OnInitDialog(), CInternetToolbar::OnMenuDropDown(), CSearchBar::OnSearchButtonClicked(), CInternetToolbar::OnTravelBack(), CInternetToolbar::OnTravelForward(), CAddressEditBox::ParseNow(), CMenuDeskBar::Popup(), CInternetToolbar::QueryService(), CMenuDeskBar::QueryService(), CMenuSite::QueryService(), CDefaultContextMenu::QueryService(), RegisterDefaultAcceptHeaders(), CNewMenu::SelectNewItem(), CAddressEditBox::SetOwner(), CInternetToolbar::SetSite(), CMenuBand::SetSite(), CMenuDeskBar::SetSite(), CDefaultContextMenu::TryToBrowse(), and CMenuBand::UIActivateIO().

◆ IUnknown_QueryServiceExec()

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

Definition at line 1553 of file ordinal.c.

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

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

◆ IUnknown_QueryServiceForWebBrowserApp()

HRESULT WINAPI IUnknown_QueryServiceForWebBrowserApp ( IUnknown lpUnknown,
REFGUID  riid,
LPVOID lppOut 
)

Definition at line 5393 of file ordinal.c.

5395{
5396 FIXME("%p %s %p semi-STUB\n", lpUnknown, debugstr_guid(riid), lppOut);
5397 return IUnknown_QueryService(lpUnknown,&IID_IWebBrowserApp,riid,lppOut);
5398}

◆ IUnknown_QueryStatus()

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

Definition at line 1048 of file ordinal.c.

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

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

◆ IUnknown_Set()

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

Definition at line 2190 of file ordinal.c.

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

Referenced by CObjectWithSiteBase::SetSite().

◆ IUnknown_SetOwner()

HRESULT WINAPI IUnknown_SetOwner ( IUnknown iface,
IUnknown pUnk 
)

Definition at line 1385 of file ordinal.c.

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

Referenced by CTrayBandSite::AddContextMenus().

◆ IUnknown_SetSite()

HRESULT WINAPI IUnknown_SetSite ( IUnknown obj,
IUnknown site 
)

Definition at line 1411 of file ordinal.c.

1414{
1415 HRESULT hr;
1416 IObjectWithSite *iobjwithsite;
1417 IInternetSecurityManager *isecmgr;
1418
1419 if (!obj) return E_FAIL;
1420
1421 hr = IUnknown_QueryInterface(obj, &IID_IObjectWithSite, (LPVOID *)&iobjwithsite);
1422 TRACE("IID_IObjectWithSite QI ret=%08x, %p\n", hr, iobjwithsite);
1423 if (SUCCEEDED(hr))
1424 {
1425 hr = IObjectWithSite_SetSite(iobjwithsite, site);
1426 TRACE("done IObjectWithSite_SetSite ret=%08x\n", hr);
1427 IObjectWithSite_Release(iobjwithsite);
1428 }
1429 else
1430 {
1431 hr = IUnknown_QueryInterface(obj, &IID_IInternetSecurityManager, (LPVOID *)&isecmgr);
1432 TRACE("IID_IInternetSecurityManager QI ret=%08x, %p\n", hr, isecmgr);
1433 if (FAILED(hr)) return hr;
1434
1435 hr = IInternetSecurityManager_SetSecuritySite(isecmgr, (IInternetSecurityMgrSite *)site);
1436 TRACE("done IInternetSecurityManager_SetSecuritySite ret=%08x\n", hr);
1437 IInternetSecurityManager_Release(isecmgr);
1438 }
1439 return hr;
1440}
static IActiveScriptSite * site
Definition: script.c:149

Referenced by CMenuBand::_OnPopupSubMenu(), CMenuSite::AddBand(), CShellBrowser::BrowseToPath(), CreateStartMenu(), CShellBrowser::DoFolderOptions(), CDefView::drag_notify_subitem(), CDefView::FillFileMenu(), CShellBrowser::GetBaseBar(), CDefView::GetItemObject(), CShellBrowser::Initialize(), CDockSite::Initialize(), CDefView::InvokeContextMenuCommand(), InvokeIExecuteCommand(), CDefaultContextMenu::InvokeRegVerb(), CDefaultContextMenu::LoadDynamicContextMenuHandler(), CMenuBand::SetClient(), CMenuSite::SetDeskBarSite(), CDefViewBckgrndMenu::SetSite(), SHInvokeCommandOnContextMenuInternal(), CDefaultContextMenu::~CDefaultContextMenu(), and MenuCleanup::~MenuCleanup().

◆ IUnknown_TranslateAcceleratorIO()

HRESULT WINAPI IUnknown_TranslateAcceleratorIO ( IUnknown lpUnknown,
LPMSG  lpMsg 
)

Definition at line 4279 of file ordinal.c.

4280{
4281 IInputObject* lpInput = NULL;
4282 HRESULT hRet = E_INVALIDARG;
4283
4284 TRACE("(%p,%p)\n", lpUnknown, lpMsg);
4285 if (lpUnknown)
4286 {
4287 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
4288 (void**)&lpInput);
4289 if (SUCCEEDED(hRet) && lpInput)
4290 {
4291 hRet = IInputObject_TranslateAcceleratorIO(lpInput, lpMsg);
4292 IInputObject_Release(lpInput);
4293 }
4294 }
4295 return hRet;
4296}
#define IInputObject_TranslateAcceleratorIO(p, a)
Definition: shlobj.h:715

Referenced by CBaseBarSite::TranslateAcceleratorIO(), CInternetToolbar::TranslateAcceleratorIO(), CBaseBar::TranslateAcceleratorIO(), CMenuDeskBar::TranslateAcceleratorIO(), and CShellBrowser::v_MayTranslateAccelerator().

◆ IUnknown_TranslateAcceleratorOCS()

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

Definition at line 1898 of file ordinal.c.

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

◆ IUnknown_UIActivateIO()

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

Definition at line 1633 of file ordinal.c.

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

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

◆ MayExecForward()

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

Definition at line 2222 of file ordinal.c.

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

◆ MayQSForward()

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

Definition at line 2207 of file ordinal.c.

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

◆ MLClearMLHInstance()

DWORD WINAPI MLClearMLHInstance ( DWORD  x)

Definition at line 4048 of file ordinal.c.

4049{
4050 FIXME("(0x%08x)stub\n", x);
4051 return 0xabba1247;
4052}

◆ MLFreeLibrary()

BOOL WINAPI MLFreeLibrary ( HMODULE  hModule)

Definition at line 4011 of file ordinal.c.

4012{
4013 FIXME("(%p) semi-stub\n", hModule);
4014 return FreeLibrary(hModule);
4015}
HMODULE hModule
Definition: animate.c:44

Referenced by MLBuildResURLW().

◆ MLIsMLHInstance()

BOOL WINAPI MLIsMLHInstance ( HINSTANCE  hInst)

Definition at line 4029 of file ordinal.c.

4030{
4031 FIXME("(%p) stub\n", hInst);
4032 return FALSE;
4033}
HINSTANCE hInst
Definition: dxdiag.c:13

◆ MLLoadLibraryA()

HMODULE WINAPI MLLoadLibraryA ( LPCSTR  new_mod,
HMODULE  inst_hwnd,
DWORD  dwCrossCodePage 
)

Definition at line 3712 of file ordinal.c.

3713{
3714 /* FIXME: Native appears to do DPA_Create and a DPA_InsertPtr for
3715 * each call here.
3716 * FIXME: Native shows calls to:
3717 * SHRegGetUSValue for "Software\Microsoft\Internet Explorer\International"
3718 * CheckVersion
3719 * RegOpenKeyExA for "HKLM\Software\Microsoft\Internet Explorer"
3720 * RegQueryValueExA for "LPKInstalled"
3721 * RegCloseKey
3722 * RegOpenKeyExA for "HKCU\Software\Microsoft\Internet Explorer\International"
3723 * RegQueryValueExA for "ResourceLocale"
3724 * RegCloseKey
3725 * RegOpenKeyExA for "HKLM\Software\Microsoft\Active Setup\Installed Components\{guid}"
3726 * RegQueryValueExA for "Locale"
3727 * RegCloseKey
3728 * and then tests the Locale ("en" for me).
3729 * code below
3730 * after the code then a DPA_Create (first time) and DPA_InsertPtr are done.
3731 */
3732 CHAR mod_path[2*MAX_PATH];
3733 LPSTR ptr;
3734 DWORD len;
3735
3736 FIXME("(%s,%p,%d) semi-stub!\n", debugstr_a(new_mod), inst_hwnd, dwCrossCodePage);
3737 len = GetModuleFileNameA(inst_hwnd, mod_path, sizeof(mod_path));
3738 if (!len || len >= sizeof(mod_path)) return NULL;
3739
3740 ptr = strrchr(mod_path, '\\');
3741 if (ptr) {
3742 strcpy(ptr+1, new_mod);
3743 TRACE("loading %s\n", debugstr_a(mod_path));
3744 return LoadLibraryA(mod_path);
3745 }
3746 return NULL;
3747}
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:539
#define debugstr_a
Definition: kernel32.h:31
static PVOID ptr
Definition: dispmode.c:27
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
char * LPSTR
Definition: xmlstorage.h:182
char CHAR
Definition: xmlstorage.h:175

◆ MLLoadLibraryW()

HMODULE WINAPI MLLoadLibraryW ( LPCWSTR  new_mod,
HMODULE  inst_hwnd,
DWORD  dwCrossCodePage 
)

Definition at line 3754 of file ordinal.c.

3755{
3756 WCHAR mod_path[2*MAX_PATH];
3757 LPWSTR ptr;
3758 DWORD len;
3759
3760 FIXME("(%s,%p,%d) semi-stub!\n", debugstr_w(new_mod), inst_hwnd, dwCrossCodePage);
3761 len = GetModuleFileNameW(inst_hwnd, mod_path, sizeof(mod_path) / sizeof(WCHAR));
3762 if (!len || len >= sizeof(mod_path) / sizeof(WCHAR)) return NULL;
3763
3764 ptr = strrchrW(mod_path, '\\');
3765 if (ptr) {
3766 strcpyW(ptr+1, new_mod);
3767 TRACE("loading %s\n", debugstr_w(mod_path));
3768 return LoadLibraryW(mod_path);
3769 }
3770 return NULL;
3771}
#define LoadLibraryW(x)
Definition: compat.h:747
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
#define debugstr_w
Definition: kernel32.h:32
#define strrchrW(s, c)
Definition: unicode.h:41
#define strcpyW(d, s)
Definition: unicode.h:35
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by MLBuildResURLW().

◆ MLSetMLHInstance()

DWORD WINAPI MLSetMLHInstance ( HINSTANCE  hInst,
HANDLE  hHeap 
)

Definition at line 4039 of file ordinal.c.

4040{
4041 FIXME("(%p,%p) stub\n", hInst, hHeap);
4042 return E_FAIL; /* This is what is used if shlwapi not loaded */
4043}

◆ PageSetupDlgWrapW()

BOOL WINAPI PageSetupDlgWrapW ( LPPAGESETUPDLGW  pagedlg)

Definition at line 3841 of file ordinal.c.

3842{
3843 return PageSetupDlgW(pagedlg);
3844}
BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW setupdlg)
Definition: printdlg.c:3938

◆ PathSkipLeadingSlashesA()

LPCSTR WINAPI PathSkipLeadingSlashesA ( LPCSTR  lpszSrc)

Definition at line 1269 of file ordinal.c.

1270{
1271 if (lpszSrc && lpszSrc[0] == '/' && lpszSrc[1] == '/')
1272 lpszSrc += 2;
1273 return lpszSrc;
1274}

◆ PlaySoundWrapW()

BOOL WINAPI PlaySoundWrapW ( LPCWSTR  pszSound,
HMODULE  hmod,
DWORD  fdwSound 
)

Definition at line 3357 of file ordinal.c.

3358{
3359 return PlaySoundW(pszSound, hmod, fdwSound);
3360}
static PEXPLICIT_ACCESSW *static HMODULE hmod
Definition: security.c:143
BOOL WINAPI PlaySoundW(LPCWSTR pszSoundW, HMODULE hmod, DWORD fdwSound)
Definition: playsound.c:653

◆ PrintDlgWrapW()

BOOL WINAPI PrintDlgWrapW ( LPPRINTDLGW  printdlg)

Definition at line 3851 of file ordinal.c.

3852{
3853 return PrintDlgW(printdlg);
3854}
BOOL WINAPI PrintDlgW(LPPRINTDLGW lppd)
Definition: printdlg.c:2403

◆ QISearch()

HRESULT WINAPI QISearch ( void base,
const QITAB table,
REFIID  riid,
void **  ppv 
)

Definition at line 2396 of file ordinal.c.

2401{
2402 HRESULT ret;
2403 IUnknown *a_vtbl;
2404 const QITAB *xmove;
2405
2406 TRACE("(%p %p %s %p)\n", base, table, debugstr_guid(riid), ppv);
2407 if (ppv) {
2408 xmove = table;
2409 while (xmove->piid) {
2410 TRACE("trying (offset %d) %s\n", xmove->dwOffset, debugstr_guid(xmove->piid));
2411 if (IsEqualIID(riid, xmove->piid)) {
2412 a_vtbl = (IUnknown*)(xmove->dwOffset + (LPBYTE)base);
2413 TRACE("matched, returning (%p)\n", a_vtbl);
2414 *ppv = a_vtbl;
2415 IUnknown_AddRef(a_vtbl);
2416 return S_OK;
2417 }
2418 xmove++;
2419 }
2420
2421 if (IsEqualIID(riid, &IID_IUnknown)) {
2422 a_vtbl = (IUnknown*)(table->dwOffset + (LPBYTE)base);
2423 TRACE("returning first for IUnknown (%p)\n", a_vtbl);
2424 *ppv = a_vtbl;
2425 IUnknown_AddRef(a_vtbl);
2426 return S_OK;
2427 }
2428 *ppv = 0;
2430 } else
2431 ret = E_POINTER;
2432
2433 TRACE("-- 0x%08x\n", ret);
2434 return ret;
2435}
const GUID IID_IUnknown
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
const IID * piid
Definition: shlwapi.h:2074
DWORD dwOffset
Definition: shlwapi.h:2076
unsigned char * LPBYTE
Definition: typedefs.h:53
#define E_POINTER
Definition: winerror.h:2365

Referenced by ExplorerInstance::QueryInterface(), and CUnknownBase< Interface >::QueryInterface().

◆ RegisterDefaultAcceptHeaders()

HRESULT WINAPI RegisterDefaultAcceptHeaders ( LPBC  lpBC,
IUnknown lpUnknown 
)

Definition at line 348 of file ordinal.c.

349{
350 static const WCHAR szProperty[] = { '{','D','0','F','C','A','4','2','0',
351 '-','D','3','F','5','-','1','1','C','F', '-','B','2','1','1','-','0',
352 '0','A','A','0','0','4','A','E','8','3','7','}','\0' };
354 IEnumFORMATETC* pIEnumFormatEtc = NULL;
356 HRESULT hr;
357 IWebBrowserApp* pBrowser;
358
359 TRACE("(%p, %p)\n", lpBC, lpUnknown);
360
361 hr = IUnknown_QueryService(lpUnknown, &IID_IWebBrowserApp, &IID_IWebBrowserApp, (void**)&pBrowser);
362 if (FAILED(hr))
363 return hr;
364
365 V_VT(&var) = VT_EMPTY;
366
367 /* The property we get is the browsers clipboard enumerator */
368 property = SysAllocString(szProperty);
369 hr = IWebBrowserApp_GetProperty(pBrowser, property, &var);
371 if (FAILED(hr)) goto exit;
372
373 if (V_VT(&var) == VT_EMPTY)
374 {
375 /* Iterate through accepted documents and RegisterClipBoardFormatA() them */
376 char szKeyBuff[128], szValueBuff[128];
377 DWORD dwKeySize, dwValueSize, dwRet = 0, dwCount = 0, dwNumValues, dwType;
378 FORMATETC* formatList, *format;
379 HKEY hDocs;
380
381 TRACE("Registering formats and creating IEnumFORMATETC instance\n");
382
383 if (!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\Current"
384 "Version\\Internet Settings\\Accepted Documents", &hDocs))
385 {
386 hr = E_FAIL;
387 goto exit;
388 }
389
390 /* Get count of values in key */
391 while (!dwRet)
392 {
393 dwKeySize = sizeof(szKeyBuff);
394 dwRet = RegEnumValueA(hDocs,dwCount,szKeyBuff,&dwKeySize,0,&dwType,0,0);
395 dwCount++;
396 }
397
398 dwNumValues = dwCount;
399
400 /* Note: dwCount = number of items + 1; The extra item is the end node */
401 format = formatList = HeapAlloc(GetProcessHeap(), 0, dwCount * sizeof(FORMATETC));
402 if (!formatList)
403 {
404 RegCloseKey(hDocs);
406 goto exit;
407 }
408
409 if (dwNumValues > 1)
410 {
411 dwRet = 0;
412 dwCount = 0;
413
414 dwNumValues--;
415
416 /* Register clipboard formats for the values and populate format list */
417 while(!dwRet && dwCount < dwNumValues)
418 {
419 dwKeySize = sizeof(szKeyBuff);
420 dwValueSize = sizeof(szValueBuff);
421 dwRet = RegEnumValueA(hDocs, dwCount, szKeyBuff, &dwKeySize, 0, &dwType,
422 (PBYTE)szValueBuff, &dwValueSize);
423 if (!dwRet)
424 {
425 HeapFree(GetProcessHeap(), 0, formatList);
426 RegCloseKey(hDocs);
427 hr = E_FAIL;
428 goto exit;
429 }
430
431 format->cfFormat = RegisterClipboardFormatA(szValueBuff);
432 format->ptd = NULL;
433 format->dwAspect = 1;
434 format->lindex = 4;
435 format->tymed = -1;
436
437 format++;
438 dwCount++;
439 }
440 }
441
442 RegCloseKey(hDocs);
443
444 /* Terminate the (maybe empty) list, last entry has a cfFormat of 0 */
445 format->cfFormat = 0;
446 format->ptd = NULL;
447 format->dwAspect = 1;
448 format->lindex = 4;
449 format->tymed = -1;
450
451 /* Create a clipboard enumerator */
452 hr = CreateFormatEnumerator(dwNumValues, formatList, &pIEnumFormatEtc);
453 HeapFree(GetProcessHeap(), 0, formatList);
454 if (FAILED(hr)) goto exit;
455
456 /* Set our enumerator as the browsers property */
457 V_VT(&var) = VT_UNKNOWN;
458 V_UNKNOWN(&var) = (IUnknown*)pIEnumFormatEtc;
459
460 property = SysAllocString(szProperty);
461 hr = IWebBrowserApp_PutProperty(pBrowser, property, var);
463 if (FAILED(hr))
464 {
465 IEnumFORMATETC_Release(pIEnumFormatEtc);
466 goto exit;
467 }
468 }
469
470 if (V_VT(&var) == VT_UNKNOWN)
471 {
472 /* Our variant is holding the clipboard enumerator */
473 IUnknown* pIUnknown = V_UNKNOWN(&var);
474 IEnumFORMATETC* pClone = NULL;
475
476 TRACE("Retrieved IEnumFORMATETC property\n");
477
478 /* Get an IEnumFormatEtc interface from the variants value */
479 pIEnumFormatEtc = NULL;
480 hr = IUnknown_QueryInterface(pIUnknown, &IID_IEnumFORMATETC, (void**)&pIEnumFormatEtc);
481 if (hr == S_OK && pIEnumFormatEtc)
482 {
483 /* Clone and register the enumerator */
484 hr = IEnumFORMATETC_Clone(pIEnumFormatEtc, &pClone);
485 if (hr == S_OK && pClone)
486 {
487 RegisterFormatEnumerator(lpBC, pClone, 0);
488
489 IEnumFORMATETC_Release(pClone);
490 }
491
492 IUnknown_Release(pIUnknown);
493 }
494 IUnknown_Release(V_UNKNOWN(&var));
495 }
496
497exit:
498 IWebBrowserApp_Release(pBrowser);
499 return hr;
500}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3234
LONG WINAPI RegEnumValueA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpdwReserved, _Out_opt_ LPDWORD lpdwType, _Out_opt_ LPBYTE lpData, _Inout_opt_ LPDWORD lpcbData)
Definition: reg.c:2668
OLECHAR * BSTR
Definition: compat.h:2293
@ VT_UNKNOWN
Definition: compat.h:2308
@ VT_EMPTY
Definition: compat.h:2295
HRESULT WINAPI CreateFormatEnumerator(UINT cfmtetc, FORMATETC *rgfmtetc, IEnumFORMATETC **ppenumfmtetc)
Definition: format.c:177
HRESULT WINAPI RegisterFormatEnumerator(LPBC pBC, IEnumFORMATETC *pEFetc, DWORD reserved)
Definition: format.c:194
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
const char * var
Definition: shader.c:5666
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_VT(A)
Definition: oleauto.h:211
const GUID IID_IEnumFORMATETC
#define exit(n)
Definition: config.h:202
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
UINT WINAPI RegisterClipboardFormatA(_In_ LPCSTR)

◆ SHAboutInfoA()

BOOL WINAPI SHAboutInfoA ( LPSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 915 of file ordinal.c.

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

◆ SHAboutInfoW()

BOOL WINAPI SHAboutInfoW ( LPWSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 934 of file ordinal.c.

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

Referenced by SHAboutInfoA().

◆ SHAllocShared()

HANDLE WINAPI SHAllocShared ( LPCVOID  lpvData,
DWORD  dwSize,
DWORD  dwProcId 
)

Definition at line 169 of file ordinal.c.

170{
171 HANDLE hMap;
172 LPVOID pMapped;
173 HANDLE hRet = NULL;
174
175 TRACE("(%p,%d,%d)\n", lpvData, dwSize, dwProcId);
176
177 /* Create file mapping of the correct length */
179 dwSize + sizeof(dwSize), NULL);
180 if (!hMap)
181 return hRet;
182
183 /* Get a view in our process address space */
184 pMapped = MapViewOfFile(hMap, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
185
186 if (pMapped)
187 {
188 /* Write size of data, followed by the data, to the view */
189 *((DWORD*)pMapped) = dwSize;
190 if (lpvData)
191 memcpy((char *) pMapped + sizeof(dwSize), lpvData, dwSize);
192
193 /* Release view. All further views mapped will be opaque */
194 UnmapViewOfFile(pMapped);
195 hRet = SHMapHandle(hMap, GetCurrentProcessId(), dwProcId,
197 }
198
199 CloseHandle(hMap);
200 return hRet;
201}
#define UnmapViewOfFile
Definition: compat.h:746
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define FILE_MAP_READ
Definition: compat.h:776
#define MapViewOfFile
Definition: compat.h:745
HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId, DWORD dwAccess, DWORD dwOptions)
Definition: ordinal.c:98
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
Definition: filemap.c:23
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
#define FILE_MAP_WRITE
Definition: winbase.h:154
#define FILE_MAP_ALL_ACCESS
Definition: winbase.h:156
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1158
#define DUPLICATE_SAME_ACCESS

Referenced by CreateNotificationParam(), CreateRegistrationParam(), init_pointers(), MakeSharedPacket(), and SHELL_ArgifyW().

◆ SHBrowseForFolderWrapW()

LPITEMIDLIST WINAPI SHBrowseForFolderWrapW ( LPBROWSEINFOW  lpBi)

Definition at line 3462 of file ordinal.c.

3463{
3464 return SHBrowseForFolderW(lpBi);
3465}
EXTERN_C LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
Definition: brfolder.cpp:1352

◆ SHChangeNotifyWrap()

void WINAPI SHChangeNotifyWrap ( LONG  wEventId,
UINT  uFlags,
LPCVOID  dwItem1,
LPCVOID  dwItem2 
)

Definition at line 5022 of file ordinal.c.

5023{
5024 SHChangeNotify(wEventId, uFlags, dwItem1, dwItem2);
5025}
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
UINT uFlags
Definition: api.c:59

◆ SHCheckMenuItem()

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

Definition at line 1800 of file ordinal.c.

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

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

◆ SHCoCreateInstanceAC()

HRESULT WINAPI SHCoCreateInstanceAC ( REFCLSID  rclsid,
LPUNKNOWN  pUnkOuter,
DWORD  dwClsContext,
REFIID  iid,
LPVOID ppv 
)

Definition at line 4554 of file ordinal.c.

4556{
4557 return CoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv);
4558}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325

◆ SHCreatePropertyBagOnRegKey()

HRESULT WINAPI SHCreatePropertyBagOnRegKey ( HKEY  hKey,
LPCWSTR  subkey,
DWORD  grfMode,
REFIID  riid,
void **  ppv 
)

Definition at line 5193 of file ordinal.c.

5195{
5196 FIXME("%p %s %d %s %p STUB\n", hKey, debugstr_w(subkey), grfMode,
5198
5199 return E_NOTIMPL;
5200}
#define E_NOTIMPL
Definition: ddrawi.h:99
FxAutoRegKey hKey

Referenced by CDefaultContextMenu::InvokeRegVerb(), and SHPropertyBag_OnRegKey().

◆ SHCreateShellPalette()

HPALETTE WINAPI SHCreateShellPalette ( HDC  hdc)

Definition at line 4411 of file ordinal.c.

4412{
4413 FIXME("stub\n");
4414 return CreateHalftonePalette(hdc);
4415}
HDC hdc
Definition: main.c:9
HPALETTE WINAPI CreateHalftonePalette(_In_opt_ HDC)

◆ SHCreateWorkerWindowA()

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

Definition at line 2679 of file ordinal.c.

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

Referenced by init_pointers(), and SHCreateWorkerWindowW().

◆ SHCreateWorkerWindowW()

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

Definition at line 3004 of file ordinal.c.

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

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

◆ SHDefExtractIconWrapW()

UINT WINAPI SHDefExtractIconWrapW ( LPCWSTR  pszIconFile,
int  iIndex,
UINT  uFlags,
HICON phiconLarge,
HICON phiconSmall,
UINT  nIconSize 
)

Definition at line 3604 of file ordinal.c.

3606{
3607 return SHDefExtractIconW(pszIconFile, iIndex, uFlags, phiconLarge, phiconSmall, nIconSize);
3608}
HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize)
Definition: iconcache.cpp:1009

◆ SHDefWindowProc()

LRESULT CALLBACK SHDefWindowProc ( HWND  hWnd,
UINT  uMessage,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 2632 of file ordinal.c.

2633{
2634 if (IsWindowUnicode(hWnd))
2635 return DefWindowProcW(hWnd, uMessage, wParam, lParam);
2636 return DefWindowProcA(hWnd, uMessage, wParam, lParam);
2637}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
BOOL WINAPI IsWindowUnicode(_In_ HWND)

◆ ShellExecuteExWrapW()

BOOL WINAPI ShellExecuteExWrapW ( LPSHELLEXECUTEINFOW  lpExecInfo)

Definition at line 3482 of file ordinal.c.

3483{
3484 return ShellExecuteExW(lpExecInfo);
3485}
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2424

◆ ShellMessageBoxWrapW()

INT WINAPIV ShellMessageBoxWrapW ( HINSTANCE  hInstance,
HWND  hWnd,
LPCWSTR  lpText,
LPCWSTR  lpCaption,
UINT  uType,
  ... 
)

Definition at line 4957 of file ordinal.c.

4959{
4960 WCHAR *szText = NULL, szTitle[100];
4961 LPCWSTR pszText, pszTitle = szTitle;
4962 LPWSTR pszTemp;
4964 int ret;
4965
4966 __ms_va_start(args, uType);
4967
4968 TRACE("(%p,%p,%p,%p,%08x)\n", hInstance, hWnd, lpText, lpCaption, uType);
4969
4970 if (IS_INTRESOURCE(lpCaption))
4972 else
4973 pszTitle = lpCaption;
4974
4975 if (IS_INTRESOURCE(lpText))
4976 {
4977 const WCHAR *ptr;
4978 UINT len = LoadStringW(hInstance, LOWORD(lpText), (LPWSTR)&ptr, 0);
4979
4980 if (len)
4981 {
4982 szText = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
4983 if (szText) LoadStringW(hInstance, LOWORD(lpText), szText, len + 1);
4984 }
4985 pszText = szText;
4986 if (!pszText) {
4987 WARN("Failed to load id %d\n", LOWORD(lpText));
4989 return 0;
4990 }
4991 }
4992 else
4993 pszText = lpText;
4994
4996 pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
4997
4999
5000#ifdef __REACTOS__
5001 uType |= MB_SETFOREGROUND;
5002#endif
5003 ret = MessageBoxW(hWnd, pszTemp, pszTitle, uType);
5004
5005 HeapFree(GetProcessHeap(), 0, szText);
5006 LocalFree(pszTemp);
5007 return ret;
5008}
#define ARRAY_SIZE(A)
Definition: main.h:20
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
unsigned int UINT
Definition: ndis.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define args
Definition: format.c:66
Definition: match.c:390
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:421
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:419
#define MB_SETFOREGROUND
Definition: winuser.h:817
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ SHEnableMenuItem()

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

Definition at line 1781 of file ordinal.c.

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

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

◆ SHFileOperationWrapW()

INT WINAPI SHFileOperationWrapW ( LPSHFILEOPSTRUCTW  lpFileOp)

Definition at line 3492 of file ordinal.c.

3493{
3494 return SHFileOperationW(lpFileOp);
3495}
int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
Definition: shlfileop.cpp:1987

◆ SHFillRectClr()

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

Definition at line 2133 of file ordinal.c.

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

◆ SHFlushSFCacheWrap()

BOOL WINAPI SHFlushSFCacheWrap ( void  )

Definition at line 4020 of file ordinal.c.

4020 {
4021 FIXME(": stub\n");
4022 return TRUE;
4023}

◆ SHFormatDateTimeA()

INT WINAPI SHFormatDateTimeA ( const FILETIME UNALIGNED fileTime,
DWORD flags,
LPSTR  buf,
UINT  size 
)

Definition at line 5313 of file ordinal.c.

5315{
5316 WCHAR *bufW;
5317 INT retval;
5318
5319 if (!buf || !size)
5320 return 0;
5321
5322 bufW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * size);
5323 retval = SHFormatDateTimeW(fileTime, flags, bufW, size);
5324
5325 if (retval != 0)
5326 WideCharToMultiByte(CP_ACP, 0, bufW, -1, buf, size, NULL, NULL);
5327
5328 HeapFree(GetProcessHeap(), 0, bufW);
5329 return retval;
5330}
INT WINAPI SHFormatDateTimeW(const FILETIME UNALIGNED *fileTime, DWORD *flags, LPWSTR buf, UINT size)
Definition: ordinal.c:5248
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161

Referenced by init_pointers().

◆ SHFormatDateTimeW()

INT WINAPI SHFormatDateTimeW ( const FILETIME UNALIGNED fileTime,
DWORD flags,
LPWSTR  buf,
UINT  size 
)

Definition at line 5248 of file ordinal.c.

5250{
5251#define SHFORMATDT_UNSUPPORTED_FLAGS (FDTF_RELATIVE | FDTF_LTRDATE | FDTF_RTLDATE | FDTF_NOAUTOREADINGORDER)
5252 DWORD fmt_flags = flags ? *flags : FDTF_DEFAULT;
5253 SYSTEMTIME st;
5254 FILETIME ft;
5255 INT ret = 0;
5256
5257 TRACE("%p %p %p %u\n", fileTime, flags, buf, size);
5258
5259 if (!buf || !size)
5260 return 0;
5261
5262 if (fmt_flags & SHFORMATDT_UNSUPPORTED_FLAGS)
5263 FIXME("ignoring some flags - 0x%08x\n", fmt_flags & SHFORMATDT_UNSUPPORTED_FLAGS);
5264
5265 FileTimeToLocalFileTime(fileTime, &ft);
5266 FileTimeToSystemTime(&ft, &st);
5267
5268 /* first of all date */
5269 if (fmt_flags & (FDTF_LONGDATE | FDTF_SHORTDATE))
5270 {
5271 static const WCHAR sep1[] = {',',' ',0};
5272 static const WCHAR sep2[] = {' ',0};
5273
5276 if (ret >= size) return ret;
5277
5278 /* add separator */
5279 if (ret < size && (fmt_flags & (FDTF_LONGTIME | FDTF_SHORTTIME)))
5280 {
5281 if ((fmt_flags & FDTF_LONGDATE) && (ret < size + 2))
5282 {
5283 lstrcatW(&buf[ret-1], sep1);
5284 ret += 2;
5285 }
5286 else
5287 {
5288 lstrcatW(&buf[ret-1], sep2);
5289 ret++;
5290 }
5291 }
5292 }
5293 /* time part */
5294 if (fmt_flags & (FDTF_LONGTIME | FDTF_SHORTTIME))
5295 {
5296 DWORD time = fmt_flags & FDTF_LONGTIME ? 0 : TIME_NOSECONDS;
5297
5298 if (ret) ret--;
5300 }
5301
5302 return ret;
5303
5304#undef SHFORMATDT_UNSUPPORTED_FLAGS
5305}
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:188
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
Definition: time.c:221
#define SHFORMATDT_UNSUPPORTED_FLAGS
INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut)
Definition: lcformat.c:1093
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
Definition: lcformat.c:993
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
__u16 date
Definition: mkdosfs.c:8
__u16 time
Definition: mkdosfs.c:8
#define LOCALE_USER_DEFAULT
#define FDTF_SHORTTIME
Definition: shlwapi.h:2061
#define FDTF_LONGDATE
Definition: shlwapi.h:2064
#define FDTF_DEFAULT
Definition: shlwapi.h:2063
#define FDTF_LONGTIME
Definition: shlwapi.h:2065
#define FDTF_SHORTDATE
Definition: shlwapi.h:2062
#define TIME_NOSECONDS
Definition: winnls.h:278
#define DATE_LONGDATE
Definition: winnls.h:197
#define DATE_SHORTDATE
Definition: winnls.h:196

Referenced by init_pointers(), and SHFormatDateTimeA().

◆ SHFreeShared()

BOOL WINAPI SHFreeShared ( HANDLE  hShared,
DWORD  dwProcId 
)

Definition at line 315 of file ordinal.c.

316{
317 HANDLE hClose;
318
319 TRACE("(%p %d)\n", hShared, dwProcId);
320
321 if (!hShared)
322 return TRUE;
323
324 /* Get a copy of the handle for our process, closing the source handle */
325 hClose = SHMapHandle(hShared, dwProcId, GetCurrentProcessId(),
327 /* Close local copy */
328 return CloseHandle(hClose);
329}
#define DUPLICATE_CLOSE_SOURCE

Referenced by _ILReadFromSharedMemory(), CreateNotificationParam(), CreateRegistrationParam(), init_pointers(), MakeSharedPacket(), CChangeNotifyServer::OnDeliverNotification(), ParseSharedPacket(), and SHChangeNotifyRegister().

◆ SHGetAppCompatFlags()

DWORD WINAPI SHGetAppCompatFlags ( DWORD  dwUnknown)

Definition at line 4544 of file ordinal.c.

4545{
4546 FIXME("(0x%08x) stub\n", dwUnknown);
4547 return 0;
4548}

◆ SHGetCurColorRes()

DWORD WINAPI SHGetCurColorRes ( void  )

Definition at line 2023 of file ordinal.c.

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

Referenced by CBrandBand::SelectImage().

◆ SHGetFileInfoWrapW()

DWORD WINAPI SHGetFileInfoWrapW ( LPCWSTR  path,
DWORD  dwFileAttributes,
SHFILEINFOW psfi,
UINT  sizeofpsfi,
UINT  flags 
)

Definition at line 3441 of file ordinal.c.

3443{
3444 return SHGetFileInfoW(path, dwFileAttributes, psfi, sizeofpsfi, flags);
3445}
DWORD dwFileAttributes
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
Definition: shell32_main.c:415

◆ SHGetIniStringW()

DWORD WINAPI SHGetIniStringW ( LPCWSTR  appName,
LPCWSTR  keyName,
LPWSTR  out,
DWORD  outLen,
LPCWSTR  filename 
)

Definition at line 3379 of file ordinal.c.

3381{
3382 INT ret;
3383 WCHAR *buf;
3384
3385 TRACE("(%s,%s,%p,%08x,%s)\n", debugstr_w(appName), debugstr_w(keyName),
3386 out, outLen, debugstr_w(filename));
3387
3388 if(outLen == 0)
3389 return 0;
3390
3391 buf = HeapAlloc(GetProcessHeap(), 0, outLen * sizeof(WCHAR));
3392 if(!buf){
3393 *out = 0;
3394 return 0;
3395 }
3396
3397 ret = GetPrivateProfileStringW(appName, keyName, NULL, buf, outLen, filename);
3398 if(ret)
3399 strcpyW(out, buf);
3400 else
3401 *out = 0;
3402
3404
3405 return strlenW(out);
3406}
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Definition: profile.c:1142
const char * appName(const char *argv0)
Definition: loadlib.c:89
static FILE * out
Definition: regtests2xml.c:44

Referenced by init_pointers(), and SHPropertyBag_SHSetIniStringW().

◆ SHGetInverseCMAP()

HRESULT WINAPI SHGetInverseCMAP ( LPDWORD  dest,
DWORD  dwSize 
)

Definition at line 4439 of file ordinal.c.

4440{
4441 if (dwSize == 4) {
4442 FIXME(" - returning bogus address for SHGetInverseCMAP\n");
4443 *dest = (DWORD)0xabba1249;
4444 return 0;
4445 }
4446 FIXME("(%p, %#x) stub\n", dest, dwSize);
4447 return 0;
4448}
static char * dest
Definition: rtl.c:135
#define DWORD
Definition: nt_native.h:44

◆ SHGetMachineInfo()

DWORD WINAPI SHGetMachineInfo ( DWORD  dwFlags)

Definition at line 3958 of file ordinal.c.

3959{
3960 HW_PROFILE_INFOA hwInfo;
3961
3962 TRACE("(0x%08x)\n", dwFlags);
3963
3964 GetCurrentHwProfileA(&hwInfo);
3965 switch (hwInfo.dwDockInfo & (DOCKINFO_DOCKED|DOCKINFO_UNDOCKED))
3966 {
3967 case DOCKINFO_DOCKED:
3968 case DOCKINFO_UNDOCKED:
3970 default:
3971 return 0;
3972 }
3973}
BOOL WINAPI GetCurrentHwProfileA(LPHW_PROFILE_INFOA lpHwProfileInfo)
Definition: hwprofiles.c:28
#define DOCKINFO_DOCKED
Definition: winbase.h:247
#define DOCKINFO_UNDOCKED
Definition: winbase.h:246
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ SHGetMenuFromID()

HMENU WINAPI SHGetMenuFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 1997 of file ordinal.c.

1998{
2000
2001 TRACE("(%p,%u)\n", hMenu, uID);
2002
2003 mi.cbSize = sizeof(mi);
2004 mi.fMask = MIIM_SUBMENU;
2005
2006 if (!GetMenuItemInfoW(hMenu, uID, FALSE, &mi))
2007 return NULL;
2008
2009 return mi.hSubMenu;
2010}
#define MIIM_SUBMENU
Definition: winuser.h:726

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

◆ SHGetNewLinkInfoWrapW()

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

Definition at line 3593 of file ordinal.c.

3595{
3596 return SHGetNewLinkInfoW(pszLinkTo, pszDir, pszName, pfMustCopy, uFlags);
3597}
_In_ LPCSTR pszDir
Definition: shellapi.h:584
_In_ LPCSTR _Out_ BOOL * pfMustCopy
Definition: shellapi.h:586
BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags)
Definition: shellord.c:2557

◆ SHGetObjectCompatFlags()

DWORD WINAPI SHGetObjectCompatFlags ( IUnknown pUnk,
const CLSID clsid 
)

Definition at line 6294 of file ordinal.c.

6295{
6296 static const WCHAR compatpathW[] =
6297 {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
6298 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
6299 'S','h','e','l','l','C','o','m','p','a','t','i','b','i','l','i','t','y','\\',
6300 'O','b','j','e','c','t','s','\\','%','s',0};
6301 WCHAR strW[sizeof(compatpathW)/sizeof(WCHAR) + 38 /* { CLSID } */];
6302 DWORD ret, length = sizeof(strW)/sizeof(WCHAR);
6303 OLECHAR *clsid_str;
6304 HKEY key;
6305 INT i;
6306
6307 TRACE("%p %s\n", pUnk, debugstr_guid(clsid));
6308
6309 if (!pUnk && !clsid) return 0;
6310
6311 if (pUnk && !clsid)
6312 {
6313 FIXME("iface not handled\n");
6314 return 0;
6315 }
6316
6317 StringFromCLSID(clsid, &clsid_str);
6318 sprintfW(strW, compatpathW, clsid_str);
6319 CoTaskMemFree(clsid_str);
6320
6322 if (ret != ERROR_SUCCESS) return 0;
6323
6324 /* now collect flag values */
6325 ret = 0;
6326 for (i = 0; RegEnumValueW(key, i, strW, &length, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; i++)
6327 {
6328 INT left, right, res, x;
6329
6330 /* search in table */
6331 left = 0;
6332 right = sizeof(objcompat_table) / sizeof(struct objcompat_entry) - 1;
6333
6334 while (right >= left) {
6335 x = (left + right) / 2;
6337 if (res == 0)
6338 {
6339 ret |= objcompat_table[x].value;
6340 break;
6341 }
6342 else if (res < 0)
6343 right = x - 1;
6344 else
6345 left = x + 1;
6346 }
6347
6348 length = sizeof(strW)/sizeof(WCHAR);
6349 }
6350
6351 return ret;
6352}
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
Definition: reg.c:2830
WCHAR OLECHAR
Definition: compat.h:2292
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
static const struct objcompat_entry objcompat_table[]
Definition: ordinal.c:6252
GLuint res
Definition: glext.h:9613
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
WCHAR strW[12]
Definition: clipboard.c:2029
#define strcmpW(s1, s2)
Definition: unicode.h:44
#define sprintfW
Definition: unicode.h:64
Definition: copy.c:22
Definition: name.c:39
Definition: ordinal.c:6246

Referenced by init_pointers(), and SHGetAttributes().

◆ SHGetPathFromIDListWrapW()

BOOL WINAPI SHGetPathFromIDListWrapW ( LPCITEMIDLIST  pidl,
LPWSTR  pszPath 
)

Definition at line 3472 of file ordinal.c.

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

Referenced by _ILIsNetworkPlace().

◆ SHGetRestriction()

DWORD WINAPI SHGetRestriction ( LPCWSTR  lpSubKey,
LPCWSTR  lpSubName,
LPCWSTR  lpValue 
)

Definition at line 2744 of file ordinal.c.

2745{
2746#ifdef __REACTOS__
2748 DWORD dwSize, dwValue = 0;
2749
2750 TRACE("(%s, %s, %s)\n", debugstr_w(lpSubKey), debugstr_w(lpSubName), debugstr_w(lpValue));
2751
2752 if (!lpSubKey)
2753 lpSubKey = L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies";
2754
2755 PathCombineW(szPath, lpSubKey, lpSubName);
2756
2757 dwSize = sizeof(dwValue);
2758 if (SHGetValueW(HKEY_LOCAL_MACHINE, szPath, lpValue, NULL, &dwValue, &dwSize) == ERROR_SUCCESS)
2759 return dwValue;
2760
2761 dwSize = sizeof(dwValue);
2762 SHGetValueW(HKEY_CURRENT_USER, szPath, lpValue, NULL, &dwValue, &dwSize);
2763 return dwValue;
2764#else
2765 DWORD retval, datsize = sizeof(retval);
2766 HKEY hKey;
2767
2768 if (!lpSubKey)
2769 lpSubKey = strRegistryPolicyW;
2770
2771 retval = RegOpenKeyW(HKEY_LOCAL_MACHINE, lpSubKey, &hKey);
2772 if (retval != ERROR_SUCCESS)
2773 retval = RegOpenKeyW(HKEY_CURRENT_USER, lpSubKey, &hKey);
2774 if (retval != ERROR_SUCCESS)
2775 return 0;
2776
2777 SHGetValueW(hKey, lpSubName, lpValue, NULL, &retval, &datsize);
2779 return retval;
2780#endif
2781}
static const WCHAR strRegistryPolicyW[]
Definition: ordinal.c:2725
LPCWSTR szPath
Definition: env.c:37
#define L(x)
Definition: ntvdm.h:50
#define PathCombineW
Definition: pathcch.h:317

Referenced by CShellDispatch::IsRestricted(), and SHRestrictionLookup().

◆ SHGetShellKey()

HKEY WINAPI SHGetShellKey ( DWORD  flags,
LPCWSTR  sub_key,
BOOL  create 
)

Definition at line 4601 of file ordinal.c.

4602{
4603#ifndef __REACTOS__
4604 enum _shellkey_flags {
4605 SHKEY_Root_HKCU = 0x1,
4606 SHKEY_Root_HKLM = 0x2,
4607 SHKEY_Key_Explorer = 0x00,
4608 SHKEY_Key_Shell = 0x10,
4609 SHKEY_Key_ShellNoRoam = 0x20,
4610 SHKEY_Key_Classes = 0x30,
4611 SHKEY_Subkey_Default = 0x0000,
4613 SHKEY_Subkey_Handlers = 0x2000,
4615 SHKEY_Subkey_Volatile = 0x4000,
4616 SHKEY_Subkey_MUICache = 0x5000,
4617 SHKEY_Subkey_FileExts = 0x6000
4618 };
4619#endif
4620