Author: akhaldi
Date: Sun Jul 19 23:09:04 2015
New Revision: 68467
URL:
http://svn.reactos.org/svn/reactos?rev=68467&view=rev
Log:
[ODBCCP32] Sync with Wine Staging 1.7.47. CORE-9924
Modified:
trunk/reactos/dll/win32/odbccp32/odbccp32.c
trunk/reactos/dll/win32/odbccp32/odbccp32.spec
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/odbccp32/odbccp32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/odbccp32/odbccp3…
==============================================================================
--- trunk/reactos/dll/win32/odbccp32/odbccp32.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/odbccp32/odbccp32.c [iso-8859-1] Sun Jul 19 23:09:04 2015
@@ -59,6 +59,7 @@
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_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. */
static void push_error(int code, LPCWSTR msg)
@@ -76,6 +77,33 @@
{
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)
{
@@ -239,7 +267,7 @@
BOOL WINAPI SQLCreateDataSourceW(HWND hwnd, LPCWSTR lpszDS)
{
clear_errors();
- FIXME("\n");
+ FIXME("%p %s\n", hwnd, debugstr_w(lpszDS));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -247,7 +275,7 @@
BOOL WINAPI SQLCreateDataSource(HWND hwnd, LPCSTR lpszDS)
{
clear_errors();
- FIXME("\n");
+ FIXME("%p %s\n", hwnd, debugstr_a(lpszDS));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -256,7 +284,7 @@
WORD cbBufMax, WORD *pcbBufOut)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s %p %d %p\n", debugstr_w(lpszInfFile), lpszBuf, cbBufMax,
pcbBufOut);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -265,7 +293,7 @@
WORD cbBufMax, WORD *pcbBufOut)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s %p %d %p\n", debugstr_a(lpszInfFile), lpszBuf, cbBufMax,
pcbBufOut);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -273,6 +301,7 @@
BOOL WINAPI SQLGetConfigMode(UWORD *pwConfigMode)
{
clear_errors();
+ TRACE("%p\n", pwConfigMode);
if (pwConfigMode)
*pwConfigMode = config_mode;
return TRUE;
@@ -290,6 +319,9 @@
BOOL success = FALSE; /* The value we will return */
clear_errors();
+
+ TRACE("%p %d %p\n", lpszBuf, cbBufMax, pcbBufOut);
+
if (!lpszBuf || cbBufMax == 0)
{
push_error(ODBC_ERROR_INVALID_BUFF_LEN, odbc_error_invalid_buff_len);
@@ -345,6 +377,9 @@
int size_wbuf = cbBufMax;
LPWSTR wbuf;
WORD size_used;
+
+ TRACE("%p %d %p\n", lpszBuf, cbBufMax, pcbBufOut);
+
wbuf = HeapAlloc(GetProcessHeap(), 0, size_wbuf*sizeof(WCHAR));
if (wbuf)
{
@@ -372,7 +407,9 @@
LPCWSTR lpszFilename)
{
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);
return FALSE;
}
@@ -382,7 +419,9 @@
LPCSTR lpszFilename)
{
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);
return FALSE;
}
@@ -392,7 +431,8 @@
WORD *pcbPathOut, DWORD *pvOption)
{
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);
return FALSE;
}
@@ -402,7 +442,8 @@
WORD *pcbPathOut, DWORD *pvOption)
{
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);
return FALSE;
}
@@ -582,7 +623,8 @@
LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers)
{
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);
return FALSE;
}
@@ -591,7 +633,8 @@
LPCSTR lpszSrcPath, LPCSTR lpszDrivers)
{
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);
return FALSE;
}
@@ -795,21 +838,21 @@
BOOL WINAPI SQLManageDataSources(HWND hwnd)
{
clear_errors();
- FIXME("\n");
+ FIXME("%p\n", hwnd);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
SQLRETURN WINAPI SQLPostInstallerErrorW(DWORD fErrorCode, LPCWSTR szErrorMsg)
{
- FIXME("\n");
+ FIXME("%u %s\n", fErrorCode, debugstr_w(szErrorMsg));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
SQLRETURN WINAPI SQLPostInstallerError(DWORD fErrorCode, LPCSTR szErrorMsg)
{
- FIXME("\n");
+ FIXME("%u %s\n", fErrorCode, debugstr_a(szErrorMsg));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -819,7 +862,8 @@
WORD *pcbString)
{
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);
return FALSE;
}
@@ -829,7 +873,8 @@
WORD *pcbString)
{
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);
return FALSE;
}
@@ -846,7 +891,7 @@
LPDWORD lpdwUsageCount)
{
clear_errors();
- FIXME("stub\n");
+ FIXME("%s %d %p\n", debugstr_w(lpszDriver), fRemoveDSN, lpdwUsageCount);
if (lpdwUsageCount) *lpdwUsageCount = 1;
return TRUE;
}
@@ -855,7 +900,7 @@
LPDWORD lpdwUsageCount)
{
clear_errors();
- FIXME("stub\n");
+ FIXME("%s %d %p\n", debugstr_a(lpszDriver), fRemoveDSN, lpdwUsageCount);
if (lpdwUsageCount) *lpdwUsageCount = 1;
return TRUE;
}
@@ -863,7 +908,7 @@
BOOL WINAPI SQLRemoveDriverManager(LPDWORD pdwUsageCount)
{
clear_errors();
- FIXME("stub\n");
+ FIXME("%p\n", pdwUsageCount);
if (pdwUsageCount) *pdwUsageCount = 1;
return TRUE;
}
@@ -871,7 +916,7 @@
BOOL WINAPI SQLRemoveDSNFromIniW(LPCWSTR lpszDSN)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s\n", debugstr_w(lpszDSN));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -879,7 +924,7 @@
BOOL WINAPI SQLRemoveDSNFromIni(LPCSTR lpszDSN)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s\n", debugstr_a(lpszDSN));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -887,7 +932,7 @@
BOOL WINAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s %p\n", debugstr_w(lpszTranslator), lpdwUsageCount);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -895,7 +940,7 @@
BOOL WINAPI SQLRemoveTranslator(LPCSTR lpszTranslator, LPDWORD lpdwUsageCount)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s %p\n", debugstr_a(lpszTranslator), lpdwUsageCount);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -903,6 +948,8 @@
BOOL WINAPI SQLSetConfigMode(UWORD wConfigMode)
{
clear_errors();
+ TRACE("%u\n", wConfigMode);
+
if (wConfigMode > ODBC_SYSTEM_DSN)
{
push_error(ODBC_ERROR_INVALID_PARAM_SEQUENCE,
odbc_error_invalid_param_sequence);
@@ -918,7 +965,7 @@
BOOL WINAPI SQLValidDSNW(LPCWSTR lpszDSN)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s\n", debugstr_w(lpszDSN));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -926,7 +973,7 @@
BOOL WINAPI SQLValidDSN(LPCSTR lpszDSN)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s\n", debugstr_a(lpszDSN));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -934,7 +981,7 @@
BOOL WINAPI SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s %s\n", debugstr_w(lpszDSN), debugstr_w(lpszDriver));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -942,7 +989,7 @@
BOOL WINAPI SQLWriteDSNToIni(LPCSTR lpszDSN, LPCSTR lpszDriver)
{
clear_errors();
- FIXME("\n");
+ FIXME("%s %s\n", debugstr_a(lpszDSN), debugstr_a(lpszDriver));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -951,7 +998,8 @@
LPCWSTR lpszKeyName, LPCWSTR lpszString)
{
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);
return FALSE;
}
@@ -960,7 +1008,8 @@
LPCSTR lpszKeyName, LPCSTR lpszString)
{
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);
return FALSE;
}
@@ -968,17 +1017,62 @@
BOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry,
LPCWSTR lpszString, LPCWSTR lpszFilename)
{
- clear_errors();
- FIXME("\n");
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ LONG ret;
+ HKEY hkey;
+ WCHAR softwareodbc[] =
{'S','o','f','t','w','a','r','e','\\','O','D','B','C',0};
+
+ clear_errors();
+ TRACE("%s %s %s %s\n", debugstr_w(lpszSection), debugstr_w(lpszEntry),
+ debugstr_w(lpszString), debugstr_w(lpszFilename));
+
+ 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,
LPCSTR lpszString, LPCSTR lpszFilename)
{
- clear_errors();
- FIXME("\n");
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
+ BOOL ret;
+ WCHAR *sect, *entry, *string, *file;
+ clear_errors();
+ TRACE("%s %s %s %s\n", lpszSection, lpszEntry, lpszString, lpszFilename);
+
+ 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;
+}
Modified: trunk/reactos/dll/win32/odbccp32/odbccp32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/odbccp32/odbccp3…
==============================================================================
--- trunk/reactos/dll/win32/odbccp32/odbccp32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/odbccp32/odbccp32.spec [iso-8859-1] Sun Jul 19 23:09:04 2015
@@ -1,6 +1,6 @@
2 stdcall SQLInstallDriver(str str str 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)
6 stdcall SQLConfigDataSource(ptr long str str)
7 stdcall SQLRemoveDefaultDataSource()
@@ -11,7 +11,7 @@
12 stdcall SQLCreateDataSource(ptr str)
13 stdcall SQLGetTranslator(ptr str long ptr ptr long ptr ptr)
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)
17 stdcall SQLRemoveDriverManager(ptr)
18 stdcall SQLInstallTranslator(str str str ptr long ptr long ptr)
@@ -31,7 +31,7 @@
112 stub SelectTransDlg
202 stdcall SQLInstallDriverW(wstr wstr wstr 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)
206 stdcall SQLConfigDataSourceW(ptr long wstr wstr)
208 stdcall SQLWriteDSNToIniW(wstr wstr)
@@ -40,7 +40,7 @@
212 stdcall SQLCreateDataSourceW(ptr wstr)
213 stdcall SQLGetTranslatorW(ptr wstr long ptr ptr long ptr ptr)
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)
218 stdcall SQLInstallTranslatorW(wstr wstr wstr ptr long ptr long ptr)
219 stdcall SQLRemoveTranslatorW(wstr ptr)
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jul 19 23:09:04 2015
@@ -144,7 +144,7 @@
reactos/dll/win32/ntprint # 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/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/oleacc # Synced to WineStaging-1.7.37
reactos/dll/win32/oleaut32 # Synced to WineStaging-1.7.37