if (LayoutList == NULL)
{
LayoutList = CreateKeyboardLayoutList(SetupInf, DefaultKBLayout);
++ if (LayoutList == NULL)
++ {
++ /* FIXME: Handle error! */
++ return;
++ }
}
ListEntry = GetFirstListEntry(LayoutList);
ListEntry = GetNextListEntry(ListEntry);
}
-- SetConsoleCodePage();
++ SetConsoleCodePage();
-- return INSTALL_INTRO_PAGE;
++ return INSTALL_INTRO_PAGE;
}
return LANGUAGE_PAGE;
PWCHAR UserData;
const MUI_LAYOUTS * LayoutsList;
ULONG uIndex = 0;
++ BOOL KeyboardLayoutsFound = FALSE;
/* Get default layout id */
if (!SetupFindFirstLineW (InfFile, L"NLS", L"DefaultLayout", &Context))
/* FIXME: Handle error! */
DPRINT("INF_GetData() failed\n");
DestroyGenericList(List, FALSE);
-- break;
++ return NULL;
}
if (_wcsicmp(LayoutsList[uIndex].LayoutID, KeyName) == 0)
if (UserData == NULL)
{
/* FIXME: Handle error! */
++ DPRINT("RtlAllocateHeap() failed\n");
++ DestroyGenericList(List, FALSE);
++ return NULL;
}
wcscpy(UserData, KeyName);
Buffer,
UserData,
_wcsicmp(KeyName, DefaultKBLayout) ? FALSE : TRUE);
++ KeyboardLayoutsFound = TRUE;
}
--
++
} while (SetupFindNextLine(&Context, &Context));
uIndex++;
} while (LayoutsList[uIndex].LangID != NULL);
++ /* FIXME: Handle this case */
++ if (!KeyboardLayoutsFound)
++ {
++ DPRINT1("No keyboard layouts have been found\n");
++ DestroyGenericList(List, FALSE);
++ return NULL;
++ }
++
return List;
}
rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize);
if (rc != ERROR_SUCCESS) {
-- strcpy(szErrorOut, "Language Default setting exists, but isn't readable");
++ sprintf(szErrorOut, "Language Default setting exists, but isn't readable (%S)", szIdBuffer);
return(FALSE);
}
WINAPI
CancelDC(HDC hdc)
{
-- UNIMPLEMENTED;
-- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-- return FALSE;
++ /* FIXME Sharememory */
++ return NtGdiCancelDC(hdc);
}
int
WINAPI
DrawEscape(HDC hdc,
-- int a1,
-- int a2,
-- LPCSTR a3)
++ INT nEscape,
++ INT cbInput,
++ LPCSTR lpszInData)
{
-- UNIMPLEMENTED;
-- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-- return 0;
++ /* FIXME Sharememory */
++ return NtGdiDrawEscape(hdc, nEscape, cbInput, (LPSTR) lpszInData);
}
int
WINAPI
EnumObjects(HDC hdc,
-- int a1,
-- GOBJENUMPROC a2,
-- LPARAM a3)
++ int nObjectType,
++ GOBJENUMPROC lpObjectFunc,
++ LPARAM lParam)
{
++ switch (nObjectType)
++ {
++ case OBJ_BRUSH:
++ case OBJ_PEN:
++ break;
++
++ default:
++ SetLastError(ERROR_INVALID_PARAMETER);
++ return 0;
++ }
++
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
HMETAFILE
WINAPI
SetMetaFileBitsEx(
-- UINT a0,
-- CONST BYTE *a1
++ UINT size,
++ CONST BYTE *lpData
)
{
++ const METAHEADER *mh_in = (const METAHEADER *)lpData;
++
++ if (size & 1) return 0;
++
++ if (!size || mh_in->mtType != METAFILE_MEMORY || mh_in->mtVersion != 0x300 ||
++ mh_in->mtHeaderSize != sizeof(METAHEADER) / 2)
++ {
++ SetLastError(ERROR_INVALID_DATA);
++ return 0;
++ }
++
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
struct inf_file *file = hinf;
int section_index;
-- SetLastError( ERROR_SECTION_NOT_FOUND );
for (file = hinf; file; file = file->next)
{
if ((section_index = find_section( file, section )) == -1) continue;
-- SetLastError( ERROR_LINE_NOT_FOUND );
if (index < file->sections[section_index]->nb_lines)
{
context->Inf = hinf;
index -= file->sections[section_index]->nb_lines;
}
TRACE( "(%p,%s) not found\n", hinf, debugstr_w(section) );
++ SetLastError( ERROR_LINE_NOT_FOUND );
return FALSE;
}
struct inf_file *file;
int section_index;
-- SetLastError( ERROR_SECTION_NOT_FOUND );
for (file = hinf; file; file = file->next)
{
if ((section_index = find_section( file, section )) == -1) continue;
ctx.Line = -1;
return SetupFindNextMatchLineW( &ctx, key, context );
}
-- SetLastError( ERROR_LINE_NOT_FOUND ); /* found at least one section */
if (file->sections[section_index]->nb_lines)
{
context->Inf = hinf;
}
}
TRACE( "(%p,%s,%s): not found\n", hinf, debugstr_w(section), debugstr_w(key) );
++ SetLastError( ERROR_LINE_NOT_FOUND );
return FALSE;
}
{'D','e','f','a','u','l','t','D','e','s','t','D','i','r',0};
INFCONTEXT ctx;
-- WCHAR *dir;
-- INT size;
++ WCHAR *dir, systemdir[MAX_PATH];
++ unsigned int size;
++ BOOL ret = FALSE;
TRACE("%p, %p, %s, %p, 0x%08x, %p\n", hinf, context, debugstr_w(section), buffer,
buffer_size, required_size);
-- if (context && !SetupFindFirstLineW( hinf, destination_dirs, NULL, context )) return FALSE;
-- else if (section && !SetupFindFirstLineW( hinf, section, NULL, &ctx )) return FALSE;
-- else if (!SetupFindFirstLineW( hinf, destination_dirs, default_dest_dir, &ctx )) return FALSE;
--
-- if (!(dir = PARSER_get_dest_dir( context ? context : &ctx ))) return FALSE;
--
-- size = lstrlenW( dir ) + 1;
++ if (context) ret = SetupFindFirstLineW( hinf, destination_dirs, NULL, context );
++ else if (section)
++ {
++ if (!(ret = SetupFindFirstLineW( hinf, destination_dirs, section, &ctx )))
++ ret = SetupFindFirstLineW( hinf, destination_dirs, default_dest_dir, &ctx );
++ }
++ if (!ret || !(dir = PARSER_get_dest_dir( context ? context : &ctx )))
++ {
++ GetSystemDirectoryW( systemdir, MAX_PATH );
++ dir = systemdir;
++ }
++ size = strlenW( dir ) + 1;
if (required_size) *required_size = size;
if (buffer)
return FALSE;
}
}
-- HeapFree( GetProcessHeap(), 0, dir );
++ if (dir != systemdir) HeapFree( GetProcessHeap(), 0, dir );
return TRUE;
}
}
--/*
-- * @unimplemented
-- */
--VOID
--EXPORT
--NdisMGetDeviceProperty(
-- IN NDIS_HANDLE MiniportAdapterHandle,
-- IN OUT PDEVICE_OBJECT *PhysicalDeviceObject OPTIONAL,
-- IN OUT PDEVICE_OBJECT *FunctionalDeviceObject OPTIONAL,
-- IN OUT PDEVICE_OBJECT *NextDeviceObject OPTIONAL,
-- IN OUT PCM_RESOURCE_LIST *AllocatedResources OPTIONAL,
-- IN OUT PCM_RESOURCE_LIST *AllocatedResourcesTranslated OPTIONAL)
--/*
-- * FUNCTION:
-- * ARGUMENTS:
-- * NOTES:
-- * NDIS 5.0
-- */
--{
-- UNIMPLEMENTED
--}
--
--
/*
* @unimplemented
*/
ShutdownHandler);
}
++/*
++ * @implemented
++ */
++VOID
++EXPORT
++NdisMGetDeviceProperty(
++ IN NDIS_HANDLE MiniportAdapterHandle,
++ IN OUT PDEVICE_OBJECT *PhysicalDeviceObject OPTIONAL,
++ IN OUT PDEVICE_OBJECT *FunctionalDeviceObject OPTIONAL,
++ IN OUT PDEVICE_OBJECT *NextDeviceObject OPTIONAL,
++ IN OUT PCM_RESOURCE_LIST *AllocatedResources OPTIONAL,
++ IN OUT PCM_RESOURCE_LIST *AllocatedResourcesTranslated OPTIONAL)
++/*
++ * FUNCTION:
++ * ARGUMENTS:
++ * NOTES:
++ * NDIS 5.0
++ */
++{
++ PLOGICAL_ADAPTER Adapter = MiniportAdapterHandle;
++
++ NDIS_DbgPrint(MAX_TRACE, ("Called\n"));
++
++ if (PhysicalDeviceObject != NULL)
++ *PhysicalDeviceObject = Adapter->NdisMiniportBlock.PhysicalDeviceObject;
++
++ if (FunctionalDeviceObject != NULL)
++ *FunctionalDeviceObject = Adapter->NdisMiniportBlock.DeviceObject;
++
++ if (NextDeviceObject != NULL)
++ *NextDeviceObject = Adapter->NdisMiniportBlock.NextDeviceObject;
++
++ if (AllocatedResources != NULL)
++ *AllocatedResources = Adapter->NdisMiniportBlock.AllocatedResources;
++
++ if (AllocatedResourcesTranslated != NULL)
++ *AllocatedResourcesTranslated = Adapter->NdisMiniportBlock.AllocatedResourcesTranslated;
++}
++
/* EOF */
NTSTATUS
NTAPI
--WdmAudClose(
++WdmAudIoctlClose(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN PWDMAUD_DEVICE_INFO DeviceInfo,
case IOCTL_GETCAPABILITIES:
return WdmAudCapabilities(DeviceObject, Irp, DeviceInfo, ClientInfo);
case IOCTL_CLOSE_WDMAUD:
-- return WdmAudClose(DeviceObject, Irp, DeviceInfo, ClientInfo);
++ return WdmAudIoctlClose(DeviceObject, Irp, DeviceInfo, ClientInfo);
case IOCTL_GETDEVID:
case IOCTL_GETVOLUME:
case IOCTL_SETVOLUME: