Use Interlocked* functions in AddRef and Release.
This commit is contained in:
parent
eeca59ff0b
commit
4064e74fc3
|
@ -77,12 +77,12 @@ HRESULT WINAPI QueryInterface(_IDummyStream *This,REFIID riid, LPVOID *ppvObj)
|
|||
|
||||
static ULONG WINAPI AddRef(_IDummyStream *This)
|
||||
{
|
||||
return ++This->ref;
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI Release(_IDummyStream *This)
|
||||
{
|
||||
return --This->ref;
|
||||
return InterlockedDecrement(&This->ref);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI Read(_IDummyStream* This, LPVOID lpMem, ULONG ulSize,
|
||||
|
|
Loading…
Reference in New Issue