ReactOS  0.4.13-dev-247-g0f29b3f
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)
 
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)
 

Macro Definition Documentation

◆ SHCreateWorkerWindow

#define SHCreateWorkerWindow   SHCreateWorkerWindowA

Definition at line 103 of file shlwapi_undoc.h.

◆ SHExpandEnvironmentStrings

#define SHExpandEnvironmentStrings   SHExpandEnvironmentStringsA

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

1143 {
1144  HRESULT hRet;
1145  IConnectionPointContainer* lpContainer;
1146  IConnectionPoint *lpCP;
1147 
1148  if(!lpUnknown || (fConnect && !lpUnkSink))
1149  return E_FAIL;
1150 
1151  if(lppCP)
1152  *lppCP = NULL;
1153 
1154  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IConnectionPointContainer,
1155  (void**)&lpContainer);
1156  if (SUCCEEDED(hRet))
1157  {
1158  hRet = IConnectionPointContainer_FindConnectionPoint(lpContainer, riid, &lpCP);
1159 
1160  if (SUCCEEDED(hRet))
1161  {
1162  if(!fConnect)
1163  hRet = IConnectionPoint_Unadvise(lpCP, *lpCookie);
1164  else
1165  hRet = IConnectionPoint_Advise(lpCP, lpUnkSink, lpCookie);
1166 
1167  if (FAILED(hRet))
1168  *lpCookie = 0;
1169 
1170  if (lppCP && SUCCEEDED(hRet))
1171  *lppCP = lpCP; /* Caller keeps the interface */
1172  else
1173  IConnectionPoint_Release(lpCP); /* Release it */
1174  }
1175 
1176  IConnectionPointContainer_Release(lpContainer);
1177  }
1178  return hRet;
1179 }
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:77
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by init_pointers().

◆ IsQSForward()

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

Definition at line 2182 of file ordinal.c.

2183 {
2184  FIXME("(%p,%d,%p) - stub!\n", pguidCmdGroup, cCmds, prgCmds);
2185  return DRAGDROP_E_NOTREGISTERED;
2186 }
#define DRAGDROP_E_NOTREGISTERED
Definition: winerror.h:2652
#define FIXME(fmt,...)
Definition: debug.h:110

◆ IUnknown_Exec()

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

Definition at line 1034 of file ordinal.c.

1037 {
1038  HRESULT hRet = E_FAIL;
1039 
1040  TRACE("(%p,%p,%d,%d,%p,%p)\n",lpUnknown, pguidCmdGroup, nCmdID,
1041  nCmdexecopt, pvaIn, pvaOut);
1042 
1043  if (lpUnknown)
1044  {
1045  IOleCommandTarget* lpOle;
1046 
1047  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleCommandTarget,
1048  (void**)&lpOle);
1049  if (SUCCEEDED(hRet) && lpOle)
1050  {
1051  hRet = IOleCommandTarget_Exec(lpOle, pguidCmdGroup, nCmdID,
1052  nCmdexecopt, pvaIn, pvaOut);
1053  IOleCommandTarget_Release(lpOle);
1054  }
1055  }
1056  return hRet;
1057 }
#define E_FAIL
Definition: ddrawi.h:102
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#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 1404 of file ordinal.c.

1405 {
1406  IPersist *persist;
1407  HRESULT hr;
1408 
1409  TRACE("(%p, %p)\n", lpUnknown, clsid);
1410 
1411  if (!lpUnknown)
1412  {
1413  memset(clsid, 0, sizeof(*clsid));
1414  return E_FAIL;
1415  }
1416 
1417  hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersist, (void**)&persist);
1418  if (hr != S_OK)
1419  {
1420  hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersistFolder, (void**)&persist);
1421  if (hr != S_OK)
1422  return hr;
1423  }
1424 
1425  hr = IPersist_GetClassID(persist, clsid);
1426  IPersist_Release(persist);
1427  return hr;
1428 }
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:77
REFCLSID clsid
Definition: msctf.c:84
#define S_OK
Definition: intsafe.h:59
#define memset(x, y, z)
Definition: compat.h:39

Referenced by init_pointers(), and SHSkipJunction().

◆ IUnknown_HandleIRestrict()

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

Definition at line 1900 of file ordinal.c.

1902 {
1903  /* FIXME: {D12F26B2-D90A-11D0-830D-00AA005B4383} - What object does this represent? */
1904  static const DWORD service_id[] = { 0xd12f26b2, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
1905  /* FIXME: {D12F26B1-D90A-11D0-830D-00AA005B4383} - Also Unknown/undocumented */
1906  static const DWORD function_id[] = { 0xd12f26b1, 0x11d0d90a, 0xaa000d83, 0x83435b00 };
1907  HRESULT hRet = E_INVALIDARG;
1908  LPUNKNOWN lpUnkInner = NULL; /* FIXME: Real type is unknown */
1909 
1910  TRACE("(%p,%p,%p,%p,%p)\n", lpUnknown, lpArg1, lpArg2, lpArg3, lpArg4);
1911 
1912  if (lpUnknown && lpArg4)
1913  {
1914  hRet = IUnknown_QueryService(lpUnknown, (REFGUID)service_id,
1915  (REFGUID)function_id, (void**)&lpUnkInner);
1916 
1917  if (SUCCEEDED(hRet) && lpUnkInner)
1918  {
1919  /* FIXME: The type of service object requested is unknown, however
1920  * testing shows that its first method is called with 4 parameters.
1921  * Fake this by using IParseDisplayName_ParseDisplayName since the
1922  * signature and position in the vtable matches our unknown object type.
1923  */
1924  hRet = IParseDisplayName_ParseDisplayName((LPPARSEDISPLAYNAME)lpUnkInner,
1925  lpArg1, lpArg2, lpArg3, lpArg4);
1926  IUnknown_Release(lpUnkInner);
1927  }
1928  }
1929  return hRet;
1930 }
Definition: scsiwmi.h:51
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
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:77
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 4136 of file ordinal.c.

4137 {
4138  IInputObject* lpInput = NULL;
4139  HRESULT hRet = E_INVALIDARG;
4140 
4141  TRACE("(%p)\n", lpUnknown);
4142  if (lpUnknown)
4143  {
4144  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObject,
4145  (void**)&lpInput);
4146  if (SUCCEEDED(hRet) && lpInput)
4147  {
4148  hRet = IInputObject_HasFocusIO(lpInput);
4149  IInputObject_Release(lpInput);
4150  }
4151  }
4152  return hRet;
4153 }
#define IInputObject_Release(p)
Definition: shlobj.h:629
#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:632
LONG HRESULT
Definition: typedefs.h:77
#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 4594 of file ordinal.c.

4595 {
4596  IInputObjectSite *pIOS = NULL;
4597  HRESULT hRet = E_INVALIDARG;
4598 
4599  TRACE("(%p, %p, %s)\n", lpUnknown, pFocusObject, bFocus ? "TRUE" : "FALSE");
4600 
4601  if (lpUnknown)
4602  {
4603  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInputObjectSite,
4604  (void **)&pIOS);
4605  if (SUCCEEDED(hRet) && pIOS)
4606  {
4607  hRet = IInputObjectSite_OnFocusChangeIS(pIOS, pFocusObject, bFocus);
4609  }
4610  }
4611  return hRet;
4612 }
#define IInputObjectSite_Release(p)
Definition: shlobj.h:653
#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:77
#define IInputObjectSite_OnFocusChangeIS(p, a, b)
Definition: shlobj.h:655
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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

◆ IUnknown_OnFocusOCS()

HRESULT WINAPI IUnknown_OnFocusOCS ( IUnknown lpUnknown,
BOOL  fGotFocus 
)

Definition at line 1878 of file ordinal.c.

1879 {
1880  IOleControlSite* lpCSite = NULL;
1881  HRESULT hRet = E_FAIL;
1882 
1883  TRACE("(%p, %d)\n", lpUnknown, fGotFocus);
1884  if (lpUnknown)
1885  {
1886  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
1887  (void**)&lpCSite);
1888  if (SUCCEEDED(hRet) && lpCSite)
1889  {
1890  hRet = IOleControlSite_OnFocus(lpCSite, fGotFocus);
1891  IOleControlSite_Release(lpCSite);
1892  }
1893  }
1894  return hRet;
1895 }
#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:77
#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 1500 of file ordinal.c.

1502 {
1504  HRESULT hr;
1505 
1506  TRACE("%p %s %s %d %08x %p %p\n", lpUnknown, debugstr_guid(service),
1507  debugstr_guid(group), cmdId, cmdOpt, pIn, pOut);
1508 
1509  hr = IUnknown_QueryService(lpUnknown, service, &IID_IOleCommandTarget, (void**)&target);
1510  if (hr == S_OK)
1511  {
1512  hr = IOleCommandTarget_Exec(target, group, cmdId, cmdOpt, pIn, pOut);
1513  IOleCommandTarget_Release(target);
1514  }
1515 
1516  TRACE("<-- hr=0x%08x\n", hr);
1517 
1518  return hr;
1519 }
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
#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:77
#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 995 of file ordinal.c.

997 {
998  HRESULT hRet = E_FAIL;
999 
1000  TRACE("(%p,%p,%d,%p,%p)\n",lpUnknown, pguidCmdGroup, cCmds, prgCmds, pCmdText);
1001 
1002  if (lpUnknown)
1003  {
1004  IOleCommandTarget* lpOle;
1005 
1006  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleCommandTarget,
1007  (void**)&lpOle);
1008 
1009  if (SUCCEEDED(hRet) && lpOle)
1010  {
1011  hRet = IOleCommandTarget_QueryStatus(lpOle, pguidCmdGroup, cCmds,
1012  prgCmds, pCmdText);
1013  IOleCommandTarget_Release(lpOle);
1014  }
1015  }
1016  return hRet;
1017 }
#define E_FAIL
Definition: ddrawi.h:102
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#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 2137 of file ordinal.c.

2138 {
2139  TRACE("(%p,%p)\n", lppDest, lpUnknown);
2140 
2141  IUnknown_AtomicRelease(lppDest);
2142 
2143  if (lpUnknown)
2144  {
2145  IUnknown_AddRef(lpUnknown);
2146  *lppDest = lpUnknown;
2147  }
2148 }
#define TRACE(s)
Definition: solgame.cpp:4
void WINAPI IUnknown_AtomicRelease(IUnknown **lpUnknown)
Definition: ordinal.c:1192

◆ IUnknown_SetOwner()

HRESULT WINAPI IUnknown_SetOwner ( IUnknown iface,
IUnknown pUnk 
)

Definition at line 1332 of file ordinal.c.

1333 {
1334  IShellService *service;
1335  HRESULT hr;
1336 
1337  TRACE("(%p, %p)\n", iface, pUnk);
1338 
1339  if (!iface) return E_FAIL;
1340 
1341  hr = IUnknown_QueryInterface(iface, &IID_IShellService, (void**)&service);
1342  if (hr == S_OK)
1343  {
1344  hr = IShellService_SetOwner(service, pUnk);
1345  IShellService_Release(service);
1346  }
1347 
1348  return hr;
1349 }
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:77
#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 1845 of file ordinal.c.

1846 {
1847  IOleControlSite* lpCSite = NULL;
1848  HRESULT hRet = E_INVALIDARG;
1849 
1850  TRACE("(%p,%p,0x%08x)\n", lpUnknown, lpMsg, dwModifiers);
1851  if (lpUnknown)
1852  {
1853  hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
1854  (void**)&lpCSite);
1855  if (SUCCEEDED(hRet) && lpCSite)
1856  {
1857  hRet = IOleControlSite_TranslateAccelerator(lpCSite, lpMsg, dwModifiers);
1858  IOleControlSite_Release(lpCSite);
1859  }
1860  }
1861  return hRet;
1862 }
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:77
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ IUnknown_UIActivateIO()

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

Definition at line 1580 of file ordinal.c.

1581 {
1582  IInputObject* object = NULL;
1583  HRESULT ret;
1584 
1585  if (!unknown)
1586  return E_FAIL;
1587 
1588  /* Get an IInputObject interface from the object */
1589  ret = IUnknown_QueryInterface(unknown, &IID_IInputObject, (LPVOID*) &object);
1590 
1591  if (ret == S_OK)
1592  {
1593  ret = IInputObject_UIActivateIO(object, activate, msg);
1594  IInputObject_Release(object);
1595  }
1596 
1597  return ret;
1598 }
#define E_FAIL
Definition: ddrawi.h:102
#define IInputObject_UIActivateIO(p, a, b)
Definition: shlobj.h:631
#define IInputObject_Release(p)
Definition: shlobj.h:629
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
Definition: id3.c:18
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 2169 of file ordinal.c.

2172 {
2173  FIXME("(%p,%d,%p,%d,%d,%p,%p) - stub!\n", lpUnknown, iUnk, pguidCmdGroup,
2174  nCmdID, nCmdexecopt, pvaIn, pvaOut);
2175  return DRAGDROP_E_NOTREGISTERED;
2176 }
#define DRAGDROP_E_NOTREGISTERED
Definition: winerror.h:2652
#define FIXME(fmt,...)
Definition: debug.h:110

◆ MayQSForward()

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

Definition at line 2154 of file ordinal.c.

2157 {
2158  FIXME("(%p,%p,%p,%d,%p,%p) - stub\n",
2159  lpUnknown, lpReserved, riidCmdGrp, cCmds, prgCmds, pCmdText);
2160 
2161  /* FIXME: Calls IsQSForward & IUnknown_QueryStatus */
2162  return DRAGDROP_E_NOTREGISTERED;
2163 }
#define DRAGDROP_E_NOTREGISTERED
Definition: winerror.h:2652
#define FIXME(fmt,...)
Definition: debug.h:110

◆ SHAboutInfoA()

BOOL WINAPI SHAboutInfoA ( LPSTR  lpszDest,
DWORD  dwDestLen 
)

Definition at line 862 of file ordinal.c.

863 {
864  WCHAR buff[2084];
865 
866  TRACE("(%p,%d)\n", lpszDest, dwDestLen);
867 
868  if (lpszDest && SHAboutInfoW(buff, dwDestLen))
869  {
870  WideCharToMultiByte(CP_ACP, 0, buff, -1, lpszDest, dwDestLen, NULL, NULL);
871  return TRUE;
872  }
873  return FALSE;
874 }
#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:881
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 881 of file ordinal.c.

882 {
883  static const WCHAR szIEKey[] = { 'S','O','F','T','W','A','R','E','\\',
884  'M','i','c','r','o','s','o','f','t','\\','I','n','t','e','r','n','e','t',
885  ' ','E','x','p','l','o','r','e','r','\0' };
886  static const WCHAR szWinNtKey[] = { 'S','O','F','T','W','A','R','E','\\',
887  'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',' ',
888  'N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0' };
889  static const WCHAR szWinKey[] = { 'S','O','F','T','W','A','R','E','\\',
890  'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
891  'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0' };
892  static const WCHAR szRegKey[] = { 'S','O','F','T','W','A','R','E','\\',
893  'M','i','c','r','o','s','o','f','t','\\','I','n','t','e','r','n','e','t',
894  ' ','E','x','p','l','o','r','e','r','\\',
895  'R','e','g','i','s','t','r','a','t','i','o','n','\0' };
896  static const WCHAR szVersion[] = { 'V','e','r','s','i','o','n','\0' };
897  static const WCHAR szCustomized[] = { 'C','u','s','t','o','m','i','z','e','d',
898  'V','e','r','s','i','o','n','\0' };
899  static const WCHAR szOwner[] = { 'R','e','g','i','s','t','e','r','e','d',
900  'O','w','n','e','r','\0' };
901  static const WCHAR szOrg[] = { 'R','e','g','i','s','t','e','r','e','d',
902  'O','r','g','a','n','i','z','a','t','i','o','n','\0' };
903  static const WCHAR szProduct[] = { 'P','r','o','d','u','c','t','I','d','\0' };
904  static const WCHAR szUpdate[] = { 'I','E','A','K',
905  'U','p','d','a','t','e','U','r','l','\0' };
906  static const WCHAR szHelp[] = { 'I','E','A','K',
907  'H','e','l','p','S','t','r','i','n','g','\0' };
908  WCHAR buff[2084];
909  HKEY hReg;
910  DWORD dwType, dwLen;
911 
912  TRACE("(%p,%d)\n", lpszDest, dwDestLen);
913 
914  if (!lpszDest)
915  return FALSE;
916 
917  *lpszDest = '\0';
918 
919  /* Try the NT key first, followed by 95/98 key */
920  if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szWinNtKey, 0, KEY_READ, &hReg) &&
921  RegOpenKeyExW(HKEY_LOCAL_MACHINE, szWinKey, 0, KEY_READ, &hReg))
922  return FALSE;
923 
924  /* OS Version */
925  buff[0] = '\0';
926  dwLen = 30;
927  if (!SHGetValueW(HKEY_LOCAL_MACHINE, szIEKey, szVersion, &dwType, buff, &dwLen))
928  {
929  DWORD dwStrLen = strlenW(buff);
930  dwLen = 30 - dwStrLen;
932  szCustomized, &dwType, buff+dwStrLen, &dwLen);
933  }
934  StrCatBuffW(lpszDest, buff, dwDestLen);
935 
936  /* ~Registered Owner */
937  buff[0] = '~';
938  dwLen = 256;
939  if (SHGetValueW(hReg, szOwner, 0, &dwType, buff+1, &dwLen))
940  buff[1] = '\0';
941  StrCatBuffW(lpszDest, buff, dwDestLen);
942 
943  /* ~Registered Organization */
944  dwLen = 256;
945  if (SHGetValueW(hReg, szOrg, 0, &dwType, buff+1, &dwLen))
946  buff[1] = '\0';
947  StrCatBuffW(lpszDest, buff, dwDestLen);
948 
949  /* FIXME: Not sure where this number comes from */
950  buff[0] = '~';
951  buff[1] = '0';
952  buff[2] = '\0';
953  StrCatBuffW(lpszDest, buff, dwDestLen);
954 
955  /* ~Product Id */
956  dwLen = 256;
957  if (SHGetValueW(HKEY_LOCAL_MACHINE, szRegKey, szProduct, &dwType, buff+1, &dwLen))
958  buff[1] = '\0';
959  StrCatBuffW(lpszDest, buff, dwDestLen);
960 
961  /* ~IE Update Url */
962  dwLen = 2048;
963  if(SHGetValueW(HKEY_LOCAL_MACHINE, szWinKey, szUpdate, &dwType, buff+1, &dwLen))
964  buff[1] = '\0';
965  StrCatBuffW(lpszDest, buff, dwDestLen);
966 
967  /* ~IE Help String */
968  dwLen = 256;
969  if(SHGetValueW(hReg, szHelp, 0, &dwType, buff+1, &dwLen))
970  buff[1] = '\0';
971  StrCatBuffW(lpszDest, buff, dwDestLen);
972 
973  RegCloseKey(hReg);
974  return TRUE;
975 }
#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:3381
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().

◆ SHCheckMenuItem()

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

Definition at line 1747 of file ordinal.c.

1748 {
1749  TRACE("%p, %u, %d\n", hMenu, uID, bCheck);
1750  return CheckMenuItem(hMenu, uID, bCheck ? MF_CHECKED : MF_UNCHECKED);
1751 }
#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 2584 of file ordinal.c.

2586 {
2587  static const char szClass[] = "WorkerA";
2588  WNDCLASSA wc;
2589  HWND hWnd;
2590 
2591  TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
2592  wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2593 
2594  /* Create Window class */
2595  wc.style = 0;
2597  wc.cbClsExtra = 0;
2598  wc.cbWndExtra = sizeof(LONG_PTR);
2600  wc.hIcon = NULL;
2602  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
2603  wc.lpszMenuName = NULL;
2604  wc.lpszClassName = szClass;
2605 
2606  SHRegisterClassA(&wc);
2607 
2608  hWnd = CreateWindowExA(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
2609  hWndParent, hMenu, shlwapi_hInstance, 0);
2610  if (hWnd)
2611  {
2612  SetWindowLongPtrW(hWnd, 0, wnd_extra);
2614  }
2615 
2616  return hWnd;
2617 }
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:3118
LPCSTR lpszMenuName
Definition: winuser.h:3124
HBRUSH hbrBackground
Definition: winuser.h:3123
char * LPSTR
Definition: xmlstorage.h:182
int cbWndExtra
Definition: winuser.h:3119
HCURSOR hCursor
Definition: winuser.h:3122
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:1764
#define SetWindowLongPtrA
Definition: winuser.h:5214
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPCSTR lpszClassName
Definition: winuser.h:3125
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2059
#define GWLP_WNDPROC
Definition: treelist.c:66
UINT style
Definition: winuser.h:3116
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:3120
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
WNDPROC lpfnWndProc
Definition: winuser.h:3117
#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:5215
HINSTANCE shlwapi_hInstance
Definition: shlwapi_main.c:33
HICON hIcon
Definition: winuser.h:3121

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

2874 {
2875  static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', 0 };
2876  WNDCLASSW wc;
2877  HWND hWnd;
2878 
2879  TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
2880  wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2881 
2882  /* If our OS is natively ANSI, use the ANSI version */
2883  if (GetVersion() & 0x80000000) /* not NT */
2884  {
2885  TRACE("fallback to ANSI, ver 0x%08x\n", GetVersion());
2886  return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
2887  }
2888 
2889  /* Create Window class */
2890  wc.style = 0;
2892  wc.cbClsExtra = 0;
2893  wc.cbWndExtra = sizeof(LONG_PTR);
2895  wc.hIcon = NULL;
2897  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
2898  wc.lpszMenuName = NULL;
2899  wc.lpszClassName = szClass;
2900 
2901  SHRegisterClassW(&wc);
2902 
2903  hWnd = CreateWindowExW(dwExStyle, szClass, 0, dwStyle, 0, 0, 0, 0,
2904  hWndParent, hMenu, shlwapi_hInstance, 0);
2905  if (hWnd)
2906  {
2907  SetWindowLongPtrW(hWnd, 0, wnd_extra);
2909  }
2910 
2911  return hWnd;
2912 }
DWORD WINAPI SHRegisterClassW(WNDCLASSW *lpWndClass)
Definition: ordinal.c:2464
UINT style
Definition: winuser.h:3129
LPCWSTR lpszMenuName
Definition: winuser.h:3137
HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2584
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:3131
DWORD WINAPI GetVersion(VOID)
Definition: version.c:22
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
WNDPROC lpfnWndProc
Definition: winuser.h:3130
smooth NULL
Definition: ftsmooth.c:416
LPCWSTR lpszClassName
Definition: winuser.h:3138
#define TRACE(s)
Definition: solgame.cpp:4
int cbWndExtra
Definition: winuser.h:3132
__wchar_t WCHAR
Definition: xmlstorage.h:180
HICON hIcon
Definition: winuser.h:3134
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:3135
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:3136
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HINSTANCE hInstance
Definition: winuser.h:3133
#define IDC_ARROW
Definition: winuser.h:682
#define SetWindowLongPtrW
Definition: winuser.h:5215
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 1728 of file ordinal.c.

1729 {
1730  TRACE("%p, %u, %d\n", hMenu, wItemID, bEnable);
1731  return EnableMenuItem(hMenu, wItemID, bEnable ? MF_ENABLED : MF_GRAYED);
1732 }
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 2080 of file ordinal.c.

2081 {
2082  COLORREF cOldColor = SetBkColor(hDC, cRef);
2083  ExtTextOutA(hDC, 0, 0, ETO_OPAQUE, pRect, 0, 0, 0);
2084  SetBkColor(hDC, cOldColor);
2085  return 0;
2086 }
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:975
#define ETO_OPAQUE
Definition: wingdi.h:646
DWORD COLORREF
Definition: windef.h:285
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:77
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 1970 of file ordinal.c.

1971 {
1972  HDC hdc;
1973  DWORD ret;
1974 
1975  TRACE("()\n");
1976 
1977  hdc = GetDC(0);
1979  ReleaseDC(0, hdc);
1980  return ret;
1981 }
#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 1944 of file ordinal.c.

1945 {
1946  MENUITEMINFOW mi;
1947 
1948  TRACE("(%p,%u)\n", hMenu, uID);
1949 
1950  mi.cbSize = sizeof(mi);
1951  mi.fMask = MIIM_SUBMENU;
1952 
1953  if (!GetMenuItemInfoW(hMenu, uID, FALSE, &mi))
1954  return NULL;
1955 
1956  return mi.hSubMenu;
1957 }
static MONITORINFO mi
Definition: win.c:7331
#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:3726

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

2929 {
2930  TRACE("%p %p %p\n", hWnd, lpFolder, lpApidl);
2931  return SHInvokeCommand(hWnd, lpFolder, lpApidl, 0);
2932 }
HWND hWnd
Definition: settings.c:17
HRESULT WINAPI SHInvokeCommand(HWND, IShellFolder *, LPCITEMIDLIST, DWORD)
Definition: ordinal.c:3486
#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 2201 of file ordinal.c.

