ReactOS  0.4.15-dev-449-g64abd9f
shlwapi_undoc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SHExpandEnvironmentStrings   SHExpandEnvironmentStringsA
 
#define SHCreateWorkerWindow   SHCreateWorkerWindowA
 

Functions

BOOL WINAPI SHAboutInfoA (LPSTR lpszDest, DWORD dwDestLen)
 
BOOL WINAPI SHAboutInfoW (LPWSTR 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 wMask, UINT wFlags)
 
HWND WINAPI SHSetParentHwnd (HWND hWnd, HWND hWndParent)
 
HRESULT WINAPI ConnectToConnectionPoint (IUnknown *lpUnkSink, REFIID riid, BOOL bAdviseOnly, IUnknown *lpUnknown, LPDWORD lpCookie, IConnectionPoint **lppCP)
 
BOOL WINAPI SHIsSameObject (IUnknown *lpInt1, IUnknown *lpInt2)
 
BOOL WINAPI SHLoadMenuPopup (HINSTANCE hInst, LPCWSTR szName)
 
void WINAPI SHPropagateMessage (HWND hWnd, UINT uiMsgId, WPARAM wParam, LPARAM lParam, BOOL bSend)
 
DWORD WINAPI SHRemoveAllSubMenus (HMENU hMenu)
 
UINT WINAPI SHEnableMenuItem (HMENU hMenu, UINT wItemID, BOOL bEnable)
 
DWORD WINAPI SHCheckMenuItem (HMENU hMenu, UINT uID, BOOL bCheck)
 
DWORD WINAPI SHRegisterClassA (WNDCLASSA *wndclass)
 
BOOL WINAPI SHSimulateDrop (IDropTarget *pDrop, IDataObject *pDataObj, DWORD grfKeyState, PPOINTL lpPt, DWORD *pdwEffect)
 
HMENU WINAPI SHGetMenuFromID (HMENU hMenu, UINT uID)
 
DWORD WINAPI SHGetCurColorRes (void)
 
DWORD WINAPI SHWaitForSendMessageThread (HANDLE hand, DWORD dwTimeout)
 
HRESULT WINAPI SHIsExpandableFolder (LPSHELLFOLDER lpFolder, LPCITEMIDLIST pidl)
 
DWORD WINAPI SHFillRectClr (HDC hDC, LPCRECT pRect, COLORREF cRef)
 
int WINAPI SHSearchMapInt (const int *lpKeys, const int *lpValues, int iLen, int iKey)
 
VOID WINAPI IUnknown_Set (IUnknown **lppDest, IUnknown *lpUnknown)
 
