Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
April 2022
- 87 participants
- 938 discussions
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/wineoss.drv/mmdevdrv.c | 17 ++++-------------
dlls/wineoss.drv/oss.c | 17 +++++++++++++++++
dlls/wineoss.drv/unixlib.h | 7 +++++++
3 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index e50a7b32338..75661f917cc 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -961,26 +961,17 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient3 *iface)
static HRESULT WINAPI AudioClient_Stop(IAudioClient3 *iface)
{
ACImpl *This = impl_from_IAudioClient3(iface);
- struct oss_stream *stream = This->stream;
+ struct stop_params params;
TRACE("(%p)\n", This);
if(!This->stream)
return AUDCLNT_E_NOT_INITIALIZED;
- oss_lock(stream);
-
- if(!stream->playing){
- oss_unlock(stream);
- return S_FALSE;
- }
-
- stream->playing = FALSE;
- stream->in_oss_frames = 0;
-
- oss_unlock(stream);
+ params.stream = This->stream;
+ OSS_CALL(stop, ¶ms);
- return S_OK;
+ return params.result;
}
static HRESULT WINAPI AudioClient_Reset(IAudioClient3 *iface)
diff --git a/dlls/wineoss.drv/oss.c b/dlls/wineoss.drv/oss.c
index 241b6d014ec..bcd07c2d2fc 100644
--- a/dlls/wineoss.drv/oss.c
+++ b/dlls/wineoss.drv/oss.c
@@ -645,6 +645,22 @@ static NTSTATUS start(void *args)
return oss_unlock_result(stream, ¶ms->result, S_OK);
}
+static NTSTATUS stop(void *args)
+{
+ struct stop_params *params = args;
+ struct oss_stream *stream = params->stream;
+
+ oss_lock(stream);
+
+ if(!stream->playing)
+ return oss_unlock_result(stream, ¶ms->result, S_FALSE);
+
+ stream->playing = FALSE;
+ stream->in_oss_frames = 0;
+
+ return oss_unlock_result(stream, ¶ms->result, S_OK);
+}
+
static void silence_buffer(struct oss_stream *stream, BYTE *buffer, UINT32 frames)
{
WAVEFORMATEXTENSIBLE *fmtex = (WAVEFORMATEXTENSIBLE*)stream->fmt;
@@ -1008,6 +1024,7 @@ unixlib_entry_t __wine_unix_call_funcs[] =
create_stream,
release_stream,
start,
+ stop,
timer_loop,
is_format_supported,
get_mix_format,
diff --git a/dlls/wineoss.drv/unixlib.h b/dlls/wineoss.drv/unixlib.h
index 7418261282d..c69ef1c3e4b 100644
--- a/dlls/wineoss.drv/unixlib.h
+++ b/dlls/wineoss.drv/unixlib.h
@@ -96,6 +96,12 @@ struct start_params
HRESULT result;
};
+struct stop_params
+{
+ struct oss_stream *stream;
+ HRESULT result;
+};
+
struct timer_loop_params
{
struct oss_stream *stream;
@@ -147,6 +153,7 @@ enum oss_funcs
oss_create_stream,
oss_release_stream,
oss_start,
+ oss_stop,
oss_timer_loop,
oss_is_format_supported,
oss_get_mix_format,
--
2.25.1
2
1
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/wineoss.drv/mmdevdrv.c | 24 +++++-------------------
dlls/wineoss.drv/oss.c | 19 +++++++++++++++++++
dlls/wineoss.drv/unixlib.h | 7 +++++++
3 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index 8f2b19c8faa..e50a7b32338 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -934,7 +934,7 @@ static void silence_buffer(struct oss_stream *stream, BYTE *buffer, UINT32 frame
static HRESULT WINAPI AudioClient_Start(IAudioClient3 *iface)
{
ACImpl *This = impl_from_IAudioClient3(iface);
- struct oss_stream *stream = This->stream;
+ struct start_params params;
TRACE("(%p)\n", This);
@@ -945,31 +945,17 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient3 *iface)
return AUDCLNT_E_NOT_INITIALIZED;
}
- oss_lock(stream);
-
- if((stream->flags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) && !stream->event){
- oss_unlock(stream);
- LeaveCriticalSection(&g_sessions_lock);
- return AUDCLNT_E_EVENTHANDLE_NOT_SET;
- }
-
- if(stream->playing){
- oss_unlock(stream);
- LeaveCriticalSection(&g_sessions_lock);
- return AUDCLNT_E_NOT_STOPPED;
- }
+ params.stream = This->stream;
+ OSS_CALL(start, ¶ms);
- if(!This->timer_thread){
+ if(SUCCEEDED(params.result) && !This->timer_thread){
This->timer_thread = CreateThread(NULL, 0, timer_thread, This->stream, 0, NULL);
SetThreadPriority(This->timer_thread, THREAD_PRIORITY_TIME_CRITICAL);
}
- stream->playing = TRUE;
-
- oss_unlock(stream);
LeaveCriticalSection(&g_sessions_lock);
- return S_OK;
+ return params.result;
}
static HRESULT WINAPI AudioClient_Stop(IAudioClient3 *iface)
diff --git a/dlls/wineoss.drv/oss.c b/dlls/wineoss.drv/oss.c
index b0dc22a500f..241b6d014ec 100644
--- a/dlls/wineoss.drv/oss.c
+++ b/dlls/wineoss.drv/oss.c
@@ -627,6 +627,24 @@ static NTSTATUS release_stream(void *args)
return STATUS_SUCCESS;
}
+static NTSTATUS start(void *args)
+{
+ struct start_params *params = args;
+ struct oss_stream *stream = params->stream;
+
+ oss_lock(stream);
+
+ if((stream->flags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) && !stream->event)
+ return oss_unlock_result(stream, ¶ms->result, AUDCLNT_E_EVENTHANDLE_NOT_SET);
+
+ if(stream->playing)
+ return oss_unlock_result(stream, ¶ms->result, AUDCLNT_E_NOT_STOPPED);
+
+ stream->playing = TRUE;
+
+ return oss_unlock_result(stream, ¶ms->result, S_OK);
+}
+
static void silence_buffer(struct oss_stream *stream, BYTE *buffer, UINT32 frames)
{
WAVEFORMATEXTENSIBLE *fmtex = (WAVEFORMATEXTENSIBLE*)stream->fmt;
@@ -989,6 +1007,7 @@ unixlib_entry_t __wine_unix_call_funcs[] =
get_endpoint_ids,
create_stream,
release_stream,
+ start,
timer_loop,
is_format_supported,
get_mix_format,
diff --git a/dlls/wineoss.drv/unixlib.h b/dlls/wineoss.drv/unixlib.h
index 2902bceb949..7418261282d 100644
--- a/dlls/wineoss.drv/unixlib.h
+++ b/dlls/wineoss.drv/unixlib.h
@@ -90,6 +90,12 @@ struct release_stream_params
HRESULT result;
};
+struct start_params
+{
+ struct oss_stream *stream;
+ HRESULT result;
+};
+
struct timer_loop_params
{
struct oss_stream *stream;
@@ -140,6 +146,7 @@ enum oss_funcs
oss_get_endpoint_ids,
oss_create_stream,
oss_release_stream,
+ oss_start,
oss_timer_loop,
oss_is_format_supported,
oss_get_mix_format,
--
2.25.1
2
1
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/wineoss.drv/mmdevdrv.c | 199 ++++--------------------------------
dlls/wineoss.drv/oss.c | 196 +++++++++++++++++++++++++++++++++++
dlls/wineoss.drv/unixlib.h | 9 +-
3 files changed, 223 insertions(+), 181 deletions(-)
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index e61c3c95df2..8f2b19c8faa 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -114,7 +114,7 @@ struct ACImpl {
UINT32 channel_count;
struct oss_stream *stream;
- HANDLE timer;
+ HANDLE timer_thread;
AudioSession *session;
AudioSessionWrapper *session_wrapper;
@@ -147,8 +147,6 @@ static const WCHAR drv_key_devicesW[] = {'S','o','f','t','w','a','r','e','\\',
'w','i','n','e','o','s','s','.','d','r','v','\\','d','e','v','i','c','e','s',0};
static const WCHAR guidW[] = {'g','u','i','d',0};
-static HANDLE g_timer_q;
-
static CRITICAL_SECTION g_sessions_lock;
static CRITICAL_SECTION_DEBUG g_sessions_lock_debug =
{
@@ -230,9 +228,6 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
if(NtQueryVirtualMemory(GetCurrentProcess(), dll, MemoryWineUnixFuncs,
&oss_handle, sizeof(oss_handle), NULL))
return FALSE;
- g_timer_q = CreateTimerQueue();
- if(!g_timer_q)
- return FALSE;
break;
case DLL_PROCESS_DETACH:
@@ -260,16 +255,28 @@ int WINAPI AUDDRV_GetPriority(void)
return params.priority;
}
-static HRESULT stream_release(struct oss_stream *stream)
+static HRESULT stream_release(struct oss_stream *stream, HANDLE timer_thread)
{
struct release_stream_params params;
params.stream = stream;
+ params.timer_thread = timer_thread;
OSS_CALL(release_stream, ¶ms);
return params.result;
}
+static DWORD WINAPI timer_thread(void *user)
+{
+ struct oss_stream *stream = user;
+ struct timer_loop_params params;
+
+ params.stream = stream;
+ OSS_CALL(timer_loop, ¶ms);
+
+ return 0;
+}
+
static void oss_lock(struct oss_stream *stream)
{
pthread_mutex_lock(&stream->lock);
@@ -532,17 +539,6 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface)
ref = InterlockedDecrement(&This->ref);
TRACE("(%p) Refcount now %u\n", This, ref);
if(!ref){
- if(This->timer){
- HANDLE event;
- DWORD wait;
- event = CreateEventW(NULL, TRUE, FALSE, NULL);
- wait = !DeleteTimerQueueTimer(g_timer_q, This->timer, event);
- wait = wait && GetLastError() == ERROR_IO_PENDING;
- if(event && wait)
- WaitForSingleObject(event, INFINITE);
- CloseHandle(event);
- }
-
IAudioClient3_Stop(iface);
IMMDevice_Release(This->parent);
IUnknown_Release(This->pUnkFTMarshal);
@@ -553,7 +549,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface)
}
HeapFree(GetProcessHeap(), 0, This->vols);
if(This->stream)
- stream_release(This->stream);
+ stream_release(This->stream, This->timer_thread);
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
@@ -765,7 +761,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
exit:
if(FAILED(params.result)){
- stream_release(stream);
+ stream_release(stream, NULL);
HeapFree(GetProcessHeap(), 0, This->vols);
This->vols = NULL;
} else {
@@ -935,161 +931,6 @@ static void silence_buffer(struct oss_stream *stream, BYTE *buffer, UINT32 frame
memset(buffer, 0, frames * stream->fmt->nBlockAlign);
}
-static void oss_write_data(struct oss_stream *stream)
-{
- ssize_t written_bytes;
- UINT32 written_frames, in_oss_frames, write_limit, max_period, write_offs_frames, new_frames;
- SIZE_T to_write_frames, to_write_bytes, advanced;
- audio_buf_info bi;
- BYTE *buf;
-
- if(ioctl(stream->fd, SNDCTL_DSP_GETOSPACE, &bi) < 0){
- WARN("GETOSPACE failed: %d (%s)\n", errno, strerror(errno));
- return;
- }
-
- max_period = max(bi.fragsize / stream->fmt->nBlockAlign, stream->period_frames);
-
- if(bi.bytes > stream->oss_bufsize_bytes){
- TRACE("New buffer size (%u) is larger than old buffer size (%u)\n",
- bi.bytes, stream->oss_bufsize_bytes);
- stream->oss_bufsize_bytes = bi.bytes;
- in_oss_frames = 0;
- }else
- in_oss_frames = (stream->oss_bufsize_bytes - bi.bytes) / stream->fmt->nBlockAlign;
-
- if(in_oss_frames > stream->in_oss_frames){
- TRACE("Capping reported frames from %u to %u\n",
- in_oss_frames, stream->in_oss_frames);
- in_oss_frames = stream->in_oss_frames;
- }
-
- write_limit = 0;
- while(write_limit + in_oss_frames < max_period * 3)
- write_limit += max_period;
- if(write_limit == 0)
- return;
-
- /* vvvvvv - in_oss_frames
- * [--xxxxxxxxxx]
- * [xxxxxxxxxx--]
- * ^^^^^^^^^^ - held_frames
- * ^ - lcl_offs_frames
- */
- advanced = stream->in_oss_frames - in_oss_frames;
- if(advanced > stream->held_frames)
- advanced = stream->held_frames;
- stream->lcl_offs_frames += advanced;
- stream->lcl_offs_frames %= stream->bufsize_frames;
- stream->held_frames -= advanced;
- stream->in_oss_frames = in_oss_frames;
- TRACE("advanced by %lu, lcl_offs: %u, held: %u, in_oss: %u\n",
- advanced, stream->lcl_offs_frames, stream->held_frames, stream->in_oss_frames);
-
-
- if(stream->held_frames == stream->in_oss_frames)
- return;
-
- write_offs_frames = (stream->lcl_offs_frames + stream->in_oss_frames) % stream->bufsize_frames;
- new_frames = stream->held_frames - stream->in_oss_frames;
-
- if(write_offs_frames + new_frames > stream->bufsize_frames)
- to_write_frames = stream->bufsize_frames - write_offs_frames;
- else
- to_write_frames = new_frames;
-
- to_write_frames = min(to_write_frames, write_limit);
- to_write_bytes = to_write_frames * stream->fmt->nBlockAlign;
- TRACE("going to write %lu frames from %u (%lu of %u)\n", to_write_frames,
- write_offs_frames, to_write_frames + write_offs_frames,
- stream->bufsize_frames);
-
- buf = stream->local_buffer + write_offs_frames * stream->fmt->nBlockAlign;
-
- if(stream->mute)
- silence_buffer(stream, buf, to_write_frames);
-
- written_bytes = write(stream->fd, buf, to_write_bytes);
- if(written_bytes < 0){
- /* EAGAIN is OSS buffer full, log that too */
- WARN("write failed: %d (%s)\n", errno, strerror(errno));
- return;
- }
- written_frames = written_bytes / stream->fmt->nBlockAlign;
-
- stream->in_oss_frames += written_frames;
-
- if(written_frames < to_write_frames){
- /* OSS buffer probably full */
- return;
- }
-
- if(new_frames > written_frames && written_frames < write_limit){
- /* wrapped and have some data back at the start to write */
-
- to_write_frames = min(write_limit - written_frames, new_frames - written_frames);
- to_write_bytes = to_write_frames * stream->fmt->nBlockAlign;
-
- if(stream->mute)
- silence_buffer(stream, stream->local_buffer, to_write_frames);
-
- TRACE("wrapping to write %lu frames from beginning\n", to_write_frames);
-
- written_bytes = write(stream->fd, stream->local_buffer, to_write_bytes);
- if(written_bytes < 0){
- WARN("write failed: %d (%s)\n", errno, strerror(errno));
- return;
- }
- written_frames = written_bytes / stream->fmt->nBlockAlign;
- stream->in_oss_frames += written_frames;
- }
-}
-
-static void oss_read_data(struct oss_stream *stream)
-{
- UINT64 pos, readable;
- ssize_t nread;
-
- pos = (stream->held_frames + stream->lcl_offs_frames) % stream->bufsize_frames;
- readable = (stream->bufsize_frames - pos) * stream->fmt->nBlockAlign;
-
- nread = read(stream->fd, stream->local_buffer + pos * stream->fmt->nBlockAlign,
- readable);
- if(nread < 0){
- WARN("read failed: %d (%s)\n", errno, strerror(errno));
- return;
- }
-
- stream->held_frames += nread / stream->fmt->nBlockAlign;
-
- if(stream->held_frames > stream->bufsize_frames){
- WARN("Overflow of unread data\n");
- stream->lcl_offs_frames += stream->held_frames;
- stream->lcl_offs_frames %= stream->bufsize_frames;
- stream->held_frames = stream->bufsize_frames;
- }
-}
-
-static void CALLBACK oss_period_callback(void *user, BOOLEAN timer)
-{
- ACImpl *This = user;
- struct oss_stream *stream = This->stream;
-
- oss_lock(stream);
-
- if(stream->playing){
- if(stream->flow == eRender && stream->held_frames)
- oss_write_data(stream);
- else if(stream->flow == eCapture)
- oss_read_data(stream);
- }
-
- if(stream->event)
- SetEvent(stream->event);
-
- oss_unlock(stream);
-}
-
static HRESULT WINAPI AudioClient_Start(IAudioClient3 *iface)
{
ACImpl *This = impl_from_IAudioClient3(iface);
@@ -1118,11 +959,9 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient3 *iface)
return AUDCLNT_E_NOT_STOPPED;
}
- if(!This->timer){
- if(!CreateTimerQueueTimer(&This->timer, g_timer_q,
- oss_period_callback, This, 0, stream->period / 10000,
- WT_EXECUTEINTIMERTHREAD))
- ERR("Unable to create period timer: %u\n", GetLastError());
+ if(!This->timer_thread){
+ This->timer_thread = CreateThread(NULL, 0, timer_thread, This->stream, 0, NULL);
+ SetThreadPriority(This->timer_thread, THREAD_PRIORITY_TIME_CRITICAL);
}
stream->playing = TRUE;
diff --git a/dlls/wineoss.drv/oss.c b/dlls/wineoss.drv/oss.c
index b00925d6e9b..b0dc22a500f 100644
--- a/dlls/wineoss.drv/oss.c
+++ b/dlls/wineoss.drv/oss.c
@@ -604,6 +604,12 @@ static NTSTATUS release_stream(void *args)
struct oss_stream *stream = params->stream;
SIZE_T size;
+ if(params->timer_thread){
+ stream->please_quit = TRUE;
+ NtWaitForSingleObject(params->timer_thread, FALSE, NULL);
+ NtClose(params->timer_thread);
+ }
+
close(stream->fd);
if(stream->local_buffer){
size = 0;
@@ -621,6 +627,195 @@ static NTSTATUS release_stream(void *args)
return STATUS_SUCCESS;
}
+static void silence_buffer(struct oss_stream *stream, BYTE *buffer, UINT32 frames)
+{
+ WAVEFORMATEXTENSIBLE *fmtex = (WAVEFORMATEXTENSIBLE*)stream->fmt;
+ if((stream->fmt->wFormatTag == WAVE_FORMAT_PCM ||
+ (stream->fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
+ IsEqualGUID(&fmtex->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM))) &&
+ stream->fmt->wBitsPerSample == 8)
+ memset(buffer, 128, frames * stream->fmt->nBlockAlign);
+ else
+ memset(buffer, 0, frames * stream->fmt->nBlockAlign);
+}
+
+static void oss_write_data(struct oss_stream *stream)
+{
+ ssize_t written_bytes;
+ UINT32 written_frames, in_oss_frames, write_limit, max_period, write_offs_frames, new_frames;
+ SIZE_T to_write_frames, to_write_bytes, advanced;
+ audio_buf_info bi;
+ BYTE *buf;
+
+ if(ioctl(stream->fd, SNDCTL_DSP_GETOSPACE, &bi) < 0){
+ WARN("GETOSPACE failed: %d (%s)\n", errno, strerror(errno));
+ return;
+ }
+
+ max_period = max(bi.fragsize / stream->fmt->nBlockAlign, stream->period_frames);
+
+ if(bi.bytes > stream->oss_bufsize_bytes){
+ TRACE("New buffer size (%u) is larger than old buffer size (%u)\n",
+ bi.bytes, stream->oss_bufsize_bytes);
+ stream->oss_bufsize_bytes = bi.bytes;
+ in_oss_frames = 0;
+ }else
+ in_oss_frames = (stream->oss_bufsize_bytes - bi.bytes) / stream->fmt->nBlockAlign;
+
+ if(in_oss_frames > stream->in_oss_frames){
+ TRACE("Capping reported frames from %u to %u\n",
+ in_oss_frames, stream->in_oss_frames);
+ in_oss_frames = stream->in_oss_frames;
+ }
+
+ write_limit = 0;
+ while(write_limit + in_oss_frames < max_period * 3)
+ write_limit += max_period;
+ if(write_limit == 0)
+ return;
+
+ /* vvvvvv - in_oss_frames
+ * [--xxxxxxxxxx]
+ * [xxxxxxxxxx--]
+ * ^^^^^^^^^^ - held_frames
+ * ^ - lcl_offs_frames
+ */
+ advanced = stream->in_oss_frames - in_oss_frames;
+ if(advanced > stream->held_frames)
+ advanced = stream->held_frames;
+ stream->lcl_offs_frames += advanced;
+ stream->lcl_offs_frames %= stream->bufsize_frames;
+ stream->held_frames -= advanced;
+ stream->in_oss_frames = in_oss_frames;
+ TRACE("advanced by %lu, lcl_offs: %u, held: %u, in_oss: %u\n",
+ advanced, stream->lcl_offs_frames, stream->held_frames, stream->in_oss_frames);
+
+
+ if(stream->held_frames == stream->in_oss_frames)
+ return;
+
+ write_offs_frames = (stream->lcl_offs_frames + stream->in_oss_frames) % stream->bufsize_frames;
+ new_frames = stream->held_frames - stream->in_oss_frames;
+
+ if(write_offs_frames + new_frames > stream->bufsize_frames)
+ to_write_frames = stream->bufsize_frames - write_offs_frames;
+ else
+ to_write_frames = new_frames;
+
+ to_write_frames = min(to_write_frames, write_limit);
+ to_write_bytes = to_write_frames * stream->fmt->nBlockAlign;
+ TRACE("going to write %lu frames from %u (%lu of %u)\n", to_write_frames,
+ write_offs_frames, to_write_frames + write_offs_frames,
+ stream->bufsize_frames);
+
+ buf = stream->local_buffer + write_offs_frames * stream->fmt->nBlockAlign;
+
+ if(stream->mute)
+ silence_buffer(stream, buf, to_write_frames);
+
+ written_bytes = write(stream->fd, buf, to_write_bytes);
+ if(written_bytes < 0){
+ /* EAGAIN is OSS buffer full, log that too */
+ WARN("write failed: %d (%s)\n", errno, strerror(errno));
+ return;
+ }
+ written_frames = written_bytes / stream->fmt->nBlockAlign;
+
+ stream->in_oss_frames += written_frames;
+
+ if(written_frames < to_write_frames){
+ /* OSS buffer probably full */
+ return;
+ }
+
+ if(new_frames > written_frames && written_frames < write_limit){
+ /* wrapped and have some data back at the start to write */
+
+ to_write_frames = min(write_limit - written_frames, new_frames - written_frames);
+ to_write_bytes = to_write_frames * stream->fmt->nBlockAlign;
+
+ if(stream->mute)
+ silence_buffer(stream, stream->local_buffer, to_write_frames);
+
+ TRACE("wrapping to write %lu frames from beginning\n", to_write_frames);
+
+ written_bytes = write(stream->fd, stream->local_buffer, to_write_bytes);
+ if(written_bytes < 0){
+ WARN("write failed: %d (%s)\n", errno, strerror(errno));
+ return;
+ }
+ written_frames = written_bytes / stream->fmt->nBlockAlign;
+ stream->in_oss_frames += written_frames;
+ }
+}
+
+static void oss_read_data(struct oss_stream *stream)
+{
+ UINT64 pos, readable;
+ ssize_t nread;
+
+ pos = (stream->held_frames + stream->lcl_offs_frames) % stream->bufsize_frames;
+ readable = (stream->bufsize_frames - pos) * stream->fmt->nBlockAlign;
+
+ nread = read(stream->fd, stream->local_buffer + pos * stream->fmt->nBlockAlign,
+ readable);
+ if(nread < 0){
+ WARN("read failed: %d (%s)\n", errno, strerror(errno));
+ return;
+ }
+
+ stream->held_frames += nread / stream->fmt->nBlockAlign;
+
+ if(stream->held_frames > stream->bufsize_frames){
+ WARN("Overflow of unread data\n");
+ stream->lcl_offs_frames += stream->held_frames;
+ stream->lcl_offs_frames %= stream->bufsize_frames;
+ stream->held_frames = stream->bufsize_frames;
+ }
+}
+
+static NTSTATUS timer_loop(void *args)
+{
+ struct timer_loop_params *params = args;
+ struct oss_stream *stream = params->stream;
+ LARGE_INTEGER delay, now, next;
+ int adjust;
+
+ oss_lock(stream);
+
+ delay.QuadPart = -stream->period;
+ NtQueryPerformanceCounter(&now, NULL);
+ next.QuadPart = now.QuadPart + stream->period;
+
+ while(!stream->please_quit){
+ if(stream->playing){
+ if(stream->flow == eRender && stream->held_frames)
+ oss_write_data(stream);
+ else if(stream->flow == eCapture)
+ oss_read_data(stream);
+ }
+ if(stream->event)
+ NtSetEvent(stream->event, NULL);
+ oss_unlock(stream);
+
+ NtDelayExecution(FALSE, &delay);
+
+ oss_lock(stream);
+ NtQueryPerformanceCounter(&now, NULL);
+ adjust = next.QuadPart - now.QuadPart;
+ if(adjust > stream->period / 2)
+ adjust = stream->period / 2;
+ else if(adjust < -stream->period / 2)
+ adjust = -stream->period / 2;
+ delay.QuadPart = -(stream->period + adjust);
+ next.QuadPart += stream->period;
+ }
+
+ oss_unlock(stream);
+
+ return STATUS_SUCCESS;
+}
+
static NTSTATUS is_format_supported(void *args)
{
struct is_format_supported_params *params = args;
@@ -794,6 +989,7 @@ unixlib_entry_t __wine_unix_call_funcs[] =
get_endpoint_ids,
create_stream,
release_stream,
+ timer_loop,
is_format_supported,
get_mix_format,
get_buffer_size,
diff --git a/dlls/wineoss.drv/unixlib.h b/dlls/wineoss.drv/unixlib.h
index 64c954cc769..2902bceb949 100644
--- a/dlls/wineoss.drv/unixlib.h
+++ b/dlls/wineoss.drv/unixlib.h
@@ -28,7 +28,7 @@ struct oss_stream
int fd;
- BOOL playing, mute;
+ BOOL playing, mute, please_quit;
UINT64 written_frames, last_pos_frames;
UINT32 period_frames, bufsize_frames, held_frames, tmp_buffer_frames, in_oss_frames;
UINT32 oss_bufsize_bytes, lcl_offs_frames; /* offs into local_buffer where valid data starts */
@@ -86,9 +86,15 @@ struct create_stream_params
struct release_stream_params
{
struct oss_stream *stream;
+ HANDLE timer_thread;
HRESULT result;
};
+struct timer_loop_params
+{
+ struct oss_stream *stream;
+};
+
struct is_format_supported_params
{
const char *device;
@@ -134,6 +140,7 @@ enum oss_funcs
oss_get_endpoint_ids,
oss_create_stream,
oss_release_stream,
+ oss_timer_loop,
oss_is_format_supported,
oss_get_mix_format,
oss_get_buffer_size,
--
2.25.1
2
1
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/wineoss.drv/mmdevdrv.c | 2 +-
dlls/wineoss.drv/oss.c | 4 ++--
dlls/wineoss.drv/unixlib.h | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index fb71aa7562a..e61c3c95df2 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -1120,7 +1120,7 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient3 *iface)
if(!This->timer){
if(!CreateTimerQueueTimer(&This->timer, g_timer_q,
- oss_period_callback, This, 0, stream->period_us / 1000,
+ oss_period_callback, This, 0, stream->period / 10000,
WT_EXECUTEINTIMERTHREAD))
ERR("Unable to create period timer: %u\n", GetLastError());
}
diff --git a/dlls/wineoss.drv/oss.c b/dlls/wineoss.drv/oss.c
index 7e716ef4704..b00925d6e9b 100644
--- a/dlls/wineoss.drv/oss.c
+++ b/dlls/wineoss.drv/oss.c
@@ -564,7 +564,7 @@ static NTSTATUS create_stream(void *args)
}
stream->fmt = &fmtex->Format;
- stream->period_us = params->period / 10;
+ stream->period = params->period;
stream->period_frames = muldiv(params->fmt->nSamplesPerSec, params->period, 10000000);
stream->bufsize_frames = muldiv(params->duration, params->fmt->nSamplesPerSec, 10000000);
@@ -771,7 +771,7 @@ static NTSTATUS get_latency(void *args)
/* pretend we process audio in Period chunks, so max latency includes
* the period time. Some native machines add .6666ms in shared mode. */
- *params->latency = (REFERENCE_TIME)stream->period_us * 10 + 6666;
+ *params->latency = stream->period + 6666;
return oss_unlock_result(stream, ¶ms->result, S_OK);
}
diff --git a/dlls/wineoss.drv/unixlib.h b/dlls/wineoss.drv/unixlib.h
index bc88be80db2..64c954cc769 100644
--- a/dlls/wineoss.drv/unixlib.h
+++ b/dlls/wineoss.drv/unixlib.h
@@ -30,8 +30,9 @@ struct oss_stream
BOOL playing, mute;
UINT64 written_frames, last_pos_frames;
- UINT32 period_us, period_frames, bufsize_frames, held_frames, tmp_buffer_frames, in_oss_frames;
+ UINT32 period_frames, bufsize_frames, held_frames, tmp_buffer_frames, in_oss_frames;
UINT32 oss_bufsize_bytes, lcl_offs_frames; /* offs into local_buffer where valid data starts */
+ REFERENCE_TIME period;
BYTE *local_buffer, *tmp_buffer;
INT32 getbuf_last; /* <0 when using tmp_buffer */
--
2.25.1
2
1
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/wineoss.drv/mmdevdrv.c | 13 +++++--------
dlls/wineoss.drv/oss.c | 13 +++++++++++++
dlls/wineoss.drv/unixlib.h | 8 ++++++++
3 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index 8a2329d1f04..fb71aa7562a 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -827,7 +827,7 @@ static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient3 *iface,
UINT32 *numpad)
{
ACImpl *This = impl_from_IAudioClient3(iface);
- struct oss_stream *stream = This->stream;
+ struct get_current_padding_params params;
TRACE("(%p)->(%p)\n", This, numpad);
@@ -837,15 +837,12 @@ static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient3 *iface,
if(!This->stream)
return AUDCLNT_E_NOT_INITIALIZED;
- oss_lock(stream);
-
- *numpad = stream->held_frames;
-
+ params.stream = This->stream;
+ params.padding = numpad;
+ OSS_CALL(get_current_padding, ¶ms);
TRACE("padding: %u\n", *numpad);
- oss_unlock(stream);
-
- return S_OK;
+ return params.result;
}
static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient3 *iface,
diff --git a/dlls/wineoss.drv/oss.c b/dlls/wineoss.drv/oss.c
index a80557b2c15..7e716ef4704 100644
--- a/dlls/wineoss.drv/oss.c
+++ b/dlls/wineoss.drv/oss.c
@@ -776,6 +776,18 @@ static NTSTATUS get_latency(void *args)
return oss_unlock_result(stream, ¶ms->result, S_OK);
}
+static NTSTATUS get_current_padding(void *args)
+{
+ struct get_current_padding_params *params = args;
+ struct oss_stream *stream = params->stream;
+
+ oss_lock(stream);
+
+ *params->padding = stream->held_frames;
+
+ return oss_unlock_result(stream, ¶ms->result, S_OK);
+}
+
unixlib_entry_t __wine_unix_call_funcs[] =
{
test_connect,
@@ -786,4 +798,5 @@ unixlib_entry_t __wine_unix_call_funcs[] =
get_mix_format,
get_buffer_size,
get_latency,
+ get_current_padding,
};
diff --git a/dlls/wineoss.drv/unixlib.h b/dlls/wineoss.drv/unixlib.h
index 9f4c736fe4e..bc88be80db2 100644
--- a/dlls/wineoss.drv/unixlib.h
+++ b/dlls/wineoss.drv/unixlib.h
@@ -120,6 +120,13 @@ struct get_latency_params
REFERENCE_TIME *latency;
};
+struct get_current_padding_params
+{
+ struct oss_stream *stream;
+ HRESULT result;
+ UINT32 *padding;
+};
+
enum oss_funcs
{
oss_test_connect,
@@ -130,6 +137,7 @@ enum oss_funcs
oss_get_mix_format,
oss_get_buffer_size,
oss_get_latency,
+ oss_get_current_padding,
};
extern unixlib_handle_t oss_handle;
--
2.25.1
2
1
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/wineoss.drv/mmdevdrv.c | 14 +++++---------
dlls/wineoss.drv/oss.c | 15 +++++++++++++++
dlls/wineoss.drv/unixlib.h | 8 ++++++++
3 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index a2f75d7a479..8a2329d1f04 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -806,7 +806,7 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient3 *iface,
REFERENCE_TIME *latency)
{
ACImpl *This = impl_from_IAudioClient3(iface);
- struct oss_stream *stream = This->stream;
+ struct get_latency_params params;
TRACE("(%p)->(%p)\n", This, latency);
@@ -816,15 +816,11 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient3 *iface,
if(!This->stream)
return AUDCLNT_E_NOT_INITIALIZED;
- oss_lock(stream);
-
- /* pretend we process audio in Period chunks, so max latency includes
- * the period time. Some native machines add .6666ms in shared mode. */
- *latency = (REFERENCE_TIME)stream->period_us * 10 + 6666;
-
- oss_unlock(stream);
+ params.stream = This->stream;
+ params.latency = latency;
+ OSS_CALL(get_latency, ¶ms);
- return S_OK;
+ return params.result;
}
static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient3 *iface,
diff --git a/dlls/wineoss.drv/oss.c b/dlls/wineoss.drv/oss.c
index fdad419abfa..a80557b2c15 100644
--- a/dlls/wineoss.drv/oss.c
+++ b/dlls/wineoss.drv/oss.c
@@ -762,6 +762,20 @@ static NTSTATUS get_buffer_size(void *args)
return oss_unlock_result(stream, ¶ms->result, S_OK);
}
+static NTSTATUS get_latency(void *args)
+{
+ struct get_latency_params *params = args;
+ struct oss_stream *stream = params->stream;
+
+ oss_lock(stream);
+
+ /* pretend we process audio in Period chunks, so max latency includes
+ * the period time. Some native machines add .6666ms in shared mode. */
+ *params->latency = (REFERENCE_TIME)stream->period_us * 10 + 6666;
+
+ return oss_unlock_result(stream, ¶ms->result, S_OK);
+}
+
unixlib_entry_t __wine_unix_call_funcs[] =
{
test_connect,
@@ -771,4 +785,5 @@ unixlib_entry_t __wine_unix_call_funcs[] =
is_format_supported,
get_mix_format,
get_buffer_size,
+ get_latency,
};
diff --git a/dlls/wineoss.drv/unixlib.h b/dlls/wineoss.drv/unixlib.h
index b57798ef435..9f4c736fe4e 100644
--- a/dlls/wineoss.drv/unixlib.h
+++ b/dlls/wineoss.drv/unixlib.h
@@ -113,6 +113,13 @@ struct get_buffer_size_params
UINT32 *size;
};
+struct get_latency_params
+{
+ struct oss_stream *stream;
+ HRESULT result;
+ REFERENCE_TIME *latency;
+};
+
enum oss_funcs
{
oss_test_connect,
@@ -122,6 +129,7 @@ enum oss_funcs
oss_is_format_supported,
oss_get_mix_format,
oss_get_buffer_size,
+ oss_get_latency,
};
extern unixlib_handle_t oss_handle;
--
2.25.1
2
1
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/wineoss.drv/mmdevdrv.c | 12 +++++-------
dlls/wineoss.drv/oss.c | 31 +++++++++++++++++++++++++++++++
dlls/wineoss.drv/unixlib.h | 8 ++++++++
3 files changed, 44 insertions(+), 7 deletions(-)
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index 2ea3c80f3ca..a2f75d7a479 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -783,7 +783,7 @@ static HRESULT WINAPI AudioClient_GetBufferSize(IAudioClient3 *iface,
UINT32 *frames)
{
ACImpl *This = impl_from_IAudioClient3(iface);
- struct oss_stream *stream = This->stream;
+ struct get_buffer_size_params params;
TRACE("(%p)->(%p)\n", This, frames);
@@ -793,15 +793,13 @@ static HRESULT WINAPI AudioClient_GetBufferSize(IAudioClient3 *iface,
if(!This->stream)
return AUDCLNT_E_NOT_INITIALIZED;
- oss_lock(stream);
-
- *frames = stream->bufsize_frames;
+ params.stream = This->stream;
+ params.size = frames;
+ OSS_CALL(get_buffer_size, ¶ms);
TRACE("buffer size: %u\n", *frames);
- oss_unlock(stream);
-
- return S_OK;
+ return params.result;
}
static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient3 *iface,
diff --git a/dlls/wineoss.drv/oss.c b/dlls/wineoss.drv/oss.c
index 628d0c5818a..fdad419abfa 100644
--- a/dlls/wineoss.drv/oss.c
+++ b/dlls/wineoss.drv/oss.c
@@ -70,6 +70,24 @@ static int muldiv( int a, int b, int c )
return ret;
}
+static void oss_lock(struct oss_stream *stream)
+{
+ pthread_mutex_lock(&stream->lock);
+}
+
+static void oss_unlock(struct oss_stream *stream)
+{
+ pthread_mutex_unlock(&stream->lock);
+}
+
+static NTSTATUS oss_unlock_result(struct oss_stream *stream,
+ HRESULT *result, HRESULT value)
+{
+ *result = value;
+ oss_unlock(stream);
+ return STATUS_SUCCESS;
+}
+
static NTSTATUS test_connect(void *args)
{
struct test_connect_params *params = args;
@@ -732,6 +750,18 @@ static NTSTATUS get_mix_format(void *args)
return STATUS_SUCCESS;
}
+static NTSTATUS get_buffer_size(void *args)
+{
+ struct get_buffer_size_params *params = args;
+ struct oss_stream *stream = params->stream;
+
+ oss_lock(stream);
+
+ *params->size = stream->bufsize_frames;
+
+ return oss_unlock_result(stream, ¶ms->result, S_OK);
+}
+
unixlib_entry_t __wine_unix_call_funcs[] =
{
test_connect,
@@ -740,4 +770,5 @@ unixlib_entry_t __wine_unix_call_funcs[] =
release_stream,
is_format_supported,
get_mix_format,
+ get_buffer_size,
};
diff --git a/dlls/wineoss.drv/unixlib.h b/dlls/wineoss.drv/unixlib.h
index c0a0b25c374..b57798ef435 100644
--- a/dlls/wineoss.drv/unixlib.h
+++ b/dlls/wineoss.drv/unixlib.h
@@ -106,6 +106,13 @@ struct get_mix_format_params
HRESULT result;
};
+struct get_buffer_size_params
+{
+ struct oss_stream *stream;
+ HRESULT result;
+ UINT32 *size;
+};
+
enum oss_funcs
{
oss_test_connect,
@@ -114,6 +121,7 @@ enum oss_funcs
oss_release_stream,
oss_is_format_supported,
oss_get_mix_format,
+ oss_get_buffer_size,
};
extern unixlib_handle_t oss_handle;
--
2.25.1
2
1
13 Apr '22
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
No point in special handling unexpected test failures.
This patch is to be applied on top of 232366 and 232365.
dlls/d3dxof/tests/d3dxof.c | 60 --------------------------------------
1 file changed, 60 deletions(-)
diff --git a/dlls/d3dxof/tests/d3dxof.c b/dlls/d3dxof/tests/d3dxof.c
index edb5d8547e6..820afd87426 100644
--- a/dlls/d3dxof/tests/d3dxof.c
+++ b/dlls/d3dxof/tests/d3dxof.c
@@ -418,11 +418,6 @@ static void test_refcount(void)
hr = pDirectXFileCreate(&lpDirectXFile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!lpDirectXFile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
ref = get_refcount(lpDirectXFile);
ok(ref == 1, "Unexpected refcount %ld.\n", ref);
@@ -490,11 +485,6 @@ static void test_CreateEnumObject(void)
hr = pDirectXFileCreate(&lpDirectXFile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!lpDirectXFile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, sizeof(template) - 1);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
@@ -565,11 +555,6 @@ static void test_file_types(void)
hr = pDirectXFileCreate(&dxfile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!dxfile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
hr = IDirectXFile_RegisterTemplates(dxfile, empty_txt_file, sizeof(empty_txt_file) - 1);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
@@ -639,11 +624,6 @@ static void test_templates(void)
hr = pDirectXFileCreate(&dxfile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!dxfile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
hr = IDirectXFile_RegisterTemplates(dxfile, templates_bad_file_type1, sizeof(templates_bad_file_type1) - 1);
ok(hr == DXFILEERR_BADFILETYPE, "Unexpected hr %#lx.\n", hr);
@@ -681,11 +661,6 @@ static void test_compressed_files(void)
hr = pDirectXFileCreate(&dxfile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!dxfile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
hr = IDirectXFile_RegisterTemplates(dxfile, compressed_template, sizeof(compressed_template) - 1);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
@@ -728,11 +703,6 @@ static void test_getname(void)
hr = pDirectXFileCreate(&lpDirectXFile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!lpDirectXFile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, sizeof(template) - 1);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
@@ -816,11 +786,6 @@ static void test_syntax(void)
hr = pDirectXFileCreate(&lpDirectXFile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!lpDirectXFile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template_syntax_array_mixed, sizeof(template_syntax_array_mixed) - 1);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
@@ -929,11 +894,6 @@ static void test_syntax_semicolon_comma(void)
hr = pDirectXFileCreate(&dxfile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!dxfile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
hr = IDirectXFile_RegisterTemplates(dxfile, template_syntax_array_mixed, sizeof(template_syntax_array_mixed) - 1);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
@@ -1029,11 +989,6 @@ static void test_complex_object(void)
hr = pDirectXFileCreate(&dxfile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!dxfile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
hr = IDirectXFile_RegisterTemplates(dxfile, templates_complex_object, sizeof(templates_complex_object) - 1);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
@@ -1063,11 +1018,6 @@ static void test_standard_templates(void)
hr = pDirectXFileCreate(&dxfile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!dxfile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
hr = IDirectXFile_RegisterTemplates(dxfile, D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
@@ -1088,11 +1038,6 @@ static void test_type_index_color(void)
hr = pDirectXFileCreate(&dxfile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if (!dxfile)
- {
- skip("Couldn't create DirectXFile interface\n");
- return;
- }
/* Test that 'indexColor' can be used (same as IndexedColor in standard templates) and is case sensitive */
hr = IDirectXFile_RegisterTemplates(dxfile, template_using_index_color_lower, sizeof(template_using_index_color_lower) - 1);
@@ -1241,11 +1186,6 @@ static void test_dump(void)
hr = pDirectXFileCreate(&lpDirectXFile);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- if(!lpDirectXFile)
- {
- skip("Couldn't create DirectXFile interface\n");
- goto exit;
- }
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, pvData, cbSize);
ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
--
2.34.1
2
1
13 Apr '22
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/d3dxof/tests/Makefile.in | 1 -
dlls/d3dxof/tests/d3dxof.c | 382 +++++++++++++++++-----------------
2 files changed, 191 insertions(+), 192 deletions(-)
diff --git a/dlls/d3dxof/tests/Makefile.in b/dlls/d3dxof/tests/Makefile.in
index eecca6f9d8c..5144ff63b97 100644
--- a/dlls/d3dxof/tests/Makefile.in
+++ b/dlls/d3dxof/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3dxof.dll
IMPORTS = d3dxof
diff --git a/dlls/d3dxof/tests/d3dxof.c b/dlls/d3dxof/tests/d3dxof.c
index 9d9e4035b66..05f92bab8cb 100644
--- a/dlls/d3dxof/tests/d3dxof.c
+++ b/dlls/d3dxof/tests/d3dxof.c
@@ -416,7 +416,7 @@ static void test_refcount(void)
}
hr = pDirectXFileCreate(&lpDirectXFile);
- ok(hr == DXFILE_OK, "DirectXFileCreate: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!lpDirectXFile)
{
skip("Couldn't create DirectXFile interface\n");
@@ -424,50 +424,50 @@ static void test_refcount(void)
}
ref = getRefcount( (IUnknown *) lpDirectXFile);
- ok(ref == 1, "Got refcount %d, expected 1\n", ref);
+ ok(ref == 1, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFile_AddRef(lpDirectXFile);
- ok(ref == 2, "Got refcount %d, expected 2\n", ref);
+ ok(ref == 2, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFile_Release(lpDirectXFile);
- ok(ref == 1, "Got refcount %d, expected 1\n", ref);
+ ok(ref == 1, "Unexpected refcount %ld.\n", ref);
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, sizeof(template) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
dxflm.lpMemory = &object;
dxflm.dSize = sizeof(object) - 1;
hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, DXFILELOAD_FROMMEMORY, &lpdxfeo);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
ref = getRefcount( (IUnknown *) lpDirectXFile);
- ok(ref == 1, "Got refcount %d, expected 1\n", ref);
+ ok(ref == 1, "Unexpected refcount %ld.\n", ref);
ref = getRefcount( (IUnknown *) lpdxfeo);
- ok(ref == 1, "Got refcount %d, expected 1\n", ref);
+ ok(ref == 1, "Unexpected refcount %ld.\n", ref);
hr = IDirectXFileEnumObject_GetNextDataObject(lpdxfeo, &lpdxfd);
- ok(hr == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
ref = getRefcount( (IUnknown *) lpDirectXFile);
- ok(ref == 1, "Got refcount %d, expected 1\n", ref);
+ ok(ref == 1, "Unexpected refcount %ld.\n", ref);
ref = getRefcount( (IUnknown *) lpdxfeo);
- ok(ref == 1, "Got refcount %d, expected 1\n", ref);
+ ok(ref == 1, "Unexpected refcount %ld.\n", ref);
/* Enum object gets references to all top level objects */
ref = getRefcount( (IUnknown *) lpdxfd);
- ok(ref == 2, "Got refcount %d, expected 2\n", ref);
+ ok(ref == 2, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFile_Release(lpDirectXFile);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
/* Nothing changes for all other objects */
ref = getRefcount( (IUnknown *) lpdxfeo);
- ok(ref == 1, "Got refcount %d, expected 1\n", ref);
+ ok(ref == 1, "Unexpected refcount %ld.\n", ref);
ref = getRefcount( (IUnknown *) lpdxfd);
- ok(ref == 2, "Got refcount %d, expected 2\n", ref);
+ ok(ref == 2, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFileEnumObject_Release(lpdxfeo);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
/* Enum object releases references to all top level objects */
ref = getRefcount( (IUnknown *) lpdxfd);
- ok(ref == 1, "Got refcount %d, expected 1\n", ref);
+ ok(ref == 1, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFileData_Release(lpdxfd);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
}
static void test_CreateEnumObject(void)
@@ -488,7 +488,7 @@ static void test_CreateEnumObject(void)
}
hr = pDirectXFileCreate(&lpDirectXFile);
- ok(hr == DXFILE_OK, "DirectXFileCreate: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!lpDirectXFile)
{
skip("Couldn't create DirectXFile interface\n");
@@ -496,57 +496,57 @@ static void test_CreateEnumObject(void)
}
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, sizeof(template) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
dxflm.lpMemory = &object;
dxflm.dSize = sizeof(object) - 1;
/* Check that only lowest 4 bits are relevant in DXFILELOADOPTIONS */
hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, 0xFFFFFFF0 + DXFILELOAD_FROMMEMORY, &lpdxfeo);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileEnumObject_GetNextDataObject(lpdxfeo, &lpdxfd);
- ok(hr == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Get all data (szMember == NULL) */
hr = IDirectXFileData_GetData(lpdxfd, NULL, &size, (void**)&pdata);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- ok(size == 8, "Retrieved data size is wrong (%u instead of 8)\n", size);
+ ok(size == 8, "Unexpected data size %lu.\n", size);
ok((*((WORD*)pdata) == 1) && (*((WORD*)(pdata+2)) == 2) && (*((DWORD*)(pdata+4)) == 3), "Retrieved data is wrong\n");
/* Get only "major" member (szMember == "major") */
hr = IDirectXFileData_GetData(lpdxfd, "major", &size, (void**)&pdata);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- ok(size == 2, "Retrieved data size is wrong (%u instead of 2)\n", size);
+ ok(size == 2, "Unexpected data size %lu.\n", size);
ok(*((WORD*)pdata) == 1, "Retrieved data is wrong (%u instead of 1)\n", *((WORD*)pdata));
/* Get only "minor" member (szMember == "minor") */
hr = IDirectXFileData_GetData(lpdxfd, "minor", &size, (void**)&pdata);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- ok(size == 2, "Retrieved data size is wrong (%u instead of 2)\n", size);
+ ok(size == 2, "Unexpected data size %lu.\n", size);
ok(*((WORD*)pdata) == 2, "Retrieved data is wrong (%u instead of 2)\n", *((WORD*)pdata));
/* Get only "flags" member (szMember == "flags") */
hr = IDirectXFileData_GetData(lpdxfd, "flags", &size, (void**)&pdata);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
- ok(size == 4, "Retrieved data size is wrong (%u instead of 4)\n", size);
+ ok(size == 4, "Unexpected data size %lu.\n", size);
ok(*((WORD*)pdata) == 3, "Retrieved data is wrong (%u instead of 3)\n", *((WORD*)pdata));
/* Try to get not existing member (szMember == "unknown") */
hr = IDirectXFileData_GetData(lpdxfd, "unknown", &size, (void**)&pdata);
- ok(hr == DXFILEERR_BADDATAREFERENCE, "IDirectXFileData_GetData: %x\n", hr);
+ ok(hr == DXFILEERR_BADDATAREFERENCE, "Unexpected hr %#lx.\n", hr);
ref = IDirectXFileEnumObject_Release(lpdxfeo);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFile_Release(lpDirectXFile);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFileData_Release(lpdxfd);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
}
static void test_file_types(void)
@@ -563,7 +563,7 @@ static void test_file_types(void)
}
hr = pDirectXFileCreate(&dxfile);
- ok(hr == DXFILE_OK, "DirectXFileCreate: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!dxfile)
{
skip("Couldn't create DirectXFile interface\n");
@@ -571,64 +571,64 @@ static void test_file_types(void)
}
hr = IDirectXFile_RegisterTemplates(dxfile, empty_txt_file, sizeof(empty_txt_file) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFile_RegisterTemplates(dxfile, empty_bin_file, sizeof(empty_bin_file) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFile_RegisterTemplates(dxfile, empty_tzip_file, sizeof(empty_tzip_file) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFile_RegisterTemplates(dxfile, empty_bzip_file, sizeof(empty_bzip_file) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFile_RegisterTemplates(dxfile, empty_cmp_file, sizeof(empty_cmp_file) - 1);
- ok(hr == DXFILEERR_BADFILETYPE, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILEERR_BADFILETYPE, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFile_RegisterTemplates(dxfile, empty_xxxx_file, sizeof(empty_xxxx_file) - 1);
- ok(hr == DXFILEERR_BADFILETYPE, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILEERR_BADFILETYPE, "Unexpected hr %#lx.\n", hr);
lminfo.lpMemory = empty_txt_file;
lminfo.dSize = sizeof(empty_txt_file) - 1;
hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (hr == DXFILE_OK) IDirectXFileEnumObject_Release(enum_object);
lminfo.lpMemory = empty_bin_file;
lminfo.dSize = sizeof(empty_bin_file) - 1;
hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (hr == DXFILE_OK) IDirectXFileEnumObject_Release(enum_object);
lminfo.lpMemory = empty_tzip_file;
lminfo.dSize = sizeof(empty_tzip_file) - 1;
hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (hr == DXFILE_OK) IDirectXFileEnumObject_Release(enum_object);
lminfo.lpMemory = empty_bzip_file;
lminfo.dSize = sizeof(empty_bzip_file) - 1;
hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (hr == DXFILE_OK) IDirectXFileEnumObject_Release(enum_object);
lminfo.lpMemory = empty_cmp_file;
lminfo.dSize = sizeof(empty_cmp_file) - 1;
hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object);
- ok(hr == DXFILEERR_BADFILETYPE, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILEERR_BADFILETYPE, "Unexpected hr %#lx.\n", hr);
lminfo.lpMemory = empty_xxxx_file;
lminfo.dSize = sizeof(empty_xxxx_file) - 1;
hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object);
- ok(hr == DXFILEERR_BADFILETYPE, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILEERR_BADFILETYPE, "Unexpected hr %#lx.\n", hr);
IDirectXFile_Release(dxfile);
}
static void test_templates(void)
{
- HRESULT ret;
IDirectXFile *dxfile = NULL;
+ HRESULT hr;
if (!pDirectXFileCreate)
{
@@ -636,28 +636,28 @@ static void test_templates(void)
return;
}
- ret = pDirectXFileCreate(&dxfile);
- ok(ret == DXFILE_OK, "DirectXFileCreate: %x\n", ret);
+ hr = pDirectXFileCreate(&dxfile);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!dxfile)
{
skip("Couldn't create DirectXFile interface\n");
return;
}
- ret = IDirectXFile_RegisterTemplates(dxfile, templates_bad_file_type1, sizeof(templates_bad_file_type1) - 1);
- ok(ret == DXFILEERR_BADFILETYPE, "RegisterTemplates returned %#x, expected %#x\n", ret, DXFILEERR_BADFILETYPE);
+ hr = IDirectXFile_RegisterTemplates(dxfile, templates_bad_file_type1, sizeof(templates_bad_file_type1) - 1);
+ ok(hr == DXFILEERR_BADFILETYPE, "Unexpected hr %#lx.\n", hr);
- ret = IDirectXFile_RegisterTemplates(dxfile, templates_bad_file_version, sizeof(templates_bad_file_version) - 1);
- ok(ret == DXFILEERR_BADFILEVERSION, "RegisterTemplates returned %#x, expected %#x\n", ret, DXFILEERR_BADFILEVERSION);
+ hr = IDirectXFile_RegisterTemplates(dxfile, templates_bad_file_version, sizeof(templates_bad_file_version) - 1);
+ ok(hr == DXFILEERR_BADFILEVERSION, "Unexpected hr %#lx.\n", hr);
- ret = IDirectXFile_RegisterTemplates(dxfile, templates_bad_file_type2, sizeof(templates_bad_file_type2) - 1);
- ok(ret == DXFILEERR_BADFILETYPE, "RegisterTemplates returned %#x, expected %#x\n", ret, DXFILEERR_BADFILETYPE);
+ hr = IDirectXFile_RegisterTemplates(dxfile, templates_bad_file_type2, sizeof(templates_bad_file_type2) - 1);
+ ok(hr == DXFILEERR_BADFILETYPE, "Unexpected hr %#lx.\n", hr);
- ret = IDirectXFile_RegisterTemplates(dxfile, templates_bad_file_float_size, sizeof(templates_bad_file_float_size) - 1);
- ok(ret == DXFILEERR_BADFILEFLOATSIZE, "RegisterTemplates returned %#x, expected %#x\n", ret, DXFILEERR_BADFILEFLOATSIZE);
+ hr = IDirectXFile_RegisterTemplates(dxfile, templates_bad_file_float_size, sizeof(templates_bad_file_float_size) - 1);
+ ok(hr == DXFILEERR_BADFILEFLOATSIZE, "Unexpected hr %#lx.\n", hr);
- ret = IDirectXFile_RegisterTemplates(dxfile, templates_parse_error, sizeof(templates_parse_error) - 1);
- ok(ret == DXFILEERR_PARSEERROR, "RegisterTemplates returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = IDirectXFile_RegisterTemplates(dxfile, templates_parse_error, sizeof(templates_parse_error) - 1);
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
IDirectXFile_Release(dxfile);
}
@@ -679,7 +679,7 @@ static void test_compressed_files(void)
}
hr = pDirectXFileCreate(&dxfile);
- ok(hr == DXFILE_OK, "DirectXFileCreate: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!dxfile)
{
skip("Couldn't create DirectXFile interface\n");
@@ -687,18 +687,18 @@ static void test_compressed_files(void)
}
hr = IDirectXFile_RegisterTemplates(dxfile, compressed_template, sizeof(compressed_template) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
lminfo.lpMemory = compressed_object;
lminfo.dSize = sizeof(compressed_object) - 1;
hr = IDirectXFile_CreateEnumObject(dxfile, &lminfo, DXFILELOAD_FROMMEMORY, &enum_object);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileEnumObject_GetNextDataObject(enum_object, &file_data);
- ok(hr == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetData(file_data, NULL, &size, (void**)&data);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
ok(size == 8, "Retrieved data size is wrong\n");
ok((*((WORD*)data) == 1) && (*((WORD*)(data+2)) == 2) && (*((DWORD*)(data+4)) == 3), "Retrieved data is wrong\n");
@@ -726,7 +726,7 @@ static void test_getname(void)
}
hr = pDirectXFileCreate(&lpDirectXFile);
- ok(hr == DXFILE_OK, "DirectXFileCreate: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!lpDirectXFile)
{
skip("Couldn't create DirectXFile interface\n");
@@ -734,67 +734,67 @@ static void test_getname(void)
}
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, sizeof(template) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Check object with name */
dxflm.lpMemory = &object;
dxflm.dSize = sizeof(object) - 1;
hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, DXFILELOAD_FROMMEMORY, &lpdxfeo);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileEnumObject_GetNextDataObject(lpdxfeo, &lpdxfd);
- ok(hr == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetName(lpdxfd, NULL, NULL);
- ok(hr == DXFILEERR_BADVALUE, "IDirectXFileData_GetName: %x\n", hr);
+ ok(hr == DXFILEERR_BADVALUE, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetName(lpdxfd, name, NULL);
- ok(hr == DXFILEERR_BADVALUE, "IDirectXFileData_GetName: %x\n", hr);
+ ok(hr == DXFILEERR_BADVALUE, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetName(lpdxfd, NULL, &length);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetName: %x\n", hr);
- ok(length == 7, "Returned length should be 7 instead of %u\n", length);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ ok(length == 7, "Unexpected length %lu.\n", length);
length = sizeof(name);
hr = IDirectXFileData_GetName(lpdxfd, name, &length);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetName: %x\n", hr);
- ok(length == 7, "Returned length should be 7 instead of %u\n", length);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ ok(length == 7, "Unexpected length %lu.\n", length);
ok(!strcmp(name, "Object"), "Returned string should be 'Object' instead of '%s'\n", name);
length = 3;
hr = IDirectXFileData_GetName(lpdxfd, name, &length);
- ok(hr == DXFILEERR_BADVALUE, "IDirectXFileData_GetName: %x\n", hr);
+ ok(hr == DXFILEERR_BADVALUE, "Unexpected hr %#lx.\n", hr);
ref = IDirectXFileEnumObject_Release(lpdxfeo);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFileData_Release(lpdxfd);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
/* Check object without name */
dxflm.lpMemory = &object_noname;
dxflm.dSize = sizeof(object_noname) - 1;
hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, DXFILELOAD_FROMMEMORY, &lpdxfeo);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileEnumObject_GetNextDataObject(lpdxfeo, &lpdxfd);
- ok(hr == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetName(lpdxfd, NULL, &length);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetName: %x\n", hr);
- ok(length == 0, "Returned length should be 0 instead of %u\n", length);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!length, "Unexpected length %lu.\n", length);
length = 0;
name[0] = 0x7f;
hr = IDirectXFileData_GetName(lpdxfd, name, &length);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetName: %x\n", hr);
- ok(length == 0, "Returned length should be 0 instead of %u\n", length);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!length, "Unexpected length %lu.\n", length);
ok(name[0] == 0x7f, "First character is %#x instead of 0x7f\n", name[0]);
length = sizeof(name);
name[0] = 0x7f;
hr = IDirectXFileData_GetName(lpdxfd, name, &length);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetName: %x\n", hr);
- ok(length == 0, "Returned length should be 0 instead of %u\n", length);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!length, "Unexpected length %lu.\n", length);
ok(name[0] == 0, "First character is %#x instead of 0x00\n", name[0]);
ref = IDirectXFileEnumObject_Release(lpdxfeo);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFileData_Release(lpdxfd);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
ref = IDirectXFile_Release(lpDirectXFile);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %ld.\n", ref);
}
static void test_syntax(void)
@@ -814,7 +814,7 @@ static void test_syntax(void)
}
hr = pDirectXFileCreate(&lpDirectXFile);
- ok(hr == DXFILE_OK, "DirectXFileCreate: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!lpDirectXFile)
{
skip("Couldn't create DirectXFile interface\n");
@@ -822,32 +822,32 @@ static void test_syntax(void)
}
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template_syntax_array_mixed, sizeof(template_syntax_array_mixed) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test empty array */
dxflm.lpMemory = &object_syntax_empty_array;
dxflm.dSize = sizeof(object_syntax_empty_array) - 1;
hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, DXFILELOAD_FROMMEMORY, &lpdxfeo);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileEnumObject_GetNextDataObject(lpdxfeo, &lpdxfd);
- ok(hr == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (hr == DXFILE_OK)
IDirectXFileData_Release(lpdxfd);
IDirectXFileEnumObject_Release(lpdxfeo);
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template_syntax_string, sizeof(template_syntax_string) - 1);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test normal string */
dxflm.lpMemory = &object_syntax_string_normal;
dxflm.dSize = sizeof(object_syntax_string_normal) - 1;
hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, DXFILELOAD_FROMMEMORY, &lpdxfeo);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileEnumObject_GetNextDataObject(lpdxfeo, &lpdxfd);
- ok(hr == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetData(lpdxfd, NULL, &size, (void**)&string);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
- ok(size == sizeof(char*), "Got wrong data size %d\n", size);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size == sizeof(char*), "Got wrong data size %ld.\n", size);
ok(!strcmp(*string, "foobar"), "Got string %s, expected foobar\n", *string);
if (hr == DXFILE_OK)
IDirectXFileData_Release(lpdxfd);
@@ -857,12 +857,12 @@ static void test_syntax(void)
dxflm.lpMemory = &object_syntax_string_with_separator;
dxflm.dSize = sizeof(object_syntax_string_with_separator) - 1;
hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, DXFILELOAD_FROMMEMORY, &lpdxfeo);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileEnumObject_GetNextDataObject(lpdxfeo, &lpdxfd);
- ok(hr == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetData(lpdxfd, NULL, &size, (void**)&string);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
- ok(size == sizeof(char*), "Got wrong data size %d\n", size);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size == sizeof(char*), "Got wrong data size %ld.\n", size);
ok(!strcmp(*string, "foo;bar"), "Got string %s, expected foo;bar\n", *string);
if (hr == DXFILE_OK)
IDirectXFileData_Release(lpdxfd);
@@ -872,12 +872,12 @@ static void test_syntax(void)
dxflm.lpMemory = &object_syntax_string_bin;
dxflm.dSize = sizeof(object_syntax_string_bin);
hr = IDirectXFile_CreateEnumObject(lpDirectXFile, &dxflm, DXFILELOAD_FROMMEMORY, &lpdxfeo);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileEnumObject_GetNextDataObject(lpdxfeo, &lpdxfd);
- ok(hr == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetData(lpdxfd, NULL, &size, (void**)&string);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
- ok(size == sizeof(char*), "Got wrong data size %d\n", size);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size == sizeof(char*), "Got wrong data size %ld.\n", size);
ok(!strcmp(*string, "foobar"), "Got string %s, expected foobar\n", *string);
if (hr == DXFILE_OK)
IDirectXFileData_Release(lpdxfd);
@@ -899,14 +899,14 @@ static HRESULT test_buffer_object(IDirectXFile *dxfile, char* object_data, DWORD
load_info.lpMemory = object_data;
load_info.dSize = object_size;
hr = IDirectXFile_CreateEnumObject(dxfile, &load_info, DXFILELOAD_FROMMEMORY, &enum_object);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
ret = IDirectXFileEnumObject_GetNextDataObject(enum_object, &file_data);
if (ret == DXFILE_OK)
{
hr = IDirectXFileData_GetData(file_data, NULL, &size, (void**)&array);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
- ok(size == sizeof(values), "Got wrong data size %d\n", size);
- ok(!memcmp(array, values, sizeof(values)), "Got values [%u, %u, %u, %u, %u], expected [%u, %u, %u, %u, %u]\n",
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size == sizeof(values), "Got wrong data size %ld.\n", size);
+ ok(!memcmp(array, values, sizeof(values)), "Got values [%lu, %lu, %lu, %lu, %lu], expected [%lu, %lu, %lu, %lu, %lu]\n",
array[0], array[1], array[2], array[3], array[4], values[0], values[1], values[2], values[3], values[4]);
IDirectXFileData_Release(file_data);
}
@@ -917,8 +917,8 @@ static HRESULT test_buffer_object(IDirectXFile *dxfile, char* object_data, DWORD
static void test_syntax_semicolon_comma(void)
{
- HRESULT ret;
IDirectXFile *dxfile = NULL;
+ HRESULT hr;
if (!pDirectXFileCreate)
{
@@ -926,99 +926,99 @@ static void test_syntax_semicolon_comma(void)
return;
}
- ret = pDirectXFileCreate(&dxfile);
- ok(ret == DXFILE_OK, "DirectXFileCreate failed with %#x\n", ret);
+ hr = pDirectXFileCreate(&dxfile);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!dxfile)
{
skip("Couldn't create DirectXFile interface\n");
return;
}
- ret = IDirectXFile_RegisterTemplates(dxfile, template_syntax_array_mixed, sizeof(template_syntax_array_mixed) - 1);
- ok(ret == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates failed with %#x\n", ret);
+ hr = IDirectXFile_RegisterTemplates(dxfile, template_syntax_array_mixed, sizeof(template_syntax_array_mixed) - 1);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test semicolon separators in text mode */
- ret = test_buffer_object(dxfile, object_syntax_semicolon_txt, sizeof(object_syntax_semicolon_txt) - 1);
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_semicolon_txt, sizeof(object_syntax_semicolon_txt) - 1);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test semicolon separators in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_semicolon_bin, sizeof(object_syntax_semicolon_bin));
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_semicolon_bin, sizeof(object_syntax_semicolon_bin));
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test comma separators in text mode */
- ret = test_buffer_object(dxfile, object_syntax_comma_txt, sizeof(object_syntax_comma_txt) - 1);
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_comma_txt, sizeof(object_syntax_comma_txt) - 1);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test comma separators in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_comma_bin, sizeof(object_syntax_comma_bin));
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_comma_bin, sizeof(object_syntax_comma_bin));
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test multi-semicolons separators in text mode */
- ret = test_buffer_object(dxfile, object_syntax_multi_semicolons_txt, sizeof(object_syntax_multi_semicolons_txt) - 1);
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_multi_semicolons_txt, sizeof(object_syntax_multi_semicolons_txt) - 1);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test multi-semicolons separators in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_multi_semicolons_bin, sizeof(object_syntax_multi_semicolons_bin));
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_multi_semicolons_bin, sizeof(object_syntax_multi_semicolons_bin));
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test multi-commas separators in text mode */
- ret = test_buffer_object(dxfile, object_syntax_multi_commas_txt, sizeof(object_syntax_multi_semicolons_txt) - 1);
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_multi_commas_txt, sizeof(object_syntax_multi_semicolons_txt) - 1);
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
/* Test multi-commas separators in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_multi_commas_bin, sizeof(object_syntax_multi_semicolons_bin));
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_multi_commas_bin, sizeof(object_syntax_multi_semicolons_bin));
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
/* Test multi-semicolons + single comma separators in text mode */
- ret = test_buffer_object(dxfile, object_syntax_multi_semicolons_and_comma_txt, sizeof(object_syntax_multi_semicolons_and_comma_txt) - 1);
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_multi_semicolons_and_comma_txt, sizeof(object_syntax_multi_semicolons_and_comma_txt) - 1);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test multi-semicolons + single comma separators in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_multi_semicolons_and_comma_bin, sizeof(object_syntax_multi_semicolons_and_comma_bin));
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_multi_semicolons_and_comma_bin, sizeof(object_syntax_multi_semicolons_and_comma_bin));
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test comma + semicolon separators in text mode */
- ret = test_buffer_object(dxfile, object_syntax_comma_and_semicolon_txt, sizeof(object_syntax_comma_and_semicolon_txt) - 1);
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_comma_and_semicolon_txt, sizeof(object_syntax_comma_and_semicolon_txt) - 1);
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
/* Test comma + semicolon separators in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_comma_and_semicolon_bin, sizeof(object_syntax_comma_and_semicolon_bin));
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_comma_and_semicolon_bin, sizeof(object_syntax_comma_and_semicolon_bin));
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
/* Test no ending separator in text mode */
- ret = test_buffer_object(dxfile, object_syntax_no_ending_separator_txt, sizeof(object_syntax_no_ending_separator_txt) - 1);
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_no_ending_separator_txt, sizeof(object_syntax_no_ending_separator_txt) - 1);
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
/* Test no ending separator in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_no_ending_separator_bin, sizeof(object_syntax_no_ending_separator_bin));
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_no_ending_separator_bin, sizeof(object_syntax_no_ending_separator_bin));
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
/* Test no array separator in text mode */
- ret = test_buffer_object(dxfile, object_syntax_array_no_separator_txt, sizeof(object_syntax_array_no_separator_txt) - 1);
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_array_no_separator_txt, sizeof(object_syntax_array_no_separator_txt) - 1);
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
/* Test no array separator in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_array_no_separator_bin, sizeof(object_syntax_array_no_separator_bin));
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_array_no_separator_bin, sizeof(object_syntax_array_no_separator_bin));
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
/* Test object with a single integer list in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_full_integer_list_bin, sizeof(object_syntax_full_integer_list_bin));
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_full_integer_list_bin, sizeof(object_syntax_full_integer_list_bin));
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test object with mixed integer list and integers + single comma separators in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_mixed_integer_list_bin, sizeof(object_syntax_mixed_integer_list_bin));
- ok(ret == DXFILE_OK, "test_buffer_object failed with %#x\n", ret);
+ hr = test_buffer_object(dxfile, object_syntax_mixed_integer_list_bin, sizeof(object_syntax_mixed_integer_list_bin));
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
/* Test integer list followed by a semicolon in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_integer_list_semicolon_bin, sizeof(object_syntax_integer_list_semicolon_bin));
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_integer_list_semicolon_bin, sizeof(object_syntax_integer_list_semicolon_bin));
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
/* Test integer list followed by a comma in binary mode */
- ret = test_buffer_object(dxfile, object_syntax_integer_list_comma_bin, sizeof(object_syntax_integer_list_comma_bin));
- ok(ret == DXFILEERR_PARSEERROR, "test_buffer_object returned %#x, expected %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = test_buffer_object(dxfile, object_syntax_integer_list_comma_bin, sizeof(object_syntax_integer_list_comma_bin));
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
IDirectXFile_Release(dxfile);
}
static void test_complex_object(void)
{
- HRESULT ret;
IDirectXFile *dxfile = NULL;
IDirectXFileEnumObject *enum_object;
IDirectXFileData *file_data;
DXFILELOADMEMORY load_info;
+ HRESULT hr;
if (!pDirectXFileCreate)
{
@@ -1026,23 +1026,23 @@ static void test_complex_object(void)
return;
}
- ret = pDirectXFileCreate(&dxfile);
- ok(ret == DXFILE_OK, "DirectXFileCreate failed with %#x\n", ret);
+ hr = pDirectXFileCreate(&dxfile);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!dxfile)
{
skip("Couldn't create DirectXFile interface\n");
return;
}
- ret = IDirectXFile_RegisterTemplates(dxfile, templates_complex_object, sizeof(templates_complex_object) - 1);
- ok(ret == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates failed with %#x\n", ret);
+ hr = IDirectXFile_RegisterTemplates(dxfile, templates_complex_object, sizeof(templates_complex_object) - 1);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
load_info.lpMemory = object_complex;
load_info.dSize = sizeof(object_complex) - 1;
- ret = IDirectXFile_CreateEnumObject(dxfile, &load_info, DXFILELOAD_FROMMEMORY, &enum_object);
- ok(ret == DXFILE_OK, "IDirectXFile_CreateEnumObject failed with %#x\n", ret);
- ret = IDirectXFileEnumObject_GetNextDataObject(enum_object, &file_data);
- ok(ret == DXFILE_OK, "IDirectXFileEnumObject_GetNextDataObject failed with %#x\n", ret);
+ hr = IDirectXFile_CreateEnumObject(dxfile, &load_info, DXFILELOAD_FROMMEMORY, &enum_object);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ hr = IDirectXFileEnumObject_GetNextDataObject(enum_object, &file_data);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
IDirectXFileData_Release(file_data);
IDirectXFileEnumObject_Release(enum_object);
@@ -1051,8 +1051,8 @@ static void test_complex_object(void)
static void test_standard_templates(void)
{
- HRESULT ret;
IDirectXFile *dxfile = NULL;
+ HRESULT hr;
if (!pDirectXFileCreate)
{
@@ -1060,24 +1060,24 @@ static void test_standard_templates(void)
return;
}
- ret = pDirectXFileCreate(&dxfile);
- ok(ret == DXFILE_OK, "DirectXFileCreate failed with %#x\n", ret);
+ hr = pDirectXFileCreate(&dxfile);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!dxfile)
{
skip("Couldn't create DirectXFile interface\n");
return;
}
- ret = IDirectXFile_RegisterTemplates(dxfile, D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES);
- ok(ret == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates failed with %#x\n", ret);
+ hr = IDirectXFile_RegisterTemplates(dxfile, D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
IDirectXFile_Release(dxfile);
}
static void test_type_index_color(void)
{
- HRESULT ret;
IDirectXFile *dxfile = NULL;
+ HRESULT hr;
if (!pDirectXFileCreate)
{
@@ -1085,8 +1085,8 @@ static void test_type_index_color(void)
return;
}
- ret = pDirectXFileCreate(&dxfile);
- ok(ret == DXFILE_OK, "DirectXFileCreate failed with %#x\n", ret);
+ hr = pDirectXFileCreate(&dxfile);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if (!dxfile)
{
skip("Couldn't create DirectXFile interface\n");
@@ -1094,10 +1094,10 @@ static void test_type_index_color(void)
}
/* Test that 'indexColor' can be used (same as IndexedColor in standard templates) and is case sensitive */
- ret = IDirectXFile_RegisterTemplates(dxfile, template_using_index_color_lower, sizeof(template_using_index_color_lower) - 1);
- ok(ret == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates failed with %#x\n", ret);
- ret = IDirectXFile_RegisterTemplates(dxfile, template_using_index_color_upper, sizeof(template_using_index_color_upper) - 1);
- ok(ret == DXFILEERR_PARSEERROR, "IDirectXFileImpl_RegisterTemplates returned %#x instead of %#x\n", ret, DXFILEERR_PARSEERROR);
+ hr = IDirectXFile_RegisterTemplates(dxfile, template_using_index_color_lower, sizeof(template_using_index_color_lower) - 1);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
+ hr = IDirectXFile_RegisterTemplates(dxfile, template_using_index_color_upper, sizeof(template_using_index_color_upper) - 1);
+ ok(hr == DXFILEERR_PARSEERROR, "Unexpected hr %#lx.\n", hr);
IDirectXFile_Release(dxfile);
}
@@ -1120,16 +1120,16 @@ static void process_data(LPDIRECTXFILEDATA lpDirectXFileData, int level)
DWORD k, size;
hr = IDirectXFileData_GetId(lpDirectXFileData, &clsid);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetId: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetName(lpDirectXFileData, name, &len);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetName: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetType(lpDirectXFileData, &clsid_type);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetType: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileData_GetData(lpDirectXFileData, NULL, &size, (void**)&pData);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetData: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < level; i++)
printf(" ");
- printf("Found object '%s' - %s - %s - %d\n",
+ printf("Found object '%s' - %s - %s - %ld\n",
len ? name : "", wine_dbgstr_guid(&clsid), wine_dbgstr_guid(clsid_type), size);
if (EXPAND_STRING && size == 4)
@@ -1176,9 +1176,9 @@ static void process_data(LPDIRECTXFILEDATA lpDirectXFileData, int level)
if (0)
{
hr = IDirectXFileDataReference_GetId(lpDirectXFileData, &clsid);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetId: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFileDataReference_GetName(lpDirectXFileData, name, &len);
- ok(hr == DXFILE_OK, "IDirectXFileData_GetName: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
}
IDirectXFileDataReference_Resolve(p2, &pfdo);
process_data(pfdo, level);
@@ -1196,7 +1196,7 @@ if (0)
IDirectXFileObject_Release(pChildObj);
}
- ok(hr == DXFILE_OK || hr == DXFILEERR_NOMOREOBJECTS, "IDirectXFileData_GetNextObject: %x\n", hr);
+ ok(hr == DXFILE_OK || hr == DXFILEERR_NOMOREOBJECTS, "Unexpected hr %#lx.\n", hr);
}
/* Dump an X file 'objects.x' and its related templates file 'templates.x' if they are both presents
@@ -1236,10 +1236,10 @@ static void test_dump(void)
goto exit;
}
- printf("Load templates file (%d bytes)\n", cbSize);
+ printf("Load templates file (%ld bytes)\n", cbSize);
hr = pDirectXFileCreate(&lpDirectXFile);
- ok(hr == DXFILE_OK, "DirectXFileCreate: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
if(!lpDirectXFile)
{
skip("Couldn't create DirectXFile interface\n");
@@ -1247,10 +1247,10 @@ static void test_dump(void)
}
hr = IDirectXFile_RegisterTemplates(lpDirectXFile, pvData, cbSize);
- ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXFile_CreateEnumObject(lpDirectXFile, (LPVOID)"objects.x", DXFILELOAD_FROMFILE, &lpDirectXFileEnumObject);
- ok(hr == DXFILE_OK, "IDirectXFile_CreateEnumObject: %x\n", hr);
+ ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr);
while (SUCCEEDED(hr = IDirectXFileEnumObject_GetNextDataObject(lpDirectXFileEnumObject, &lpDirectXFileData)))
{
@@ -1258,13 +1258,13 @@ static void test_dump(void)
process_data(lpDirectXFileData, 0);
IDirectXFileData_Release(lpDirectXFileData);
}
- ok(hr == DXFILE_OK || hr == DXFILEERR_NOMOREOBJECTS, "IDirectXFileEnumObject_GetNextDataObject: %x\n", hr);
+ ok(hr == DXFILE_OK || hr == DXFILEERR_NOMOREOBJECTS, "Unexpected hr %#lx.\n", hr);
ref = IDirectXFile_Release(lpDirectXFileEnumObject);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %lu.\n", ref);
ref = IDirectXFile_Release(lpDirectXFile);
- ok(ref == 0, "Got refcount %d, expected 0\n", ref);
+ ok(!ref, "Unexpected refcount %lu.\n", ref);
CloseHandle(hFile);
--
2.35.1
2
3
[PATCH v4 1/3] msvcr100: Add _StructuredTaskCollection::_Schedule stub.
by Torge Matthies 13 Apr '22
by Torge Matthies 13 Apr '22
13 Apr '22
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47375
Signed-off-by: Torge Matthies <tmatthies(a)codeweavers.com>
---
v3 -> v4:
Add dummy UnrealizedChore definition.
dlls/concrt140/concrt140.spec | 2 +-
dlls/msvcr100/msvcr100.spec | 2 +-
dlls/msvcr110/msvcr110.spec | 2 +-
dlls/msvcr120/msvcr120.spec | 2 +-
dlls/msvcr120_app/msvcr120_app.spec | 2 +-
dlls/msvcrt/concurrency.c | 25 +++++++++++++++++++++++++
6 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec
index 50db9348327..ab57c736672 100644
--- a/dlls/concrt140/concrt140.spec
+++ b/dlls/concrt140/concrt140.spec
@@ -596,7 +596,7 @@
@ stub -arch=win64 ?_RunAndWait(a)_TaskCollection@details(a)Concurrency@@QEAA?AW4_TaskCollectionStatus(a)23@PEAV_UnrealizedChore(a)23@@Z
@ stub -arch=arm ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAAXPAV_UnrealizedChore(a)23@@Z
@ stub -arch=i386 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@@Z
-@ stub -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z
+@ thiscall -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z(ptr ptr) StructuredTaskCollection__Schedule
@ stub -arch=arm ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAAXPAV_UnrealizedChore(a)23@PAVlocation(a)3@@Z
@ stub -arch=i386 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@PAVlocation(a)3@@Z
@ stub -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@PEAVlocation(a)3@@Z
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index 19b4cbe96d7..68a78a6aa16 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -364,7 +364,7 @@
@ stub -arch=win32 ?_RunAndWait(a)_TaskCollection@details(a)Concurrency@@QAG?AW4_TaskCollectionStatus(a)23@PAV_UnrealizedChore(a)23@@Z
@ stub -arch=win64 ?_RunAndWait(a)_TaskCollection@details(a)Concurrency@@QEAA?AW4_TaskCollectionStatus(a)23@PEAV_UnrealizedChore(a)23@@Z
@ stub -arch=win32 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@@Z
-@ stub -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z
+@ thiscall -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z(ptr ptr) StructuredTaskCollection__Schedule
@ stub -arch=win32 ?_Schedule(a)_TaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@@Z
@ stub -arch=win64 ?_Schedule(a)_TaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z
@ thiscall -arch=win32 ?_SetSpinCount@?$_SpinWait@$00(a)details@Concurrency@@QAEXI(a)Z(ptr long) SpinWait__SetSpinCount
diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec
index 23840f85eda..0f5eaf9ac51 100644
--- a/dlls/msvcr110/msvcr110.spec
+++ b/dlls/msvcr110/msvcr110.spec
@@ -616,7 +616,7 @@
@ stub -arch=win64 ?_RunAndWait(a)_TaskCollection@details(a)Concurrency@@QEAA?AW4_TaskCollectionStatus(a)23@PEAV_UnrealizedChore(a)23@@Z
@ stub -arch=arm ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAAXPAV_UnrealizedChore(a)23@@Z
@ stub -arch=i386 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@@Z
-@ stub -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z
+@ thiscall -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z(ptr ptr) StructuredTaskCollection__Schedule
@ stub -arch=arm ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAAXPAV_UnrealizedChore(a)23@PAVlocation(a)3@@Z
@ stub -arch=i386 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@PAVlocation(a)3@@Z
@ stub -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@PEAVlocation(a)3@@Z
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index 64ddeed42f4..332a617932e 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -598,7 +598,7 @@
@ stub -arch=win64 ?_RunAndWait(a)_TaskCollection@details(a)Concurrency@@QEAA?AW4_TaskCollectionStatus(a)23@PEAV_UnrealizedChore(a)23@@Z
@ stub -arch=arm ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAAXPAV_UnrealizedChore(a)23@@Z
@ stub -arch=i386 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@@Z
-@ stub -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z
+@ thiscall -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z(ptr ptr) StructuredTaskCollection__Schedule
@ stub -arch=arm ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAAXPAV_UnrealizedChore(a)23@PAVlocation(a)3@@Z
@ stub -arch=i386 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@PAVlocation(a)3@@Z
@ stub -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@PEAVlocation(a)3@@Z
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 05f408d6884..ee2ee2c42a1 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -594,7 +594,7 @@
@ stub -arch=win64 ?_RunAndWait(a)_TaskCollection@details(a)Concurrency@@QEAA?AW4_TaskCollectionStatus(a)23@PEAV_UnrealizedChore(a)23@@Z
@ stub -arch=arm ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAAXPAV_UnrealizedChore(a)23@@Z
@ stub -arch=i386 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@@Z
-@ stub -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z
+@ thiscall -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z(ptr ptr) msvcr120.?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z
@ stub -arch=arm ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAAXPAV_UnrealizedChore(a)23@PAVlocation(a)3@@Z
@ stub -arch=i386 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QAEXPAV_UnrealizedChore(a)23@PAVlocation(a)3@@Z
@ stub -arch=win64 ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@PEAVlocation(a)3@@Z
diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c
index 2ca6421b0e7..b884952b314 100644
--- a/dlls/msvcrt/concurrency.c
+++ b/dlls/msvcrt/concurrency.c
@@ -174,6 +174,20 @@ typedef struct cs_queue
#endif
} cs_queue;
+#if _MSVCR_VER >= 100
+
+typedef struct
+{
+ char dummy;
+} UnrealizedChore;
+
+typedef struct
+{
+ char dummy;
+} StructuredTaskCollection;
+
+#endif /* _MSVCR_VER >= 100 */
+
typedef struct
{
ULONG_PTR unk_thread_id;
@@ -1741,6 +1755,17 @@ bool __thiscall SpinWait__SpinOnce(SpinWait *this)
}
}
+#if _MSVCR_VER >= 100
+
+/* ?_Schedule(a)_StructuredTaskCollection@details(a)Concurrency@@QEAAXPEAV_UnrealizedChore(a)23@@Z */
+DEFINE_THISCALL_WRAPPER(StructuredTaskCollection__Schedule, 8)
+void __thiscall StructuredTaskCollection__Schedule(StructuredTaskCollection *this, UnrealizedChore *chore)
+{
+ FIXME("(%p %p): stub!\n", this, chore);
+}
+
+#endif /* _MSVCR_VER >= 100 */
+
/* ??0critical_section(a)Concurrency@@QAE(a)XZ */
/* ??0critical_section(a)Concurrency@@QEAA(a)XZ */
DEFINE_THISCALL_WRAPPER(critical_section_ctor, 4)
--
2.35.1
2
3