Don't use copies of critical sections made by memcpy()

Added missing WINAPIs
This commit is contained in:
James Abbatiello 2000-09-01 01:22:21 +00:00 committed by Alexandre Julliard
parent ebef9a9519
commit 26d6c1f557
1 changed files with 20 additions and 19 deletions

View File

@ -2023,6 +2023,7 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer(
(*ippdsb)->dsound = This; (*ippdsb)->dsound = This;
(*ippdsb)->parent = ipdsb; (*ippdsb)->parent = ipdsb;
memcpy(&((*ippdsb)->wfx), &(ipdsb->wfx), sizeof((*ippdsb)->wfx)); memcpy(&((*ippdsb)->wfx), &(ipdsb->wfx), sizeof((*ippdsb)->wfx));
InitializeCriticalSection(&(*ippdsb)->lock);
/* register buffer */ /* register buffer */
EnterCriticalSection(&(This->lock)); EnterCriticalSection(&(This->lock));
{ {
@ -3185,7 +3186,7 @@ DSOUND_CreateDirectSoundCapture( LPVOID* ppobj )
return S_OK; return S_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureImpl_QueryInterface( IDirectSoundCaptureImpl_QueryInterface(
LPDIRECTSOUNDCAPTURE iface, LPDIRECTSOUNDCAPTURE iface,
REFIID riid, REFIID riid,
@ -3198,7 +3199,7 @@ IDirectSoundCaptureImpl_QueryInterface(
return E_FAIL; return E_FAIL;
} }
static ULONG static ULONG WINAPI
IDirectSoundCaptureImpl_AddRef( LPDIRECTSOUNDCAPTURE iface ) IDirectSoundCaptureImpl_AddRef( LPDIRECTSOUNDCAPTURE iface )
{ {
ULONG uRef; ULONG uRef;
@ -3214,7 +3215,7 @@ IDirectSoundCaptureImpl_AddRef( LPDIRECTSOUNDCAPTURE iface )
return uRef; return uRef;
} }
static ULONG static ULONG WINAPI
IDirectSoundCaptureImpl_Release( LPDIRECTSOUNDCAPTURE iface ) IDirectSoundCaptureImpl_Release( LPDIRECTSOUNDCAPTURE iface )
{ {
ULONG uRef; ULONG uRef;
@ -3235,7 +3236,7 @@ IDirectSoundCaptureImpl_Release( LPDIRECTSOUNDCAPTURE iface )
return uRef; return uRef;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureImpl_CreateCaptureBuffer( IDirectSoundCaptureImpl_CreateCaptureBuffer(
LPDIRECTSOUNDCAPTURE iface, LPDIRECTSOUNDCAPTURE iface,
LPCDSCBUFFERDESC lpcDSCBufferDesc, LPCDSCBUFFERDESC lpcDSCBufferDesc,
@ -3256,7 +3257,7 @@ IDirectSoundCaptureImpl_CreateCaptureBuffer(
return hr; return hr;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureImpl_GetCaps( IDirectSoundCaptureImpl_GetCaps(
LPDIRECTSOUNDCAPTURE iface, LPDIRECTSOUNDCAPTURE iface,
LPDSCCAPS lpDSCCaps ) LPDSCCAPS lpDSCCaps )
@ -3268,7 +3269,7 @@ IDirectSoundCaptureImpl_GetCaps(
return DS_OK; return DS_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureImpl_Initialize( IDirectSoundCaptureImpl_Initialize(
LPDIRECTSOUNDCAPTURE iface, LPDIRECTSOUNDCAPTURE iface,
LPCGUID lpcGUID ) LPCGUID lpcGUID )
@ -3295,7 +3296,7 @@ static ICOM_VTABLE(IDirectSoundCapture) dscvt =
IDirectSoundCaptureImpl_Initialize IDirectSoundCaptureImpl_Initialize
}; };
static HRESULT static HRESULT
DSOUND_CreateDirectSoundCaptureBuffer( LPCDSCBUFFERDESC lpcDSCBufferDesc, LPVOID* ppobj ) DSOUND_CreateDirectSoundCaptureBuffer( LPCDSCBUFFERDESC lpcDSCBufferDesc, LPVOID* ppobj )
{ {
@ -3320,7 +3321,7 @@ DSOUND_CreateDirectSoundCaptureBuffer( LPCDSCBUFFERDESC lpcDSCBufferDesc, LPVOID
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_QueryInterface( IDirectSoundCaptureBufferImpl_QueryInterface(
LPDIRECTSOUNDCAPTUREBUFFER iface, LPDIRECTSOUNDCAPTUREBUFFER iface,
REFIID riid, REFIID riid,
@ -3333,7 +3334,7 @@ IDirectSoundCaptureBufferImpl_QueryInterface(
return E_FAIL; return E_FAIL;
} }
static ULONG static ULONG WINAPI
IDirectSoundCaptureBufferImpl_AddRef( LPDIRECTSOUNDCAPTUREBUFFER iface ) IDirectSoundCaptureBufferImpl_AddRef( LPDIRECTSOUNDCAPTUREBUFFER iface )
{ {
ULONG uRef; ULONG uRef;
@ -3349,7 +3350,7 @@ IDirectSoundCaptureBufferImpl_AddRef( LPDIRECTSOUNDCAPTUREBUFFER iface )
return uRef; return uRef;
} }
static ULONG static ULONG WINAPI
IDirectSoundCaptureBufferImpl_Release( LPDIRECTSOUNDCAPTUREBUFFER iface ) IDirectSoundCaptureBufferImpl_Release( LPDIRECTSOUNDCAPTUREBUFFER iface )
{ {
ULONG uRef; ULONG uRef;
@ -3370,7 +3371,7 @@ IDirectSoundCaptureBufferImpl_Release( LPDIRECTSOUNDCAPTUREBUFFER iface )
return uRef; return uRef;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_GetCaps( IDirectSoundCaptureBufferImpl_GetCaps(
LPDIRECTSOUNDCAPTUREBUFFER iface, LPDIRECTSOUNDCAPTUREBUFFER iface,
LPDSCBCAPS lpDSCBCaps ) LPDSCBCAPS lpDSCBCaps )
@ -3382,7 +3383,7 @@ IDirectSoundCaptureBufferImpl_GetCaps(
return DS_OK; return DS_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_GetCurrentPosition( IDirectSoundCaptureBufferImpl_GetCurrentPosition(
LPDIRECTSOUNDCAPTUREBUFFER iface, LPDIRECTSOUNDCAPTUREBUFFER iface,
LPDWORD lpdwCapturePosition, LPDWORD lpdwCapturePosition,
@ -3395,7 +3396,7 @@ IDirectSoundCaptureBufferImpl_GetCurrentPosition(
return DS_OK; return DS_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_GetFormat( IDirectSoundCaptureBufferImpl_GetFormat(
LPDIRECTSOUNDCAPTUREBUFFER iface, LPDIRECTSOUNDCAPTUREBUFFER iface,
LPWAVEFORMATEX lpwfxFormat, LPWAVEFORMATEX lpwfxFormat,
@ -3409,7 +3410,7 @@ IDirectSoundCaptureBufferImpl_GetFormat(
return DS_OK; return DS_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_GetStatus( IDirectSoundCaptureBufferImpl_GetStatus(
LPDIRECTSOUNDCAPTUREBUFFER iface, LPDIRECTSOUNDCAPTUREBUFFER iface,
LPDWORD lpdwStatus ) LPDWORD lpdwStatus )
@ -3421,7 +3422,7 @@ IDirectSoundCaptureBufferImpl_GetStatus(
return DS_OK; return DS_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_Initialize( IDirectSoundCaptureBufferImpl_Initialize(
LPDIRECTSOUNDCAPTUREBUFFER iface, LPDIRECTSOUNDCAPTUREBUFFER iface,
LPDIRECTSOUNDCAPTURE lpDSC, LPDIRECTSOUNDCAPTURE lpDSC,
@ -3434,7 +3435,7 @@ IDirectSoundCaptureBufferImpl_Initialize(
return DS_OK; return DS_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_Lock( IDirectSoundCaptureBufferImpl_Lock(
LPDIRECTSOUNDCAPTUREBUFFER iface, LPDIRECTSOUNDCAPTUREBUFFER iface,
DWORD dwReadCusor, DWORD dwReadCusor,
@ -3452,7 +3453,7 @@ IDirectSoundCaptureBufferImpl_Lock(
return DS_OK; return DS_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_Start( IDirectSoundCaptureBufferImpl_Start(
LPDIRECTSOUNDCAPTUREBUFFER iface, LPDIRECTSOUNDCAPTUREBUFFER iface,
DWORD dwFlags ) DWORD dwFlags )
@ -3464,7 +3465,7 @@ IDirectSoundCaptureBufferImpl_Start(
return DS_OK; return DS_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_Stop( LPDIRECTSOUNDCAPTUREBUFFER iface ) IDirectSoundCaptureBufferImpl_Stop( LPDIRECTSOUNDCAPTUREBUFFER iface )
{ {
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface); ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
@ -3474,7 +3475,7 @@ IDirectSoundCaptureBufferImpl_Stop( LPDIRECTSOUNDCAPTUREBUFFER iface )
return DS_OK; return DS_OK;
} }
static HRESULT static HRESULT WINAPI
IDirectSoundCaptureBufferImpl_Unlock( IDirectSoundCaptureBufferImpl_Unlock(
LPDIRECTSOUNDCAPTUREBUFFER iface, LPDIRECTSOUNDCAPTUREBUFFER iface,
LPVOID lpvAudioPtr1, LPVOID lpvAudioPtr1,