mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:03:25 +00:00
[ODBCCP32] Sync with Wine Staging 1.7.47. CORE-9924
svn path=/trunk/; revision=68467
This commit is contained in:
parent
b2b1bf9eef
commit
cb7d607aed
3 changed files with 133 additions and 39 deletions
|
@ -59,6 +59,7 @@ static const WCHAR odbc_error_invalid_buff_len[] = {'I','n','v','a','l','i','d',
|
||||||
static const WCHAR odbc_error_component_not_found[] = {'C','o','m','p','o','n','e','n','t',' ','n','o','t',' ','f','o','u','n','d',0};
|
static const WCHAR odbc_error_component_not_found[] = {'C','o','m','p','o','n','e','n','t',' ','n','o','t',' ','f','o','u','n','d',0};
|
||||||
static const WCHAR odbc_error_out_of_mem[] = {'O','u','t',' ','o','f',' ','m','e','m','o','r','y',0};
|
static const WCHAR odbc_error_out_of_mem[] = {'O','u','t',' ','o','f',' ','m','e','m','o','r','y',0};
|
||||||
static const WCHAR odbc_error_invalid_param_sequence[] = {'I','n','v','a','l','i','d',' ','p','a','r','a','m','e','t','e','r',' ','s','e','q','u','e','n','c','e',0};
|
static const WCHAR odbc_error_invalid_param_sequence[] = {'I','n','v','a','l','i','d',' ','p','a','r','a','m','e','t','e','r',' ','s','e','q','u','e','n','c','e',0};
|
||||||
|
static const WCHAR odbc_error_invalid_param_string[] = {'I','n','v','a','l','i','d',' ','p','a','r','a','m','e','t','e','r',' ','s','t','r','i','n','g',0};
|
||||||
|
|
||||||
/* Push an error onto the error stack, taking care of ranges etc. */
|
/* Push an error onto the error stack, taking care of ranges etc. */
|
||||||
static void push_error(int code, LPCWSTR msg)
|
static void push_error(int code, LPCWSTR msg)
|
||||||
|
@ -77,6 +78,33 @@ static void clear_errors(void)
|
||||||
num_errors = 0;
|
num_errors = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void * heap_alloc(size_t len)
|
||||||
|
{
|
||||||
|
return HeapAlloc(GetProcessHeap(), 0, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline BOOL heap_free(void *mem)
|
||||||
|
{
|
||||||
|
return HeapFree(GetProcessHeap(), 0, mem);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline WCHAR *heap_strdupAtoW(const char *str)
|
||||||
|
{
|
||||||
|
LPWSTR ret = NULL;
|
||||||
|
|
||||||
|
if(str) {
|
||||||
|
DWORD len;
|
||||||
|
|
||||||
|
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||||
|
ret = heap_alloc(len*sizeof(WCHAR));
|
||||||
|
if(ret)
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL WINAPI ODBCCPlApplet( LONG i, LONG j, LONG * p1, LONG * p2)
|
BOOL WINAPI ODBCCPlApplet( LONG i, LONG j, LONG * p1, LONG * p2)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
|
@ -239,7 +267,7 @@ BOOL WINAPI SQLConfigDriver(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver,
|
||||||
BOOL WINAPI SQLCreateDataSourceW(HWND hwnd, LPCWSTR lpszDS)
|
BOOL WINAPI SQLCreateDataSourceW(HWND hwnd, LPCWSTR lpszDS)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%p %s\n", hwnd, debugstr_w(lpszDS));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -247,7 +275,7 @@ BOOL WINAPI SQLCreateDataSourceW(HWND hwnd, LPCWSTR lpszDS)
|
||||||
BOOL WINAPI SQLCreateDataSource(HWND hwnd, LPCSTR lpszDS)
|
BOOL WINAPI SQLCreateDataSource(HWND hwnd, LPCSTR lpszDS)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%p %s\n", hwnd, debugstr_a(lpszDS));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -256,7 +284,7 @@ BOOL WINAPI SQLGetAvailableDriversW(LPCWSTR lpszInfFile, LPWSTR lpszBuf,
|
||||||
WORD cbBufMax, WORD *pcbBufOut)
|
WORD cbBufMax, WORD *pcbBufOut)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %p %d %p\n", debugstr_w(lpszInfFile), lpszBuf, cbBufMax, pcbBufOut);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -265,7 +293,7 @@ BOOL WINAPI SQLGetAvailableDrivers(LPCSTR lpszInfFile, LPSTR lpszBuf,
|
||||||
WORD cbBufMax, WORD *pcbBufOut)
|
WORD cbBufMax, WORD *pcbBufOut)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %p %d %p\n", debugstr_a(lpszInfFile), lpszBuf, cbBufMax, pcbBufOut);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -273,6 +301,7 @@ BOOL WINAPI SQLGetAvailableDrivers(LPCSTR lpszInfFile, LPSTR lpszBuf,
|
||||||
BOOL WINAPI SQLGetConfigMode(UWORD *pwConfigMode)
|
BOOL WINAPI SQLGetConfigMode(UWORD *pwConfigMode)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
|
TRACE("%p\n", pwConfigMode);
|
||||||
if (pwConfigMode)
|
if (pwConfigMode)
|
||||||
*pwConfigMode = config_mode;
|
*pwConfigMode = config_mode;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -290,6 +319,9 @@ BOOL WINAPI SQLGetInstalledDriversW(LPWSTR lpszBuf, WORD cbBufMax,
|
||||||
BOOL success = FALSE; /* The value we will return */
|
BOOL success = FALSE; /* The value we will return */
|
||||||
|
|
||||||
clear_errors();
|
clear_errors();
|
||||||
|
|
||||||
|
TRACE("%p %d %p\n", lpszBuf, cbBufMax, pcbBufOut);
|
||||||
|
|
||||||
if (!lpszBuf || cbBufMax == 0)
|
if (!lpszBuf || cbBufMax == 0)
|
||||||
{
|
{
|
||||||
push_error(ODBC_ERROR_INVALID_BUFF_LEN, odbc_error_invalid_buff_len);
|
push_error(ODBC_ERROR_INVALID_BUFF_LEN, odbc_error_invalid_buff_len);
|
||||||
|
@ -345,6 +377,9 @@ BOOL WINAPI SQLGetInstalledDrivers(LPSTR lpszBuf, WORD cbBufMax,
|
||||||
int size_wbuf = cbBufMax;
|
int size_wbuf = cbBufMax;
|
||||||
LPWSTR wbuf;
|
LPWSTR wbuf;
|
||||||
WORD size_used;
|
WORD size_used;
|
||||||
|
|
||||||
|
TRACE("%p %d %p\n", lpszBuf, cbBufMax, pcbBufOut);
|
||||||
|
|
||||||
wbuf = HeapAlloc(GetProcessHeap(), 0, size_wbuf*sizeof(WCHAR));
|
wbuf = HeapAlloc(GetProcessHeap(), 0, size_wbuf*sizeof(WCHAR));
|
||||||
if (wbuf)
|
if (wbuf)
|
||||||
{
|
{
|
||||||
|
@ -372,7 +407,9 @@ int WINAPI SQLGetPrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry,
|
||||||
LPCWSTR lpszFilename)
|
LPCWSTR lpszFilename)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %s %s %p %d %s\n", debugstr_w(lpszSection), debugstr_w(lpszEntry),
|
||||||
|
debugstr_w(lpszDefault), RetBuffer, cbRetBuffer,
|
||||||
|
debugstr_w(lpszFilename));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -382,7 +419,9 @@ int WINAPI SQLGetPrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry,
|
||||||
LPCSTR lpszFilename)
|
LPCSTR lpszFilename)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %s %s %p %d %s\n", debugstr_a(lpszSection), debugstr_a(lpszEntry),
|
||||||
|
debugstr_a(lpszDefault), RetBuffer, cbRetBuffer,
|
||||||
|
debugstr_a(lpszFilename));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -392,7 +431,8 @@ BOOL WINAPI SQLGetTranslatorW(HWND hwndParent, LPWSTR lpszName, WORD cbNameMax,
|
||||||
WORD *pcbPathOut, DWORD *pvOption)
|
WORD *pcbPathOut, DWORD *pvOption)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%p %s %d %p %p %d %p %p\n", hwndParent, debugstr_w(lpszName), cbNameMax,
|
||||||
|
pcbNameOut, lpszPath, cbPathMax, pcbPathOut, pvOption);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -402,7 +442,8 @@ BOOL WINAPI SQLGetTranslator(HWND hwndParent, LPSTR lpszName, WORD cbNameMax,
|
||||||
WORD *pcbPathOut, DWORD *pvOption)
|
WORD *pcbPathOut, DWORD *pvOption)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%p %s %d %p %p %d %p %p\n", hwndParent, debugstr_a(lpszName), cbNameMax,
|
||||||
|
pcbNameOut, lpszPath, cbPathMax, pcbPathOut, pvOption);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -582,7 +623,8 @@ BOOL WINAPI SQLInstallODBCW(HWND hwndParent, LPCWSTR lpszInfFile,
|
||||||
LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers)
|
LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%p %s %s %s\n", hwndParent, debugstr_w(lpszInfFile),
|
||||||
|
debugstr_w(lpszSrcPath), debugstr_w(lpszDrivers));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -591,7 +633,8 @@ BOOL WINAPI SQLInstallODBC(HWND hwndParent, LPCSTR lpszInfFile,
|
||||||
LPCSTR lpszSrcPath, LPCSTR lpszDrivers)
|
LPCSTR lpszSrcPath, LPCSTR lpszDrivers)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%p %s %s %s\n", hwndParent, debugstr_a(lpszInfFile),
|
||||||
|
debugstr_a(lpszSrcPath), debugstr_a(lpszDrivers));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -795,21 +838,21 @@ BOOL WINAPI SQLInstallTranslatorW(LPCWSTR lpszInfFile, LPCWSTR lpszTranslator,
|
||||||
BOOL WINAPI SQLManageDataSources(HWND hwnd)
|
BOOL WINAPI SQLManageDataSources(HWND hwnd)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%p\n", hwnd);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
SQLRETURN WINAPI SQLPostInstallerErrorW(DWORD fErrorCode, LPCWSTR szErrorMsg)
|
SQLRETURN WINAPI SQLPostInstallerErrorW(DWORD fErrorCode, LPCWSTR szErrorMsg)
|
||||||
{
|
{
|
||||||
FIXME("\n");
|
FIXME("%u %s\n", fErrorCode, debugstr_w(szErrorMsg));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
SQLRETURN WINAPI SQLPostInstallerError(DWORD fErrorCode, LPCSTR szErrorMsg)
|
SQLRETURN WINAPI SQLPostInstallerError(DWORD fErrorCode, LPCSTR szErrorMsg)
|
||||||
{
|
{
|
||||||
FIXME("\n");
|
FIXME("%u %s\n", fErrorCode, debugstr_a(szErrorMsg));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -819,7 +862,8 @@ BOOL WINAPI SQLReadFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName,
|
||||||
WORD *pcbString)
|
WORD *pcbString)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %s %s %s %d %p\n", debugstr_w(lpszFileName), debugstr_w(lpszAppName),
|
||||||
|
debugstr_w(lpszKeyName), debugstr_w(lpszString), cbString, pcbString);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -829,7 +873,8 @@ BOOL WINAPI SQLReadFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName,
|
||||||
WORD *pcbString)
|
WORD *pcbString)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %s %s %s %d %p\n", debugstr_a(lpszFileName), debugstr_a(lpszAppName),
|
||||||
|
debugstr_a(lpszKeyName), debugstr_a(lpszString), cbString, pcbString);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -846,7 +891,7 @@ BOOL WINAPI SQLRemoveDriverW(LPCWSTR lpszDriver, BOOL fRemoveDSN,
|
||||||
LPDWORD lpdwUsageCount)
|
LPDWORD lpdwUsageCount)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("stub\n");
|
FIXME("%s %d %p\n", debugstr_w(lpszDriver), fRemoveDSN, lpdwUsageCount);
|
||||||
if (lpdwUsageCount) *lpdwUsageCount = 1;
|
if (lpdwUsageCount) *lpdwUsageCount = 1;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -855,7 +900,7 @@ BOOL WINAPI SQLRemoveDriver(LPCSTR lpszDriver, BOOL fRemoveDSN,
|
||||||
LPDWORD lpdwUsageCount)
|
LPDWORD lpdwUsageCount)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("stub\n");
|
FIXME("%s %d %p\n", debugstr_a(lpszDriver), fRemoveDSN, lpdwUsageCount);
|
||||||
if (lpdwUsageCount) *lpdwUsageCount = 1;
|
if (lpdwUsageCount) *lpdwUsageCount = 1;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -863,7 +908,7 @@ BOOL WINAPI SQLRemoveDriver(LPCSTR lpszDriver, BOOL fRemoveDSN,
|
||||||
BOOL WINAPI SQLRemoveDriverManager(LPDWORD pdwUsageCount)
|
BOOL WINAPI SQLRemoveDriverManager(LPDWORD pdwUsageCount)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("stub\n");
|
FIXME("%p\n", pdwUsageCount);
|
||||||
if (pdwUsageCount) *pdwUsageCount = 1;
|
if (pdwUsageCount) *pdwUsageCount = 1;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -871,7 +916,7 @@ BOOL WINAPI SQLRemoveDriverManager(LPDWORD pdwUsageCount)
|
||||||
BOOL WINAPI SQLRemoveDSNFromIniW(LPCWSTR lpszDSN)
|
BOOL WINAPI SQLRemoveDSNFromIniW(LPCWSTR lpszDSN)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s\n", debugstr_w(lpszDSN));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -879,7 +924,7 @@ BOOL WINAPI SQLRemoveDSNFromIniW(LPCWSTR lpszDSN)
|
||||||
BOOL WINAPI SQLRemoveDSNFromIni(LPCSTR lpszDSN)
|
BOOL WINAPI SQLRemoveDSNFromIni(LPCSTR lpszDSN)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s\n", debugstr_a(lpszDSN));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -887,7 +932,7 @@ BOOL WINAPI SQLRemoveDSNFromIni(LPCSTR lpszDSN)
|
||||||
BOOL WINAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount)
|
BOOL WINAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %p\n", debugstr_w(lpszTranslator), lpdwUsageCount);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -895,7 +940,7 @@ BOOL WINAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount)
|
||||||
BOOL WINAPI SQLRemoveTranslator(LPCSTR lpszTranslator, LPDWORD lpdwUsageCount)
|
BOOL WINAPI SQLRemoveTranslator(LPCSTR lpszTranslator, LPDWORD lpdwUsageCount)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %p\n", debugstr_a(lpszTranslator), lpdwUsageCount);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -903,6 +948,8 @@ BOOL WINAPI SQLRemoveTranslator(LPCSTR lpszTranslator, LPDWORD lpdwUsageCount)
|
||||||
BOOL WINAPI SQLSetConfigMode(UWORD wConfigMode)
|
BOOL WINAPI SQLSetConfigMode(UWORD wConfigMode)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
|
TRACE("%u\n", wConfigMode);
|
||||||
|
|
||||||
if (wConfigMode > ODBC_SYSTEM_DSN)
|
if (wConfigMode > ODBC_SYSTEM_DSN)
|
||||||
{
|
{
|
||||||
push_error(ODBC_ERROR_INVALID_PARAM_SEQUENCE, odbc_error_invalid_param_sequence);
|
push_error(ODBC_ERROR_INVALID_PARAM_SEQUENCE, odbc_error_invalid_param_sequence);
|
||||||
|
@ -918,7 +965,7 @@ BOOL WINAPI SQLSetConfigMode(UWORD wConfigMode)
|
||||||
BOOL WINAPI SQLValidDSNW(LPCWSTR lpszDSN)
|
BOOL WINAPI SQLValidDSNW(LPCWSTR lpszDSN)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s\n", debugstr_w(lpszDSN));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -926,7 +973,7 @@ BOOL WINAPI SQLValidDSNW(LPCWSTR lpszDSN)
|
||||||
BOOL WINAPI SQLValidDSN(LPCSTR lpszDSN)
|
BOOL WINAPI SQLValidDSN(LPCSTR lpszDSN)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s\n", debugstr_a(lpszDSN));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -934,7 +981,7 @@ BOOL WINAPI SQLValidDSN(LPCSTR lpszDSN)
|
||||||
BOOL WINAPI SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver)
|
BOOL WINAPI SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %s\n", debugstr_w(lpszDSN), debugstr_w(lpszDriver));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -942,7 +989,7 @@ BOOL WINAPI SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver)
|
||||||
BOOL WINAPI SQLWriteDSNToIni(LPCSTR lpszDSN, LPCSTR lpszDriver)
|
BOOL WINAPI SQLWriteDSNToIni(LPCSTR lpszDSN, LPCSTR lpszDriver)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %s\n", debugstr_a(lpszDSN), debugstr_a(lpszDriver));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -951,7 +998,8 @@ BOOL WINAPI SQLWriteFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName,
|
||||||
LPCWSTR lpszKeyName, LPCWSTR lpszString)
|
LPCWSTR lpszKeyName, LPCWSTR lpszString)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %s %s %s\n", debugstr_w(lpszFileName), debugstr_w(lpszAppName),
|
||||||
|
debugstr_w(lpszKeyName), debugstr_w(lpszString));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -960,7 +1008,8 @@ BOOL WINAPI SQLWriteFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName,
|
||||||
LPCSTR lpszKeyName, LPCSTR lpszString)
|
LPCSTR lpszKeyName, LPCSTR lpszString)
|
||||||
{
|
{
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
FIXME("%s %s %s %s\n", debugstr_a(lpszFileName), debugstr_a(lpszAppName),
|
||||||
|
debugstr_a(lpszKeyName), debugstr_a(lpszString));
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -968,17 +1017,62 @@ BOOL WINAPI SQLWriteFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName,
|
||||||
BOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry,
|
BOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry,
|
||||||
LPCWSTR lpszString, LPCWSTR lpszFilename)
|
LPCWSTR lpszString, LPCWSTR lpszFilename)
|
||||||
{
|
{
|
||||||
|
LONG ret;
|
||||||
|
HKEY hkey;
|
||||||
|
WCHAR softwareodbc[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C',0};
|
||||||
|
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
TRACE("%s %s %s %s\n", debugstr_w(lpszSection), debugstr_w(lpszEntry),
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
debugstr_w(lpszString), debugstr_w(lpszFilename));
|
||||||
return FALSE;
|
|
||||||
|
if(!lpszFilename || !*lpszFilename)
|
||||||
|
{
|
||||||
|
push_error(ODBC_ERROR_INVALID_STR, odbc_error_invalid_param_string);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((ret = RegCreateKeyW(HKEY_CURRENT_USER, softwareodbc, &hkey)) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
HKEY hkeyfilename;
|
||||||
|
|
||||||
|
if ((ret = RegCreateKeyW(hkey, lpszFilename, &hkeyfilename)) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
HKEY hkey_section;
|
||||||
|
|
||||||
|
if ((ret = RegCreateKeyW(hkeyfilename, lpszSection, &hkey_section)) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
ret = RegSetValueExW(hkey_section, lpszEntry, 0, REG_SZ, (BYTE*)lpszString, (lstrlenW(lpszString)+1)*sizeof(WCHAR));
|
||||||
|
RegCloseKey(hkey_section);
|
||||||
|
}
|
||||||
|
|
||||||
|
RegCloseKey(hkeyfilename);
|
||||||
|
}
|
||||||
|
|
||||||
|
RegCloseKey(hkey);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret == ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI SQLWritePrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry,
|
BOOL WINAPI SQLWritePrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry,
|
||||||
LPCSTR lpszString, LPCSTR lpszFilename)
|
LPCSTR lpszString, LPCSTR lpszFilename)
|
||||||
{
|
{
|
||||||
|
BOOL ret;
|
||||||
|
WCHAR *sect, *entry, *string, *file;
|
||||||
clear_errors();
|
clear_errors();
|
||||||
FIXME("\n");
|
TRACE("%s %s %s %s\n", lpszSection, lpszEntry, lpszString, lpszFilename);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
||||||
return FALSE;
|
sect = heap_strdupAtoW(lpszSection);
|
||||||
|
entry = heap_strdupAtoW(lpszEntry);
|
||||||
|
string = heap_strdupAtoW(lpszString);
|
||||||
|
file = heap_strdupAtoW(lpszFilename);
|
||||||
|
|
||||||
|
ret = SQLWritePrivateProfileStringW(sect, entry, string, file);
|
||||||
|
|
||||||
|
heap_free(sect);
|
||||||
|
heap_free(entry);
|
||||||
|
heap_free(string);
|
||||||
|
heap_free(file);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
2 stdcall SQLInstallDriver(str str str long ptr)
|
2 stdcall SQLInstallDriver(str str str long ptr)
|
||||||
3 stdcall SQLInstallDriverManager(ptr long ptr)
|
3 stdcall SQLInstallDriverManager(ptr long ptr)
|
||||||
4 stdcall SQLGetInstalledDrivers(str long ptr)
|
4 stdcall SQLGetInstalledDrivers(ptr long ptr)
|
||||||
5 stdcall SQLGetAvailableDrivers(str ptr long ptr)
|
5 stdcall SQLGetAvailableDrivers(str ptr long ptr)
|
||||||
6 stdcall SQLConfigDataSource(ptr long str str)
|
6 stdcall SQLConfigDataSource(ptr long str str)
|
||||||
7 stdcall SQLRemoveDefaultDataSource()
|
7 stdcall SQLRemoveDefaultDataSource()
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
12 stdcall SQLCreateDataSource(ptr str)
|
12 stdcall SQLCreateDataSource(ptr str)
|
||||||
13 stdcall SQLGetTranslator(ptr str long ptr ptr long ptr ptr)
|
13 stdcall SQLGetTranslator(ptr str long ptr ptr long ptr ptr)
|
||||||
14 stdcall SQLWritePrivateProfileString(str str str str)
|
14 stdcall SQLWritePrivateProfileString(str str str str)
|
||||||
15 stdcall SQLGetPrivateProfileString(str str str str long str)
|
15 stdcall SQLGetPrivateProfileString(str str str ptr long str)
|
||||||
16 stdcall SQLValidDSN(str)
|
16 stdcall SQLValidDSN(str)
|
||||||
17 stdcall SQLRemoveDriverManager(ptr)
|
17 stdcall SQLRemoveDriverManager(ptr)
|
||||||
18 stdcall SQLInstallTranslator(str str str ptr long ptr long ptr)
|
18 stdcall SQLInstallTranslator(str str str ptr long ptr long ptr)
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
112 stub SelectTransDlg
|
112 stub SelectTransDlg
|
||||||
202 stdcall SQLInstallDriverW(wstr wstr wstr long ptr)
|
202 stdcall SQLInstallDriverW(wstr wstr wstr long ptr)
|
||||||
203 stdcall SQLInstallDriverManagerW(ptr long ptr)
|
203 stdcall SQLInstallDriverManagerW(ptr long ptr)
|
||||||
204 stdcall SQLGetInstalledDriversW(wstr long ptr)
|
204 stdcall SQLGetInstalledDriversW(ptr long ptr)
|
||||||
205 stdcall SQLGetAvailableDriversW(wstr ptr long ptr)
|
205 stdcall SQLGetAvailableDriversW(wstr ptr long ptr)
|
||||||
206 stdcall SQLConfigDataSourceW(ptr long wstr wstr)
|
206 stdcall SQLConfigDataSourceW(ptr long wstr wstr)
|
||||||
208 stdcall SQLWriteDSNToIniW(wstr wstr)
|
208 stdcall SQLWriteDSNToIniW(wstr wstr)
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
212 stdcall SQLCreateDataSourceW(ptr wstr)
|
212 stdcall SQLCreateDataSourceW(ptr wstr)
|
||||||
213 stdcall SQLGetTranslatorW(ptr wstr long ptr ptr long ptr ptr)
|
213 stdcall SQLGetTranslatorW(ptr wstr long ptr ptr long ptr ptr)
|
||||||
214 stdcall SQLWritePrivateProfileStringW(wstr wstr wstr wstr)
|
214 stdcall SQLWritePrivateProfileStringW(wstr wstr wstr wstr)
|
||||||
215 stdcall SQLGetPrivateProfileStringW(wstr wstr wstr wstr long wstr)
|
215 stdcall SQLGetPrivateProfileStringW(wstr wstr wstr ptr long wstr)
|
||||||
216 stdcall SQLValidDSNW(wstr)
|
216 stdcall SQLValidDSNW(wstr)
|
||||||
218 stdcall SQLInstallTranslatorW(wstr wstr wstr ptr long ptr long ptr)
|
218 stdcall SQLInstallTranslatorW(wstr wstr wstr ptr long ptr long ptr)
|
||||||
219 stdcall SQLRemoveTranslatorW(wstr ptr)
|
219 stdcall SQLRemoveTranslatorW(wstr ptr)
|
||||||
|
|
|
@ -144,7 +144,7 @@ reactos/dll/win32/ntdsapi # Synced to WineStaging-1.7.37
|
||||||
reactos/dll/win32/ntprint # Synced to WineStaging-1.7.37
|
reactos/dll/win32/ntprint # Synced to WineStaging-1.7.37
|
||||||
reactos/dll/win32/objsel # Synced to WineStaging-1.7.37
|
reactos/dll/win32/objsel # Synced to WineStaging-1.7.37
|
||||||
reactos/dll/win32/odbc32 # Synced to WineStaging-1.7.37. Depends on port of Linux ODBC.
|
reactos/dll/win32/odbc32 # Synced to WineStaging-1.7.37. Depends on port of Linux ODBC.
|
||||||
reactos/dll/win32/odbccp32 # Synced to WineStaging-1.7.37
|
reactos/dll/win32/odbccp32 # Synced to WineStaging-1.7.47
|
||||||
reactos/dll/win32/ole32 # Synced to WineStaging-1.7.37
|
reactos/dll/win32/ole32 # Synced to WineStaging-1.7.37
|
||||||
reactos/dll/win32/oleacc # Synced to WineStaging-1.7.37
|
reactos/dll/win32/oleacc # Synced to WineStaging-1.7.37
|
||||||
reactos/dll/win32/oleaut32 # Synced to WineStaging-1.7.37
|
reactos/dll/win32/oleaut32 # Synced to WineStaging-1.7.37
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue