2 * setupapi query functions
4 * Copyright 2006 James Hawkins
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "wine/debug.h"
32 #include "setupapi_private.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(setupapi
);
37 static const WCHAR source_disks_names_platform
[] =
38 {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s','.','x','8','6',0};
39 static const WCHAR source_disks_files_platform
[] =
40 {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s','.','x','8','6',0};
41 #elif defined(__x86_64__)
42 static const WCHAR source_disks_names_platform
[] =
43 {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s','.','a','m','d','6','4',0};
44 static const WCHAR source_disks_files_platform
[] =
45 {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s','.','a','m','d','6','4',0};
46 #elif defined(__arm__)
47 static const WCHAR source_disks_names_platform
[] =
48 {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s','.','a','r','m',0};
49 static const WCHAR source_disks_files_platform
[] =
50 {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s','.','a','r','m',0};
51 #elif defined(__aarch64__)
52 static const WCHAR source_disks_names_platform
[] =
53 {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s','.','a','r','m','6','4',0};
54 static const WCHAR source_disks_files_platform
[] =
55 {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s','.','a','r','m','6','4',0};
56 #else /* FIXME: other platforms */
57 static const WCHAR source_disks_names_platform
[] =
58 {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s',0};
59 static const WCHAR source_disks_files_platform
[] =
60 {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s',0};
62 static const WCHAR source_disks_names
[] =
63 {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s',0};
64 static const WCHAR source_disks_files
[] =
65 {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s',0};
67 /* fills the PSP_INF_INFORMATION struct fill_info is TRUE
68 * always returns the required size of the information
70 static BOOL
fill_inf_info(HINF inf
, PSP_INF_INFORMATION buffer
, DWORD size
, DWORD
*required
)
72 LPCWSTR filename
= PARSER_get_inf_filename(inf
);
73 DWORD total_size
= FIELD_OFFSET(SP_INF_INFORMATION
, VersionData
)
74 + (lstrlenW(filename
) + 1) * sizeof(WCHAR
);
76 if (required
) *required
= total_size
;
78 /* FIXME: we need to parse the INF file to find the correct version info */
81 if (size
< total_size
)
83 SetLastError(ERROR_INSUFFICIENT_BUFFER
);
86 buffer
->InfStyle
= INF_STYLE_WIN4
;
88 /* put the filename in buffer->VersionData */
89 lstrcpyW((LPWSTR
)&buffer
->VersionData
[0], filename
);
94 static HINF
search_for_inf(LPCVOID InfSpec
, DWORD SearchControl
)
96 HINF hInf
= INVALID_HANDLE_VALUE
;
97 WCHAR inf_path
[MAX_PATH
];
99 static const WCHAR infW
[] = {'\\','i','n','f','\\',0};
100 static const WCHAR system32W
[] = {'\\','s','y','s','t','e','m','3','2','\\',0};
102 if (SearchControl
== INFINFO_REVERSE_DEFAULT_SEARCH
)
104 GetWindowsDirectoryW(inf_path
, MAX_PATH
);
105 lstrcatW(inf_path
, system32W
);
106 lstrcatW(inf_path
, InfSpec
);
108 hInf
= SetupOpenInfFileW(inf_path
, NULL
,
109 INF_STYLE_OLDNT
| INF_STYLE_WIN4
, NULL
);
110 if (hInf
!= INVALID_HANDLE_VALUE
)
113 GetWindowsDirectoryW(inf_path
, MAX_PATH
);
114 lstrcpyW(inf_path
, infW
);
115 lstrcatW(inf_path
, InfSpec
);
117 return SetupOpenInfFileW(inf_path
, NULL
,
118 INF_STYLE_OLDNT
| INF_STYLE_WIN4
, NULL
);
121 return INVALID_HANDLE_VALUE
;
124 /***********************************************************************
125 * SetupGetInfInformationA (SETUPAPI.@)
128 BOOL WINAPI
SetupGetInfInformationA(LPCVOID InfSpec
, DWORD SearchControl
,
129 PSP_INF_INFORMATION ReturnBuffer
,
130 DWORD ReturnBufferSize
, PDWORD RequiredSize
)
132 LPWSTR inf
= (LPWSTR
)InfSpec
;
136 if (InfSpec
&& SearchControl
>= INFINFO_INF_NAME_IS_ABSOLUTE
)
138 len
= MultiByteToWideChar(CP_ACP
, 0, InfSpec
, -1, NULL
, 0);
139 inf
= malloc(len
* sizeof(WCHAR
));
142 SetLastError(ERROR_NOT_ENOUGH_MEMORY
);
145 MultiByteToWideChar(CP_ACP
, 0, InfSpec
, -1, inf
, len
);
148 ret
= SetupGetInfInformationW(inf
, SearchControl
, ReturnBuffer
,
149 ReturnBufferSize
, RequiredSize
);
151 if (SearchControl
>= INFINFO_INF_NAME_IS_ABSOLUTE
)
157 /***********************************************************************
158 * SetupGetInfInformationW (SETUPAPI.@)
161 * Only handles the case when InfSpec is an INF handle.
163 BOOL WINAPI
SetupGetInfInformationW(LPCVOID InfSpec
, DWORD SearchControl
,
164 PSP_INF_INFORMATION ReturnBuffer
,
165 DWORD ReturnBufferSize
, PDWORD RequiredSize
)
171 TRACE("(%p, %ld, %p, %ld, %p)\n", InfSpec
, SearchControl
, ReturnBuffer
,
172 ReturnBufferSize
, RequiredSize
);
176 if (SearchControl
== INFINFO_INF_SPEC_IS_HINF
)
177 SetLastError(ERROR_INVALID_HANDLE
);
179 SetLastError(ERROR_INVALID_PARAMETER
);
184 switch (SearchControl
)
186 case INFINFO_INF_SPEC_IS_HINF
:
189 case INFINFO_INF_NAME_IS_ABSOLUTE
:
190 case INFINFO_DEFAULT_SEARCH
:
191 inf
= SetupOpenInfFileW(InfSpec
, NULL
,
192 INF_STYLE_OLDNT
| INF_STYLE_WIN4
, NULL
);
194 case INFINFO_REVERSE_DEFAULT_SEARCH
:
195 inf
= search_for_inf(InfSpec
, SearchControl
);
197 case INFINFO_INF_PATH_LIST_SEARCH
:
198 FIXME("Unhandled search control: %ld\n", SearchControl
);
205 SetLastError(ERROR_INVALID_PARAMETER
);
209 if (inf
== INVALID_HANDLE_VALUE
)
211 SetLastError(ERROR_FILE_NOT_FOUND
);
215 ret
= fill_inf_info(inf
, ReturnBuffer
, ReturnBufferSize
, &infSize
);
216 if (!ReturnBuffer
&& (ReturnBufferSize
>= infSize
))
218 SetLastError(ERROR_INVALID_PARAMETER
);
221 if (RequiredSize
) *RequiredSize
= infSize
;
223 if (SearchControl
>= INFINFO_INF_NAME_IS_ABSOLUTE
)
224 SetupCloseInfFile(inf
);
229 /***********************************************************************
230 * SetupQueryInfFileInformationA (SETUPAPI.@)
232 BOOL WINAPI
SetupQueryInfFileInformationA(PSP_INF_INFORMATION InfInformation
,
233 UINT InfIndex
, PSTR ReturnBuffer
,
234 DWORD ReturnBufferSize
, PDWORD RequiredSize
)
240 ret
= SetupQueryInfFileInformationW(InfInformation
, InfIndex
, NULL
, 0, &size
);
244 filenameW
= malloc(size
* sizeof(WCHAR
));
246 ret
= SetupQueryInfFileInformationW(InfInformation
, InfIndex
,
247 filenameW
, size
, &size
);
255 *RequiredSize
= size
;
260 if (ReturnBufferSize
)
262 SetLastError(ERROR_INVALID_PARAMETER
);
269 if (size
> ReturnBufferSize
)
272 SetLastError(ERROR_INSUFFICIENT_BUFFER
);
276 WideCharToMultiByte(CP_ACP
, 0, filenameW
, -1, ReturnBuffer
, size
, NULL
, NULL
);
282 /***********************************************************************
283 * SetupQueryInfFileInformationW (SETUPAPI.@)
285 BOOL WINAPI
SetupQueryInfFileInformationW(PSP_INF_INFORMATION InfInformation
,
286 UINT InfIndex
, PWSTR ReturnBuffer
,
287 DWORD ReturnBufferSize
, PDWORD RequiredSize
)
292 TRACE("(%p, %u, %p, %ld, %p) Stub!\n", InfInformation
, InfIndex
,
293 ReturnBuffer
, ReturnBufferSize
, RequiredSize
);
297 SetLastError(ERROR_INVALID_PARAMETER
);
302 FIXME("Appended INF files are not handled\n");
304 ptr
= (LPWSTR
)InfInformation
->VersionData
;
308 *RequiredSize
= len
+ 1;
313 if (ReturnBufferSize
< len
)
315 SetLastError(ERROR_INSUFFICIENT_BUFFER
);
319 lstrcpyW(ReturnBuffer
, ptr
);
323 /***********************************************************************
324 * SetupGetSourceFileLocationA (SETUPAPI.@)
327 BOOL WINAPI
SetupGetSourceFileLocationA( HINF hinf
, PINFCONTEXT context
, PCSTR filename
,
328 PUINT source_id
, PSTR buffer
, DWORD buffer_size
,
329 PDWORD required_size
)
332 WCHAR
*filenameW
= NULL
, *bufferW
= NULL
;
336 TRACE("%p, %p, %s, %p, %p, 0x%08lx, %p\n", hinf
, context
, debugstr_a(filename
), source_id
,
337 buffer
, buffer_size
, required_size
);
339 if (filename
&& *filename
&& !(filenameW
= strdupAtoW( filename
)))
342 if (!SetupGetSourceFileLocationW( hinf
, context
, filenameW
, source_id
, NULL
, 0, &required
))
345 if (!(bufferW
= malloc( required
* sizeof(WCHAR
) )))
348 if (!SetupGetSourceFileLocationW( hinf
, context
, filenameW
, source_id
, bufferW
, required
, NULL
))
351 size
= WideCharToMultiByte( CP_ACP
, 0, bufferW
, -1, NULL
, 0, NULL
, NULL
);
352 if (required_size
) *required_size
= size
;
356 if (buffer_size
>= size
)
357 WideCharToMultiByte( CP_ACP
, 0, bufferW
, -1, buffer
, buffer_size
, NULL
, NULL
);
360 SetLastError( ERROR_INSUFFICIENT_BUFFER
);
372 /***********************************************************************
373 * SetupGetSourceFileLocationW (SETUPAPI.@)
376 BOOL WINAPI
SetupGetSourceFileLocationW( HINF hinf
, PINFCONTEXT context
, PCWSTR filename
,
377 PUINT source_id
, PWSTR buffer
, DWORD buffer_size
,
378 PDWORD required_size
)
383 TRACE("%p, %p, %s, %p, %p, 0x%08lx, %p\n", hinf
, context
, debugstr_w(filename
), source_id
,
384 buffer
, buffer_size
, required_size
);
391 if (!SetupGetStringFieldW( context
, 1, NULL
, 0, &filename_size
))
393 if (!(ctx_filename
= malloc( filename_size
* sizeof(WCHAR
) )))
395 SetupGetStringFieldW( context
, 1, ctx_filename
, filename_size
, NULL
);
397 if (!SetupFindFirstLineW( hinf
, source_disks_files_platform
, ctx_filename
, &ctx
) &&
398 !SetupFindFirstLineW( hinf
, source_disks_files
, ctx_filename
, &ctx
))
400 free( ctx_filename
);
404 free( ctx_filename
);
408 if (!SetupFindFirstLineW( hinf
, source_disks_files_platform
, filename
, &ctx
) &&
409 !SetupFindFirstLineW( hinf
, source_disks_files
, filename
, &ctx
))
415 if (!SetupGetIntField( &ctx
, 1, &id
))
419 if (SetupGetStringFieldW( &ctx
, 2, buffer
, buffer_size
, required_size
))
422 if (required_size
) *required_size
= 1;
425 if (buffer_size
>= 1) buffer
[0] = 0;
428 SetLastError( ERROR_INSUFFICIENT_BUFFER
);
435 /***********************************************************************
436 * SetupGetSourceInfoA (SETUPAPI.@)
439 BOOL WINAPI
SetupGetSourceInfoA( HINF hinf
, UINT source_id
, UINT info
,
440 PSTR buffer
, DWORD buffer_size
, LPDWORD required_size
)
443 WCHAR
*bufferW
= NULL
;
447 TRACE("%p, %d, %d, %p, %ld, %p\n", hinf
, source_id
, info
, buffer
, buffer_size
,
450 if (!SetupGetSourceInfoW( hinf
, source_id
, info
, NULL
, 0, &required
))
453 if (!(bufferW
= malloc( required
* sizeof(WCHAR
) )))
456 if (!SetupGetSourceInfoW( hinf
, source_id
, info
, bufferW
, required
, NULL
))
459 size
= WideCharToMultiByte( CP_ACP
, 0, bufferW
, -1, NULL
, 0, NULL
, NULL
);
460 if (required_size
) *required_size
= size
;
464 if (buffer_size
>= size
)
465 WideCharToMultiByte( CP_ACP
, 0, bufferW
, -1, buffer
, buffer_size
, NULL
, NULL
);
468 SetLastError( ERROR_INSUFFICIENT_BUFFER
);
479 /***********************************************************************
480 * SetupGetSourceInfoW (SETUPAPI.@)
483 BOOL WINAPI
SetupGetSourceInfoW( HINF hinf
, UINT source_id
, UINT info
,
484 PWSTR buffer
, DWORD buffer_size
, LPDWORD required_size
)
487 WCHAR source_id_str
[11];
488 static const WCHAR fmt
[] = {'%','d',0};
491 TRACE("%p, %d, %d, %p, %ld, %p\n", hinf
, source_id
, info
, buffer
, buffer_size
,
494 swprintf( source_id_str
, ARRAY_SIZE(source_id_str
), fmt
, source_id
);
496 if (!SetupFindFirstLineW( hinf
, source_disks_names_platform
, source_id_str
, &ctx
) &&
497 !SetupFindFirstLineW( hinf
, source_disks_names
, source_id_str
, &ctx
))
502 case SRCINFO_PATH
: index
= 4; break;
503 case SRCINFO_TAGFILE
: index
= 2; break;
504 case SRCINFO_DESCRIPTION
: index
= 1; break;
506 WARN("unknown info level: %d\n", info
);
510 if (SetupGetStringFieldW( &ctx
, index
, buffer
, buffer_size
, required_size
))
513 if (required_size
) *required_size
= 1;
516 if (buffer_size
>= 1) buffer
[0] = 0;
519 SetLastError( ERROR_INSUFFICIENT_BUFFER
);
526 /***********************************************************************
527 * SetupGetTargetPathA (SETUPAPI.@)
530 BOOL WINAPI
SetupGetTargetPathA( HINF hinf
, PINFCONTEXT context
, PCSTR section
, PSTR buffer
,
531 DWORD buffer_size
, PDWORD required_size
)
534 WCHAR
*sectionW
= NULL
, *bufferW
= NULL
;
538 TRACE("%p, %p, %s, %p, 0x%08lx, %p\n", hinf
, context
, debugstr_a(section
), buffer
,
539 buffer_size
, required_size
);
541 if (section
&& !(sectionW
= strdupAtoW( section
)))
544 if (!SetupGetTargetPathW( hinf
, context
, sectionW
, NULL
, 0, &required
))
547 if (!(bufferW
= malloc( required
* sizeof(WCHAR
) )))
550 if (!SetupGetTargetPathW( hinf
, context
, sectionW
, bufferW
, required
, NULL
))
553 size
= WideCharToMultiByte( CP_ACP
, 0, bufferW
, -1, NULL
, 0, NULL
, NULL
);
554 if (required_size
) *required_size
= size
;
558 if (buffer_size
>= size
)
559 WideCharToMultiByte( CP_ACP
, 0, bufferW
, -1, buffer
, buffer_size
, NULL
, NULL
);
562 SetLastError( ERROR_INSUFFICIENT_BUFFER
);
574 /***********************************************************************
575 * SetupGetTargetPathW (SETUPAPI.@)
578 BOOL WINAPI
SetupGetTargetPathW( HINF hinf
, PINFCONTEXT context
, PCWSTR section
, PWSTR buffer
,
579 DWORD buffer_size
, PDWORD required_size
)
581 static const WCHAR destination_dirs
[] =
582 {'D','e','s','t','i','n','a','t','i','o','n','D','i','r','s',0};
583 static const WCHAR default_dest_dir
[] =
584 {'D','e','f','a','u','l','t','D','e','s','t','D','i','r',0};
587 WCHAR
*dir
, systemdir
[MAX_PATH
];
591 TRACE("%p, %p, %s, %p, 0x%08lx, %p\n", hinf
, context
, debugstr_w(section
), buffer
,
592 buffer_size
, required_size
);
594 if (context
) ret
= SetupFindFirstLineW( hinf
, destination_dirs
, NULL
, context
);
597 if (!(ret
= SetupFindFirstLineW( hinf
, destination_dirs
, section
, &ctx
)))
598 ret
= SetupFindFirstLineW( hinf
, destination_dirs
, default_dest_dir
, &ctx
);
600 if (!ret
|| !(dir
= PARSER_get_dest_dir( context
? context
: &ctx
)))
602 GetSystemDirectoryW( systemdir
, MAX_PATH
);
605 size
= lstrlenW( dir
) + 1;
606 if (required_size
) *required_size
= size
;
610 if (buffer_size
>= size
)
611 lstrcpyW( buffer
, dir
);
614 SetLastError( ERROR_INSUFFICIENT_BUFFER
);
615 if (dir
!= systemdir
) free( dir
);
619 if (dir
!= systemdir
) free( dir
);
623 /***********************************************************************
624 * SetupQueryInfOriginalFileInformationA (SETUPAPI.@)
626 BOOL WINAPI
SetupQueryInfOriginalFileInformationA(
627 PSP_INF_INFORMATION InfInformation
, UINT InfIndex
,
628 PSP_ALTPLATFORM_INFO AlternativePlatformInfo
,
629 PSP_ORIGINAL_FILE_INFO_A OriginalFileInfo
)
632 SP_ORIGINAL_FILE_INFO_W OriginalFileInfoW
;
634 TRACE("(%p, %d, %p, %p)\n", InfInformation
, InfIndex
,
635 AlternativePlatformInfo
, OriginalFileInfo
);
637 if (OriginalFileInfo
->cbSize
!= sizeof(*OriginalFileInfo
))
639 WARN("incorrect OriginalFileInfo->cbSize of %ld\n", OriginalFileInfo
->cbSize
);
640 SetLastError( ERROR_INVALID_USER_BUFFER
);
644 OriginalFileInfoW
.cbSize
= sizeof(OriginalFileInfoW
);
645 ret
= SetupQueryInfOriginalFileInformationW(InfInformation
, InfIndex
,
646 AlternativePlatformInfo
, &OriginalFileInfoW
);
649 WideCharToMultiByte(CP_ACP
, 0, OriginalFileInfoW
.OriginalInfName
, -1,
650 OriginalFileInfo
->OriginalInfName
, MAX_PATH
, NULL
, NULL
);
651 WideCharToMultiByte(CP_ACP
, 0, OriginalFileInfoW
.OriginalCatalogName
, -1,
652 OriginalFileInfo
->OriginalCatalogName
, MAX_PATH
, NULL
, NULL
);
658 /***********************************************************************
659 * SetupQueryInfOriginalFileInformationW (SETUPAPI.@)
661 BOOL WINAPI
SetupQueryInfOriginalFileInformationW(
662 PSP_INF_INFORMATION InfInformation
, UINT InfIndex
,
663 PSP_ALTPLATFORM_INFO AlternativePlatformInfo
,
664 PSP_ORIGINAL_FILE_INFO_W OriginalFileInfo
)
669 static const WCHAR wszVersion
[] = { 'V','e','r','s','i','o','n',0 };
670 static const WCHAR wszCatalogFile
[] = { 'C','a','t','a','l','o','g','F','i','l','e',0 };
672 FIXME("(%p, %d, %p, %p): semi-stub\n", InfInformation
, InfIndex
,
673 AlternativePlatformInfo
, OriginalFileInfo
);
675 if (OriginalFileInfo
->cbSize
!= sizeof(*OriginalFileInfo
))
677 WARN("incorrect OriginalFileInfo->cbSize of %ld\n", OriginalFileInfo
->cbSize
);
678 SetLastError(ERROR_INVALID_USER_BUFFER
);
682 inf_path
= (LPWSTR
)InfInformation
->VersionData
;
684 /* FIXME: we should get OriginalCatalogName from CatalogFile line in
685 * the original inf file and cache it, but that would require building a
687 hinf
= SetupOpenInfFileW(inf_path
, NULL
, INF_STYLE_WIN4
, NULL
);
688 if (hinf
== INVALID_HANDLE_VALUE
) return FALSE
;
690 if (!SetupGetLineTextW(NULL
, hinf
, wszVersion
, wszCatalogFile
,
691 OriginalFileInfo
->OriginalCatalogName
,
692 ARRAY_SIZE(OriginalFileInfo
->OriginalCatalogName
), NULL
))
694 OriginalFileInfo
->OriginalCatalogName
[0] = '\0';
696 SetupCloseInfFile(hinf
);
698 /* FIXME: not quite correct as we just return the same file name as
699 * destination (copied) inf file, not the source (original) inf file.
700 * to fix it properly would require building a .pnf file */
701 /* file name is stored in VersionData field of InfInformation */
702 inf_name
= wcsrchr(inf_path
, '\\');
703 if (inf_name
) inf_name
++;
704 else inf_name
= inf_path
;
706 lstrcpyW(OriginalFileInfo
->OriginalInfName
, inf_name
);
711 /***********************************************************************
712 * SetupGetInfDriverStoreLocationW (SETUPAPI.@)
714 BOOL WINAPI
SetupGetInfDriverStoreLocationW(
715 PCWSTR FileName
, PSP_ALTPLATFORM_INFO AlternativePlatformInfo
,
716 PCWSTR LocaleName
, PWSTR ReturnBuffer
, DWORD ReturnBufferSize
,
719 FIXME("stub: %s %p %s %p %lu %p\n", debugstr_w(FileName
), AlternativePlatformInfo
, debugstr_w(LocaleName
), ReturnBuffer
, ReturnBufferSize
, RequiredSize
);
721 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
725 BOOL WINAPI
SetupQueryInfVersionInformationA(SP_INF_INFORMATION
*info
, UINT index
, const char *key
, char *buff
,
726 DWORD size
, DWORD
*req_size
)
728 FIXME("info %p, index %d, key %s, buff %p, size %ld, req_size %p stub!\n", info
, index
, debugstr_a(key
), buff
,
730 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
734 BOOL WINAPI
SetupQueryInfVersionInformationW(SP_INF_INFORMATION
*info
, UINT index
, const WCHAR
*key
, WCHAR
*buff
,
735 DWORD size
, DWORD
*req_size
)
737 FIXME("info %p, index %d, key %s, buff %p, size %ld, req_size %p stub!\n", info
, index
, debugstr_w(key
), buff
,
739 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);