2202 {
2203  TRACE("(%p,%p)\n", hParent, hChild);
2204 
2205  if (!hParent || !hChild)
2206  return TRUE;
2207  else if(hParent == hChild)
2208  return FALSE;
2209  return !IsChild(hParent, hChild);
2210 }
#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 2035 of file ordinal.c.

2036 {
2037  HRESULT hRet = E_INVALIDARG;
2038  IQueryInfo *lpInfo;
2039 
2040  if (lpFolder && pidl)
2041  {
2042  hRet = IShellFolder_GetUIObjectOf(lpFolder, NULL, 1, &pidl, &IID_IQueryInfo,
2043  NULL, (void**)&lpInfo);
2044  if (FAILED(hRet))
2045  hRet = S_FALSE; /* Doesn't expose IQueryInfo */
2046  else
2047  {
2048  DWORD dwFlags = 0;
2049 
2050  /* MSDN states of IQueryInfo_GetInfoFlags() that "This method is not
2051  * currently used". Really? You wouldn't be holding out on me would you?
2052  */
2053  hRet = IQueryInfo_GetInfoFlags(lpInfo, &dwFlags);
2054 
2055  if (SUCCEEDED(hRet))
2056  {
2057  /* 0x2 is an undocumented flag apparently indicating expandability */
2058  hRet = dwFlags & 0x2 ? S_OK : S_FALSE;
2059  }
2060 
2061  IQueryInfo_Release(lpInfo);
2062  }
2063  }
2064  return hRet;
2065 }
#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:77
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IQueryInfo_Release(p)
Definition: shlobj.h:604
#define IQueryInfo_GetInfoFlags(p, a)
Definition: shlobj.h:607
_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 1236 of file ordinal.c.

1237 {
1238  IUnknown *lpUnknown1, *lpUnknown2;
1239  BOOL ret;
1240 
1241  TRACE("(%p %p)\n", lpInt1, lpInt2);
1242 
1243  if (!lpInt1 || !lpInt2)
1244  return FALSE;
1245 
1246  if (lpInt1 == lpInt2)
1247  return TRUE;
1248 
1249  if (IUnknown_QueryInterface(lpInt1, &IID_IUnknown, (void**)&lpUnknown1) != S_OK)
1250  return FALSE;
1251 
1252  if (IUnknown_QueryInterface(lpInt2, &IID_IUnknown, (void**)&lpUnknown2) != S_OK)
1253  {
1254  IUnknown_Release(lpUnknown1);
1255  return FALSE;
1256  }
1257 
1258  ret = lpUnknown1 == lpUnknown2;
1259 
1260  IUnknown_Release(lpUnknown1);
1261  IUnknown_Release(lpUnknown2);
1262 
1263  return ret;
1264 }
#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 1613 of file ordinal.c.

1614 {
1615  HMENU hMenu;
1616 
1617  TRACE("%p %s\n", hInst, debugstr_w(szName));
1618 
1619  if ((hMenu = LoadMenuW(hInst, szName)))
1620  {
1621  if (GetSubMenu(hMenu, 0))
1622  RemoveMenu(hMenu, 0, MF_BYPOSITION);
1623 
1624  DestroyMenu(hMenu);
1625  return TRUE;
1626  }
1627  return FALSE;
1628 }
#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

◆ SHPropagateMessage()

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

Definition at line 1666 of file ordinal.c.

1667 {
1668  enumWndData data;
1669 
1670  TRACE("(%p,%u,%ld,%ld,%d)\n", hWnd, uiMsgId, wParam, lParam, bSend);
1671 
1672  if(hWnd)
1673  {
1674  data.uiMsgId = uiMsgId;
1675  data.wParam = wParam;
1676  data.lParam = lParam;
1677 
1678  if (bSend)
1679  data.pfnPost = IsWindowUnicode(hWnd) ? (void*)SendMessageW : (void*)SendMessageA;
1680  else
1681  data.pfnPost = IsWindowUnicode(hWnd) ? (void*)PostMessageW : (void*)PostMessageA;
1682 
1684  }
1685 }
BOOL WINAPI EnumChildWindows(_In_opt_ HWND, _In_ WNDENUMPROC, _In_ LPARAM)
static BOOL CALLBACK SHLWAPI_EnumChildProc(HWND hWnd, LPARAM lParam)
Definition: ordinal.c:1639
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:77
#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:112

Referenced by CShellLink::Load().

◆ SHRegisterClassA()

DWORD WINAPI SHRegisterClassA ( WNDCLASSA wndclass)

Definition at line 1764 of file ordinal.c.

1765 {
1766  WNDCLASSA wca;
1767  if (GetClassInfoA(wndclass->hInstance, wndclass->lpszClassName, &wca))
1768  return TRUE;
1769  return (DWORD)RegisterClassA(wndclass);
1770 }
#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:3125
HINSTANCE hInstance
Definition: winuser.h:3120
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)

Referenced by SHCreateWorkerWindowA().

◆ SHRemoveAllSubMenus()

DWORD WINAPI SHRemoveAllSubMenus ( HMENU  hMenu)

Definition at line 1699 of file ordinal.c.

1700 {
1701  int iItemCount = GetMenuItemCount(hMenu) - 1;
1702 
1703  TRACE("%p\n", hMenu);
1704 
1705  while (iItemCount >= 0)
1706  {
1707  HMENU hSubMenu = GetSubMenu(hMenu, iItemCount);
1708  if (hSubMenu)
1709  RemoveMenu(hMenu, iItemCount, MF_BYPOSITION);
1710  iItemCount--;
1711  }
1712  return iItemCount;
1713 }
#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 2108 of file ordinal.c.

2109 {
2110  if (lpKeys && lpValues)
2111  {
2112  int i = 0;
2113 
2114  while (i < iLen)
2115  {
2116  if (lpKeys[i] == iKey)
2117  return lpValues[i]; /* Found */
2118  i++;
2119  }
2120  }
2121  return -1; /* Not found */
2122 }
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 1105 of file ordinal.c.

1106 {
1107  TRACE("%p, %p\n", hWnd, hWndParent);
1108 
1109  if(GetParent(hWnd) == hWndParent)
1110  return NULL;
1111 
1112  if(hWndParent)
1114  else
1116 
1117  return hWndParent ? SetParent(hWnd, hWndParent) : NULL;
1118 }
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:1077
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 1077 of file ordinal.c.

1078 {
1080  LONG new_flags = (flags & mask) | (ret & ~mask);
1081 
1082  TRACE("%p %d %x %x\n", hwnd, offset, mask, flags);
1083 
1084  if (new_flags != ret)
1085  ret = SetWindowLongW(hwnd, offset, new_flags);
1086  return ret;
1087 }
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 1775 of file ordinal.c.

1777 {
1778  DWORD dwEffect = DROPEFFECT_LINK | DROPEFFECT_MOVE | DROPEFFECT_COPY;
1779  POINTL pt = { 0, 0 };
1780 
1781  TRACE("%p %p 0x%08x %p %p\n", pDrop, pDataObj, grfKeyState, lpPt, pdwEffect);
1782 
1783  if (!lpPt)
1784  lpPt = &pt;
1785 
1786  if (!pdwEffect)
1787  pdwEffect = &dwEffect;
1788 
1789  IDropTarget_DragEnter(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
1790 
1791  if (*pdwEffect != DROPEFFECT_NONE)
1792  return IDropTarget_Drop(pDrop, pDataObj, grfKeyState, *lpPt, pdwEffect);
1793 
1794  IDropTarget_DragLeave(pDrop);
1795  return TRUE;
1796 }
#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().

◆ SHWaitForSendMessageThread()

DWORD WINAPI SHWaitForSendMessageThread ( HANDLE  hand,
DWORD  dwTimeout 
)

Definition at line 1997 of file ordinal.c.

1998 {
1999  DWORD dwEndTicks = GetTickCount() + dwTimeout;
2000  DWORD dwRet;
2001 
2002  while ((dwRet = MsgWaitForMultipleObjectsEx(1, &hand, dwTimeout, QS_SENDMESSAGE, 0)) == 1)
2003  {
2004  MSG msg;
2005 
2006  PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE);
2007 
2008  if (dwTimeout != INFINITE)
2009  {
2010  if ((int)(dwTimeout = dwEndTicks - GetTickCount()) <= 0)
2011  return WAIT_TIMEOUT;
2012  }
2013  }
2014 
2015  return dwRet;
2016 }
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:445
#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:6081
#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:77
#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().