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
February 2019
- 73 participants
- 737 discussions
06 Feb '19
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/gdi32/freetype.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index c38108eece..de62425173 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -8217,14 +8217,14 @@ static BOOL load_child_font(GdiFont *font, CHILD_FONT *child)
UINT penalty = 0, new_penalty = 0;
BOOL bold, italic, bd, it;
- italic = font->font_desc.lf.lfItalic ? TRUE : FALSE;
- bold = font->font_desc.lf.lfWeight > FW_MEDIUM ? TRUE : FALSE;
+ italic = !!font->font_desc.lf.lfItalic;
+ bold = font->font_desc.lf.lfWeight > FW_MEDIUM;
face_list = get_face_list_from_family( child->face->family );
LIST_FOR_EACH_ENTRY( child_face, face_list, Face, entry )
{
- it = child_face->ntmFlags & NTM_ITALIC ? TRUE : FALSE;
- bd = child_face->ntmFlags & NTM_BOLD ? TRUE : FALSE;
+ it = !!(child_face->ntmFlags & NTM_ITALIC);
+ bd = !!(child_face->ntmFlags & NTM_BOLD);
new_penalty = ( it ^ italic ) + ( bd ^ bold );
if (!best_face || new_penalty < penalty)
{
--
2.20.1
2
1
[PATCH] crypt32: CryptAcquireCertificatePrivateKey should look up certificate in the user's store if the provided certificate is not linked to a provider.
by Dmitry Timoshkov 06 Feb '19
by Dmitry Timoshkov 06 Feb '19
06 Feb '19
Under Windows passing to CryptAcquireCertificatePrivateKey() a certificate
retrieved from the key container using CryptGetKeyParam(KP_CERTIFICATE) +
CertCreateCertificateContext() works although such a certificate doesn't
have assigned properties at all. In order this to work Windows probably
looks up an original certificate in the user's private store.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/crypt32/cert.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index e1c7c54340..02693b96d0 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -886,6 +886,7 @@ BOOL WINAPI CryptAcquireCertificatePrivateKey(PCCERT_CONTEXT pCert,
PCRYPT_KEY_PROV_INFO info = NULL;
CERT_KEY_CONTEXT keyContext;
DWORD size;
+ PCCERT_CONTEXT cert_in_store = NULL;
TRACE("(%p, %08x, %p, %p, %p, %p)\n", pCert, dwFlags, pvReserved,
phCryptProv, pdwKeySpec, pfCallerFreeProv);
@@ -896,6 +897,34 @@ BOOL WINAPI CryptAcquireCertificatePrivateKey(PCCERT_CONTEXT pCert,
ret = CertGetCertificateContextProperty(pCert,
CERT_KEY_PROV_INFO_PROP_ID, 0, &size);
+
+ if (!ret)
+ {
+ static const WCHAR myW[] = { 'M','y',0 };
+ HCERTSTORE hstore;
+
+ hstore = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0,
+ CERT_SYSTEM_STORE_CURRENT_USER, myW);
+ if (hstore)
+ {
+ cert_in_store = CertFindCertificateInStore(hstore, pCert->dwCertEncodingType, 0,
+ CERT_FIND_EXISTING, pCert, NULL);
+ if (cert_in_store)
+ {
+ ret = CertGetCertificateContextProperty(cert_in_store, CERT_KEY_PROV_INFO_PROP_ID, 0, &size);
+ if (ret)
+ pCert = cert_in_store;
+ else
+ {
+ CertFreeCertificateContext(cert_in_store);
+ cert_in_store = NULL;
+ }
+ }
+
+ CertCloseStore(hstore, 0);
+ }
+ }
+
if (ret)
{
info = HeapAlloc(GetProcessHeap(), 0, size);
@@ -949,6 +978,8 @@ BOOL WINAPI CryptAcquireCertificatePrivateKey(PCCERT_CONTEXT pCert,
}
}
HeapFree(GetProcessHeap(), 0, info);
+ if (cert_in_store)
+ CertFreeCertificateContext(cert_in_store);
return ret;
}
--
2.20.1
2
2
1
0
[PATCH 1/5] wined3d: Store transforms in the wined3d_stateblock_state structure.
by Zebediah Figura 05 Feb '19
by Zebediah Figura 05 Feb '19
05 Feb '19
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/wined3d/device.c | 2 +-
dlls/wined3d/stateblock.c | 19 ++++++++++++++++---
dlls/wined3d/wined3d_private.h | 2 ++
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 72e328f630..f23e76f37e 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1495,11 +1495,11 @@ void CDECL wined3d_device_set_transform(struct wined3d_device *device,
TRACE("%.8e %.8e %.8e %.8e\n", matrix->_41, matrix->_42, matrix->_43, matrix->_44);
/* Handle recording of state blocks. */
+ device->update_stateblock_state->transforms[d3dts] = *matrix;
if (device->recording)
{
TRACE("Recording... not performing anything.\n");
device->recording->changed.transform[d3dts >> 5] |= 1u << (d3dts & 0x1f);
- device->update_state->transforms[d3dts] = *matrix;
return;
}
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index e6e68b428b..c1a5d02b78 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -787,7 +787,7 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock)
TRACE("Updating transform %#x.\n", transform);
- stateblock->state.transforms[transform] = src_state->transforms[transform];
+ stateblock->stateblock_state.transforms[transform] = state->transforms[transform];
}
if (stateblock->changed.indices
@@ -1110,8 +1110,10 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
/* Transform states. */
for (i = 0; i < stateblock->num_contained_transform_states; ++i)
{
- wined3d_device_set_transform(device, stateblock->contained_transform_states[i],
- &stateblock->state.transforms[stateblock->contained_transform_states[i]]);
+ enum wined3d_transform_state transform = stateblock->contained_transform_states[i];
+
+ state->transforms[transform] = stateblock->stateblock_state.transforms[transform];
+ wined3d_device_set_transform(device, transform, &stateblock->stateblock_state.transforms[transform]);
}
if (stateblock->changed.indices)
@@ -1424,12 +1426,23 @@ void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
static void stateblock_state_init_default(struct wined3d_stateblock_state *state,
const struct wined3d_d3d_info *d3d_info)
{
+ struct wind3d_matrix identity;
unsigned int i;
+ get_identity_matrix(&identity);
+
+ state->transforms[WINED3D_TS_PROJECTION] = identity;
+ state->transforms[WINED3D_TS_VIEW] = identity;
+ for (i = 0; i < 256; ++i)
+ {
+ state->transforms[WINED3D_TS_WORLD_MATRIX(i)] = identity;
+ }
+
init_default_render_states(state->rs, d3d_info);
for (i = 0; i < MAX_TEXTURES; ++i)
{
+ state->transforms[WINED3D_TS_TEXTURE0 + i] = identity;
init_default_texture_state(i, state->texture_states[i]);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1a461c0dec..ee69549114 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2985,6 +2985,8 @@ struct wined3d_stateblock_state
struct wined3d_texture *textures[MAX_COMBINED_SAMPLERS];
DWORD sampler_states[MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1];
DWORD texture_states[MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1];
+
+ struct wined3d_matrix transforms[HIGHEST_TRANSFORMSTATE + 1];
};
struct wined3d_device
--
2.20.1
2
9
Binary packages for various distributions will be available from:
https://www.winehq.org/download
Summary of the past few weeks
* Rebased to current wine 4.1 (836 patches are applied to wine vanilla)
* Reviewed and upstreamed patches.
Upstreamed (Either directly from staging or fixed with a similar patch).
* ddraw: Implement ddraw7_FlipToGDISurface.
* msvcp140: Export _Equivalent and port tests.
* wtsapi32: Improve WTSQueryUserToken stub.
* d3dx9_36/tests: Fix D3DXMatrixTransformation when the scaling matrix
is NULL.
* api-ms-win-crt-private-l1-1-0: Update to 10.0.17134.12
* ucrtbase: Forward a few functions for dxil.dll and pkgmgr.exe
* windowscodecs: Implement IWICPalette::InitializeFromBitmap.
* gdiplus: Implement GdipInitializePalette.
* gdiplus/tests: Add some tests for GdipInitializePalette.
* windowscodecs: Add support for converting to 8bppIndexed format to
IWICFormatConverter.
Added:
* [44850] iphlpapi: Add GetBestRoute2 stub.
* [15934] mciavi32: Add Support for MCI_MCIAVI_PLAY_FULLSCREEN.
* [46284] Add D3DXSHProjectCubeMap stub.
* [39080] wined3d: Ignore multisample quality for MULTISAMPLE_NONE.
* [39080] wined3d: Return stream frequency of 1 if it was not set.
* [26445] urlmon: Use unescaped Urls for FTP actions
* [46549] httpapi: Fake success from HttpCreateServerSession
* [44948] kernel32: Implement CreateSymbolicLink
* [46564] bcrypt: BCryptDestroySecret/BCryptSecretAgreement stubs.
Updated:
* bcrypt-BCryptGenerateKeyPair
* kernel32-CreateSymbolicLink
Where can you help
* Run Steam/Battle.net/UPlay.
* Try you favorite game.
* Test your favorite applications.
* Improve staging patches and get them accepted upstream.
As always, if you find a bug, please report it via
https://bugs.winehq.org
Best Regards
 Alistair.
1
0
[PATCH v2 resend 1/2] kernelbase/tests: Relax tests for WaitOnAddress().
by Zebediah Figura 05 Feb '19
by Zebediah Figura 05 Feb '19
05 Feb '19
Application should be expected to handle spurious wakeups, which the
following implementation will give in WakeByAddressSingle(). Avoid testing
that WakeByAddressSingle() only wakes one thread.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/kernelbase/tests/sync.c | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/dlls/kernelbase/tests/sync.c b/dlls/kernelbase/tests/sync.c
index 99cbbc43bc..7a335d1af8 100644
--- a/dlls/kernelbase/tests/sync.c
+++ b/dlls/kernelbase/tests/sync.c
@@ -31,19 +31,23 @@ static void (WINAPI *pWakeByAddressAll)(void *);
static void (WINAPI *pWakeByAddressSingle)(void *);
static LONG64 address;
-static LONG64 compare;
static DWORD WINAPI test_WaitOnAddress_func(void *arg)
{
BOOL ret = FALSE;
- DWORD gle;
- while (address == compare)
+ LONG64 compare;
+
+ do
{
- SetLastError(0xdeadbeef);
- ret = pWaitOnAddress(&address, &compare, sizeof(compare), INFINITE);
- gle = GetLastError();
- ok(gle == 0xdeadbeef || broken(gle == ERROR_SUCCESS) /* Win 8 */, "got %d\n", gle);
- }
- ok(ret, "got %d\n", ret);
+ while (!(compare = address))
+ {
+ SetLastError(0xdeadbeef);
+ ret = pWaitOnAddress(&address, &compare, sizeof(compare), INFINITE);
+ ok(ret, "wait failed\n");
+ ok(GetLastError() == 0xdeadbeef || broken(GetLastError() == ERROR_SUCCESS) /* Win 8 */,
+ "got error %d\n", GetLastError());
+ }
+ } while (InterlockedCompareExchange64(&address, compare - 1, compare) != compare);
+
return 0;
}
@@ -51,6 +55,7 @@ static void test_WaitOnAddress(void)
{
DWORD gle, val, nthreads;
HANDLE threads[8];
+ LONG64 compare;
BOOL ret;
int i;
@@ -135,31 +140,28 @@ static void test_WaitOnAddress(void)
/* WakeByAddressAll */
address = 0;
- compare = 0;
for (i = 0; i < ARRAY_SIZE(threads); i++)
threads[i] = CreateThread(NULL, 0, test_WaitOnAddress_func, NULL, 0, NULL);
Sleep(100);
- address = ~0;
+ address = ARRAY_SIZE(threads);
pWakeByAddressAll(&address);
val = WaitForMultipleObjects(ARRAY_SIZE(threads), threads, TRUE, 5000);
ok(val == WAIT_OBJECT_0, "got %d\n", val);
for (i = 0; i < ARRAY_SIZE(threads); i++)
CloseHandle(threads[i]);
+ ok(!address, "got unexpected value %s\n", wine_dbgstr_longlong(address));
/* WakeByAddressSingle */
address = 0;
for (i = 0; i < ARRAY_SIZE(threads); i++)
- threads[i] = CreateThread(NULL, 0, test_WaitOnAddress_func, NULL, 0, NULL);
+ threads[i] = CreateThread(NULL, 0, test_WaitOnAddress_func, NULL, 0, NULL);
Sleep(100);
- address = 1;
nthreads = ARRAY_SIZE(threads);
+ address = ARRAY_SIZE(threads);
while (nthreads)
{
- val = WaitForMultipleObjects(nthreads, threads, FALSE, 0);
- ok(val == STATUS_TIMEOUT, "got %u\n", val);
-
pWakeByAddressSingle(&address);
val = WaitForMultipleObjects(nthreads, threads, FALSE, 2000);
ok(val < WAIT_OBJECT_0 + nthreads, "got %u\n", val);
@@ -167,7 +169,7 @@ static void test_WaitOnAddress(void)
memmove(&threads[val], &threads[val+1], (nthreads - val - 1) * sizeof(threads[0]));
nthreads--;
}
-
+ ok(!address, "got unexpected value %s\n", wine_dbgstr_longlong(address));
}
START_TEST(sync)
--
2.14.1
3
6
05 Feb '19
Application should be expected to handle spurious wakeups, which the
following implementation will give in WakeByAddressSingle(). Avoid testing
that WakeByAddressSingle() only wakes one thread.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/kernelbase/tests/sync.c | 50 +++++++++++++++++++-----------------
1 file changed, 26 insertions(+), 24 deletions(-)
diff --git a/dlls/kernelbase/tests/sync.c b/dlls/kernelbase/tests/sync.c
index 99cbbc43bc..eb1a20f11e 100644
--- a/dlls/kernelbase/tests/sync.c
+++ b/dlls/kernelbase/tests/sync.c
@@ -30,20 +30,24 @@ static BOOL (WINAPI *pWaitOnAddress)(volatile void *, void *, SIZE_T, DWORD);
static void (WINAPI *pWakeByAddressAll)(void *);
static void (WINAPI *pWakeByAddressSingle)(void *);
-static LONG64 address;
-static LONG64 compare;
+static LONG address;
static DWORD WINAPI test_WaitOnAddress_func(void *arg)
{
BOOL ret = FALSE;
- DWORD gle;
- while (address == compare)
+ LONG compare;
+
+ do
{
- SetLastError(0xdeadbeef);
- ret = pWaitOnAddress(&address, &compare, sizeof(compare), INFINITE);
- gle = GetLastError();
- ok(gle == 0xdeadbeef || broken(gle == ERROR_SUCCESS) /* Win 8 */, "got %d\n", gle);
- }
- ok(ret, "got %d\n", ret);
+ while (!(compare = address))
+ {
+ SetLastError(0xdeadbeef);
+ ret = pWaitOnAddress(&address, &compare, sizeof(compare), INFINITE);
+ ok(ret, "wait failed\n");
+ ok(GetLastError() == 0xdeadbeef || broken(GetLastError() == ERROR_SUCCESS) /* Win 8 */,
+ "got error %d\n", GetLastError());
+ }
+ } while (InterlockedCompareExchange(&address, compare - 1, compare) != compare);
+
return 0;
}
@@ -51,6 +55,7 @@ static void test_WaitOnAddress(void)
{
DWORD gle, val, nthreads;
HANDLE threads[8];
+ LONG compare;
BOOL ret;
int i;
@@ -64,8 +69,8 @@ static void test_WaitOnAddress(void)
compare = 0;
if (0) /* crash on Windows */
{
- ret = pWaitOnAddress(&address, NULL, 8, 0);
- ret = pWaitOnAddress(NULL, &compare, 8, 0);
+ ret = pWaitOnAddress(&address, NULL, 4, 0);
+ ret = pWaitOnAddress(NULL, &compare, 4, 0);
}
/* invalid arguments */
@@ -111,15 +116,15 @@ static void test_WaitOnAddress(void)
/* different address size */
address = 0;
- compare = 0xffff0000;
+ compare = 0xff00;
SetLastError(0xdeadbeef);
- ret = pWaitOnAddress(&address, &compare, 4, 0);
+ ret = pWaitOnAddress(&address, &compare, 2, 0);
gle = GetLastError();
ok(gle == 0xdeadbeef || broken(gle == ERROR_SUCCESS) /* Win 8 */, "got %d\n", gle);
ok(ret, "got %d\n", ret);
SetLastError(0xdeadbeef);
- ret = pWaitOnAddress(&address, &compare, 2, 0);
+ ret = pWaitOnAddress(&address, &compare, 1, 0);
gle = GetLastError();
ok(gle == ERROR_TIMEOUT, "got %d\n", gle);
ok(!ret, "got %d\n", ret);
@@ -128,38 +133,35 @@ static void test_WaitOnAddress(void)
address = 0;
compare = 1;
SetLastError(0xdeadbeef);
- ret = pWaitOnAddress(&address, &compare, 8, 0);
+ ret = pWaitOnAddress(&address, &compare, 4, 0);
gle = GetLastError();
ok(gle == 0xdeadbeef || broken(gle == ERROR_SUCCESS) /* Win 8 */, "got %d\n", gle);
ok(ret, "got %d\n", ret);
/* WakeByAddressAll */
address = 0;
- compare = 0;
for (i = 0; i < ARRAY_SIZE(threads); i++)
threads[i] = CreateThread(NULL, 0, test_WaitOnAddress_func, NULL, 0, NULL);
Sleep(100);
- address = ~0;
+ address = ARRAY_SIZE(threads);
pWakeByAddressAll(&address);
val = WaitForMultipleObjects(ARRAY_SIZE(threads), threads, TRUE, 5000);
ok(val == WAIT_OBJECT_0, "got %d\n", val);
for (i = 0; i < ARRAY_SIZE(threads); i++)
CloseHandle(threads[i]);
+ ok(!address, "got unexpected value %s\n", wine_dbgstr_longlong(address));
/* WakeByAddressSingle */
address = 0;
for (i = 0; i < ARRAY_SIZE(threads); i++)
- threads[i] = CreateThread(NULL, 0, test_WaitOnAddress_func, NULL, 0, NULL);
+ threads[i] = CreateThread(NULL, 0, test_WaitOnAddress_func, NULL, 0, NULL);
Sleep(100);
- address = 1;
nthreads = ARRAY_SIZE(threads);
+ address = ARRAY_SIZE(threads);
while (nthreads)
{
- val = WaitForMultipleObjects(nthreads, threads, FALSE, 0);
- ok(val == STATUS_TIMEOUT, "got %u\n", val);
-
pWakeByAddressSingle(&address);
val = WaitForMultipleObjects(nthreads, threads, FALSE, 2000);
ok(val < WAIT_OBJECT_0 + nthreads, "got %u\n", val);
@@ -167,7 +169,7 @@ static void test_WaitOnAddress(void)
memmove(&threads[val], &threads[val+1], (nthreads - val - 1) * sizeof(threads[0]));
nthreads--;
}
-
+ ok(!address, "got unexpected value %s\n", wine_dbgstr_longlong(address));
}
START_TEST(sync)
--
2.20.1
1
1
1
0
4
5
05 Feb '19
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/odbc32/proxyodbc.c | 1835 +++++++++++++++++++++++++++--------------------
1 file changed, 1051 insertions(+), 784 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index ab28506708..31c5f5e4c2 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -677,7 +677,6 @@ static BOOL ODBC_LoadDMFunctions(void)
return TRUE;
}
-
/*************************************************************************
* SQLAllocConnect [ODBC32.001]
*/
@@ -725,32 +724,32 @@ SQLRETURN WINAPI ODBC32_SQLAllocEnv(SQLHENV *EnvironmentHandle)
*/
SQLRETURN WINAPI ODBC32_SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
{
- SQLRETURN ret;
- TRACE("(Type %d, Handle %p)\n", HandleType, InputHandle);
+ SQLRETURN ret;
- if (!pSQLAllocHandle)
- {
- if (nErrorType == ERROR_LIBRARY_NOT_FOUND)
- WARN("ProxyODBC: Cannot load ODBC driver manager library.\n");
-
- if (HandleType == SQL_HANDLE_ENV)
- *OutputHandle = SQL_NULL_HENV;
- else if (HandleType == SQL_HANDLE_DBC)
- *OutputHandle = SQL_NULL_HDBC;
- else if (HandleType == SQL_HANDLE_STMT)
- *OutputHandle = SQL_NULL_HSTMT;
- else if (HandleType == SQL_HANDLE_DESC)
- *OutputHandle = SQL_NULL_HDESC;
-
- TRACE ("Not ready\n");
- return SQL_ERROR;
- }
+ TRACE("(HandleType %d, InputHandle %p, OutputHandle %p)\n", HandleType, InputHandle, OutputHandle);
- ret = pSQLAllocHandle(HandleType, InputHandle, OutputHandle);
- TRACE("Returns %d, Handle %p\n", ret, *OutputHandle);
- return ret;
-}
+ if (!pSQLAllocHandle)
+ {
+ if (nErrorType == ERROR_LIBRARY_NOT_FOUND)
+ WARN("ProxyODBC: Cannot load ODBC driver manager library.\n");
+
+ if (HandleType == SQL_HANDLE_ENV)
+ *OutputHandle = SQL_NULL_HENV;
+ else if (HandleType == SQL_HANDLE_DBC)
+ *OutputHandle = SQL_NULL_HDBC;
+ else if (HandleType == SQL_HANDLE_STMT)
+ *OutputHandle = SQL_NULL_HSTMT;
+ else if (HandleType == SQL_HANDLE_DESC)
+ *OutputHandle = SQL_NULL_HDESC;
+
+ TRACE ("Not ready\n");
+ return SQL_ERROR;
+ }
+ ret = pSQLAllocHandle(HandleType, InputHandle, OutputHandle);
+ TRACE("Returning %d, Handle %p\n", ret, *OutputHandle);
+ return ret;
+}
/*************************************************************************
* SQLAllocStmt [ODBC32.003]
@@ -776,29 +775,32 @@ SQLRETURN WINAPI ODBC32_SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *Stateme
/*************************************************************************
* SQLAllocHandleStd [ODBC32.077]
*/
-SQLRETURN WINAPI ODBC32_SQLAllocHandleStd( SQLSMALLINT HandleType,
- SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
+SQLRETURN WINAPI ODBC32_SQLAllocHandleStd(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
{
- TRACE("ProxyODBC: SQLAllocHandleStd.\n");
+ SQLRETURN ret;
- if (!pSQLAllocHandleStd)
- {
- if (nErrorType == ERROR_LIBRARY_NOT_FOUND)
- WARN("ProxyODBC: Cannot load ODBC driver manager library.\n");
-
- if (HandleType == SQL_HANDLE_ENV)
- *OutputHandle = SQL_NULL_HENV;
- else if (HandleType == SQL_HANDLE_DBC)
- *OutputHandle = SQL_NULL_HDBC;
- else if (HandleType == SQL_HANDLE_STMT)
- *OutputHandle = SQL_NULL_HSTMT;
- else if (HandleType == SQL_HANDLE_DESC)
- *OutputHandle = SQL_NULL_HDESC;
-
- return SQL_ERROR;
- }
+ TRACE("(HandleType %d, InputHandle %p, OutputHandle %p)\n", HandleType, InputHandle, OutputHandle);
+
+ if (!pSQLAllocHandleStd)
+ {
+ if (nErrorType == ERROR_LIBRARY_NOT_FOUND)
+ WARN("ProxyODBC: Cannot load ODBC driver manager library.\n");
+
+ if (HandleType == SQL_HANDLE_ENV)
+ *OutputHandle = SQL_NULL_HENV;
+ else if (HandleType == SQL_HANDLE_DBC)
+ *OutputHandle = SQL_NULL_HDBC;
+ else if (HandleType == SQL_HANDLE_STMT)
+ *OutputHandle = SQL_NULL_HSTMT;
+ else if (HandleType == SQL_HANDLE_DESC)
+ *OutputHandle = SQL_NULL_HDESC;
- return pSQLAllocHandleStd(HandleType, InputHandle, OutputHandle);
+ return SQL_ERROR;
+ }
+
+ ret = pSQLAllocHandleStd(HandleType, InputHandle, OutputHandle);
+ TRACE ("Returning %d, OutputHandle %p\n", ret, *OutputHandle);
+ return ret;
}
static const char *debugstr_sqllen( SQLLEN len )
@@ -867,94 +869,116 @@ SQLRETURN WINAPI ODBC32_SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT Para
*/
SQLRETURN WINAPI ODBC32_SQLCancel(SQLHSTMT StatementHandle)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLCancel) return SQL_ERROR;
- return pSQLCancel(StatementHandle);
-}
+ TRACE("(StatementHandle %p)\n", StatementHandle);
+
+ if (!pSQLCancel) return SQL_ERROR;
+ ret = pSQLCancel(StatementHandle);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLCloseCursor [ODBC32.026]
*/
SQLRETURN WINAPI ODBC32_SQLCloseCursor(SQLHSTMT StatementHandle)
{
- SQLRETURN ret;
- TRACE("(Handle %p)\n", StatementHandle);
+ SQLRETURN ret;
- if (!pSQLCloseCursor) return SQL_ERROR;
+ TRACE("(StatementHandle %p)\n", StatementHandle);
- ret = pSQLCloseCursor(StatementHandle);
- TRACE("Returns %d\n", ret);
- return ret;
-}
+ if (!pSQLCloseCursor) return SQL_ERROR;
+ ret = pSQLCloseCursor(StatementHandle);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLColAttribute [ODBC32.027]
*/
-SQLRETURN WINAPI ODBC32_SQLColAttribute (SQLHSTMT StatementHandle,
- SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
- SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength,
- SQLSMALLINT *StringLength, SQLLEN *NumericAttribute)
+SQLRETURN WINAPI ODBC32_SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber,
+ SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttribute,
+ SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
+ SQLLEN *NumericAttribute)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLColAttribute) return SQL_ERROR;
- return pSQLColAttribute(StatementHandle, ColumnNumber, FieldIdentifier,
- CharacterAttribute, BufferLength, StringLength, NumericAttribute);
-}
+ TRACE("(StatementHandle %p, ColumnNumber %d, FieldIdentifier %d, CharacterAttribute %p, BufferLength %d,"
+ " StringLength %p, NumericAttribute %p)\n", StatementHandle, ColumnNumber, FieldIdentifier,
+ CharacterAttribute, BufferLength, StringLength, NumericAttribute);
+ if (!pSQLColAttribute) return SQL_ERROR;
+
+ ret = pSQLColAttribute(StatementHandle, ColumnNumber, FieldIdentifier, CharacterAttribute, BufferLength,
+ StringLength, NumericAttribute);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLColumns [ODBC32.040]
*/
-SQLRETURN WINAPI ODBC32_SQLColumns(SQLHSTMT StatementHandle,
- SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
- SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
- SQLCHAR *TableName, SQLSMALLINT NameLength3,
- SQLCHAR *ColumnName, SQLSMALLINT NameLength4)
+SQLRETURN WINAPI ODBC32_SQLColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+ SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName,
+ SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLColumns) return SQL_ERROR;
- return pSQLColumns(StatementHandle, CatalogName, NameLength1,
- SchemaName, NameLength2, TableName, NameLength3, ColumnName, NameLength4);
-}
+ TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s,"
+ " NameLength3 %d, ColumnName %s, NameLength4 %d)\n", StatementHandle,
+ debugstr_an((const char *)CatalogName, NameLength1), NameLength1,
+ debugstr_an((const char *)SchemaName, NameLength2), NameLength2,
+ debugstr_an((const char *)TableName, NameLength3), NameLength3,
+ debugstr_an((const char *)ColumnName, NameLength4), NameLength4);
+
+ if (!pSQLColumns) return SQL_ERROR;
+ ret = pSQLColumns(StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2, TableName,
+ NameLength3, ColumnName, NameLength4);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLConnect [ODBC32.007]
*/
-SQLRETURN WINAPI ODBC32_SQLConnect(SQLHDBC ConnectionHandle,
- SQLCHAR *ServerName, SQLSMALLINT NameLength1,
- SQLCHAR *UserName, SQLSMALLINT NameLength2,
- SQLCHAR *Authentication, SQLSMALLINT NameLength3)
+SQLRETURN WINAPI ODBC32_SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSMALLINT NameLength1,
+ SQLCHAR *UserName, SQLSMALLINT NameLength2, SQLCHAR *Authentication,
+ SQLSMALLINT NameLength3)
{
- SQLRETURN ret;
- TRACE("(Server=%.*s)\n",NameLength1, ServerName);
+ SQLRETURN ret;
- if (!pSQLConnect) return SQL_ERROR;
+ TRACE("(ConnectionHandle %p, ServerName %s, NameLength1 %d, UserName %s, NameLength2 %d, Authentication %p,"
+ " NameLength3 %d)\n", ConnectionHandle,
+ debugstr_an((const char *)ServerName, NameLength1), NameLength1,
+ debugstr_an((const char *)UserName, NameLength2), NameLength2,
+ debugstr_an((const char *)Authentication, NameLength3), NameLength3);
- ret = pSQLConnect(ConnectionHandle, ServerName, NameLength1,
- UserName, NameLength2, Authentication, NameLength3);
+ if (!pSQLConnect) return SQL_ERROR;
- TRACE("Returns %d\n", ret);
- return ret;
+ ret = pSQLConnect(ConnectionHandle, ServerName, NameLength1, UserName, NameLength2, Authentication, NameLength3);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
-
/*************************************************************************
* SQLCopyDesc [ODBC32.028]
*/
SQLRETURN WINAPI ODBC32_SQLCopyDesc(SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLCopyDesc) return SQL_ERROR;
- return pSQLCopyDesc(SourceDescHandle, TargetDescHandle);
-}
+ TRACE("(SourceDescHandle %p, TargetDescHandle %p)\n", SourceDescHandle, TargetDescHandle);
+
+ if (!pSQLCopyDesc) return SQL_ERROR;
+ ret = pSQLCopyDesc(SourceDescHandle, TargetDescHandle);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLDataSources [ODBC32.057]
@@ -986,30 +1010,30 @@ SQLRETURN WINAPI ODBC32_SQLDataSources(SQLHENV EnvironmentHandle, SQLUSMALLINT D
return ret;
}
-SQLRETURN WINAPI ODBC32_SQLDataSourcesA(SQLHENV EnvironmentHandle,
- SQLUSMALLINT Direction, SQLCHAR *ServerName,
- SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1,
- SQLCHAR *Description, SQLSMALLINT BufferLength2,
- SQLSMALLINT *NameLength2)
+SQLRETURN WINAPI ODBC32_SQLDataSourcesA(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR *ServerName,
+ SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description,
+ SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2)
{
SQLRETURN ret;
- TRACE("EnvironmentHandle = %p\n", EnvironmentHandle);
+ TRACE("(EnvironmentHandle %p, Direction %d, ServerName %p, BufferLength1 %d, NameLength1 %p, Description %p,"
+ " BufferLength2 %d, NameLength2 %p)\n", EnvironmentHandle, Direction, ServerName, BufferLength1,
+ NameLength1, Description, BufferLength2, NameLength2);
if (!pSQLDataSourcesA) return SQL_ERROR;
- ret = pSQLDataSourcesA(EnvironmentHandle, Direction, ServerName,
- BufferLength1, NameLength1, Description, BufferLength2, NameLength2);
+ ret = pSQLDataSourcesA(EnvironmentHandle, Direction, ServerName, BufferLength1, NameLength1, Description,
+ BufferLength2, NameLength2);
if (TRACE_ON(odbc))
{
- TRACE("Returns %d \t", ret);
- if (NameLength1 && *NameLength1 > 0)
- TRACE("DataSource = %s,", ServerName);
- if (NameLength2 && *NameLength2 > 0)
- TRACE(" Description = %s", Description);
+ if (ServerName && NameLength1 && *NameLength1 > 0)
+ TRACE(" DataSource %s", debugstr_an((const char *)ServerName, *NameLength1));
+ if (Description && NameLength2 && *NameLength2 > 0)
+ TRACE(" Description %s", debugstr_an((const char *)Description, *NameLength2));
TRACE("\n");
}
+ TRACE("Returning %d\n", ret);
return ret;
}
@@ -1066,63 +1090,78 @@ SQLRETURN WINAPI ODBC32_SQLDisconnect(SQLHDBC ConnectionHandle)
*/
SQLRETURN WINAPI ODBC32_SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLEndTran) return SQL_ERROR;
- return pSQLEndTran(HandleType, Handle, CompletionType);
-}
+ TRACE("(HandleType %d, Handle %p, CompletionType %d)\n", HandleType, Handle, CompletionType);
+ if (!pSQLEndTran) return SQL_ERROR;
+
+ ret = pSQLEndTran(HandleType, Handle, CompletionType);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLError [ODBC32.010]
*/
-SQLRETURN WINAPI ODBC32_SQLError(SQLHENV EnvironmentHandle,
- SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle,
- SQLCHAR *Sqlstate, SQLINTEGER *NativeError,
- SQLCHAR *MessageText, SQLSMALLINT BufferLength,
- SQLSMALLINT *TextLength)
+SQLRETURN WINAPI ODBC32_SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle,
+ SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText,
+ SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
{
- SQLRETURN ret;
+ SQLRETURN ret;
- TRACE("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, BufferLength %d)\n",
- EnvironmentHandle, ConnectionHandle, StatementHandle, BufferLength);
+ TRACE("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, Sqlstate %p, NativeError %p,"
+ " MessageText %p, BufferLength %d, TextLength %p)\n", EnvironmentHandle, ConnectionHandle,
+ StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength);
- if (!pSQLError) return SQL_ERROR;
- ret = pSQLError(EnvironmentHandle, ConnectionHandle, StatementHandle,
- Sqlstate, NativeError, MessageText, BufferLength, TextLength);
- if (ret == SQL_SUCCESS)
- TRACE("SQLState %s, Error %d, Text %s, Textlen %d\n",
- debugstr_an((char *)Sqlstate, 5), *NativeError,
- debugstr_an((char *)MessageText, *TextLength), *TextLength);
- else
- TRACE("Returns %d\n", ret);
- return ret;
-}
+ if (!pSQLError) return SQL_ERROR;
+
+ ret = pSQLError(EnvironmentHandle, ConnectionHandle, StatementHandle, Sqlstate, NativeError, MessageText,
+ BufferLength, TextLength);
+
+ if (ret == SQL_SUCCESS)
+ {
+ TRACE(" SQLState %s\n", debugstr_an((const char *)Sqlstate, 5));
+ TRACE(" Error %d\n", *NativeError);
+ TRACE(" MessageText %s\n", debugstr_an((const char *)MessageText, *TextLength));
+ }
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLExecDirect [ODBC32.011]
*/
SQLRETURN WINAPI ODBC32_SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLExecDirect) return SQL_ERROR;
- return pSQLExecDirect(StatementHandle, StatementText, TextLength);
-}
+ TRACE("(StatementHandle %p, StatementText %s, TextLength %d)\n", StatementHandle,
+ debugstr_an((const char *)StatementText, TextLength), TextLength);
+
+ if (!pSQLExecDirect) return SQL_ERROR;
+ ret = pSQLExecDirect(StatementHandle, StatementText, TextLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLExecute [ODBC32.012]
*/
SQLRETURN WINAPI ODBC32_SQLExecute(SQLHSTMT StatementHandle)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLExecute) return SQL_ERROR;
- return pSQLExecute(StatementHandle);
-}
+ TRACE("(StatementHandle %p)\n", StatementHandle);
+
+ if (!pSQLExecute) return SQL_ERROR;
+ ret = pSQLExecute(StatementHandle);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLFetch [ODBC32.013]
@@ -1145,12 +1184,17 @@ SQLRETURN WINAPI ODBC32_SQLFetch(SQLHSTMT StatementHandle)
*/
SQLRETURN WINAPI ODBC32_SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLFetchScroll) return SQL_ERROR;
- return pSQLFetchScroll(StatementHandle, FetchOrientation, FetchOffset);
-}
+ TRACE("(StatementHandle %p, FetchOrientation %d, FetchOffset %s)\n", StatementHandle, FetchOrientation,
+ debugstr_sqllen(FetchOffset));
+ if (!pSQLFetchScroll) return SQL_ERROR;
+
+ ret = pSQLFetchScroll(StatementHandle, FetchOrientation, FetchOffset);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLFreeConnect [ODBC32.014]
@@ -1189,16 +1233,16 @@ SQLRETURN WINAPI ODBC32_SQLFreeEnv(SQLHENV EnvironmentHandle)
*/
SQLRETURN WINAPI ODBC32_SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
{
- SQLRETURN ret;
- TRACE("(Type %d, Handle %p)\n", HandleType, Handle);
+ SQLRETURN ret;
- if (!pSQLFreeHandle) return SQL_ERROR;
+ TRACE("(HandleType %d, Handle %p)\n", HandleType, Handle);
- ret = pSQLFreeHandle(HandleType, Handle);
- TRACE ("Returns %d\n", ret);
- return ret;
-}
+ if (!pSQLFreeHandle) return SQL_ERROR;
+ ret = pSQLFreeHandle(HandleType, Handle);
+ TRACE ("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLFreeStmt [ODBC32.016]
@@ -1219,43 +1263,54 @@ SQLRETURN WINAPI ODBC32_SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Optio
/*************************************************************************
* SQLGetConnectAttr [ODBC32.032]
*/
-SQLRETURN WINAPI ODBC32_SQLGetConnectAttr(SQLHDBC ConnectionHandle,
- SQLINTEGER Attribute, SQLPOINTER Value,
- SQLINTEGER BufferLength, SQLINTEGER *StringLength)
+SQLRETURN WINAPI ODBC32_SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value,
+ SQLINTEGER BufferLength, SQLINTEGER *StringLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetConnectAttr) return SQL_ERROR;
- return pSQLGetConnectAttr(ConnectionHandle, Attribute, Value,
- BufferLength, StringLength);
-}
+ TRACE("(ConnectionHandle %p, Attribute %d, Value %p, BufferLength %d, StringLength %p)\n", ConnectionHandle,
+ Attribute, Value, BufferLength, StringLength);
+ if (!pSQLGetConnectAttr) return SQL_ERROR;
+
+ ret = pSQLGetConnectAttr(ConnectionHandle, Attribute, Value, BufferLength, StringLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetConnectOption [ODBC32.042]
*/
SQLRETURN WINAPI ODBC32_SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetConnectOption) return SQL_ERROR;
- return pSQLGetConnectOption(ConnectionHandle, Option, Value);
-}
+ TRACE("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value);
+ if (!pSQLGetConnectOption) return SQL_ERROR;
+
+ ret = pSQLGetConnectOption(ConnectionHandle, Option, Value);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetCursorName [ODBC32.017]
*/
-SQLRETURN WINAPI ODBC32_SQLGetCursorName(SQLHSTMT StatementHandle,
- SQLCHAR *CursorName, SQLSMALLINT BufferLength,
- SQLSMALLINT *NameLength)
+SQLRETURN WINAPI ODBC32_SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength,
+ SQLSMALLINT *NameLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetCursorName) return SQL_ERROR;
- return pSQLGetCursorName(StatementHandle, CursorName, BufferLength, NameLength);
-}
+ TRACE("(StatementHandle %p, CursorName %p, BufferLength %d, NameLength %p)\n", StatementHandle, CursorName,
+ BufferLength, NameLength);
+
+ if (!pSQLGetCursorName) return SQL_ERROR;
+ ret = pSQLGetCursorName(StatementHandle, CursorName, BufferLength, NameLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetData [ODBC32.043]
@@ -1278,68 +1333,81 @@ SQLRETURN WINAPI ODBC32_SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT Column
/*************************************************************************
* SQLGetDescField [ODBC32.033]
*/
-SQLRETURN WINAPI ODBC32_SQLGetDescField(SQLHDESC DescriptorHandle,
- SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
- SQLPOINTER Value, SQLINTEGER BufferLength,
- SQLINTEGER *StringLength)
+SQLRETURN WINAPI ODBC32_SQLGetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
+ SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetDescField) return SQL_ERROR;
- return pSQLGetDescField(DescriptorHandle, RecNumber, FieldIdentifier,
- Value, BufferLength, StringLength);
-}
+ TRACE("(DescriptorHandle %p, RecNumber %d, FieldIdentifier %d, Value %p, BufferLength %d, StringLength %p)\n",
+ DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength, StringLength);
+ if (!pSQLGetDescField) return SQL_ERROR;
+
+ ret = pSQLGetDescField(DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength, StringLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetDescRec [ODBC32.034]
*/
-SQLRETURN WINAPI ODBC32_SQLGetDescRec(SQLHDESC DescriptorHandle,
- SQLSMALLINT RecNumber, SQLCHAR *Name,
- SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
- SQLSMALLINT *Type, SQLSMALLINT *SubType,
- SQLLEN *Length, SQLSMALLINT *Precision,
- SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
+SQLRETURN WINAPI ODBC32_SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLCHAR *Name,
+ SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLSMALLINT *Type,
+ SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision,
+ SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetDescRec) return SQL_ERROR;
- return pSQLGetDescRec(DescriptorHandle, RecNumber, Name, BufferLength,
- StringLength, Type, SubType, Length, Precision, Scale, Nullable);
-}
+ TRACE("(DescriptorHandle %p, RecNumber %d, Name %p, BufferLength %d, StringLength %p, Type %p, SubType %p,"
+ " Length %p, Precision %p, Scale %p, Nullable %p)\n", DescriptorHandle, RecNumber, Name, BufferLength,
+ StringLength, Type, SubType, Length, Precision, Scale, Nullable);
+ if (!pSQLGetDescRec) return SQL_ERROR;
+
+ ret = pSQLGetDescRec(DescriptorHandle, RecNumber, Name, BufferLength, StringLength, Type, SubType, Length,
+ Precision, Scale, Nullable);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetDiagField [ODBC32.035]
*/
-SQLRETURN WINAPI ODBC32_SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle,
- SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier,
- SQLPOINTER DiagInfo, SQLSMALLINT BufferLength,
- SQLSMALLINT *StringLength)
+SQLRETURN WINAPI ODBC32_SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber,
+ SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength,
+ SQLSMALLINT *StringLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetDiagField) return SQL_ERROR;
- return pSQLGetDiagField(HandleType, Handle, RecNumber, DiagIdentifier,
- DiagInfo, BufferLength, StringLength);
-}
+ TRACE("(HandleType %d, Handle %p, RecNumber %d, DiagIdentifier %d, DiagInfo %p, BufferLength %d,"
+ " StringLength %p)\n", HandleType, Handle, RecNumber, DiagIdentifier, DiagInfo, BufferLength, StringLength);
+ if (!pSQLGetDiagField) return SQL_ERROR;
+
+ ret = pSQLGetDiagField(HandleType, Handle, RecNumber, DiagIdentifier, DiagInfo, BufferLength, StringLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetDiagRec [ODBC32.036]
*/
-SQLRETURN WINAPI ODBC32_SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
- SQLSMALLINT RecNumber, SQLCHAR *Sqlstate,
- SQLINTEGER *NativeError, SQLCHAR *MessageText,
- SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
+SQLRETURN WINAPI ODBC32_SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber,
+ SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText,
+ SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetDiagRec) return SQL_ERROR;
- return pSQLGetDiagRec(HandleType, Handle, RecNumber, Sqlstate, NativeError,
- MessageText, BufferLength, TextLength);
-}
+ TRACE("(HandleType %d, Handle %p, RecNumber %d, Sqlstate %p, NativeError %p, MessageText %p, BufferLength %d,"
+ " TextLength %p)\n", HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength,
+ TextLength);
+ if (!pSQLGetDiagRec) return SQL_ERROR;
+
+ ret = pSQLGetDiagRec(HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength, TextLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetEnvAttr [ODBC32.037]
@@ -1378,54 +1446,82 @@ SQLRETURN WINAPI ODBC32_SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT F
/*************************************************************************
* SQLGetInfo [ODBC32.045]
*/
-SQLRETURN WINAPI ODBC32_SQLGetInfo(SQLHDBC ConnectionHandle,
- SQLUSMALLINT InfoType, SQLPOINTER InfoValue,
- SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
+SQLRETURN WINAPI ODBC32_SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue,
+ SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetInfo) return SQL_ERROR;
- return pSQLGetInfo(ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength);
-}
+ TRACE("(ConnectionHandle, %p, InfoType %d, InfoValue %p, BufferLength %d, StringLength %p)\n", ConnectionHandle,
+ InfoType, InfoValue, BufferLength, StringLength);
+ if (!InfoValue)
+ {
+ WARN("Unexpected NULL InfoValue address\n");
+ return SQL_ERROR;
+ }
+
+ if (!pSQLGetInfo) return SQL_ERROR;
+
+ ret = pSQLGetInfo(ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetStmtAttr [ODBC32.038]
*/
-SQLRETURN WINAPI ODBC32_SQLGetStmtAttr(SQLHSTMT StatementHandle,
- SQLINTEGER Attribute, SQLPOINTER Value,
- SQLINTEGER BufferLength, SQLINTEGER *StringLength)
+SQLRETURN WINAPI ODBC32_SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value,
+ SQLINTEGER BufferLength, SQLINTEGER *StringLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetStmtAttr) return SQL_ERROR;
- return pSQLGetStmtAttr(StatementHandle, Attribute, Value, BufferLength, StringLength);
-}
+ TRACE("(StatementHandle %p, Attribute %d, Value %p, BufferLength %d, StringLength %p)\n", StatementHandle,
+ Attribute, Value, BufferLength, StringLength);
+ if (!Value)
+ {
+ WARN("Unexpected NULL Value return address\n");
+ return SQL_ERROR;
+ }
+
+ if (!pSQLGetStmtAttr) return SQL_ERROR;
+
+ ret = pSQLGetStmtAttr(StatementHandle, Attribute, Value, BufferLength, StringLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetStmtOption [ODBC32.046]
*/
SQLRETURN WINAPI ODBC32_SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLPOINTER Value)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetStmtOption) return SQL_ERROR;
- return pSQLGetStmtOption(StatementHandle, Option, Value);
-}
+ TRACE("(StatementHandle %p, Option %d, Value %p)\n", StatementHandle, Option, Value);
+ if (!pSQLGetStmtOption) return SQL_ERROR;
+
+ ret = pSQLGetStmtOption(StatementHandle, Option, Value);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLGetTypeInfo [ODBC32.047]
*/
SQLRETURN WINAPI ODBC32_SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLGetTypeInfo) return SQL_ERROR;
- return pSQLGetTypeInfo(StatementHandle, DataType);
-}
+ TRACE("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType);
+ if (!pSQLGetTypeInfo) return SQL_ERROR;
+
+ ret = pSQLGetTypeInfo(StatementHandle, DataType);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLNumResultCols [ODBC32.018]
@@ -1448,36 +1544,49 @@ SQLRETURN WINAPI ODBC32_SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *
*/
SQLRETURN WINAPI ODBC32_SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLParamData) return SQL_ERROR;
- return pSQLParamData(StatementHandle, Value);
-}
+ TRACE("(StatementHandle %p, Value %p)\n", StatementHandle, Value);
+
+ if (!pSQLParamData) return SQL_ERROR;
+ ret = pSQLParamData(StatementHandle, Value);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLPrepare [ODBC32.019]
*/
SQLRETURN WINAPI ODBC32_SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLPrepare) return SQL_ERROR;
- return pSQLPrepare(StatementHandle, StatementText, TextLength);
-}
+ TRACE("(StatementHandle %p, StatementText %s, TextLength %d)\n", StatementHandle,
+ debugstr_an((const char *)StatementText, TextLength), TextLength);
+ if (!pSQLPrepare) return SQL_ERROR;
+
+ ret = pSQLPrepare(StatementHandle, StatementText, TextLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLPutData [ODBC32.049]
*/
SQLRETURN WINAPI ODBC32_SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN StrLen_or_Ind)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLPutData) return SQL_ERROR;
- return pSQLPutData(StatementHandle, Data, StrLen_or_Ind);
-}
+ TRACE("(StatementHandle %p, Data %p, StrLen_or_Ind %s)\n", StatementHandle, Data, debugstr_sqllen(StrLen_or_Ind));
+
+ if (!pSQLPutData) return SQL_ERROR;
+ ret = pSQLPutData(StatementHandle, Data, StrLen_or_Ind);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLRowCount [ODBC32.020]
@@ -1499,71 +1608,92 @@ SQLRETURN WINAPI ODBC32_SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount)
/*************************************************************************
* SQLSetConnectAttr [ODBC32.039]
*/
-SQLRETURN WINAPI ODBC32_SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute,
- SQLPOINTER Value, SQLINTEGER StringLength)
+SQLRETURN WINAPI ODBC32_SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value,
+ SQLINTEGER StringLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetConnectAttr) return SQL_ERROR;
- return pSQLSetConnectAttr(ConnectionHandle, Attribute, Value, StringLength);
-}
+ TRACE("(ConnectionHandle %p, Attribute %d, Value %p, StringLength %d)\n", ConnectionHandle, Attribute, Value,
+ StringLength);
+ if (!pSQLSetConnectAttr) return SQL_ERROR;
+
+ ret = pSQLSetConnectAttr(ConnectionHandle, Attribute, Value, StringLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSetConnectOption [ODBC32.050]
*/
SQLRETURN WINAPI ODBC32_SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetConnectOption) return SQL_ERROR;
- return pSQLSetConnectOption(ConnectionHandle, Option, Value);
-}
+ TRACE("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqlulen(Value));
+ if (!pSQLSetConnectOption) return SQL_ERROR;
+
+ ret = pSQLSetConnectOption(ConnectionHandle, Option, Value);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSetCursorName [ODBC32.021]
*/
SQLRETURN WINAPI ODBC32_SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT NameLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetCursorName) return SQL_ERROR;
- return pSQLSetCursorName(StatementHandle, CursorName, NameLength);
-}
+ TRACE("(StatementHandle %p, CursorName %s, NameLength %d)\n", StatementHandle,
+ debugstr_an((const char *)CursorName, NameLength), NameLength);
+
+ if (!pSQLSetCursorName) return SQL_ERROR;
+ ret = pSQLSetCursorName(StatementHandle, CursorName, NameLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSetDescField [ODBC32.073]
*/
-SQLRETURN WINAPI ODBC32_SQLSetDescField(SQLHDESC DescriptorHandle,
- SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
- SQLPOINTER Value, SQLINTEGER BufferLength)
+SQLRETURN WINAPI ODBC32_SQLSetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
+ SQLPOINTER Value, SQLINTEGER BufferLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetDescField) return SQL_ERROR;
- return pSQLSetDescField(DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength);
-}
+ TRACE("(DescriptorHandle %p, RecNumber %d, FieldIdentifier %d, Value %p, BufferLength %d)\n", DescriptorHandle,
+ RecNumber, FieldIdentifier, Value, BufferLength);
+
+ if (!pSQLSetDescField) return SQL_ERROR;
+ ret = pSQLSetDescField(DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSetDescRec [ODBC32.074]
*/
-SQLRETURN WINAPI ODBC32_SQLSetDescRec(SQLHDESC DescriptorHandle,
- SQLSMALLINT RecNumber, SQLSMALLINT Type,
- SQLSMALLINT SubType, SQLLEN Length,
- SQLSMALLINT Precision, SQLSMALLINT Scale,
- SQLPOINTER Data, SQLLEN *StringLength,
- SQLLEN *Indicator)
+SQLRETURN WINAPI ODBC32_SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT Type,
+ SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale,
+ SQLPOINTER Data, SQLLEN *StringLength, SQLLEN *Indicator)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetDescRec) return SQL_ERROR;
- return pSQLSetDescRec(DescriptorHandle, RecNumber, Type, SubType, Length,
- Precision, Scale, Data, StringLength, Indicator);
-}
+ TRACE("(DescriptorHandle %p, RecNumber %d, Type %d, SubType %d, Length %s, Precision %d, Scale %d, Data %p,"
+ " StringLength %p, Indicator %p)\n", DescriptorHandle, RecNumber, Type, SubType, debugstr_sqllen(Length),
+ Precision, Scale, Data, StringLength, Indicator);
+
+ if (!pSQLSetDescRec) return SQL_ERROR;
+ ret = pSQLSetDescRec(DescriptorHandle, RecNumber, Type, SubType, Length, Precision, Scale, Data,
+ StringLength, Indicator);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSetEnvAttr [ODBC32.075]
@@ -1586,141 +1716,181 @@ SQLRETURN WINAPI ODBC32_SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attr
/*************************************************************************
* SQLSetParam [ODBC32.022]
*/
-SQLRETURN WINAPI ODBC32_SQLSetParam(SQLHSTMT StatementHandle,
- SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
- SQLSMALLINT ParameterType, SQLULEN LengthPrecision,
- SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
- SQLLEN *StrLen_or_Ind)
+SQLRETURN WINAPI ODBC32_SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
+ SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale,
+ SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetParam) return SQL_ERROR;
- return pSQLSetParam(StatementHandle, ParameterNumber, ValueType, ParameterType, LengthPrecision,
- ParameterScale, ParameterValue, StrLen_or_Ind);
-}
+ TRACE("(StatementHandle %p, ParameterNumber %d, ValueType %d, ParameterType %d, LengthPrecision %s,"
+ " ParameterScale %d, ParameterValue %p, StrLen_or_Ind %p)\n", StatementHandle, ParameterNumber, ValueType,
+ ParameterType, debugstr_sqlulen(LengthPrecision), ParameterScale, ParameterValue, StrLen_or_Ind);
+
+ if (!pSQLSetParam) return SQL_ERROR;
+ ret = pSQLSetParam(StatementHandle, ParameterNumber, ValueType, ParameterType, LengthPrecision,
+ ParameterScale, ParameterValue, StrLen_or_Ind);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSetStmtAttr [ODBC32.076]
*/
-SQLRETURN WINAPI ODBC32_SQLSetStmtAttr(SQLHSTMT StatementHandle,
- SQLINTEGER Attribute, SQLPOINTER Value,
- SQLINTEGER StringLength)
+SQLRETURN WINAPI ODBC32_SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value,
+ SQLINTEGER StringLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetStmtAttr) return SQL_ERROR;
- return pSQLSetStmtAttr(StatementHandle, Attribute, Value, StringLength);
-}
+ TRACE("(StatementHandle %p, Attribute %d, Value %p, StringLength %d)\n", StatementHandle, Attribute, Value,
+ StringLength);
+ if (!pSQLSetStmtAttr) return SQL_ERROR;
+
+ ret = pSQLSetStmtAttr(StatementHandle, Attribute, Value, StringLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSetStmtOption [ODBC32.051]
*/
SQLRETURN WINAPI ODBC32_SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLULEN Value)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetStmtOption) return SQL_ERROR;
- return pSQLSetStmtOption(StatementHandle, Option, Value);
-}
+ TRACE("(StatementHandle %p, Option %d, Value %s)\n", StatementHandle, Option, debugstr_sqlulen(Value));
+
+ if (!pSQLSetStmtOption) return SQL_ERROR;
+ ret = pSQLSetStmtOption(StatementHandle, Option, Value);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSpecialColumns [ODBC32.052]
*/
-SQLRETURN WINAPI ODBC32_SQLSpecialColumns(SQLHSTMT StatementHandle,
- SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName,
- SQLSMALLINT NameLength1, SQLCHAR *SchemaName,
- SQLSMALLINT NameLength2, SQLCHAR *TableName,
- SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
- SQLUSMALLINT Nullable)
+SQLRETURN WINAPI ODBC32_SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName,
+ SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
+ SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
+ SQLUSMALLINT Nullable)
{
+ SQLRETURN ret;
- if (!pSQLSpecialColumns) return SQL_ERROR;
- return pSQLSpecialColumns(StatementHandle, IdentifierType, CatalogName, NameLength1, SchemaName,
- NameLength2, TableName, NameLength3, Scope, Nullable);
-}
+ TRACE("(StatementHandle %p, IdentifierType %d, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d,"
+ " TableName %s, NameLength3 %d, Scope %d, Nullable %d)\n", StatementHandle, IdentifierType,
+ debugstr_an((const char *)CatalogName, NameLength1), NameLength1,
+ debugstr_an((const char *)SchemaName, NameLength2), NameLength2,
+ debugstr_an((const char *)TableName, NameLength3), NameLength3, Scope, Nullable);
+ if (!pSQLSpecialColumns) return SQL_ERROR;
+
+ ret = pSQLSpecialColumns(StatementHandle, IdentifierType, CatalogName, NameLength1, SchemaName,
+ NameLength2, TableName, NameLength3, Scope, Nullable);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLStatistics [ODBC32.053]
*/
-SQLRETURN WINAPI ODBC32_SQLStatistics(SQLHSTMT StatementHandle,
- SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
- SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
- SQLCHAR *TableName, SQLSMALLINT NameLength3,
- SQLUSMALLINT Unique, SQLUSMALLINT Reserved)
+SQLRETURN WINAPI ODBC32_SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+ SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName,
+ SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLStatistics) return SQL_ERROR;
- return pSQLStatistics(StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2,
- TableName, NameLength3, Unique, Reserved);
-}
+ TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d SchemaName %s, NameLength2 %d, TableName %s"
+ " NameLength3 %d, Unique %d, Reserved %d)\n", StatementHandle,
+ debugstr_an((const char *)CatalogName, NameLength1), NameLength1,
+ debugstr_an((const char *)SchemaName, NameLength2), NameLength2,
+ debugstr_an((const char *)TableName, NameLength3), NameLength3, Unique, Reserved);
+ if (!pSQLStatistics) return SQL_ERROR;
+
+ ret = pSQLStatistics(StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2, TableName,
+ NameLength3, Unique, Reserved);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLTables [ODBC32.054]
*/
-SQLRETURN WINAPI ODBC32_SQLTables(SQLHSTMT StatementHandle,
- SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
- SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
- SQLCHAR *TableName, SQLSMALLINT NameLength3,
- SQLCHAR *TableType, SQLSMALLINT NameLength4)
+SQLRETURN WINAPI ODBC32_SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+ SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName,
+ SQLSMALLINT NameLength3, SQLCHAR *TableType, SQLSMALLINT NameLength4)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLTables) return SQL_ERROR;
- return pSQLTables(StatementHandle, CatalogName, NameLength1,
- SchemaName, NameLength2, TableName, NameLength3, TableType, NameLength4);
-}
+ TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s,"
+ " NameLength3 %d, TableType %s, NameLength4 %d)\n", StatementHandle,
+ debugstr_an((const char *)CatalogName, NameLength1), NameLength1,
+ debugstr_an((const char *)SchemaName, NameLength2), NameLength2,
+ debugstr_an((const char *)TableName, NameLength3), NameLength3,
+ debugstr_an((const char *)TableType, NameLength4), NameLength4);
+
+ if (!pSQLTables) return SQL_ERROR;
+ ret = pSQLTables(StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2, TableName, NameLength3,
+ TableType, NameLength4);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLTransact [ODBC32.023]
*/
-SQLRETURN WINAPI ODBC32_SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle,
- SQLUSMALLINT CompletionType)
+SQLRETURN WINAPI ODBC32_SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLTransact) return SQL_ERROR;
- return pSQLTransact(EnvironmentHandle, ConnectionHandle, CompletionType);
-}
+ TRACE("(EnvironmentHandle %p, ConnectionHandle %p, CompletionType %d)\n", EnvironmentHandle, ConnectionHandle,
+ CompletionType);
+
+ if (!pSQLTransact) return SQL_ERROR;
+ ret = pSQLTransact(EnvironmentHandle, ConnectionHandle, CompletionType);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLBrowseConnect [ODBC32.055]
*/
-SQLRETURN WINAPI ODBC32_SQLBrowseConnect(
- SQLHDBC hdbc,
- SQLCHAR *szConnStrIn,
- SQLSMALLINT cbConnStrIn,
- SQLCHAR *szConnStrOut,
- SQLSMALLINT cbConnStrOutMax,
- SQLSMALLINT *pcbConnStrOut)
+SQLRETURN WINAPI ODBC32_SQLBrowseConnect(SQLHDBC hdbc, SQLCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn,
+ SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax,
+ SQLSMALLINT *pcbConnStrOut)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLBrowseConnect) return SQL_ERROR;
- return pSQLBrowseConnect(hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut);
-}
+ TRACE("(hdbc %p, szConnStrIn %s, cbConnStrIn %d, szConnStrOut %p, cbConnStrOutMax %d, pcbConnStrOut %p)\n",
+ hdbc, debugstr_an((const char *)szConnStrIn, cbConnStrIn), cbConnStrIn, szConnStrOut, cbConnStrOutMax,
+ pcbConnStrOut);
+ if (!pSQLBrowseConnect) return SQL_ERROR;
+
+ ret = pSQLBrowseConnect(hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLBulkOperations [ODBC32.078]
*/
-SQLRETURN WINAPI ODBC32_SQLBulkOperations(
- SQLHSTMT StatementHandle,
- SQLSMALLINT Operation)
+SQLRETURN WINAPI ODBC32_SQLBulkOperations(SQLHSTMT StatementHandle, SQLSMALLINT Operation)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLBulkOperations) return SQL_ERROR;
- return pSQLBulkOperations(StatementHandle, Operation);
-}
+ TRACE("(StatementHandle %p, Operation %d)\n", StatementHandle, Operation);
+
+ if (!pSQLBulkOperations) return SQL_ERROR;
+ ret = pSQLBulkOperations(StatementHandle, Operation);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLColAttributes [ODBC32.006]
@@ -1744,42 +1914,44 @@ SQLRETURN WINAPI ODBC32_SQLColAttributes(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLU
/*************************************************************************
* SQLColumnPrivileges [ODBC32.056]
*/
-SQLRETURN WINAPI ODBC32_SQLColumnPrivileges(
- SQLHSTMT hstmt,
- SQLCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLCHAR *szTableName,
- SQLSMALLINT cbTableName,
- SQLCHAR *szColumnName,
- SQLSMALLINT cbColumnName)
+SQLRETURN WINAPI ODBC32_SQLColumnPrivileges(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName,
+ SQLSMALLINT cbTableName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLColumnPrivileges) return SQL_ERROR;
- return pSQLColumnPrivileges(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szTableName, cbTableName, szColumnName, cbColumnName);
-}
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s,"
+ " cbTableName %d, szColumnName %s, cbColumnName %d)\n", hstmt,
+ debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName,
+ debugstr_an((const char *)szTableName, cbTableName), cbTableName,
+ debugstr_an((const char *)szColumnName, cbColumnName), cbColumnName);
+
+ if (!pSQLColumnPrivileges) return SQL_ERROR;
+ ret = pSQLColumnPrivileges(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
+ szTableName, cbTableName, szColumnName, cbColumnName);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLDescribeParam [ODBC32.058]
*/
-SQLRETURN WINAPI ODBC32_SQLDescribeParam(
- SQLHSTMT hstmt,
- SQLUSMALLINT ipar,
- SQLSMALLINT *pfSqlType,
- SQLULEN *pcbParamDef,
- SQLSMALLINT *pibScale,
- SQLSMALLINT *pfNullable)
+SQLRETURN WINAPI ODBC32_SQLDescribeParam(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT *pfSqlType,
+ SQLULEN *pcbParamDef, SQLSMALLINT *pibScale, SQLSMALLINT *pfNullable)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLDescribeParam) return SQL_ERROR;
- return pSQLDescribeParam(hstmt, ipar, pfSqlType, pcbParamDef, pibScale, pfNullable);
-}
+ TRACE("(hstmt %p, ipar %d, pfSqlType %p, pcbParamDef %p, pibScale %p, pfNullable %p)\n", hstmt, ipar,
+ pfSqlType, pcbParamDef, pibScale, pfNullable);
+ if (!pSQLDescribeParam) return SQL_ERROR;
+
+ ret = pSQLDescribeParam(hstmt, ipar, pfSqlType, pcbParamDef, pibScale, pfNullable);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLExtendedFetch [ODBC32.059]
@@ -1802,30 +1974,33 @@ SQLRETURN WINAPI ODBC32_SQLExtendedFetch(SQLHSTMT hstmt, SQLUSMALLINT fFetchType
/*************************************************************************
* SQLForeignKeys [ODBC32.060]
*/
-SQLRETURN WINAPI ODBC32_SQLForeignKeys(
- SQLHSTMT hstmt,
- SQLCHAR *szPkCatalogName,
- SQLSMALLINT cbPkCatalogName,
- SQLCHAR *szPkSchemaName,
- SQLSMALLINT cbPkSchemaName,
- SQLCHAR *szPkTableName,
- SQLSMALLINT cbPkTableName,
- SQLCHAR *szFkCatalogName,
- SQLSMALLINT cbFkCatalogName,
- SQLCHAR *szFkSchemaName,
- SQLSMALLINT cbFkSchemaName,
- SQLCHAR *szFkTableName,
- SQLSMALLINT cbFkTableName)
+SQLRETURN WINAPI ODBC32_SQLForeignKeys(SQLHSTMT hstmt, SQLCHAR *szPkCatalogName, SQLSMALLINT cbPkCatalogName,
+ SQLCHAR *szPkSchemaName, SQLSMALLINT cbPkSchemaName, SQLCHAR *szPkTableName,
+ SQLSMALLINT cbPkTableName, SQLCHAR *szFkCatalogName,
+ SQLSMALLINT cbFkCatalogName, SQLCHAR *szFkSchemaName,
+ SQLSMALLINT cbFkSchemaName, SQLCHAR *szFkTableName, SQLSMALLINT cbFkTableName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLForeignKeys) return SQL_ERROR;
- return pSQLForeignKeys(hstmt, szPkCatalogName, cbPkCatalogName, szPkSchemaName, cbPkSchemaName,
- szPkTableName, cbPkTableName, szFkCatalogName, cbFkCatalogName,
- szFkSchemaName, cbFkSchemaName, szFkTableName, cbFkTableName);
+ TRACE("(hstmt %p, szPkCatalogName %s, cbPkCatalogName %d, szPkSchemaName %s, cbPkSchemaName %d,"
+ " szPkTableName %s, cbPkTableName %d, szFkCatalogName %s, cbFkCatalogName %d, szFkSchemaName %s,"
+ " cbFkSchemaName %d, szFkTableName %s, cbFkTableName %d)\n", hstmt,
+ debugstr_an((const char *)szPkCatalogName, cbPkCatalogName), cbPkCatalogName,
+ debugstr_an((const char *)szPkSchemaName, cbPkSchemaName), cbPkSchemaName,
+ debugstr_an((const char *)szPkTableName, cbPkTableName), cbPkTableName,
+ debugstr_an((const char *)szFkCatalogName, cbFkCatalogName), cbFkCatalogName,
+ debugstr_an((const char *)szFkSchemaName, cbFkSchemaName), cbFkSchemaName,
+ debugstr_an((const char *)szFkTableName, cbFkTableName), cbFkTableName);
+
+ if (!pSQLForeignKeys) return SQL_ERROR;
+
+ ret = pSQLForeignKeys(hstmt, szPkCatalogName, cbPkCatalogName, szPkSchemaName, cbPkSchemaName, szPkTableName,
+ cbPkTableName, szFkCatalogName, cbFkCatalogName, szFkSchemaName, cbFkSchemaName,
+ szFkTableName, cbFkTableName);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
-
/*************************************************************************
* SQLMoreResults [ODBC32.061]
*/
@@ -1845,34 +2020,36 @@ SQLRETURN WINAPI ODBC32_SQLMoreResults(SQLHSTMT StatementHandle)
/*************************************************************************
* SQLNativeSql [ODBC32.062]
*/
-SQLRETURN WINAPI ODBC32_SQLNativeSql(
- SQLHDBC hdbc,
- SQLCHAR *szSqlStrIn,
- SQLINTEGER cbSqlStrIn,
- SQLCHAR *szSqlStr,
- SQLINTEGER cbSqlStrMax,
- SQLINTEGER *pcbSqlStr)
+SQLRETURN WINAPI ODBC32_SQLNativeSql(SQLHDBC hdbc, SQLCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR *szSqlStr,
+ SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLNativeSql) return SQL_ERROR;
- return pSQLNativeSql(hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr);
-}
+ TRACE("(hdbc %p, szSqlStrIn %s, cbSqlStrIn %d, szSqlStr %p, cbSqlStrMax %d, pcbSqlStr %p)\n", hdbc,
+ debugstr_an((const char *)szSqlStrIn, cbSqlStrIn), cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr);
+ if (!pSQLNativeSql) return SQL_ERROR;
+
+ ret = pSQLNativeSql(hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLNumParams [ODBC32.063]
*/
-SQLRETURN WINAPI ODBC32_SQLNumParams(
- SQLHSTMT hstmt,
- SQLSMALLINT *pcpar)
+SQLRETURN WINAPI ODBC32_SQLNumParams(SQLHSTMT hstmt, SQLSMALLINT *pcpar)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLNumParams) return SQL_ERROR;
- return pSQLNumParams(hstmt, pcpar);
-}
+ TRACE("(hstmt %p, pcpar %p)\n", hstmt, pcpar);
+
+ if (!pSQLNumParams) return SQL_ERROR;
+ ret = pSQLNumParams(hstmt, pcpar);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLParamOptions [ODBC32.064]
@@ -1893,100 +2070,109 @@ SQLRETURN WINAPI ODBC32_SQLParamOptions(SQLHSTMT hstmt, SQLULEN crow, SQLULEN *p
/*************************************************************************
* SQLPrimaryKeys [ODBC32.065]
*/
-SQLRETURN WINAPI ODBC32_SQLPrimaryKeys(
- SQLHSTMT hstmt,
- SQLCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLCHAR *szTableName,
- SQLSMALLINT cbTableName)
+SQLRETURN WINAPI ODBC32_SQLPrimaryKeys(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName,
+ SQLSMALLINT cbTableName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLPrimaryKeys) return SQL_ERROR;
- return pSQLPrimaryKeys(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szTableName, cbTableName);
-}
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s,"
+ " cbTableName %d)\n", hstmt,
+ debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName,
+ debugstr_an((const char *)szTableName, cbTableName), cbTableName);
+ if (!pSQLPrimaryKeys) return SQL_ERROR;
+
+ ret = pSQLPrimaryKeys(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szTableName, cbTableName);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLProcedureColumns [ODBC32.066]
*/
-SQLRETURN WINAPI ODBC32_SQLProcedureColumns(
- SQLHSTMT hstmt,
- SQLCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLCHAR *szProcName,
- SQLSMALLINT cbProcName,
- SQLCHAR *szColumnName,
- SQLSMALLINT cbColumnName)
+SQLRETURN WINAPI ODBC32_SQLProcedureColumns(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szProcName,
+ SQLSMALLINT cbProcName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLProcedureColumns) return SQL_ERROR;
- return pSQLProcedureColumns(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szProcName, cbProcName, szColumnName, cbColumnName);
-}
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s,"
+ " cbProcName %d, szColumnName %s, cbColumnName %d)\n", hstmt,
+ debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName,
+ debugstr_an((const char *)szProcName, cbProcName), cbProcName,
+ debugstr_an((const char *)szColumnName, cbColumnName), cbColumnName);
+
+ if (!pSQLProcedureColumns) return SQL_ERROR;
+ ret = pSQLProcedureColumns(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szProcName,
+ cbProcName, szColumnName, cbColumnName);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLProcedures [ODBC32.067]
*/
-SQLRETURN WINAPI ODBC32_SQLProcedures(
- SQLHSTMT hstmt,
- SQLCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLCHAR *szProcName,
- SQLSMALLINT cbProcName)
+SQLRETURN WINAPI ODBC32_SQLProcedures(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szProcName,
+ SQLSMALLINT cbProcName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLProcedures) return SQL_ERROR;
- return pSQLProcedures(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szProcName, cbProcName);
-}
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s,"
+ " cbProcName %d)\n", hstmt,
+ debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName,
+ debugstr_an((const char *)szProcName, cbProcName), cbProcName);
+ if (!pSQLProcedures) return SQL_ERROR;
+
+ ret = pSQLProcedures(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szProcName, cbProcName);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSetPos [ODBC32.068]
*/
-SQLRETURN WINAPI ODBC32_SQLSetPos(
- SQLHSTMT hstmt,
- SQLSETPOSIROW irow,
- SQLUSMALLINT fOption,
- SQLUSMALLINT fLock)
+SQLRETURN WINAPI ODBC32_SQLSetPos(SQLHSTMT hstmt, SQLSETPOSIROW irow, SQLUSMALLINT fOption, SQLUSMALLINT fLock)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetPos) return SQL_ERROR;
- return pSQLSetPos(hstmt, irow, fOption, fLock);
-}
+ TRACE("(hstmt %p, irow %s, fOption %d, fLock %d)\n", hstmt, debugstr_sqlulen(irow), fOption, fLock);
+
+ if (!pSQLSetPos) return SQL_ERROR;
+ ret = pSQLSetPos(hstmt, irow, fOption, fLock);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLTablePrivileges [ODBC32.070]
*/
-SQLRETURN WINAPI ODBC32_SQLTablePrivileges(
- SQLHSTMT hstmt,
- SQLCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLCHAR *szTableName,
- SQLSMALLINT cbTableName)
+SQLRETURN WINAPI ODBC32_SQLTablePrivileges(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName,
+ SQLSMALLINT cbTableName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLTablePrivileges) return SQL_ERROR;
- return pSQLTablePrivileges(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szTableName, cbTableName);
-}
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s,"
+ " cbTableName %d)\n", hstmt,
+ debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName,
+ debugstr_an((const char *)szTableName, cbTableName), cbTableName);
+ if (!pSQLTablePrivileges) return SQL_ERROR;
+
+ ret = pSQLTablePrivileges(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szTableName,
+ cbTableName);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLDrivers [ODBC32.071]
@@ -2017,65 +2203,63 @@ SQLRETURN WINAPI ODBC32_SQLDrivers(SQLHENV EnvironmentHandle, SQLUSMALLINT fDire
/*************************************************************************
* SQLBindParameter [ODBC32.072]
*/
-SQLRETURN WINAPI ODBC32_SQLBindParameter(
- SQLHSTMT hstmt,
- SQLUSMALLINT ipar,
- SQLSMALLINT fParamType,
- SQLSMALLINT fCType,
- SQLSMALLINT fSqlType,
- SQLULEN cbColDef,
- SQLSMALLINT ibScale,
- SQLPOINTER rgbValue,
- SQLLEN cbValueMax,
- SQLLEN *pcbValue)
+SQLRETURN WINAPI ODBC32_SQLBindParameter(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fParamType,
+ SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLULEN cbColDef,
+ SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN cbValueMax,
+ SQLLEN *pcbValue)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLBindParameter) return SQL_ERROR;
- return pSQLBindParameter(hstmt, ipar, fParamType, fCType, fSqlType, cbColDef, ibScale,
- rgbValue, cbValueMax, pcbValue);
-}
+ TRACE("(hstmt %p, ipar %d, fParamType %d, fCType %d, fSqlType %d, cbColDef %s, ibScale %d, rgbValue %p,"
+ " cbValueMax %d, pcbValue %p)\n", hstmt, ipar, fParamType, fCType, fSqlType, debugstr_sqlulen(cbColDef),
+ ibScale, rgbValue, cbValueMax, pcbValue);
+
+ if (!pSQLBindParameter) return SQL_ERROR;
+ ret = pSQLBindParameter(hstmt, ipar, fParamType, fCType, fSqlType, cbColDef, ibScale, rgbValue, cbValueMax,
+ pcbValue);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLDriverConnect [ODBC32.041]
*/
-SQLRETURN WINAPI ODBC32_SQLDriverConnect(
- SQLHDBC hdbc,
- SQLHWND hwnd,
- SQLCHAR *conn_str_in,
- SQLSMALLINT len_conn_str_in,
- SQLCHAR *conn_str_out,
- SQLSMALLINT conn_str_out_max,
- SQLSMALLINT *ptr_conn_str_out,
- SQLUSMALLINT driver_completion )
+SQLRETURN WINAPI ODBC32_SQLDriverConnect(SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR *ConnectionString, SQLSMALLINT Length,
+ SQLCHAR *conn_str_out, SQLSMALLINT conn_str_out_max,
+ SQLSMALLINT *ptr_conn_str_out, SQLUSMALLINT driver_completion)
{
- SQLRETURN ret;
+ SQLRETURN ret;
- TRACE("(ConnectionString %s, Length %d)\n",
- debugstr_a((char *)conn_str_in), len_conn_str_in);
+ TRACE("(hdbc %p, hwnd %p, ConnectionString %s, Length %d, conn_str_out %p, conn_str_out_max %d,"
+ " ptr_conn_str_out %p, driver_completion %d)\n", hdbc, hwnd,
+ debugstr_an((const char *)ConnectionString, Length), Length, conn_str_out, conn_str_out_max,
+ ptr_conn_str_out, driver_completion);
- if (!pSQLDriverConnect) return SQL_ERROR;
- ret = pSQLDriverConnect(hdbc, hwnd, conn_str_in, len_conn_str_in, conn_str_out,
- conn_str_out_max, ptr_conn_str_out, driver_completion);
- TRACE("Returns %d\n", ret);
- return ret;
-}
+ if (!pSQLDriverConnect) return SQL_ERROR;
+ ret = pSQLDriverConnect(hdbc, hwnd, ConnectionString, Length, conn_str_out, conn_str_out_max,
+ ptr_conn_str_out, driver_completion);
+ TRACE("Returning %d\n", ret);
+ return ret;
+}
/*************************************************************************
* SQLSetScrollOptions [ODBC32.069]
*/
-SQLRETURN WINAPI ODBC32_SQLSetScrollOptions(
- SQLHSTMT statement_handle,
- SQLUSMALLINT f_concurrency,
- SQLLEN crow_keyset,
- SQLUSMALLINT crow_rowset )
+SQLRETURN WINAPI ODBC32_SQLSetScrollOptions(SQLHSTMT statement_handle, SQLUSMALLINT f_concurrency, SQLLEN crow_keyset,
+ SQLUSMALLINT crow_rowset)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetScrollOptions) return SQL_ERROR;
- return pSQLSetScrollOptions(statement_handle, f_concurrency, crow_keyset, crow_rowset);
+ TRACE("(statement_handle %p, f_concurrency %d, crow_keyset %s, crow_rowset %d)\n", statement_handle,
+ f_concurrency, debugstr_sqllen(crow_keyset), crow_rowset);
+
+ if (!pSQLSetScrollOptions) return SQL_ERROR;
+
+ ret = pSQLSetScrollOptions(statement_handle, f_concurrency, crow_keyset, crow_rowset);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
static BOOL SQLColAttributes_KnownStringAttribute(SQLUSMALLINT fDescType)
@@ -2111,55 +2295,48 @@ static BOOL SQLColAttributes_KnownStringAttribute(SQLUSMALLINT fDescType)
/*************************************************************************
* SQLColAttributesW [ODBC32.106]
*/
-SQLRETURN WINAPI ODBC32_SQLColAttributesW(
- SQLHSTMT hstmt,
- SQLUSMALLINT icol,
- SQLUSMALLINT fDescType,
- SQLPOINTER rgbDesc,
- SQLSMALLINT cbDescMax,
- SQLSMALLINT *pcbDesc,
- SQLLEN *pfDesc)
-{
- SQLRETURN iResult;
-
- TRACE("hstmt=%p icol=%d fDescType=%d rgbDesc=%p cbDescMax=%d pcbDesc=%p pfDesc=%p\n",
- hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc);
-
- if (!pSQLColAttributesW) return SQL_ERROR;
-
- iResult = pSQLColAttributesW(hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc);
- if (iResult == SQL_SUCCESS && rgbDesc != NULL && SQLColAttributes_KnownStringAttribute(fDescType)) {
- /*
- TRACE("Dumping values fetched via SQLColAttributesW:\n");
- TRACE(" Attribute name : %s\n", debugstr_w(rgbDesc));
- TRACE(" Declared length: %d\n", *pcbDesc);
- */
- if (*pcbDesc != lstrlenW(rgbDesc) * 2) {
- TRACE("CHEAT: resetting name length for ADO\n");
- *pcbDesc = lstrlenW(rgbDesc) * 2;
- }
- }
- return iResult;
+SQLRETURN WINAPI ODBC32_SQLColAttributesW(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType,
+ SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT *pcbDesc,
+ SQLLEN *pfDesc)
+{
+ SQLRETURN ret;
+
+ TRACE("(hstmt %p, icol %d, fDescType %d, rgbDesc %p, cbDescMax %d, pcbDesc %p, pfDesc %p)\n", hstmt, icol,
+ fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc);
+
+ if (!pSQLColAttributesW) return SQL_ERROR;
+
+ ret = pSQLColAttributesW(hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc);
+
+ if (ret == SQL_SUCCESS && SQLColAttributes_KnownStringAttribute(fDescType) && rgbDesc && pcbDesc &&
+ *pcbDesc != lstrlenW(rgbDesc) * 2)
+ {
+ TRACE("CHEAT: resetting name length for ADO\n");
+ *pcbDesc = lstrlenW(rgbDesc) * 2;
+ }
+
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLConnectW [ODBC32.107]
*/
-SQLRETURN WINAPI ODBC32_SQLConnectW(SQLHDBC ConnectionHandle,
- WCHAR *ServerName, SQLSMALLINT NameLength1,
- WCHAR *UserName, SQLSMALLINT NameLength2,
- WCHAR *Authentication, SQLSMALLINT NameLength3)
+SQLRETURN WINAPI ODBC32_SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMALLINT NameLength1,
+ WCHAR *UserName, SQLSMALLINT NameLength2, WCHAR *Authentication,
+ SQLSMALLINT NameLength3)
{
- SQLRETURN ret;
- TRACE("(Server=%.*s)\n",NameLength1+3, debugstr_w(ServerName));
+ SQLRETURN ret;
- if (!pSQLConnectW) return SQL_ERROR;
+ TRACE("(ConnectionHandle %p, ServerName %s, NameLength1 %d, UserName %s, NameLength2 %d, Authentication %p,"
+ " NameLength3 %d)\n", ConnectionHandle, debugstr_wn(ServerName, NameLength1), NameLength1,
+ debugstr_wn(UserName, NameLength2), NameLength2, debugstr_wn(Authentication, NameLength3), NameLength3);
- ret = pSQLConnectW(ConnectionHandle, ServerName, NameLength1,
- UserName, NameLength2, Authentication, NameLength3);
+ if (!pSQLConnectW) return SQL_ERROR;
- TRACE("Returns %d\n", ret);
- return ret;
+ ret = pSQLConnectW(ConnectionHandle, ServerName, NameLength1, UserName, NameLength2, Authentication, NameLength3);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2197,17 +2374,30 @@ SQLRETURN WINAPI ODBC32_SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT C
/*************************************************************************
* SQLErrorW [ODBC32.110]
*/
-SQLRETURN WINAPI ODBC32_SQLErrorW(SQLHENV EnvironmentHandle,
- SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle,
- WCHAR *Sqlstate, SQLINTEGER *NativeError,
- WCHAR *MessageText, SQLSMALLINT BufferLength,
- SQLSMALLINT *TextLength)
+SQLRETURN WINAPI ODBC32_SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle,
+ WCHAR *Sqlstate, SQLINTEGER *NativeError, WCHAR *MessageText,
+ SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLErrorW) return SQL_ERROR;
- return pSQLErrorW(EnvironmentHandle, ConnectionHandle, StatementHandle,
- Sqlstate, NativeError, MessageText, BufferLength, TextLength);
+ TRACE("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, Sqlstate %p, NativeError %p,"
+ " MessageText %p, BufferLength %d, TextLength %p)\n", EnvironmentHandle, ConnectionHandle,
+ StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength);
+
+ if (!pSQLErrorW) return SQL_ERROR;
+
+ ret = pSQLErrorW(EnvironmentHandle, ConnectionHandle, StatementHandle, Sqlstate, NativeError, MessageText,
+ BufferLength, TextLength);
+
+ if (ret == SQL_SUCCESS)
+ {
+ TRACE(" SQLState %s\n", debugstr_wn(Sqlstate, 5));
+ TRACE(" Error %d\n", *NativeError);
+ TRACE(" MessageText %s\n", debugstr_wn(MessageText, *TextLength));
+ }
+
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2230,26 +2420,36 @@ SQLRETURN WINAPI ODBC32_SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *Statemen
/*************************************************************************
* SQLGetCursorNameW [ODBC32.117]
*/
-SQLRETURN WINAPI ODBC32_SQLGetCursorNameW(SQLHSTMT StatementHandle,
- WCHAR *CursorName, SQLSMALLINT BufferLength,
- SQLSMALLINT *NameLength)
+SQLRETURN WINAPI ODBC32_SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT BufferLength,
+ SQLSMALLINT *NameLength)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(StatementHandle %p, CursorName %p, BufferLength %d, NameLength %p)\n", StatementHandle, CursorName,
+ BufferLength, NameLength);
+
+ if (!pSQLGetCursorNameW) return SQL_ERROR;
- if (!pSQLGetCursorNameW) return SQL_ERROR;
- return pSQLGetCursorNameW(StatementHandle, CursorName, BufferLength, NameLength);
+ ret = pSQLGetCursorNameW(StatementHandle, CursorName, BufferLength, NameLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLPrepareW [ODBC32.119]
*/
-SQLRETURN WINAPI ODBC32_SQLPrepareW(SQLHSTMT StatementHandle,
- WCHAR *StatementText, SQLINTEGER TextLength)
+SQLRETURN WINAPI ODBC32_SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLINTEGER TextLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLPrepareW) return SQL_ERROR;
- return pSQLPrepareW(StatementHandle, StatementText, TextLength);
+ TRACE("(StatementHandle %p, StatementText %s, TextLength %d)\n", StatementHandle,
+ debugstr_wn(StatementText, TextLength), TextLength);
+
+ if (!pSQLPrepareW) return SQL_ERROR;
+
+ ret = pSQLPrepareW(StatementHandle, StatementText, TextLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2257,42 +2457,46 @@ SQLRETURN WINAPI ODBC32_SQLPrepareW(SQLHSTMT StatementHandle,
*/
SQLRETURN WINAPI ODBC32_SQLSetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT NameLength)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLSetCursorNameW) return SQL_ERROR;
- return pSQLSetCursorNameW(StatementHandle, CursorName, NameLength);
+ TRACE("(StatementHandle %p, CursorName %s, NameLength %d)\n", StatementHandle,
+ debugstr_wn(CursorName, NameLength), NameLength);
+
+ if (!pSQLSetCursorNameW) return SQL_ERROR;
+
+ ret = pSQLSetCursorNameW(StatementHandle, CursorName, NameLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLColAttributeW [ODBC32.127]
*/
-SQLRETURN WINAPI ODBC32_SQLColAttributeW (SQLHSTMT StatementHandle,
- SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
- SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength,
- SQLSMALLINT *StringLength, SQLLEN *NumericAttribute)
-{
- SQLRETURN iResult;
-
- TRACE("StatementHandle=%p ColumnNumber=%d FieldIdentifier=%d CharacterAttribute=%p BufferLength=%d StringLength=%p NumericAttribute=%p\n",
- StatementHandle, ColumnNumber, FieldIdentifier,
- CharacterAttribute, BufferLength, StringLength, NumericAttribute);
-
- if (!pSQLColAttributeW) return SQL_ERROR;
-
- iResult = pSQLColAttributeW(StatementHandle, ColumnNumber, FieldIdentifier,
- CharacterAttribute, BufferLength, StringLength, NumericAttribute);
- if (iResult == SQL_SUCCESS && CharacterAttribute != NULL && SQLColAttributes_KnownStringAttribute(FieldIdentifier)) {
- /*
- TRACE("Dumping values fetched via SQLColAttributeW:\n");
- TRACE(" Attribute name : %s\n", debugstr_w(rgbDesc));
- TRACE(" Declared length: %d\n", *pcbDesc);
- */
- if (*StringLength != lstrlenW(CharacterAttribute) * 2) {
- TRACE("CHEAT: resetting name length for ADO\n");
- *StringLength = lstrlenW(CharacterAttribute) * 2;
- }
- }
- return iResult;
+SQLRETURN WINAPI ODBC32_SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber,
+ SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttribute,
+ SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
+ SQLLEN *NumericAttribute)
+{
+ SQLRETURN ret;
+
+ TRACE("StatementHandle %p ColumnNumber %d FieldIdentifier %d CharacterAttribute %p BufferLength %d"
+ " StringLength %p NumericAttribute %p\n", StatementHandle, ColumnNumber, FieldIdentifier,
+ CharacterAttribute, BufferLength, StringLength, NumericAttribute);
+
+ if (!pSQLColAttributeW) return SQL_ERROR;
+
+ ret = pSQLColAttributeW(StatementHandle, ColumnNumber, FieldIdentifier, CharacterAttribute, BufferLength,
+ StringLength, NumericAttribute);
+
+ if (ret == SQL_SUCCESS && CharacterAttribute != NULL && SQLColAttributes_KnownStringAttribute(FieldIdentifier) &&
+ StringLength && *StringLength != lstrlenW(CharacterAttribute) * 2)
+ {
+ TRACE("CHEAT: resetting name length for ADO\n");
+ *StringLength = lstrlenW(CharacterAttribute) * 2;
+ }
+
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2316,33 +2520,41 @@ SQLRETURN WINAPI ODBC32_SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER
/*************************************************************************
* SQLGetDescFieldW [ODBC32.133]
*/
-SQLRETURN WINAPI ODBC32_SQLGetDescFieldW(SQLHDESC DescriptorHandle,
- SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
- SQLPOINTER Value, SQLINTEGER BufferLength,
- SQLINTEGER *StringLength)
+SQLRETURN WINAPI ODBC32_SQLGetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
+ SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(DescriptorHandle %p, RecNumber %d, FieldIdentifier %d, Value %p, BufferLength %d, StringLength %p)\n",
+ DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength, StringLength);
- if (!pSQLGetDescFieldW) return SQL_ERROR;
- return pSQLGetDescFieldW(DescriptorHandle, RecNumber, FieldIdentifier,
- Value, BufferLength, StringLength);
+ if (!pSQLGetDescFieldW) return SQL_ERROR;
+
+ ret = pSQLGetDescFieldW(DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength, StringLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLGetDescRecW [ODBC32.134]
*/
-SQLRETURN WINAPI ODBC32_SQLGetDescRecW(SQLHDESC DescriptorHandle,
- SQLSMALLINT RecNumber, WCHAR *Name,
- SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
- SQLSMALLINT *Type, SQLSMALLINT *SubType,
- SQLLEN *Length, SQLSMALLINT *Precision,
- SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
+SQLRETURN WINAPI ODBC32_SQLGetDescRecW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, WCHAR *Name,
+ SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLSMALLINT *Type,
+ SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision,
+ SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(DescriptorHandle %p, RecNumber %d, Name %p, BufferLength %d, StringLength %p, Type %p, SubType %p,"
+ " Length %p, Precision %p, Scale %p, Nullable %p)\n", DescriptorHandle, RecNumber, Name, BufferLength,
+ StringLength, Type, SubType, Length, Precision, Scale, Nullable);
- if (!pSQLGetDescRecW) return SQL_ERROR;
- return pSQLGetDescRecW(DescriptorHandle, RecNumber, Name, BufferLength,
- StringLength, Type, SubType, Length, Precision, Scale, Nullable);
+ if (!pSQLGetDescRecW) return SQL_ERROR;
+
+ ret = pSQLGetDescRecW(DescriptorHandle, RecNumber, Name, BufferLength, StringLength, Type, SubType, Length,
+ Precision, Scale, Nullable);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2367,16 +2579,21 @@ SQLRETURN WINAPI ODBC32_SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handl
/*************************************************************************
* SQLGetDiagRecW [ODBC32.136]
*/
-SQLRETURN WINAPI ODBC32_SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle,
- SQLSMALLINT RecNumber, WCHAR *Sqlstate,
- SQLINTEGER *NativeError, WCHAR *MessageText,
- SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
+SQLRETURN WINAPI ODBC32_SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber,
+ WCHAR *Sqlstate, SQLINTEGER *NativeError, WCHAR *MessageText,
+ SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(HandleType %d, Handle %p, RecNumber %d, Sqlstate %p, NativeError %p, MessageText %p, BufferLength %d,"
+ " TextLength %p)\n", HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength,
+ TextLength);
- if (!pSQLGetDiagRecW) return SQL_ERROR;
- return pSQLGetDiagRecW(HandleType, Handle, RecNumber, Sqlstate, NativeError,
- MessageText, BufferLength, TextLength);
+ if (!pSQLGetDiagRecW) return SQL_ERROR;
+
+ ret = pSQLGetDiagRecW(HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength, TextLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2424,17 +2641,23 @@ SQLRETURN WINAPI ODBC32_SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER
/*************************************************************************
* SQLColumnsW [ODBC32.140]
*/
-SQLRETURN WINAPI ODBC32_SQLColumnsW(SQLHSTMT StatementHandle,
- WCHAR *CatalogName, SQLSMALLINT NameLength1,
- WCHAR *SchemaName, SQLSMALLINT NameLength2,
- WCHAR *TableName, SQLSMALLINT NameLength3,
- WCHAR *ColumnName, SQLSMALLINT NameLength4)
+SQLRETURN WINAPI ODBC32_SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSMALLINT NameLength1,
+ WCHAR *SchemaName, SQLSMALLINT NameLength2, WCHAR *TableName,
+ SQLSMALLINT NameLength3, WCHAR *ColumnName, SQLSMALLINT NameLength4)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s,"
+ " NameLength3 %d, ColumnName %s, NameLength4 %d)\n", StatementHandle,
+ debugstr_wn(CatalogName, NameLength1), NameLength1, debugstr_wn(SchemaName, NameLength2), NameLength2,
+ debugstr_wn(TableName, NameLength3), NameLength3, debugstr_wn(ColumnName, NameLength4), NameLength4);
- if (!pSQLColumnsW) return SQL_ERROR;
- return pSQLColumnsW(StatementHandle, CatalogName, NameLength1,
- SchemaName, NameLength2, TableName, NameLength3, ColumnName, NameLength4);
+ if (!pSQLColumnsW) return SQL_ERROR;
+
+ ret = pSQLColumnsW(StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2, TableName, NameLength3,
+ ColumnName, NameLength4);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2464,10 +2687,15 @@ SQLRETURN WINAPI ODBC32_SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND Wind
*/
SQLRETURN WINAPI ODBC32_SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value);
- if (!pSQLGetConnectOptionW) return SQL_ERROR;
- return pSQLGetConnectOptionW(ConnectionHandle, Option, Value);
+ if (!pSQLGetConnectOptionW) return SQL_ERROR;
+
+ ret = pSQLGetConnectOptionW(ConnectionHandle, Option, Value);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2499,10 +2727,15 @@ SQLRETURN WINAPI ODBC32_SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoT
*/
SQLRETURN WINAPI ODBC32_SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType);
- if (!pSQLGetTypeInfoW) return SQL_ERROR;
- return pSQLGetTypeInfoW(StatementHandle, DataType);
+ if (!pSQLGetTypeInfoW) return SQL_ERROR;
+
+ ret = pSQLGetTypeInfoW(StatementHandle, DataType);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2510,25 +2743,38 @@ SQLRETURN WINAPI ODBC32_SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT Da
*/
SQLRETURN WINAPI ODBC32_SQLSetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLLEN Value)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqllen(Value));
- if (!pSQLSetConnectOptionW) return SQL_ERROR;
- return pSQLSetConnectOptionW(ConnectionHandle, Option, Value);
+ if (!pSQLSetConnectOptionW) return SQL_ERROR;
+
+ ret = pSQLSetConnectOptionW(ConnectionHandle, Option, Value);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLSpecialColumnsW [ODBC32.152]
*/
-SQLRETURN WINAPI ODBC32_SQLSpecialColumnsW(SQLHSTMT StatementHandle,
- SQLUSMALLINT IdentifierType, SQLWCHAR *CatalogName,
- SQLSMALLINT NameLength1, SQLWCHAR *SchemaName,
- SQLSMALLINT NameLength2, SQLWCHAR *TableName,
- SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
- SQLUSMALLINT Nullable)
+SQLRETURN WINAPI ODBC32_SQLSpecialColumnsW(SQLHSTMT StatementHandle, SQLUSMALLINT IdentifierType,
+ SQLWCHAR *CatalogName, SQLSMALLINT NameLength1, SQLWCHAR *SchemaName,
+ SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3,
+ SQLUSMALLINT Scope, SQLUSMALLINT Nullable)
{
- if (!pSQLSpecialColumnsW) return SQL_ERROR;
- return pSQLSpecialColumnsW(StatementHandle, IdentifierType, CatalogName, NameLength1, SchemaName,
- NameLength2, TableName, NameLength3, Scope, Nullable);
+ SQLRETURN ret;
+
+ TRACE("(StatementHandle %p, IdentifierType %d, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d,"
+ " TableName %s, NameLength3 %d, Scope %d, Nullable %d)\n", StatementHandle, IdentifierType,
+ debugstr_wn(CatalogName, NameLength1), NameLength1, debugstr_wn(SchemaName, NameLength2), NameLength2,
+ debugstr_wn(TableName, NameLength3), NameLength3, Scope, Nullable);
+
+ if (!pSQLSpecialColumnsW) return SQL_ERROR;
+
+ ret = pSQLSpecialColumnsW(StatementHandle, IdentifierType, CatalogName, NameLength1, SchemaName,
+ NameLength2, TableName, NameLength3, Scope, Nullable);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2578,40 +2824,44 @@ SQLRETURN WINAPI ODBC32_SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogNa
/*************************************************************************
* SQLBrowseConnectW [ODBC32.155]
*/
-SQLRETURN WINAPI ODBC32_SQLBrowseConnectW(
- SQLHDBC hdbc,
- SQLWCHAR *szConnStrIn,
- SQLSMALLINT cbConnStrIn,
- SQLWCHAR *szConnStrOut,
- SQLSMALLINT cbConnStrOutMax,
- SQLSMALLINT *pcbConnStrOut)
+SQLRETURN WINAPI ODBC32_SQLBrowseConnectW(SQLHDBC hdbc, SQLWCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn,
+ SQLWCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax,
+ SQLSMALLINT *pcbConnStrOut)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(hdbc %p, szConnStrIn %s, cbConnStrIn %d, szConnStrOut %p, cbConnStrOutMax %d, pcbConnStrOut %p)\n",
+ hdbc, debugstr_wn(szConnStrIn, cbConnStrIn), cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut);
+
+ if (!pSQLBrowseConnectW) return SQL_ERROR;
- if (!pSQLBrowseConnectW) return SQL_ERROR;
- return pSQLBrowseConnectW(hdbc, szConnStrIn, cbConnStrIn, szConnStrOut,
- cbConnStrOutMax, pcbConnStrOut);
+ ret = pSQLBrowseConnectW(hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLColumnPrivilegesW [ODBC32.156]
*/
-SQLRETURN WINAPI ODBC32_SQLColumnPrivilegesW(
- SQLHSTMT hstmt,
- SQLWCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLWCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLWCHAR *szTableName,
- SQLSMALLINT cbTableName,
- SQLWCHAR *szColumnName,
- SQLSMALLINT cbColumnName)
+SQLRETURN WINAPI ODBC32_SQLColumnPrivilegesW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName,
+ SQLSMALLINT cbTableName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLColumnPrivilegesW) return SQL_ERROR;
- return pSQLColumnPrivilegesW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szTableName, cbTableName, szColumnName, cbColumnName);
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s,"
+ " cbTableName %d, szColumnName %s, cbColumnName %d)\n", hstmt,
+ debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName,
+ debugstr_wn(szTableName, cbTableName), cbTableName,
+ debugstr_wn(szColumnName, cbColumnName), cbColumnName);
+
+ if (!pSQLColumnPrivilegesW) return SQL_ERROR;
+
+ ret = pSQLColumnPrivilegesW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szTableName,
+ cbTableName, szColumnName, cbColumnName);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2648,150 +2898,162 @@ SQLRETURN WINAPI ODBC32_SQLDataSourcesW(SQLHENV EnvironmentHandle, SQLUSMALLINT
/*************************************************************************
* SQLForeignKeysW [ODBC32.160]
*/
-SQLRETURN WINAPI ODBC32_SQLForeignKeysW(
- SQLHSTMT hstmt,
- SQLWCHAR *szPkCatalogName,
- SQLSMALLINT cbPkCatalogName,
- SQLWCHAR *szPkSchemaName,
- SQLSMALLINT cbPkSchemaName,
- SQLWCHAR *szPkTableName,
- SQLSMALLINT cbPkTableName,
- SQLWCHAR *szFkCatalogName,
- SQLSMALLINT cbFkCatalogName,
- SQLWCHAR *szFkSchemaName,
- SQLSMALLINT cbFkSchemaName,
- SQLWCHAR *szFkTableName,
- SQLSMALLINT cbFkTableName)
+SQLRETURN WINAPI ODBC32_SQLForeignKeysW(SQLHSTMT hstmt, SQLWCHAR *szPkCatalogName, SQLSMALLINT cbPkCatalogName,
+ SQLWCHAR *szPkSchemaName, SQLSMALLINT cbPkSchemaName, SQLWCHAR *szPkTableName,
+ SQLSMALLINT cbPkTableName, SQLWCHAR *szFkCatalogName,
+ SQLSMALLINT cbFkCatalogName, SQLWCHAR *szFkSchemaName,
+ SQLSMALLINT cbFkSchemaName, SQLWCHAR *szFkTableName, SQLSMALLINT cbFkTableName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLForeignKeysW) return SQL_ERROR;
- return pSQLForeignKeysW(hstmt, szPkCatalogName, cbPkCatalogName, szPkSchemaName, cbPkSchemaName,
- szPkTableName, cbPkTableName, szFkCatalogName, cbFkCatalogName,
- szFkSchemaName, cbFkSchemaName, szFkTableName, cbFkTableName);
+ TRACE("(hstmt %p, szPkCatalogName %s, cbPkCatalogName %d, szPkSchemaName %s, cbPkSchemaName %d,"
+ " szPkTableName %s, cbPkTableName %d, szFkCatalogName %s, cbFkCatalogName %d, szFkSchemaName %s,"
+ " cbFkSchemaName %d, szFkTableName %s, cbFkTableName %d)\n", hstmt,
+ debugstr_wn(szPkCatalogName, cbPkCatalogName), cbPkCatalogName,
+ debugstr_wn(szPkSchemaName, cbPkSchemaName), cbPkSchemaName,
+ debugstr_wn(szPkTableName, cbPkTableName), cbPkTableName,
+ debugstr_wn(szFkCatalogName, cbFkCatalogName), cbFkCatalogName,
+ debugstr_wn(szFkSchemaName, cbFkSchemaName), cbFkSchemaName,
+ debugstr_wn(szFkTableName, cbFkTableName), cbFkTableName);
+
+ if (!pSQLForeignKeysW) return SQL_ERROR;
+
+ ret = pSQLForeignKeysW(hstmt, szPkCatalogName, cbPkCatalogName, szPkSchemaName, cbPkSchemaName, szPkTableName,
+ cbPkTableName, szFkCatalogName, cbFkCatalogName, szFkSchemaName, cbFkSchemaName,
+ szFkTableName, cbFkTableName);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLNativeSqlW [ODBC32.162]
*/
-SQLRETURN WINAPI ODBC32_SQLNativeSqlW(
- SQLHDBC hdbc,
- SQLWCHAR *szSqlStrIn,
- SQLINTEGER cbSqlStrIn,
- SQLWCHAR *szSqlStr,
- SQLINTEGER cbSqlStrMax,
- SQLINTEGER *pcbSqlStr)
+SQLRETURN WINAPI ODBC32_SQLNativeSqlW(SQLHDBC hdbc, SQLWCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLWCHAR *szSqlStr,
+ SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(hdbc %p, szSqlStrIn %s, cbSqlStrIn %d, szSqlStr %p, cbSqlStrMax %d, pcbSqlStr %p)\n", hdbc,
+ debugstr_wn(szSqlStrIn, cbSqlStrIn), cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr);
+
+ if (!pSQLNativeSqlW) return SQL_ERROR;
- if (!pSQLNativeSqlW) return SQL_ERROR;
- return pSQLNativeSqlW(hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr);
+ ret = pSQLNativeSqlW(hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLPrimaryKeysW [ODBC32.165]
*/
-SQLRETURN WINAPI ODBC32_SQLPrimaryKeysW(
- SQLHSTMT hstmt,
- SQLWCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLWCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLWCHAR *szTableName,
- SQLSMALLINT cbTableName)
+SQLRETURN WINAPI ODBC32_SQLPrimaryKeysW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName,
+ SQLSMALLINT cbTableName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLPrimaryKeysW) return SQL_ERROR;
- return pSQLPrimaryKeysW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szTableName, cbTableName);
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s,"
+ " cbTableName %d)\n", hstmt,
+ debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName,
+ debugstr_wn(szTableName, cbTableName), cbTableName);
+
+ if (!pSQLPrimaryKeysW) return SQL_ERROR;
+
+ ret = pSQLPrimaryKeysW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szTableName, cbTableName);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLProcedureColumnsW [ODBC32.166]
*/
-SQLRETURN WINAPI ODBC32_SQLProcedureColumnsW(
- SQLHSTMT hstmt,
- SQLWCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLWCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLWCHAR *szProcName,
- SQLSMALLINT cbProcName,
- SQLWCHAR *szColumnName,
- SQLSMALLINT cbColumnName)
+SQLRETURN WINAPI ODBC32_SQLProcedureColumnsW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szProcName,
+ SQLSMALLINT cbProcName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s,"
+ " cbProcName %d, szColumnName %s, cbColumnName %d)\n", hstmt,
+ debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName,
+ debugstr_wn(szProcName, cbProcName), cbProcName,
+ debugstr_wn(szColumnName, cbColumnName), cbColumnName);
+
+ if (!pSQLProcedureColumnsW) return SQL_ERROR;
- if (!pSQLProcedureColumnsW) return SQL_ERROR;
- return pSQLProcedureColumnsW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szProcName, cbProcName, szColumnName, cbColumnName);
+ ret = pSQLProcedureColumnsW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szProcName,
+ cbProcName, szColumnName, cbColumnName);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLProceduresW [ODBC32.167]
*/
-SQLRETURN WINAPI ODBC32_SQLProceduresW(
- SQLHSTMT hstmt,
- SQLWCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLWCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLWCHAR *szProcName,
- SQLSMALLINT cbProcName)
+SQLRETURN WINAPI ODBC32_SQLProceduresW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szProcName,
+ SQLSMALLINT cbProcName)
{
- TRACE("\n");
+ SQLRETURN ret;
- if (!pSQLProceduresW) return SQL_ERROR;
- return pSQLProceduresW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szProcName, cbProcName);
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s,"
+ " cbProcName %d)\n", hstmt, debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName, debugstr_wn(szProcName, cbProcName), cbProcName);
+
+ if (!pSQLProceduresW) return SQL_ERROR;
+
+ ret = pSQLProceduresW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szProcName, cbProcName);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLTablePrivilegesW [ODBC32.170]
*/
-SQLRETURN WINAPI ODBC32_SQLTablePrivilegesW(
- SQLHSTMT hstmt,
- SQLWCHAR *szCatalogName,
- SQLSMALLINT cbCatalogName,
- SQLWCHAR *szSchemaName,
- SQLSMALLINT cbSchemaName,
- SQLWCHAR *szTableName,
- SQLSMALLINT cbTableName)
+SQLRETURN WINAPI ODBC32_SQLTablePrivilegesW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName,
+ SQLSMALLINT cbTableName)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s,"
+ " cbTableName %d)\n", hstmt, debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName,
+ debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName, debugstr_wn(szTableName, cbTableName), cbTableName);
+
+ if (!pSQLTablePrivilegesW) return SQL_ERROR;
- if (!pSQLTablePrivilegesW) return SQL_ERROR;
- return pSQLTablePrivilegesW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
- szTableName, cbTableName);
+ ret = pSQLTablePrivilegesW(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szTableName,
+ cbTableName);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
* SQLDriversW [ODBC32.171]
*/
-SQLRETURN WINAPI ODBC32_SQLDriversW(
- SQLHENV henv,
- SQLUSMALLINT fDirection,
- SQLWCHAR *szDriverDesc,
- SQLSMALLINT cbDriverDescMax,
- SQLSMALLINT *pcbDriverDesc,
- SQLWCHAR *szDriverAttributes,
- SQLSMALLINT cbDriverAttrMax,
- SQLSMALLINT *pcbDriverAttr)
+SQLRETURN WINAPI ODBC32_SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT fDirection, SQLWCHAR *szDriverDesc,
+ SQLSMALLINT cbDriverDescMax, SQLSMALLINT *pcbDriverDesc,
+ SQLWCHAR *szDriverAttributes, SQLSMALLINT cbDriverAttrMax,
+ SQLSMALLINT *pcbDriverAttr)
{
- SQLRETURN ret;
+ SQLRETURN ret;
+
+ TRACE("(EnvironmentHandle %p, Direction %d, szDriverDesc %p, cbDriverDescMax %d, pcbDriverDesc %p,"
+ " DriverAttributes %p, cbDriverAttrMax %d, pcbDriverAttr %p)\n", EnvironmentHandle, fDirection,
+ szDriverDesc, cbDriverDescMax, pcbDriverDesc, szDriverAttributes, cbDriverAttrMax, pcbDriverAttr);
- TRACE("(Direction %d)\n", fDirection);
+ if (!pSQLDriversW) return SQL_ERROR;
- if (!pSQLDriversW) return SQL_ERROR;
- ret = pSQLDriversW(henv, fDirection, szDriverDesc, cbDriverDescMax, pcbDriverDesc,
- szDriverAttributes, cbDriverAttrMax, pcbDriverAttr);
+ ret = pSQLDriversW(EnvironmentHandle, fDirection, szDriverDesc, cbDriverDescMax, pcbDriverDesc,
+ szDriverAttributes, cbDriverAttrMax, pcbDriverAttr);
- if (ret == SQL_NO_DATA && fDirection == SQL_FETCH_FIRST)
- ERR_(winediag)("No ODBC drivers could be found. "
- "Check the settings for your libodbc provider.\n");
+ if (ret == SQL_NO_DATA && fDirection == SQL_FETCH_FIRST)
+ ERR_(winediag)("No ODBC drivers could be found. Check the settings for your libodbc provider.\n");
- return ret;
+ TRACE("Returning %d\n", ret);
+ return ret;
}
/*************************************************************************
@@ -2839,14 +3101,19 @@ SQLRETURN WINAPI ODBC32_SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Att
/*************************************************************************
* SQLGetDiagRecA [ODBC32.236]
*/
-SQLRETURN WINAPI ODBC32_SQLGetDiagRecA(SQLSMALLINT handle_type, SQLHANDLE handle, SQLSMALLINT record,
- SQLCHAR *sql_state, SQLINTEGER *native_error,
- SQLCHAR *error_msg, SQLSMALLINT error_msg_max,
- SQLSMALLINT *error_msg_size)
+SQLRETURN WINAPI ODBC32_SQLGetDiagRecA(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber,
+ SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText,
+ SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
{
- TRACE("\n");
+ SQLRETURN ret;
+
+ TRACE("(HandleType %d, Handle %p, RecNumber %d, Sqlstate %p, NativeError %p, MessageText %p, BufferLength %d,"
+ " TextLength %p)\n", HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength,
+ TextLength);
if (!pSQLGetDiagRecA) return SQL_ERROR;
- return pSQLGetDiagRecA(handle_type, handle, record, sql_state, native_error, error_msg,
- error_msg_max, error_msg_size);
+
+ ret = pSQLGetDiagRecA(HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength, TextLength);
+ TRACE("Returning %d\n", ret);
+ return ret;
}
--
2.11.0
1
0