TRACE("(%p,%d,%d,%08x,%08x)\n", hShared, dwDstProcId, dwSrcProcId,
dwAccess, dwOptions);
+ if (!hShared)
+ {
+ TRACE("Returning handle NULL\n");
+ return NULL;
+ }
+
/* Get dest process handle */
if (dwDstProcId == dwMyProcId)
hDst = GetCurrentProcess();
TRACE("(%p %d)\n", hShared, dwProcId);
+ if (!hShared)
+ return TRUE;
+
/* Get a copy of the handle for our process, closing the source handle */
hClose = SHMapHandle(hShared, dwProcId, GetCurrentProcessId(),
FILE_MAP_ALL_ACCESS,DUPLICATE_CLOSE_SOURCE);
* Success: S_OK. langbuf is set to the language string found.
* Failure: E_FAIL, If any arguments are invalid, error occurred, or Explorer
* does not contain the setting.
- * HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), If the buffer is not big enough
+ * E_NOT_SUFFICIENT_BUFFER, If the buffer is not big enough
*/
HRESULT WINAPI GetAcceptLanguagesW( LPWSTR langbuf, LPDWORD buflen)
{
}
*buflen = 0;
- return __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
+ return E_NOT_SUFFICIENT_BUFFER;
}
/*************************************************************************
*
* PARAMS
* lpUnknown [I] Object supporting the IPersist interface
- * lpClassId [O] Destination for Class Id
+ * clsid [O] Destination for Class Id
*
* RETURNS
* Success: S_OK. lpClassId contains the Class Id requested.
* E_NOINTERFACE If lpUnknown does not support IPersist,
* Or an HRESULT error code.
*/
-HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID* lpClassId)
+HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID *clsid)
{
- IPersist* lpPersist;
- HRESULT hRet = E_FAIL;
+ IPersist *persist;
+ HRESULT hr;
- TRACE("(%p,%s)\n", lpUnknown, debugstr_guid(lpClassId));
+ TRACE("(%p, %p)\n", lpUnknown, clsid);
- if (lpUnknown)
- {
- hRet = IUnknown_QueryInterface(lpUnknown,&IID_IPersist,(void**)&lpPersist);
- if (SUCCEEDED(hRet))
+ if (!lpUnknown)
{
- IPersist_GetClassID(lpPersist, lpClassId);
- IPersist_Release(lpPersist);
+ memset(clsid, 0, sizeof(*clsid));
+ return E_FAIL;
}
- }
- return hRet;
+
+ hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersist, (void**)&persist);
+ if (hr != S_OK)
+ {
+ hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersistFolder, (void**)&persist);
+ if (hr != S_OK)
+ return hr;
+ }
+
+ hr = IPersist_GetClassID(persist, clsid);
+ IPersist_Release(persist);
+ return hr;
}
/*************************************************************************
cmIci.cbSize = sizeof(cmIci);
cmIci.fMask = CMIC_MASK_ASYNCOK;
cmIci.hwnd = hWnd;
+#ifdef __REACTOS__ /* r75561 */
+ cmIci.lpVerb = MAKEINTRESOURCEA(dwCommandId - 1);
+#else
cmIci.lpVerb = MAKEINTRESOURCEA(dwCommandId);
+#endif
cmIci.nShow = SW_SHOWNORMAL;
hRet = IContextMenu_InvokeCommand(iContext, &cmIci);
case OS_SMALLBUSINESSSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_TABLETPC:
- FIXME("(OS_TABLEPC) What should we return here?\n");
+ FIXME("(OS_TABLETPC) What should we return here?\n");
return FALSE;
case OS_SERVERADMINUI:
FIXME("(OS_SERVERADMINUI) What should we return here?\n");
* NOTES
* Call should free returned descriptor with LocalFree
*/
-PSECURITY_DESCRIPTOR WINAPI GetShellSecurityDescriptor(PSHELL_USER_PERMISSION *apUserPerm, int cUserPerm)
+PSECURITY_DESCRIPTOR WINAPI GetShellSecurityDescriptor(const PSHELL_USER_PERMISSION *apUserPerm, int cUserPerm)
{
PSID *sidlist;
PSID cur_user = NULL;
{
if ((fmt_flags & FDTF_LONGDATE) && (ret < size + 2))
{
- if (ret < size + 2)
- {
- lstrcatW(&buf[ret-1], sep1);
- ret += 2;
- }
+ lstrcatW(&buf[ret-1], sep1);
+ ret += 2;
}
else
{
* pValue: address to receive the property value as a 32-bit signed integer
*
* RETURNS
- * 0 for Success
+ * HRESULT codes
*/
-BOOL WINAPI SHPropertyBag_ReadLONG(IPropertyBag *ppb, LPCWSTR pszPropName, LPLONG pValue)
+HRESULT WINAPI SHPropertyBag_ReadLONG(IPropertyBag *ppb, LPCWSTR pszPropName, LPLONG pValue)
{
VARIANT var;
HRESULT hr;
return hr;
}
+#ifdef __REACTOS__
+/**************************************************************************
+ * SHPropertyBag_WriteLONG (SHLWAPI.497)
+ *
+ * This function asks a property bag to write a named property as a LONG.
+ *
+ * PARAMS
+ * ppb: a IPropertyBag interface
+ * pszPropName: Unicode string that names the property
+ * lValue: address to receive the property value as a 32-bit signed integer
+ *
+ * RETURNS
+ * HRESULT codes
+ */
+HRESULT WINAPI SHPropertyBag_WriteLONG(IPropertyBag *ppb, LPCWSTR pszPropName, LONG lValue)
+{
+ UNIMPLEMENTED;
+ return E_NOTIMPL;
+}
+
+/**************************************************************************
+ * SHPropertyBag_WriteStr (SHLWAPI.495)
+ *
+ * This function asks a property bag to write a string as the value of a named property.
+ *
+ * PARAMS
+ * ppb: a IPropertyBag interface
+ * pszPropName: Unicode string that names the property
+ * pValue: address to write the property value
+ *
+ * RETURNS
+ * HRESULT codes
+ */
+HRESULT WINAPI SHPropertyBag_WriteStr(IPropertyBag *ppb, LPCWSTR pszPropName, LPCWSTR pszValue)
+{
+ UNIMPLEMENTED;
+ return E_NOTIMPL;
+}
+#endif
+
/* return flags for SHGetObjectCompatFlags, names derived from registry value names */
#define OBJCOMPAT_OTNEEDSSFCACHE 0x00000001
#define OBJCOMPAT_NO_WEBVIEW 0x00000002