HRESULT WINAPI MayQSForward (IUnknown *lpUnknown, PVOID lpReserved, REFGUID riidCmdGrp, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
 
HRESULT WINAPI MayExecForward (IUnknown *lpUnknown, INT iUnk, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
HRESULT WINAPI IsQSForward (REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds)
 
BOOL WINAPI SHIsChildOrSelf (HWND hParent, HWND hChild)
 
HRESULT WINAPI SHForwardContextMenuMsg (IUnknown *pUnk, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult, BOOL useIContextMenu2)
 
HRESULT WINAPI SHRegGetCLSIDKeyW (REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU, BOOL bCreate, PHKEY phKey)
 
BOOL WINAPI SHAddDataBlock (LPDBLIST *lppList, const DATABLOCK_HEADER *lpNewItem)
 
BOOL WINAPI SHRemoveDataBlock (LPDBLIST *lppList, DWORD dwSignature)
 
DATABLOCK_HEADER *WINAPI SHFindDataBlock (LPDBLIST lpList, DWORD dwSignature)
 
HRESULT WINAPI SHWriteDataBlockList (IStream *lpStream, LPDBLIST lpList)
 
HRESULT WINAPI SHReadDataBlockList (IStream *lpStream, LPDBLIST *lppList)
 
VOID WINAPI SHFreeDataBlockList (LPDBLIST lpList)
 
DWORD WINAPI SHExpandEnvironmentStringsA (LPCSTR, LPSTR, DWORD)
 
DWORD WINAPI SHExpandEnvironmentStringsW (LPCWSTR, LPWSTR, DWORD)
 
BOOL WINAPI SHIsEmptyStream (IStream *)
 
HRESULT WINAPI SHInvokeDefaultCommand (HWND, IShellFolder *, LPCITEMIDLIST)
 
HRESULT WINAPI SHPropertyBag_ReadPOINTL (IPropertyBag *, LPCWSTR, POINTL *)
 
HRESULT WINAPI SHGetPerScreenResName (OUT LPWSTR lpResName, IN INT cchResName, IN DWORD dwReserved)
 
HRESULT WINAPI SHPropertyBag_ReadStream (IPropertyBag *, LPCWSTR, IStream **)
 
HWND WINAPI SHCreateWorkerWindowA (WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
 
HWND WINAPI SHCreateWorkerWindowW (WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
 
HRESULT WINAPI IUnknown_SetOwner (IUnknown *iface, IUnknown *pUnk)
 
HRESULT WINAPI IUnknown_GetClassID (IUnknown *lpUnknown, CLSID *lpClassId)
 
HRESULT WINAPI IUnknown_QueryServiceExec (IUnknown *lpUnknown, REFIID service, const GUID *group, DWORD cmdId, DWORD cmdOpt, VARIANT *pIn, VARIANT *pOut)
 
HRESULT WINAPI IUnknown_UIActivateIO (IUnknown *unknown, BOOL activate, LPMSG msg)
 
HRESULT WINAPI IUnknown_TranslateAcceleratorOCS (IUnknown *lpUnknown, LPMSG lpMsg, DWORD dwModifiers)
 
HRESULT WINAPI IUnknown_OnFocusOCS (IUnknown *lpUnknown, BOOL fGotFocus)
 
HRESULT WINAPI IUnknown_HandleIRestrict (LPUNKNOWN lpUnknown, PVOID lpArg1, PVOID lpArg2, PVOID lpArg3, PVOID lpArg4)
 
HRESULT WINAPI IUnknown_HasFocusIO (IUnknown *punk)
 
HRESULT WINAPI IUnknown_TranslateAcceleratorIO (IUnknown *punk, MSG *pmsg)
 
HRESULT WINAPI IUnknown_OnFocusChangeIS (LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
 
DWORD WINAPI SHAnsiToUnicode (LPCSTR lpSrcStr, LPWSTR lpDstStr, INT iLen)
 
INT WINAPI SHUnicodeToAnsi (LPCWSTR lpSrcStr, LPSTR lpDstStr, INT iLen)
 
PVOID WINAPI SHLockSharedEx (HANDLE hData, DWORD dwProcessId, BOOL bWriteAccess)
 

Macro Definition Documentation

◆ SHCreateWorkerWindow

#define SHCreateWorkerWindow   SHCreateWorkerWindowA

Definition at line 104 of file shlwapi_undoc.h.

◆ SHExpandEnvironmentStrings

#define SHExpandEnvironmentStrings   SHExpandEnvironmentStringsA

Definition at line 71 of file shlwapi_undoc.h.

Function Documentation

◆ ConnectToConnectionPoint()

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

Definition at line 1186 of file ordinal.c.

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

Referenced by init_pointers().

◆ IsQSForward()

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

Definition at line 2228 of file ordinal.c.

2229 {
2230  FIXME("(%p,%d,%p) - stub!\n", pguidCmdGroup, cCmds, prgCmds);
2231  return DRAGDROP_E_NOTREGISTERED;
2232 }
#define DRAGDROP_E_NOTREGISTERED
Definition: winerror.h:2652
#define FIXME(fmt,...)
Definition: debug.h:111

◆ IUnknown_Exec()

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

Definition at line 1080 of file ordinal.c.

1083 {
1084  HRESULT hRet = E_FAIL;
1085 
1086  TRACE("(%p,%p,%d,%d,%p,%p)\n",lpUnknown, pguidCmdGroup, nCmdID,
1087  nCmdexecopt, pvaIn, pvaOut);
1088 
1089  if (lpUnknown)
1090  {
1091  IOleCommandTarget* lpOle;
1092 
1093  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleCommandTarget,
1094  (void**)&lpOle);
1095  if (SUCCEEDED(hRet) && lpOle)
1096  {
1097  hRet = IOleCommandTarget_Exec(lpOle, pguidCmdGroup, nCmdID,
1098  nCmdexecopt, pvaIn, pvaOut);
1099  IOleCommandTarget_Release(lpOle);
1100  }
1101  }
1102  return hRet;
1103 }
#define E_FAIL
Definition: ddrawi.h:102
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by CTrayBandSite::AddBand(), CTrayWindow::CheckTrayWndPosition(), CInternetToolbar::CreateMenuBar(), CMenuSite::Exec(), CBaseBar::Exec(), 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::ShowBand(), and CTrayBandSite::Update().

◆ IUnknown_GetClassID()

HRESULT WINAPI IUnknown_GetClassID ( IUnknown lpUnknown,
CLSID lpClassId 
)

Definition at line 1450 of file ordinal.c.

1451 {
1452  IPersist *persist;
1453  HRESULT hr;
1454 
1455  TRACE("(%p, %p)\n", lpUnknown, clsid);
1456 
1457  if (!lpUnknown)
1458  {
1459  memset(clsid, 0, sizeof(*clsid));
1460  return E_FAIL;
1461  }
1462 
1463  hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersist, (void**)&persist);
1464  if (hr != S_OK)
1465  {
1466  hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersistFolder, (void**)&persist);
1467  if (hr != S_OK)
1468  return hr;
1469  }
1470 
1471  hr = IPersist_GetClassID(persist, clsid);
1472  IPersist_Release(persist);
1473  return hr;
1474 }
HRESULT hr
Definition: shlfolder.c:183
const GUID IID_IPersist
Definition: proxy.cpp:14
#define E_FAIL
Definition: ddrawi.h:102
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
REFCLSID clsid
Definition: msctf.c:82
#define S_OK
Definition: intsafe.h:59
#define memset(x, y, z)
Definition: compat.h:39

Referenced by CSearchBar::GetSearchResultsFolder(), init_pointers(), CSearchBar::Invoke(), and SHSkipJunction().

◆ IUnknown_HandleIRestrict()

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

Definition at line 1946 of file ordinal.c.

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

◆ IUnknown_HasFocusIO()

HRESULT WINAPI IUnknown_HasFocusIO ( IUnknown punk)

Definition at line 4182 of file ordinal.c.

4183 {
4184  IInputObject* lpInput = NULL;
4185  HRESULT hRet = E_INVALIDARG;
4186 
4187  TRACE("(%p)\n", lpUnknown);
4188  if (lpUnknown)
4189  {
4190  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
4191  (void**)&lpInput);
4192  if (SUCCEEDED(hRet) && lpInput)
4193  {
4194  hRet = IInputObject_HasFocusIO(lpInput);
4195  IInputObject_Release(lpInput);
4196  }
4197  }
4198  return hRet;
4199 }
#define IInputObject_Release(p)
Definition: shlobj.h:638
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define IInputObject_HasFocusIO(p)
Definition: shlobj.h:641
LONG HRESULT
Definition: typedefs.h:78
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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

◆ IUnknown_OnFocusChangeIS()

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

Definition at line 4652 of file ordinal.c.

4653 {
4654  IInputObjectSite *pIOS = NULL;
4655  HRESULT hRet = E_INVALIDARG;
4656 
4657  TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
4658 
4659  if (lpUnknown)
4660  {
4661  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
4662  (void **)&pIOS);
4663  if (SUCCEEDED(hRet) && pIOS)
4664  {
4665  hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
4667  }
4668  }
4669  return hRet;
4670 }
#define IInputObjectSite_Release(p)
Definition: shlobj.h:662
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define IInputObjectSite_OnFocusChangeIS(p, a, b)
Definition: shlobj.h:664
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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

◆ IUnknown_OnFocusOCS()

HRESULT WINAPI IUnknown_OnFocusOCS ( IUnknown lpUnknown,
BOOL  fGotFocus 
)

Definition at line 1924 of file ordinal.c.

1925 {
1926  IOleControlSite* lpCSite = NULL;
1927  HRESULT hRet = E_FAIL;
1928 
1929  TRACE("(%p, %d)\n", lpUnknown, fGotFocus);
1930  if (lpUnknown)
1931  {
1932  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
1933  (void**)&lpCSite);
1934  if (SUCCEEDED(hRet) && lpCSite)
1935  {
1936  hRet = IOleControlSite_OnFocus(lpCSite, fGotFocus);
1937  IOleControlSite_Release(lpCSite);
1938  }
1939  }
1940  return hRet;
1941 }
#define E_FAIL
Definition: ddrawi.h:102
const GUID IID_IOleControlSite
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ IUnknown_QueryServiceExec()

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

Definition at line 1546 of file ordinal.c.

1548 {
1550  HRESULT hr;
1551 
1552  TRACE("%p %s %s %d %08x %p %p\n", lpUnknown, debugstr_guid(service),
1553  debugstr_guid(group), cmdId, cmdOpt, pIn, pOut);
1554 
1555  hr = IUnknown_QueryService(lpUnknown, service, &IID_IOleCommandTarget, (void**)&target);
1556  if (hr == S_OK)
1557  {
1558  hr = IOleCommandTarget_Exec(target, group, cmdId, cmdOpt, pIn, pOut);
1559  IOleCommandTarget_Release(target);
1560  }
1561 
1562  TRACE("<-- hr=0x%08x\n", hr);
1563 
1564  return hr;
1565 }
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1494
#define debugstr_guid
Definition: kernel32.h:35
GLboolean GLuint group
Definition: glext.h:11120
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define S_OK
Definition: intsafe.h:59
GLenum target
Definition: glext.h:7315

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

◆ IUnknown_QueryStatus()

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

Definition at line 1041 of file ordinal.c.

1043 {
1044  HRESULT hRet = E_FAIL;
1045 
1046  TRACE("(%p,%p,%d,%p,%p)\n",lpUnknown, pguidCmdGroup, cCmds, prgCmds, pCmdText);
1047 
1048  if (lpUnknown)
1049  {
1050  IOleCommandTarget* lpOle;
1051 
1052  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleCommandTarget,
1053  (void**)&lpOle);
1054 
1055  if (SUCCEEDED(hRet) && lpOle)
1056  {
1057  hRet = IOleCommandTarget_QueryStatus(lpOle, pguidCmdGroup, cCmds,
1058  prgCmds, pCmdText);
1059  IOleCommandTarget_Release(lpOle);
1060  }
1061  }
1062  return hRet;
1063 }
#define E_FAIL
Definition: ddrawi.h:102
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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

◆ IUnknown_Set()

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

Definition at line 2183 of file ordinal.c.

2184 {
2185  TRACE("(%p,%p)\n", lppDest, lpUnknown);
2186 
2187  IUnknown_AtomicRelease(lppDest);
2188 
2189  if (lpUnknown)
2190  {
2191  IUnknown_AddRef(lpUnknown);
2192  *lppDest = lpUnknown;
2193  }
2194 }
#define TRACE(s)
Definition: solgame.cpp:4
void WINAPI IUnknown_AtomicRelease(IUnknown **lpUnknown)
Definition: ordinal.c:1238

◆ IUnknown_SetOwner()

HRESULT WINAPI IUnknown_SetOwner ( IUnknown iface,
IUnknown pUnk 
)

Definition at line 1378 of file ordinal.c.

1379 {
1380  IShellService *service;
1381  HRESULT hr;
1382 
1383  TRACE("(%p, %p)\n", iface, pUnk);
1384 
1385  if (!iface) return E_FAIL;
1386 
1387  hr = IUnknown_QueryInterface(iface, &IID_IShellService, (void**)&service);
1388  if (hr == S_OK)
1389  {
1390  hr = IShellService_SetOwner(service, pUnk);
1391  IShellService_Release(service);
1392  }
1393 
1394  return hr;
1395 }
HRESULT hr
Definition: shlfolder.c:183
#define E_FAIL
Definition: ddrawi.h:102
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define S_OK
Definition: intsafe.h:59
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30

Referenced by CTrayBandSite::AddContextMenus().

◆ IUnknown_TranslateAcceleratorIO()

HRESULT WINAPI IUnknown_TranslateAcceleratorIO ( IUnknown punk,
MSG pmsg 
)

◆ IUnknown_TranslateAcceleratorOCS()

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

Definition at line 1891 of file ordinal.c.

1892 {
1893  IOleControlSite* lpCSite = NULL;
1894  HRESULT hRet = E_INVALIDARG;
1895 
1896  TRACE("(%p,%p,0x%08x)\n", lpUnknown, lpMsg, dwModifiers);
1897  if (lpUnknown)
1898  {
1899  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
1900  (void**)&lpCSite);
1901  if (SUCCEEDED(hRet) && lpCSite)
1902  {
1903  hRet = IOleControlSite_TranslateAccelerator(lpCSite, lpMsg, dwModifiers);
1904  IOleControlSite_Release(lpCSite);
1905  }
1906  }
1907  return hRet;
1908 }
const GUID IID_IOleControlSite
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ IUnknown_UIActivateIO()

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

Definition at line 1626 of file ordinal.c.

1627 {
1628  IInputObject* object = NULL;
1629  HRESULT ret;
1630 
1631  if (!unknown)
1632  return E_FAIL;
1633 
1634  /* Get an IInputObject interface from the object */
1635  ret = IUnknown_QueryInterface(unknown, &IID_IInputObject, (LPVOID*) &object);
1636 
1637  if (ret == S_OK)
1638  {
1639  ret = IInputObject_UIActivateIO(object, activate, msg);
1640  IInputObject_Release(object);
1641  }
1642 
1643  return ret;
1644 }
#define E_FAIL
Definition: ddrawi.h:102
#define IInputObject_UIActivateIO(p, a, b)
Definition: shlobj.h:640
#define IInputObject_Release(p)
Definition: shlobj.h:638
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:78
Definition: id3.c:95
int ret
#define S_OK
Definition: intsafe.h:59
#define msg(x)
Definition: auth_time.c:54

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

◆ MayExecForward()

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

Definition at line 2215 of file ordinal.c.

2218 {
2219  FIXME("(%p,%d,%p,%d,%d,%p,%p) - stub!\n", lpUnknown, iUnk, pguidCmdGroup,
2220  nCmdID, nCmdexecopt, pvaIn, pvaOut);
2221  return DRAGDROP_E_NOTREGISTERED;
2222 }
#define DRAGDROP_E_NOTREGISTERED
Definition: winerror.h:2652
#define FIXME(fmt,...)
Definition: debug.h:111

◆ MayQSForward()

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

Definition at line 2200 of file ordinal.c.

2203 {
2204  FIXME("(%p,%p,%p,%d,%p,%p) - stub\n",
2205  lpUnknown, lpReserved, riidCmdGrp, cCmds, prgCmds, pCmdText);
2206 
2207  /* FIXME: Calls IsQSForward & IUnknown_QueryStatus */
2208  return DRAGDROP_E_NOTREGISTERED;
2209 }
#define DRAGDROP_E_NOTREGISTERED
Definition: winerror.h:2652
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHAboutInfoA()

BOOL WINAPI SHAboutInfoA ( LPSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 908 of file ordinal.c.

909 {
910  WCHAR buff[2084];
911 
912  TRACE("(%p,%d)\n", lpszDest, dwDestLen);
913 
914  if (lpszDest && SHAboutInfoW(buff, dwDestLen))
915  {
916  WideCharToMultiByte(CP_ACP, 0, buff, -1, lpszDest, dwDestLen, NULL, NULL);
917  return TRUE;
918  }
919  return FALSE;
920 }
#define TRUE
Definition: types.h:120
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
BOOL WINAPI SHAboutInfoW(LPWSTR, DWORD)
Definition: ordinal.c:927
smooth NULL
Definition: ftsmooth.c:416
WCHAR lpszDest[260]
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static unsigned char buff[32768]
Definition: fatten.c:17

◆ SHAboutInfoW()

BOOL WINAPI SHAboutInfoW ( LPWSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 927 of file ordinal.c.

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

Referenced by SHAboutInfoA().

◆ SHAddDataBlock()

BOOL WINAPI SHAddDataBlock ( LPDBLIST lppList,
const DATABLOCK_HEADER lpNewItem 
)

Definition at line 68 of file clist.c.

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

Referenced by CShellLink::AddDataBlock(), and SHReadDataBlockList().

◆ SHAnsiToUnicode()

DWORD WINAPI SHAnsiToUnicode ( LPCSTR  lpSrcStr,
LPWSTR  lpDstStr,
INT  iLen 
)

◆ SHCheckMenuItem()

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

Definition at line 1793 of file ordinal.c.

1794 {
1795  TRACE("%p, %u, %d\n", hMenu, uID, bCheck);
1796  return CheckMenuItem(hMenu, uID, bCheck ? MF_CHECKED : MF_UNCHECKED);
1797 }
#define MF_CHECKED
Definition: winuser.h:132
#define TRACE(s)
Definition: solgame.cpp:4
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define MF_UNCHECKED
Definition: winuser.h:204

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

◆ SHCreateWorkerWindowA()

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

Definition at line 2630 of file ordinal.c.

2632 {
2633  static const char szClass[] = "WorkerA";
2634  WNDCLASSA wc;
2635  HWND hWnd;
2636 
2637  TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
2638  wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2639 
2640  /* Create Window class */
2641  wc.style = 0;
2643  wc.cbClsExtra = 0;
2644  wc.cbWndExtra = sizeof(LONG_PTR);
2646  wc.hIcon = NULL;
2648  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
2649  wc.lpszMenuName = NULL;
2650  wc.lpszClassName = szClass;
2651 
2652  SHRegisterClassA(&wc);
2653 
2654  hWnd = CreateWindowExA(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
2655  hWndParent, hMenu, shlwapi_hInstance, 0);
2656  if (hWnd)
2657  {
2658  SetWindowLongPtrW(hWnd, 0, wnd_extra);
2660  }
2661 
2662  return hWnd;
2663 }
static LRESULT WINAPI wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: imm32.c:179
HWND hWnd
Definition: settings.c:17
int cbClsExtra
Definition: winuser.h:3140
LPCSTR lpszMenuName
Definition: winuser.h:3146
HBRUSH hbrBackground
Definition: winuser.h:3145
char * LPSTR
Definition: xmlstorage.h:182
int cbWndExtra
Definition: winuser.h:3141
HCURSOR hCursor
Definition: winuser.h:3144
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define COLOR_BTNFACE
Definition: winuser.h:918
DWORD WINAPI SHRegisterClassA(WNDCLASSA *wndclass)
Definition: ordinal.c:1810
#define SetWindowLongPtrA
Definition: winuser.h:5320
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPCSTR lpszClassName
Definition: winuser.h:3147
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2059
#define GWLP_WNDPROC
Definition: treelist.c:66
UINT style
Definition: winuser.h:3138
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static LONG_PTR
Definition: ordinal.c:60
HINSTANCE hInstance
Definition: winuser.h:3142
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
WNDPROC lpfnWndProc
Definition: winuser.h:3139
#define IDC_ARROW
Definition: winuser.h:682
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)
#define SetWindowLongPtrW
Definition: winuser.h:5321
HINSTANCE shlwapi_hInstance
Definition: shlwapi_main.c:33
HICON hIcon
Definition: winuser.h:3143

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

2920 {
2921  static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', 0 };
2922  WNDCLASSW wc;
2923  HWND hWnd;
2924 
2925  TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
2926  wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2927 
2928  /* If our OS is natively ANSI, use the ANSI version */
2929  if (GetVersion() & 0x80000000) /* not NT */
2930  {
2931  TRACE("fallback to ANSI, ver 0x%08x\n", GetVersion());
2932  return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2933  }
2934 
2935  /* Create Window class */
2936  wc.style = 0;
2938  wc.cbClsExtra = 0;
2939  wc.cbWndExtra = sizeof(LONG_PTR);
2941  wc.hIcon = NULL;
2943  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
2944  wc.lpszMenuName = NULL;
2945  wc.lpszClassName = szClass;
2946 
2947  SHRegisterClassW(&wc);
2948 
2949  hWnd = CreateWindowExW(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
2950  hWndParent, hMenu, shlwapi_hInstance, 0);
2951  if (hWnd)
2952  {
2953  SetWindowLongPtrW(hWnd, 0, wnd_extra);
2955  }
2956 
2957  return hWnd;
2958 }
DWORD WINAPI SHRegisterClassW(WNDCLASSW *lpWndClass)
Definition: ordinal.c:2510
UINT style
Definition: winuser.h:3151
LPCWSTR lpszMenuName
Definition: winuser.h:3159
HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2630
static LRESULT WINAPI wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: imm32.c:179
HWND hWnd
Definition: settings.c:17
int cbClsExtra
Definition: winuser.h:3153
DWORD WINAPI GetVersion(VOID)
Definition: version.c:22
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
WNDPROC lpfnWndProc
Definition: winuser.h:3152
smooth NULL
Definition: ftsmooth.c:416
LPCWSTR lpszClassName
Definition: winuser.h:3160
#define TRACE(s)
Definition: solgame.cpp:4
int cbWndExtra
Definition: winuser.h:3154
__wchar_t WCHAR
Definition: xmlstorage.h:180
HICON hIcon
Definition: winuser.h:3156
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
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)
#define COLOR_BTNFACE
Definition: winuser.h:918
#define GWLP_WNDPROC
Definition: treelist.c:66
HCURSOR hCursor
Definition: winuser.h:3157
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static LONG_PTR
Definition: ordinal.c:60
HBRUSH hbrBackground
Definition: winuser.h:3158
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HINSTANCE hInstance
Definition: winuser.h:3155
#define IDC_ARROW
Definition: winuser.h:682
#define SetWindowLongPtrW
Definition: winuser.h:5321
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HINSTANCE shlwapi_hInstance
Definition: shlwapi_main.c:33

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

◆ SHEnableMenuItem()

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

Definition at line 1774 of file ordinal.c.

1775 {
1776  TRACE("%p, %u, %d\n", hMenu, wItemID, bEnable);
1777  return EnableMenuItem(hMenu, wItemID, bEnable ? MF_ENABLED : MF_GRAYED);
1778 }
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define TRACE(s)
Definition: solgame.cpp:4
#define MF_ENABLED
Definition: winuser.h:128
_In_ BOOL bEnable
Definition: winddi.h:3426
#define MF_GRAYED
Definition: winuser.h:129

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

◆ SHExpandEnvironmentStringsA()

DWORD WINAPI SHExpandEnvironmentStringsA ( LPCSTR  ,
LPSTR  ,
DWORD   
)

◆ SHExpandEnvironmentStringsW()

DWORD WINAPI SHExpandEnvironmentStringsW ( LPCWSTR  ,
LPWSTR  ,
DWORD   
)

◆ SHFillRectClr()

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

Definition at line 2126 of file ordinal.c.

2127 {
2128  COLORREF cOldColor = SetBkColor(hDC, cRef);
2129  ExtTextOutA(hDC, 0, 0, ETO_OPAQUE, pRect, 0, 0, 0);
2130  SetBkColor(hDC, cOldColor);
2131  return 0;
2132 }
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:975
#define ETO_OPAQUE
Definition: wingdi.h:646
DWORD COLORREF
Definition: windef.h:300
static HDC hDC
Definition: 3dtext.c:33
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)

◆ SHFindDataBlock()

DATABLOCK_HEADER* WINAPI SHFindDataBlock ( LPDBLIST  lpList,
DWORD  dwSignature 
)

Definition at line 424 of file clist.c.

425 {
426  TRACE("(%p,%d)\n", lpList, dwSignature);
427 
428  if(lpList)
429  {
430  while(lpList->cbSize)
431  {
432  if(lpList->dwSignature == dwSignature)
433  return lpList; /* Matched */
434  else if(lpList->dwSignature == CLIST_ID_CONTAINER && lpList[1].dwSignature == dwSignature)
435  return lpList + 1; /* Contained item matches */
436 
437  lpList = NextItem(lpList);
438  }
439  }
440  return NULL;
441 }
#define CLIST_ID_CONTAINER
Definition: clist.c:35
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static LPDATABLOCK_HEADER NextItem(LPDBLIST lpList)
Definition: clist.c:42

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

◆ SHForwardContextMenuMsg()

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

Definition at line 11 of file rosordinal.c.

13 {
14  HRESULT hr;
15  IContextMenu3* pcmenu3;
16  IContextMenu2* pcmenu2;
17 
18  /* First try to use the IContextMenu3 interface */
19  hr = IUnknown_QueryInterface(pUnk, &IID_IContextMenu3, (void**)&pcmenu3);
20  if (SUCCEEDED(hr))
21  {
22  hr = IContextMenu3_HandleMenuMsg2(pcmenu3, uMsg, wParam, lParam, pResult);
23  IContextMenu3_Release(pcmenu3);
24  return hr;
25  }
26 
27  /* Return failure if we can't use the IContextMenu2 interface */
28  if(!useIContextMenu2)
29  return hr;
30 
31  /* Now try to use the IContextMenu2 interface */
32  hr = IUnknown_QueryInterface(pUnk, &IID_IContextMenu2, (void**)&pcmenu2);
33  if (FAILED(hr))
34  return hr;
35 
36  hr = IContextMenu2_HandleMenuMsg(pcmenu2, uMsg, wParam, lParam);
37  IContextMenu2_Release(pcmenu2);
38  return hr;
39 }
HRESULT hr
Definition: shlfolder.c:183
WPARAM wParam
Definition: combotst.c:138
LONG HRESULT
Definition: typedefs.h:78
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
LPARAM lParam
Definition: combotst.c:139
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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

◆ SHFreeDataBlockList()

VOID WINAPI SHFreeDataBlockList ( LPDBLIST  lpList)

Definition at line 331 of file clist.c.

332 {
333  TRACE("(%p)\n", lpList);
334 
335  if (lpList)
336  LocalFree(lpList);
337 }
#define TRACE(s)
Definition: solgame.cpp:4
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577

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

◆ SHGetCurColorRes()

DWORD WINAPI SHGetCurColorRes ( void  )

Definition at line 2016 of file ordinal.c.

2017 {
2018  HDC hdc;
2019  DWORD ret;
2020 
2021  TRACE("()\n");
2022 
2023  hdc = GetDC(0);
2025  ReleaseDC(0, hdc);
2026  return ret;
2027 }
#define BITSPIXEL
Definition: wingdi.h:719
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
HDC hdc
Definition: main.c:9
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define PLANES
Definition: wingdi.h:720

Referenced by CBrandBand::SelectImage().

◆ SHGetMenuFromID()

HMENU WINAPI SHGetMenuFromID ( HMENU  hMenu,
UINT  uID 
)

Definition at line 1990 of file ordinal.c.

1991 {
1992  MENUITEMINFOW mi;
1993 
1994  TRACE("(%p,%u)\n", hMenu, uID);
1995 
1996  mi.cbSize = sizeof(mi);
1997  mi.fMask = MIIM_SUBMENU;
1998 
1999  if (!GetMenuItemInfoW(hMenu, uID, FALSE, &mi))
2000  return NULL;
2001 
2002  return mi.hSubMenu;
2003 }
static MONITORINFO mi
Definition: win.c:7339
#define MIIM_SUBMENU
Definition: winuser.h:718
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
#define TRACE(s)
Definition: solgame.cpp:4
DWORD cbSize
Definition: winuser.h:3759

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

◆ SHGetPerScreenResName()

HRESULT WINAPI SHGetPerScreenResName ( OUT LPWSTR  lpResName,
IN INT  cchResName,
IN DWORD  dwReserved 
)

◆ SHInvokeDefaultCommand()

HRESULT WINAPI SHInvokeDefaultCommand ( HWND  ,
IShellFolder ,
LPCITEMIDLIST   
)

Definition at line 2974 of file ordinal.c.

2975 {
2976  TRACE("%p %p %p\n", hWnd, lpFolder, lpApidl);
2977  return SHInvokeCommand(hWnd, lpFolder, lpApidl, 0);
2978 }
HWND hWnd
Definition: settings.c:17
HRESULT WINAPI SHInvokeCommand(HWND, IShellFolder *, LPCITEMIDLIST, DWORD)
Definition: ordinal.c:3532
#define TRACE(s)
Definition: solgame.cpp:4

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

◆ SHIsChildOrSelf()

BOOL WINAPI SHIsChildOrSelf ( HWND  hParent,
HWND  hChild 
)

Definition at line 2247 of file ordinal.c.

2248 {
2249  TRACE("(%p,%p)\n", hParent, hChild);
2250 
2251  if (!hParent || !hChild)
2252  return TRUE;
2253  else if(hParent == hChild)
2254  return FALSE;
2255  return !IsChild(hParent, hChild);
2256 }
#define TRUE
Definition: types.h:120
static HTREEITEM hChild
Definition: treeview.c:381
#define TRACE(s)
Definition: solgame.cpp:4
const DOCKBAR PVOID HWND hParent
Definition: tooldock.h:22
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)

◆ SHIsEmptyStream()

BOOL WINAPI SHIsEmptyStream ( IStream )

Definition at line 567 of file istream.c.

568 {
569  STATSTG statstg;
570  BOOL bRet = TRUE;
571 
572  TRACE("(%p)\n", lpStream);
573 
574  memset(&statstg, 0, sizeof(statstg));
575 
576  if(SUCCEEDED(IStream_Stat(lpStream, &statstg, 1)))
577  {
578  if(statstg.cbSize.QuadPart)
579  bRet = FALSE; /* Non-Zero */
580  }
581  else
582  {
583  DWORD dwDummy;
584 
585  /* Try to read from the stream */
586  if(SUCCEEDED(SHIStream_Read(lpStream, &dwDummy, sizeof(dwDummy))))
587  {
589  zero.QuadPart = 0;
590 
591  IStream_Seek(lpStream, zero, 0, NULL);
592  bRet = FALSE; /* Non-Zero */
593  }
594  }
595  return bRet;
596 }
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
static double zero
Definition: j0_y0.c:96
#define memset(x, y, z)
Definition: compat.h:39
HRESULT WINAPI SHIStream_Read(IStream *lpStream, LPVOID lpvDest, ULONG ulSize)
Definition: istream.c:541
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ SHIsExpandableFolder()

HRESULT WINAPI SHIsExpandableFolder ( LPSHELLFOLDER  lpFolder,
LPCITEMIDLIST  pidl 
)

Definition at line 2081 of file ordinal.c.

2082 {
2083  HRESULT hRet = E_INVALIDARG;
2084  IQueryInfo *lpInfo;
2085 
2086  if (lpFolder && pidl)
2087  {
2088  hRet = IShellFolder_GetUIObjectOf(lpFolder, NULL, 1, &pidl, &IID_IQueryInfo,
2089  NULL, (void**)&lpInfo);
2090  if (FAILED(hRet))
2091  hRet = S_FALSE; /* Doesn't expose IQueryInfo */
2092  else
2093  {
2094  DWORD dwFlags = 0;
2095 
2096  /* MSDN states of IQueryInfo_GetInfoFlags() that "This method is not
2097  * currently used". Really? You wouldn't be holding out on me would you?
2098  */
2099  hRet = IQueryInfo_GetInfoFlags(lpInfo, &dwFlags);
2100 
2101  if (SUCCEEDED(hRet))
2102  {
2103  /* 0x2 is an undocumented flag apparently indicating expandability */
2104  hRet = dwFlags & 0x2 ? S_OK : S_FALSE;
2105  }
2106 
2107  IQueryInfo_Release(lpInfo);
2108  }
2109  }
2110  return hRet;
2111 }
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IQueryInfo_Release(p)
Definition: shlobj.h:613
#define IQueryInfo_GetInfoFlags(p, a)
Definition: shlobj.h:616
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ SHIsSameObject()

BOOL WINAPI SHIsSameObject ( IUnknown lpInt1,
IUnknown lpInt2 
)

Definition at line 1282 of file ordinal.c.

1283 {
1284  IUnknown *lpUnknown1, *lpUnknown2;
1285  BOOL ret;
1286 
1287  TRACE("(%p %p)\n", lpInt1, lpInt2);
1288 
1289  if (!lpInt1 || !lpInt2)
1290  return FALSE;
1291 
1292  if (lpInt1 == lpInt2)
1293  return TRUE;
1294 
1295  if (IUnknown_QueryInterface(lpInt1, &IID_IUnknown, (void**)&lpUnknown1) != S_OK)
1296  return FALSE;
1297 
1298  if (IUnknown_QueryInterface(lpInt2, &IID_IUnknown, (void**)&lpUnknown2) != S_OK)
1299  {
1300  IUnknown_Release(lpUnknown1);
1301  return FALSE;
1302  }
1303 
1304  ret = lpUnknown1 == lpUnknown2;
1305 
1306  IUnknown_Release(lpUnknown1);
1307  IUnknown_Release(lpUnknown2);
1308 
1309  return ret;
1310 }
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
int ret
#define S_OK
Definition: intsafe.h:59

◆ SHLoadMenuPopup()

BOOL WINAPI SHLoadMenuPopup ( HINSTANCE  hInst,
LPCWSTR  szName 
)

Definition at line 1659 of file ordinal.c.

1660 {
1661  HMENU hMenu;
1662 
1663  TRACE("%p %s\n", hInst, debugstr_w(szName));
1664 
1665  if ((hMenu = LoadMenuW(hInst, szName)))
1666  {
1667  if (GetSubMenu(hMenu, 0))
1668  RemoveMenu(hMenu, 0, MF_BYPOSITION);
1669 
1670  DestroyMenu(hMenu);
1671  return TRUE;
1672  }
1673  return FALSE;
1674 }
#define TRUE
Definition: types.h:120
#define MF_BYPOSITION
Definition: winuser.h:203
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
BOOL WINAPI DestroyMenu(_In_ HMENU)
HINSTANCE hInst
Definition: dxdiag.c:13
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
static const WCHAR szName[]
Definition: msipriv.h:1194
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

◆ SHLockSharedEx()

◆ SHPropagateMessage()

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

Definition at line 1712 of file ordinal.c.

1713 {
1714  enumWndData data;
1715 
1716  TRACE("(%p,%u,%ld,%ld,%d)\n", hWnd, uiMsgId, wParam, lParam, bSend);
1717 
1718  if(hWnd)
1719  {
1720  data.uiMsgId = uiMsgId;
1721  data.wParam = wParam;
1722  data.lParam = lParam;
1723 
1724  if (bSend)
1725  data.pfnPost = IsWindowUnicode(hWnd) ? (void*)SendMessageW : (void*)SendMessageA;
1726  else
1727  data.pfnPost = IsWindowUnicode(hWnd) ? (void*)PostMessageW : (void*)PostMessageA;
1728 
1730  }
1731 }
BOOL WINAPI EnumChildWindows(_In_opt_ HWND, _In_ WNDENUMPROC, _In_ LPARAM)
static BOOL CALLBACK SHLWAPI_EnumChildProc(HWND hWnd, LPARAM lParam)
Definition: ordinal.c:1685
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND hWnd
Definition: settings.c:17
WPARAM wParam
Definition: combotst.c:138
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI IsWindowUnicode(_In_ HWND)
#define TRACE(s)
Definition: solgame.cpp:4
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPARAM lParam
Definition: combotst.c:139

Referenced by CShellBrowser::OnSettingChange().

◆ SHPropertyBag_ReadPOINTL()

HRESULT WINAPI SHPropertyBag_ReadPOINTL ( IPropertyBag ,
LPCWSTR  ,
POINTL  
)

◆ SHPropertyBag_ReadStream()

HRESULT WINAPI SHPropertyBag_ReadStream ( IPropertyBag ,
LPCWSTR  ,
IStream **   
)

◆ SHReadDataBlockList()

HRESULT WINAPI SHReadDataBlockList ( IStream lpStream,
LPDBLIST lppList 
)

Definition at line 235 of file clist.c.

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

Referenced by CShellLink::Load().

◆ SHRegGetCLSIDKeyW()

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

Definition at line 2422 of file reg.c.

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

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

◆ SHRegisterClassA()

DWORD WINAPI SHRegisterClassA ( WNDCLASSA wndclass)

Definition at line 1810 of file ordinal.c.

1811 {
1812  WNDCLASSA wca;
1813  if (GetClassInfoA(wndclass->hInstance, wndclass->lpszClassName, &wca))
1814  return TRUE;
1815  return (DWORD)RegisterClassA(wndclass);
1816 }
#define TRUE
Definition: types.h:120
BOOL WINAPI GetClassInfoA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSA)
unsigned long DWORD
Definition: ntddk_ex.h:95
LPCSTR lpszClassName
Definition: winuser.h:3147
HINSTANCE hInstance
Definition: winuser.h:3142
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)

Referenced by SHCreateWorkerWindowA().

◆ SHRemoveAllSubMenus()

DWORD WINAPI SHRemoveAllSubMenus ( HMENU  hMenu)

Definition at line 1745 of file ordinal.c.

1746 {
1747  int iItemCount = GetMenuItemCount(hMenu) - 1;
1748 
1749  TRACE("%p\n", hMenu);
1750 
1751  while (iItemCount >= 0)
1752  {
1753  HMENU hSubMenu = GetSubMenu(hMenu, iItemCount);
1754  if (hSubMenu)
1755  RemoveMenu(hMenu, iItemCount, MF_BYPOSITION);
1756  iItemCount--;
1757  }
1758  return iItemCount;
1759 }
#define MF_BYPOSITION
Definition: winuser.h:203
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
#define TRACE(s)
Definition: solgame.cpp:4
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

◆ SHRemoveDataBlock()

BOOL WINAPI SHRemoveDataBlock ( LPDBLIST lppList,
DWORD  dwSignature 
)

Definition at line 355 of file clist.c.

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

Referenced by CShellLink::RemoveDataBlock().

◆ SHSearchMapInt()

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

Definition at line 2154 of file ordinal.c.

2155 {
2156  if (lpKeys && lpValues)
2157  {
2158  int i = 0;
2159 
2160  while (i < iLen)
2161  {
2162  if (lpKeys[i] == iKey)
2163  return lpValues[i]; /* Found */
2164  i++;
2165  }
2166  }
2167  return -1; /* Not found */
2168 }
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

Referenced by init_pointers().

◆ SHSetParentHwnd()

HWND WINAPI SHSetParentHwnd ( HWND  hWnd,
HWND  hWndParent 
)

Definition at line 1151 of file ordinal.c.

1152 {
1153  TRACE("%p, %p\n", hWnd, hWndParent);
1154 
1155  if(GetParent(hWnd) == hWndParent)
1156  return NULL;
1157 
1158  if(hWndParent)
1160  else
1162 
1163  return hWndParent ? SetParent(hWnd, hWndParent) : NULL;
1164 }
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
HWND hWnd
Definition: settings.c:17
#define WS_CHILD
Definition: pedump.c:617
LONG WINAPI SHSetWindowBits(HWND hwnd, INT offset, UINT mask, UINT flags)
Definition: ordinal.c:1123
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GWL_STYLE
Definition: winuser.h:846
HWND WINAPI GetParent(_In_ HWND)
#define WS_POPUP
Definition: pedump.c:616

Referenced by init_pointers().

◆ SHSetWindowBits()

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

Definition at line 1123 of file ordinal.c.

1124 {
1126  LONG new_flags = (flags & mask) | (ret & ~mask);
1127 
1128  TRACE("%p %d %x %x\n", hwnd, offset, mask, flags);
1129 
1130  if (new_flags != ret)
1131  ret = SetWindowLongW(hwnd, offset, new_flags);
1132  return ret;
1133 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
GLintptr offset
Definition: glext.h:5920
GLenum GLint GLuint mask
Definition: glext.h:6028
long LONG
Definition: pedump.c:60
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
int ret

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

◆ SHSimulateDrop()

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

Definition at line 1821 of file ordinal.c.

1823 {
1824  DWORD dwEffect = DROPEFFECT_LINK | DROPEFFECT_MOVE | DROPEFFECT_COPY;
1825  POINTL pt = { 0, 0 };
1826 
1827  TRACE("%p %p 0x%08x %p %p\n", pDrop, pDataObj, grfKeyState, lpPt, pdwEffect);
1828 
1829  if (!lpPt)
1830  lpPt = &pt;
1831 
1832  if (!pdwEffect)
1833  pdwEffect = &dwEffect;
1834 
1835  IDropTarget_DragEnter(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
1836 
1837  if (*pdwEffect != DROPEFFECT_NONE)
1838  return IDropTarget_Drop(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
1839 
1840  IDropTarget_DragLeave(pDrop);
1841  return TRUE;
1842 }
#define TRUE
Definition: types.h:120
#define pt(x, y)
Definition: drawing.c:79
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95

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

◆ SHUnicodeToAnsi()

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

Definition at line 2749 of file string.c.

2750 {
2751  return SHUnicodeToAnsiCP(CP_ACP, lpSrcStr, lpDstStr, iLen);
2752 }
#define CP_ACP
Definition: compat.h:99
DWORD WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr, int dstlen)
Definition: string.c:2650

Referenced by CheckEscapesA(), DoesStringRoundTripW(), CDefaultContextMenu::GetCommandString(), and MakeShellURLFromPathA().

◆ SHWaitForSendMessageThread()

DWORD WINAPI SHWaitForSendMessageThread ( HANDLE  hand,
DWORD  dwTimeout 
)

Definition at line 2043 of file ordinal.c.

2044 {
2045  DWORD dwEndTicks = GetTickCount() + dwTimeout;
2046  DWORD dwRet;
2047 
2048  while ((dwRet = MsgWaitForMultipleObjectsEx(1, &hand, dwTimeout, QS_SENDMESSAGE, 0)) == 1)
2049  {
2050  MSG msg;
2051 
2052  PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE);
2053 
2054  if (dwTimeout != INFINITE)
2055  {
2056  if ((int)(dwTimeout = dwEndTicks - GetTickCount()) <= 0)
2057  return WAIT_TIMEOUT;
2058  }
2059  }
2060 
2061  return dwRet;
2062 }
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
#define PM_NOREMOVE
Definition: winuser.h:1181
DWORD WINAPI MsgWaitForMultipleObjectsEx(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask, _In_ DWORD dwFlags)
smooth NULL
Definition: ftsmooth.c:416
#define QS_SENDMESSAGE
Definition: winuser.h:892
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WAIT_TIMEOUT
Definition: dderror.h:14
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6077
#define msg(x)
Definition: auth_time.c:54
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define INFINITE
Definition: serial.h:102

◆ SHWriteDataBlockList()

HRESULT WINAPI SHWriteDataBlockList ( IStream lpStream,
LPDBLIST  lpList 
)

Definition at line 179 of file clist.c.

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

Referenced by CShellLink::Save().