Module: wine
Branch: master
Commit: 1a540fa4ced8189d7d588461f23a21278369ae25
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1a540fa4ced8189d7d588461f…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com>
Date: Tue Mar 4 22:30:39 2008 +0000
mciwave: Assign to struct instead of using memcpy.
---
dlls/mciwave/mciwave.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/mciwave/mciwave.c b/dlls/mciwave/mciwave.c
index 0b12ad2..7dfedca 100644
--- a/dlls/mciwave/mciwave.c
+++ b/dlls/mciwave/mciwave.c
@@ -323,7 +323,7 @@ static DWORD WAVE_mciCreateRIFFSkeleton(WINE_MCIWAVE* wmw)
{
wmw->lpWaveFormat = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wmw->lpWaveFormat));
if (!wmw->lpWaveFormat) return MMSYSERR_NOMEM;
- memcpy(wmw->lpWaveFormat, &wmw->wfxRef, sizeof(wmw->wfxRef));
+ *wmw->lpWaveFormat = wmw->wfxRef;
}
/* we can only record PCM files... there is no way in the MCI API to specify
Module: wine
Branch: master
Commit: aa3ad44edfd729a720595e075bc7e77c23b75e0c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=aa3ad44edfd729a720595e075…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl>
Date: Tue Mar 4 20:26:34 2008 +0100
shell32: Improve SHRegisterDragDrop and SHRevokeDragDrop.
---
dlls/shell32/shellord.c | 29 +++++++++++++++++++++++------
1 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index ed326ea..5d1666b 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -446,9 +446,12 @@ int WINAPIV ShellMessageBoxA(
/*************************************************************************
* SHRegisterDragDrop [SHELL32.86]
*
- * Probably equivalent to RegisterDragDrop but under Windows 9x it could use the
+ * Probably equivalent to RegisterDragDrop but under Windows 95 it could use the
* shell32 built-in "mini-COM" without the need to load ole32.dll - see SHLoadOLE
- * for details
+ * for details. Under Windows 98 this function initializes the true OLE when called
+ * the first time, on XP always returns E_OUTOFMEMORY and it got removed from Vista.
+ *
+ * We follow Windows 98 behaviour.
*
* NOTES
* exported by ordinal
@@ -460,16 +463,30 @@ HRESULT WINAPI SHRegisterDragDrop(
HWND hWnd,
LPDROPTARGET pDropTarget)
{
- FIXME("(%p,%p):stub.\n", hWnd, pDropTarget);
+ static BOOL ole_initialized = FALSE;
+ HRESULT hr;
+
+ TRACE("(%p,%p)\n", hWnd, pDropTarget);
+
+ if (!ole_initialized)
+ {
+ hr = OleInitialize(NULL);
+ if (FAILED(hr))
+ return hr;
+ ole_initialized = TRUE;
+ }
return RegisterDragDrop(hWnd, pDropTarget);
}
/*************************************************************************
* SHRevokeDragDrop [SHELL32.87]
*
- * Probably equivalent to RevokeDragDrop but under Windows 9x it could use the
+ * Probably equivalent to RevokeDragDrop but under Windows 95 it could use the
* shell32 built-in "mini-COM" without the need to load ole32.dll - see SHLoadOLE
- * for details
+ * for details. Function removed from Windows Vista.
+ *
+ * We call ole32 RevokeDragDrop which seems to work even if OleInitialize was
+ * not called.
*
* NOTES
* exported by ordinal
@@ -479,7 +496,7 @@ HRESULT WINAPI SHRegisterDragDrop(
*/
HRESULT WINAPI SHRevokeDragDrop(HWND hWnd)
{
- FIXME("(%p):stub.\n",hWnd);
+ TRACE("(%p)\n", hWnd);
return RevokeDragDrop(hWnd);
}