Added YUV routines needed for v4l driver, and in the future possibly
[wine/gsoc-2012-control.git] / dlls / odbccp32 / odbccp32.c
blob604cb0e2e983c1f5cb436c7a1d5bbef82d942d58
1 /*
2 * Implementation of the ODBC driver installer
4 * Copyright 2005 Mike McCormack for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include <stdarg.h>
23 #define COBJMACROS
24 #define NONAMELESSUNION
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winreg.h"
29 #include "winnls.h"
30 #include "wine/debug.h"
32 #include "odbcinst.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(odbc);
36 static LPWSTR SQLInstall_strdup_multi(LPCSTR str)
38 LPCSTR p;
39 LPWSTR ret = NULL;
40 DWORD len;
42 if (!str)
43 return ret;
45 for (p = str; *p; p += lstrlenA(p) + 1)
48 len = MultiByteToWideChar(CP_ACP, 0, str, p - str, NULL, 0 );
49 ret = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR));
50 MultiByteToWideChar(CP_ACP, 0, str, p - str, ret, len );
51 ret[len] = 0;
53 return ret;
56 static LPWSTR SQLInstall_strdup(LPCSTR str)
58 DWORD len;
59 LPWSTR ret = NULL;
61 if (!str)
62 return ret;
64 len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0 );
65 ret = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
66 MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len );
68 return ret;
71 BOOL WINAPI SQLConfigDataSourceW(HWND hwndParent, WORD fRequest,
72 LPCWSTR lpszDriver, LPCWSTR lpszAttributes)
74 FIXME("\n");
75 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
76 return FALSE;
79 BOOL WINAPI SQLConfigDataSource(HWND hwndParent, WORD fRequest,
80 LPCSTR lpszDriver, LPCSTR lpszAttributes)
82 FIXME("\n");
83 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
84 return FALSE;
87 BOOL WINAPI SQLConfigDriverW(HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver,
88 LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut)
90 FIXME("\n");
91 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
92 return FALSE;
95 BOOL WINAPI SQLConfigDriver(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver,
96 LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut)
98 FIXME("\n");
99 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
100 return FALSE;
103 BOOL WINAPI SQLCreateDataSourceW(HWND hwnd, LPWSTR lpszDS)
105 FIXME("\n");
106 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
107 return FALSE;
110 BOOL WINAPI SQLCreateDataSource(HWND hwnd, LPSTR lpszDS)
112 FIXME("\n");
113 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
114 return FALSE;
117 BOOL WINAPI SQLGetAvailableDriversW(LPCWSTR lpszInfFile, LPWSTR lpszBuf,
118 WORD cbBufMax, WORD *pcbBufOut)
120 FIXME("\n");
121 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
122 return FALSE;
125 BOOL WINAPI SQLGetAvailableDrivers(LPCSTR lpszInfFile, LPSTR lpszBuf,
126 WORD cbBufMax, WORD *pcbBufOut)
128 FIXME("\n");
129 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
130 return FALSE;
133 BOOL WINAPI SQLGetConfigMode(UWORD *pwConfigMode)
135 FIXME("\n");
136 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
137 return FALSE;
140 BOOL WINAPI SQLGetInstalledDriversW(LPWSTR lpszBuf, WORD cbBufMax,
141 WORD *pcbBufOut)
143 FIXME("\n");
144 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
145 return FALSE;
148 BOOL WINAPI SQLGetInstalledDrivers(LPSTR lpszBuf, WORD cbBufMax,
149 WORD *pcbBufOut)
151 FIXME("\n");
152 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
153 return FALSE;
156 int WINAPI SQLGetPrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry,
157 LPCWSTR lpszDefault, LPCWSTR RetBuffer, INT cbRetBuffer,
158 LPCWSTR lpszFilename)
160 FIXME("\n");
161 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
162 return FALSE;
165 int WINAPI SQLGetPrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry,
166 LPCSTR lpszDefault, LPCSTR RetBuffer, INT cbRetBuffer,
167 LPCSTR lpszFilename)
169 FIXME("\n");
170 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
171 return FALSE;
174 BOOL WINAPI SQLGetTranslatorW(HWND hwndParent, LPWSTR lpszName, WORD cbNameMax,
175 WORD *pcbNameOut, LPWSTR lpszPath, WORD cbPathMax,
176 WORD *pcbPathOut, DWORD *pvOption)
178 FIXME("\n");
179 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
180 return FALSE;
183 BOOL WINAPI SQLGetTranslator(HWND hwndParent, LPSTR lpszName, WORD cbNameMax,
184 WORD *pcbNameOut, LPSTR lpszPath, WORD cbPathMax,
185 WORD *pcbPathOut, DWORD *pvOption)
187 FIXME("\n");
188 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
189 return FALSE;
192 BOOL WINAPI SQLInstallDriverW(LPCWSTR lpszInfFile, LPCWSTR lpszDriver,
193 LPWSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut)
195 FIXME("%s %s %p %d %p\n", debugstr_w(lpszInfFile),
196 debugstr_w(lpszDriver), lpszPath, cbPathMax, pcbPathOut);
197 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
198 return FALSE;
201 BOOL WINAPI SQLInstallDriver(LPCSTR lpszInfFile, LPCSTR lpszDriver,
202 LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut)
204 FIXME("%s %s %p %d %p\n", debugstr_a(lpszInfFile),
205 debugstr_a(lpszDriver), lpszPath, cbPathMax, pcbPathOut);
206 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
207 return FALSE;
210 BOOL WINAPI SQLInstallDriverExW(LPCWSTR lpszDriver, LPCWSTR lpszPathIn,
211 LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut,
212 WORD fRequest, LPDWORD lpdwUsageCount)
214 LPCWSTR p;
216 FIXME("%s %s %p %d %p %d %p\n", debugstr_w(lpszDriver), debugstr_w(lpszPathIn),
217 lpszPathOut, cbPathOutMax, pcbPathOut, fRequest, lpdwUsageCount);
219 for (p = lpszDriver; *p; p += lstrlenW(p) + 1)
220 FIXME("%s\n", debugstr_w(p));
222 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
223 return FALSE;
226 BOOL WINAPI SQLInstallDriverEx(LPCSTR lpszDriver, LPCSTR lpszPathIn,
227 LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut,
228 WORD fRequest, LPDWORD lpdwUsageCount)
230 LPWSTR driver, pathin;
231 WCHAR pathout[MAX_PATH];
232 BOOL r;
233 WORD cbOut = 0;
235 TRACE("%s %s %p %d %p %d %p\n", debugstr_a(lpszDriver), debugstr_a(lpszPathIn),
236 lpszPathOut, cbPathOutMax, pcbPathOut, fRequest, lpdwUsageCount);
238 driver = SQLInstall_strdup_multi(lpszDriver);
239 pathin = SQLInstall_strdup(lpszPathIn);
241 r = SQLInstallDriverExW( driver, pathin, pathout, MAX_PATH,
242 &cbOut, fRequest, lpdwUsageCount );
243 if (r)
245 *pcbPathOut = WideCharToMultiByte(CP_ACP, 0, pathout, -1,
246 lpszPathOut, cbPathOutMax, NULL, NULL );
249 return r;
252 BOOL WINAPI SQLInstallDriverManagerW(LPWSTR lpszPath, WORD cbPathMax,
253 WORD *pcbPathOut)
255 FIXME("\n");
256 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
257 return FALSE;
260 BOOL WINAPI SQLInstallDriverManager(LPSTR lpszPath, WORD cbPathMax,
261 WORD *pcbPathOut)
263 FIXME("\n");
264 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
265 return FALSE;
268 BOOL WINAPI SQLInstallODBCW(HWND hwndParent, LPCWSTR lpszInfFile,
269 LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers)
271 FIXME("\n");
272 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
273 return FALSE;
276 BOOL WINAPI SQLInstallODBC(HWND hwndParent, LPCSTR lpszInfFile,
277 LPCSTR lpszSrcPath, LPCSTR lpszDrivers)
279 FIXME("\n");
280 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
281 return FALSE;
284 RETCODE WINAPI SQLInstallerErrorW(WORD iError, DWORD *pfErrorCode,
285 LPWSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD *pcbErrorMsg)
287 FIXME("\n");
288 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
289 return FALSE;
292 RETCODE WINAPI SQLInstallerError(WORD iError, DWORD *pfErrorCode,
293 LPSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD *pcbErrorMsg)
295 FIXME("\n");
296 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
297 return FALSE;
300 BOOL WINAPI SQLInstallTranslatorExW(LPCWSTR lpszTranslator, LPCWSTR lpszPathIn,
301 LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut,
302 WORD fRequest, LPDWORD lpdwUsageCount)
304 FIXME("\n");
305 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
306 return FALSE;
309 BOOL WINAPI SQLInstallTranslatorEx(LPCSTR lpszTranslator, LPCSTR lpszPathIn,
310 LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut,
311 WORD fRequest, LPDWORD lpdwUsageCount)
313 FIXME("\n");
314 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
315 return FALSE;
318 BOOL WINAPI SQLInstallTranslator(LPCSTR lpszInfFile, LPCSTR lpszTranslator,
319 LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax,
320 WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
322 FIXME("\n");
323 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
324 return FALSE;
327 BOOL WINAPI SQLInstallTranslatorW(LPCWSTR lpszInfFile, LPCWSTR lpszTranslator,
328 LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax,
329 WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
331 FIXME("\n");
332 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
333 return FALSE;
336 BOOL WINAPI SQLManageDataSources(HWND hwnd)
338 FIXME("\n");
339 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
340 return FALSE;
343 RETCODE WINAPI SQLPostInstallerErrorW(DWORD fErrorCode, LPWSTR szErrorMsg)
345 FIXME("\n");
346 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
347 return FALSE;
350 RETCODE WINAPI SQLPostInstallerError(DWORD fErrorCode, LPSTR szErrorMsg)
352 FIXME("\n");
353 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
354 return FALSE;
357 BOOL WINAPI SQLReadFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName,
358 LPCWSTR lpszKeyName, LPWSTR lpszString, WORD cbString,
359 WORD *pcbString)
361 FIXME("\n");
362 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
363 return FALSE;
366 BOOL WINAPI SQLReadFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName,
367 LPCSTR lpszKeyName, LPSTR lpszString, WORD cbString,
368 WORD *pcbString)
370 FIXME("\n");
371 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
372 return FALSE;
375 BOOL WINAPI SQLRemoveDefaultDataSource(void)
377 FIXME("\n");
378 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
379 return FALSE;
382 BOOL WINAPI SQLRemoveDriverW(LPCWSTR lpszDriver, BOOL fRemoveDSN,
383 LPDWORD lpdwUsageCount)
385 FIXME("\n");
386 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
387 return FALSE;
390 BOOL WINAPI SQLRemoveDriver(LPCSTR lpszDriver, BOOL fRemoveDSN,
391 LPDWORD lpdwUsageCount)
393 FIXME("\n");
394 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
395 return FALSE;
398 BOOL WINAPI SQLRemoveDriverManager(LPDWORD pdwUsageCount)
400 FIXME("\n");
401 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
402 return FALSE;
405 BOOL WINAPI SQLRemoveDSNFromIniW(LPCWSTR lpszDSN)
407 FIXME("\n");
408 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
409 return FALSE;
412 BOOL WINAPI SQLRemoveDSNFromIni(LPCSTR lpszDSN)
414 FIXME("\n");
415 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
416 return FALSE;
419 BOOL WINAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount)
421 FIXME("\n");
422 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
423 return FALSE;
426 BOOL WINAPI SQLRemoveTranslator(LPCSTR lpszTranslator, LPDWORD lpdwUsageCount)
428 FIXME("\n");
429 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
430 return FALSE;
433 BOOL WINAPI SQLSetConfigMode(UWORD wConfigMode)
435 FIXME("\n");
436 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
437 return FALSE;
440 BOOL WINAPI SQLValidDSNW(LPCWSTR lpszDSN)
442 FIXME("\n");
443 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
444 return FALSE;
447 BOOL WINAPI SQLValidDSN(LPCSTR lpszDSN)
449 FIXME("\n");
450 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
451 return FALSE;
454 BOOL WINAPI SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver)
456 FIXME("\n");
457 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
458 return FALSE;
461 BOOL WINAPI SQLWriteDSNToIni(LPCSTR lpszDSN, LPCSTR lpszDriver)
463 FIXME("\n");
464 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
465 return FALSE;
468 BOOL WINAPI SQLWriteFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName,
469 LPCWSTR lpszKeyName, LPCWSTR lpszString)
471 FIXME("\n");
472 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
473 return FALSE;
476 BOOL WINAPI SQLWriteFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName,
477 LPCSTR lpszKeyName, LPCSTR lpszString)
479 FIXME("\n");
480 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
481 return FALSE;
484 BOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry,
485 LPCWSTR lpszString, LPCWSTR lpszFilename)
487 FIXME("\n");
488 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
489 return FALSE;
492 BOOL WINAPI SQLWritePrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry,
493 LPCSTR lpszString, LPCSTR lpszFilename)
495 FIXME("\n");
496 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
497 return FALSE;