ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2009
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
29 participants
559 discussions
Start a n
N
ew thread
[jimtabor] 39798: - No code change, adding notes to header.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Feb 28 07:41:52 2009 New Revision: 39798 URL:
http://svn.reactos.org/svn/reactos?rev=39798&view=rev
Log: - No code change, adding notes to header. Modified: trunk/reactos/subsystems/win32/win32k/include/win32.h Modified: trunk/reactos/subsystems/win32/win32k/include/win32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] Sat Feb 28 07:41:52 2009 @@ -39,8 +39,8 @@ PCLIENTINFO pClientInfo; FLONG TIF_flags; HANDLE hDesktop; - UINT cPaintsReady; - UINT cTimersReady; + UINT cPaintsReady; /* Count of paints pending. */ + UINT cTimersReady; /* Count of timers pending. */ LIST_ENTRY PtiLink; LIST_ENTRY WindowListHead;
15 years, 9 months
1
0
0
0
[silverblade] 39797: Started new implementation of Sound Blaster driver (kernel mode), which at present just looks at the settings in the registry (actual sound blaster code to go in a dedicated library elsewhere for later reuse in portcls.) Also updated wdmaud.drv - it can only identify how many devices have been reported by janderwald's code at present.
by silverblade@svn.reactos.org
Author: silverblade Date: Sat Feb 28 01:50:58 2009 New Revision: 39797 URL:
http://svn.reactos.org/svn/reactos?rev=39797&view=rev
Log: Started new implementation of Sound Blaster driver (kernel mode), which at present just looks at the settings in the registry (actual sound blaster code to go in a dedicated library elsewhere for later reuse in portcls.) Also updated wdmaud.drv - it can only identify how many devices have been reported by janderwald's code at present. Added: trunk/reactos/drivers/multimedia/audio/sndblst_sys/ trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.c (with props) trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rbuild (with props) trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rc (with props) Modified: trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c trunk/reactos/drivers/multimedia/audio/directory.rbuild trunk/reactos/lib/drivers/sound/mmebuddy/kernel.c Modified: trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/wdmau…
============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c [iso-8859-1] Sat Feb 28 01:50:58 2009 @@ -22,7 +22,7 @@ #include <ksmedia.h> #include "interface.h" -#define KERNEL_DEVICE_NAME L"\\\\Device\\wdmaud" +#define KERNEL_DEVICE_NAME L"\\\\.\\wdmaud" PWSTR UnknownWaveIn = L"Wave Input"; PWSTR UnknownWaveOut = L"Wave Output"; @@ -57,8 +57,9 @@ sizeof(WDMAUD_DEVICE_INFO), NULL); - if ( ! Result ) - { + if ( ! MMSUCCESS( Result ) ) + { + SND_ERR(L"Call to IOCTL_GETNUMDEVS_TYPE failed\n"); *DeviceCount = 0; return TranslateInternalMmResult(Result); } @@ -128,6 +129,7 @@ /* Only open this if it's not already open */ if ( KernelHandle == INVALID_HANDLE_VALUE ) { + SND_TRACE(L"Opening wdmaud device\n"); KernelHandle = CreateFile(KERNEL_DEVICE_NAME, GENERIC_READ | GENERIC_WRITE, 0, @@ -153,7 +155,11 @@ IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, /* NOT USED */ IN PVOID Handle) { - SND_ASSERT( OpenCount > 0 ); + if ( OpenCount == 0 ) + { + return MMSYSERR_NOERROR; + } + SND_ASSERT( KernelHandle != INVALID_HANDLE_VALUE ); -- OpenCount; Modified: trunk/reactos/drivers/multimedia/audio/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/multimedia/audio/d…
============================================================================== --- trunk/reactos/drivers/multimedia/audio/directory.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/multimedia/audio/directory.rbuild [iso-8859-1] Sat Feb 28 01:50:58 2009 @@ -1,6 +1,9 @@ <?xml version="1.0"?> <!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd"> <group xmlns:xi="
http://www.w3.org/2001/XInclude
"> + <directory name="sndblst_sys"> + <xi:include href="sndblst_sys/sndblst.rbuild" /> + </directory> <!--directory name="mpu401_nt4"> <xi:include href="mpu401_nt4/mpu401.rbuild" /> </directory> Added: trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/multimedia/audio/s…
============================================================================== --- trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.c (added) +++ trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.c [iso-8859-1] Sat Feb 28 01:50:58 2009 @@ -1,0 +1,375 @@ +/* + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Sound System + * FILE: drivers/multimedia/audio/sndblst/sndblst.c + * PURPOSE: Sound Blaster / Pro / 16 driver + * PROGRAMMER: Andrew Greenwood (silverblade(a)reactos.org) + * + * UPDATE HISTORY: Feb 25, 2009: New rewrite started + * + */ + +/* DEFINES AND INCLUDES ******************************************************/ + +#include <ntddk.h> +#include <windef.h> +#include <mmsystem.h> +#include <debug.h> + +#define CompleteIrpAndReturn(irp, status) \ + irp->IoStatus.Status = status; \ + irp->IoStatus.Information = 0; \ + IoCompleteRequest(Irp, IO_NO_INCREMENT); \ + return status; + + +/* FORWARD DECLARATIONS *****************************************************/ + +static VOID NTAPI +UnloadSoundBlaster(PDRIVER_OBJECT DriverObject); + + +/* DEVICE "DISCOVERY" *******************************************************/ +/* Nb: These need to go in the helper lib */ + +typedef NTSTATUS (*SOUNDDEVICEENUMERATIONCALLBACK)( + IN PUNICODE_STRING DeviceRegistryPath); + +NTSTATUS +EnumerateSoundDevices( + IN PUNICODE_STRING RegistryPath, + IN PWSTR RegistrySubKey, + IN SOUNDDEVICEENUMERATIONCALLBACK Callback) +{ + NTSTATUS Status; + OBJECT_ATTRIBUTES RegAttributes; + HKEY MainKeyHandle, ChildKeyHandle; + UNICODE_STRING UnicodeSubkeyName, DeviceKeyName; + KEY_BASIC_INFORMATION KeyInfo, *FinalKeyInfo; + ULONG i = 0, NeededDataLength = 0, FinalDataLength = 0, NameLength = 0; + + /* Turn the subkey name into a Unicode string */ + RtlInitUnicodeString(&UnicodeSubkeyName, RegistrySubKey); + + /* Open the registry key for the service */ + InitializeObjectAttributes(&RegAttributes, + RegistryPath, + OBJ_CASE_INSENSITIVE, + NULL, + (PSECURITY_DESCRIPTOR) NULL); + + Status = ZwOpenKey(&MainKeyHandle, KEY_READ, &RegAttributes); + + if ( ! NT_SUCCESS(Status) ) + { + DPRINT("Failed to open registry key\n"); + return Status; + } + + /* Open the subkey usually named "Parameters" */ + InitializeObjectAttributes(&RegAttributes, + &UnicodeSubkeyName, + OBJ_CASE_INSENSITIVE, + MainKeyHandle, + (PSECURITY_DESCRIPTOR) NULL); + + Status = ZwOpenKey(&ChildKeyHandle, KEY_ENUMERATE_SUB_KEYS, &RegAttributes); + + /* We're done with the main key now */ + ZwClose(MainKeyHandle); + + if ( ! NT_SUCCESS(Status) ) + { + DPRINT("Failed to open registry subkeys for enumeration\n"); + return Status; + } + + /* Enumerate through the device keys */ + while ( ( Status = ZwEnumerateKey(ChildKeyHandle, + i, + KeyBasicInformation, + &KeyInfo, + sizeof(KEY_BASIC_INFORMATION), + &NeededDataLength) ) != STATUS_NO_MORE_ENTRIES ) + { + PWSTR EnumeratedKeyName, StartOfEnumeratedKeyName; + + DPRINT("Found subkey %d\n", i); + + FinalDataLength = NeededDataLength + FIELD_OFFSET(KEY_BASIC_INFORMATION, Name[0]); + DPRINT("Allocating %d bytes\n", FinalDataLength); + + FinalKeyInfo = (PKEY_BASIC_INFORMATION) ExAllocatePool(PagedPool, FinalDataLength); + + if ( ! FinalKeyInfo ) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + break; + } + + /* This time we get the real info */ + Status = ZwEnumerateKey(ChildKeyHandle, + i, + KeyBasicInformation, + FinalKeyInfo, + FinalDataLength, + &NeededDataLength); + + if ( ! NT_SUCCESS(Status) ) + { + DPRINT("FAILED to enumerate key!\n"); + } + else + { + NameLength = RegistryPath->Length + sizeof(WCHAR) + + UnicodeSubkeyName.Length + sizeof(WCHAR) + + FinalKeyInfo->NameLength + sizeof(UNICODE_NULL); + + DPRINT("Allocating memory for name (%d bytes)\n", NameLength); + + EnumeratedKeyName = (PWSTR) ExAllocatePool(PagedPool, NameLength); + + if ( ! EnumeratedKeyName ) + { + ExFreePool((PVOID)FinalKeyInfo); + Status = STATUS_INSUFFICIENT_RESOURCES; + break; + } + + StartOfEnumeratedKeyName = EnumeratedKeyName; + + /* Start building the registry path using the service key */ + RtlCopyMemory(EnumeratedKeyName, + RegistryPath->Buffer, + RegistryPath->Length); + + EnumeratedKeyName += RegistryPath->Length / sizeof(WCHAR); + EnumeratedKeyName[0] = '\\'; + ++ EnumeratedKeyName; + + /* Append the parameters subkey */ + RtlCopyMemory(EnumeratedKeyName, + RegistrySubKey, + UnicodeSubkeyName.Length); + + EnumeratedKeyName += UnicodeSubkeyName.Length / sizeof(WCHAR); + EnumeratedKeyName[0] = '\\'; + ++ EnumeratedKeyName; + + /* And finally append the enumerated key name */ + RtlCopyMemory(EnumeratedKeyName, + FinalKeyInfo->Name, + FinalKeyInfo->NameLength); + + EnumeratedKeyName += FinalKeyInfo->NameLength / sizeof(WCHAR); + EnumeratedKeyName[0] = UNICODE_NULL; + + /* Reset pointer */ + EnumeratedKeyName = StartOfEnumeratedKeyName; + + /* Convert into a Unicode string for the callback */ + RtlInitUnicodeString(&DeviceKeyName, EnumeratedKeyName); + + Callback(&DeviceKeyName); + + /* No longer need the key name */ + ExFreePool((PVOID)EnumeratedKeyName); + EnumeratedKeyName = NULL; + } + + /* No longer need the key info */ + ExFreePool((PVOID)FinalKeyInfo); + FinalKeyInfo = NULL; + + ++ i; + } + + /* We're done with enumeration so close this */ + ZwClose(ChildKeyHandle); + + /* This isn't an error */ + if ( Status == STATUS_NO_MORE_ENTRIES ) + { + Status = STATUS_SUCCESS; + } + + /* No devices configured? */ + if ( i == 0 && Status == STATUS_NO_MORE_ENTRIES ) + { + Status = STATUS_DEVICE_CONFIGURATION_ERROR; + } + + return Status; +} + +NTSTATUS +PublishWaveOutDevice( + IN DWORD HardwareDeviceIndex, + IN PWSTR BaseDeviceName, + IN DWORD DeviceIndex, + IN LPWAVEOUTCAPS Capabilities) +{ + return STATUS_SUCCESS; +} + + +typedef struct _SOUND_BLASTER_DEVICE +{ + DWORD BasePort; + DWORD MidiUartBasePort; + + DWORD Irq; + + DWORD DmaChannel_8; + DWORD DmaChannel_16; + + DWORD DspVersion; + + DWORD ActualDmaBufferSize; + DWORD DmaBufferSize; +} SOUND_BLASTER_DEVICE; + + +NTSTATUS +AllocateSoundBlasterStructure(OUT SOUND_BLASTER_DEVICE* SoundBlasterDevice) +{ + return STATUS_NOT_IMPLEMENTED; +} + +/* callback */ +/* + Configuration options within the registry: + REG_DWORD Actual Dma Buffer Size 0x00004000 + REG_DWORD Configuration Error 0xffffffff + REG_DWORD Dma Buffer Size 0x00004000 + REG_DWORD DmaChannel 0x00000001 + REG_DWORD DmaChannel16 0x00000005 + REG_DWORD DSP Version 0x00000405 + REG_DWORD Interrupt 0x00000005 + REG_DWORD Load Type 0x00000000 + REG_BINARY Mixer Settings ?? + REG_DWORD MPU401 Port 0xffffffff + REG_DWORD Port 0x00000220 +*/ + +NTSTATUS +ConfigureSoundBlasterDevice(IN PUNICODE_STRING DeviceRegistryPath) +{ + OBJECT_ATTRIBUTES RegAttributes; + NTSTATUS Status = STATUS_SUCCESS; + HKEY ConfigKeyHandle; + + DPRINT("Configuring Sound Blaster (config at %S)\n", DeviceRegistryPath->Buffer); + + if ( ! DeviceRegistryPath ) + { + return STATUS_INVALID_PARAMETER; + } + + /* Open the registry key */ + InitializeObjectAttributes(&RegAttributes, + DeviceRegistryPath, + OBJ_CASE_INSENSITIVE, + NULL, + (PSECURITY_DESCRIPTOR) NULL); + + Status = ZwOpenKey(&ConfigKeyHandle, KEY_READ, &RegAttributes); + + if ( ! NT_SUCCESS(Status) ) + { + DPRINT("Failed to open config registry key\n"); + return Status; + } + + /* Read configuration */ + DPRINT("Reading configuration\n"); + + //Status = ZwQueryValueKey(ConfigKeyHandle, + + return Status; +} + + +/* IRP DISPATCHERS **********************************************************/ + +static NTSTATUS NTAPI +CreateSoundBlaster( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("Sound Blaster driver received IRP_MJ_CREATE\n"); + + CompleteIrpAndReturn(Irp, STATUS_SUCCESS); +} + +static NTSTATUS NTAPI +CloseSoundBlaster( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("Sound Blaster driver received IRP_MJ_CLOSE\n"); + + CompleteIrpAndReturn(Irp, STATUS_SUCCESS); +} + +static NTSTATUS NTAPI +CleanupSoundBlaster( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("Sound Blaster driver received IRP_MJ_CLEANUP\n"); + + CompleteIrpAndReturn(Irp, STATUS_SUCCESS); +} + +static NTSTATUS NTAPI +ControlSoundBlaster( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("Sound Blaster driver received IRP_MJ_CONTROL\n"); + + CompleteIrpAndReturn(Irp, STATUS_SUCCESS); +} + +static NTSTATUS NTAPI +WriteToSoundBlaster( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("Sound Blaster driver received IRP_MJ_WRITE\n"); + + CompleteIrpAndReturn(Irp, STATUS_SUCCESS); +} + + +/* DRIVER ENTRYPOINT ********************************************************/ + +NTSTATUS NTAPI +DriverEntry( + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath) +{ + NTSTATUS Status = STATUS_SUCCESS; + + DPRINT("Sound Blaster driver by silverblade\n"); + + DriverObject->Flags = 0; + DriverObject->MajorFunction[IRP_MJ_CREATE] = CreateSoundBlaster; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = CloseSoundBlaster; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = CleanupSoundBlaster; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = ControlSoundBlaster; + DriverObject->MajorFunction[IRP_MJ_WRITE] = WriteToSoundBlaster; + DriverObject->DriverUnload = UnloadSoundBlaster; + + EnumerateSoundDevices(RegistryPath, L"Parameters", ConfigureSoundBlasterDevice); + + return Status; +} + +static VOID NTAPI +UnloadSoundBlaster(IN PDRIVER_OBJECT DriverObject) +{ + DPRINT("Sound Blaster driver is being unloaded\n"); +} Propchange: trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/multimedia/audio/s…
============================================================================== --- trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rbuild (added) +++ trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rbuild [iso-8859-1] Sat Feb 28 01:50:58 2009 @@ -1,0 +1,9 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd"> +<module name="sndblst_sys" type="kernelmodedriver"> + <include base="sndblst_sys">.</include> + <library>ntoskrnl</library> + <library>hal</library> + <file>sndblst.c</file> + <file>sndblst.rc</file> +</module> Propchange: trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/multimedia/audio/s…
============================================================================== --- trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rc (added) +++ trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rc [iso-8859-1] Sat Feb 28 01:50:58 2009 @@ -1,0 +1,7 @@ +/* $Id: sndblst.rc 39744 2009-02-25 09:10:46Z silverblade $ */ + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "SoundBlaster Driver\0" +#define REACTOS_STR_INTERNAL_NAME "sndblst\0" +#define REACTOS_STR_ORIGINAL_FILENAME "sndblst.sys\0" +#include <reactos/version.rc> Propchange: trunk/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/lib/drivers/sound/mmebuddy/kernel.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/kernel.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/kernel.c [iso-8859-1] Sat Feb 28 01:50:58 2009 @@ -127,6 +127,8 @@ if ( ! IoResult ) return Win32ErrorToMmResult(GetLastError()); + SND_TRACE(L"Transferred %d bytes in Sync overlapped I/O\n", Transferred); + if ( BytesTransferred ) *BytesTransferred = Transferred;
15 years, 9 months
1
0
0
0
[dgorbachev] 39796: Fix warning: implicit declaration of function 'VALID_SOUND_DEVICE_TYPE'
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sat Feb 28 00:46:59 2009 New Revision: 39796 URL:
http://svn.reactos.org/svn/reactos?rev=39796&view=rev
Log: Fix warning: implicit declaration of function 'VALID_SOUND_DEVICE_TYPE' Modified: trunk/reactos/lib/drivers/sound/legacy/devname.c Modified: trunk/reactos/lib/drivers/sound/legacy/devname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/legacy/d…
============================================================================== --- trunk/reactos/lib/drivers/sound/legacy/devname.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/legacy/devname.c [iso-8859-1] Sat Feb 28 00:46:59 2009 @@ -12,6 +12,7 @@ #include <ntddk.h> #include <ntddsnd.h> #include <sndnames.h> +#include <sndtypes.h> #include <debug.h> @@ -168,7 +169,7 @@ OUT PCWSTR* DeviceNameBody, OUT PCWSTR* DosDeviceNameBody) { - if ( ! VALID_SOUND_DEVICE_TYPE(DeviceType) ) + if ( ! IS_VALID_SOUND_DEVICE_TYPE(DeviceType) ) { DPRINT("Invalid device type"); return STATUS_INVALID_PARAMETER;
15 years, 9 months
1
0
0
0
[jmorlan] 39795: Handle quotes in a CMD /C or CMD /K argument properly.
by jmorlan@svn.reactos.org
Author: jmorlan Date: Fri Feb 27 21:09:33 2009 New Revision: 39795 URL:
http://svn.reactos.org/svn/reactos?rev=39795&view=rev
Log: Handle quotes in a CMD /C or CMD /K argument properly. Modified: trunk/reactos/base/shell/cmd/cmd.c Modified: trunk/reactos/base/shell/cmd/cmd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=3…
============================================================================== --- trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] Fri Feb 27 21:09:33 2009 @@ -1529,23 +1529,73 @@ RegCloseKey(hkey); } +/* Get the command that comes after a /C or /K switch */ +static VOID +GetCmdLineCommand(TCHAR *commandline, TCHAR *ptr, BOOL AlwaysStrip) +{ + TCHAR *LastQuote; + + while (_istspace(*ptr)) + ptr++; + + /* Remove leading quote, find final quote */ + if (*ptr == _T('"') && + (LastQuote = _tcsrchr(++ptr, _T('"'))) != NULL) + { + TCHAR *Space; + /* Under certain circumstances, all quotes are preserved. + * CMD /? documents these conditions as follows: + * 1. No /S switch + * 2. Exactly two quotes + * 3. No "special characters" between the quotes + * (CMD /? says &<>()@^| but parentheses did not + * trigger this rule when I tested them.) + * 4. Whitespace exists between the quotes + * 5. Enclosed string is an executable filename + */ + *LastQuote = _T('\0'); + for (Space = ptr + 1; Space < LastQuote; Space++) + { + if (_istspace(*Space)) /* Rule 4 */ + { + if (!AlwaysStrip && /* Rule 1 */ + !_tcspbrk(ptr, _T("\"&<>@^|")) && /* Rules 2, 3 */ + SearchForExecutable(ptr, commandline)) /* Rule 5 */ + { + /* All conditions met: preserve both the quotes */ + *LastQuote = _T('"'); + _tcscpy(commandline, ptr - 1); + return; + } + break; + } + } + + /* The conditions were not met: remove both the + * leading quote and the last quote */ + _tcscpy(commandline, ptr); + _tcscpy(&commandline[LastQuote - ptr], LastQuote + 1); + return; + } + + /* No quotes; just copy */ + _tcscpy(commandline, ptr); +} + /* * set up global initializations and process parameters - * - * argc - number of parameters to
command.com
- * argv - command-line parameters - * */ static VOID -Initialize (int argc, const TCHAR* argv[]) +Initialize() { TCHAR commandline[CMDLINE_LENGTH]; TCHAR ModuleName[_MAX_PATH + 1]; - INT i; TCHAR lpBuffer[2]; //INT len; - //TCHAR *ptr, *cmdLine; + TCHAR *ptr, *cmdLine; + BOOL AlwaysStrip = FALSE; + BOOL ShowVersion = TRUE; /* get version information */ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); @@ -1572,13 +1622,8 @@ NtReadVirtualMemoryPtr = (NtReadVirtualMemoryProc)GetProcAddress(NtDllModule, "NtReadVirtualMemory"); } - - TRACE ("[command args:\n"); - for (i = 0; i < argc; i++) - { - TRACE ("%d. %s\n", i, debugstr_aw(argv[i])); - } - TRACE ("]\n"); + cmdLine = GetCommandLine(); + TRACE ("[command args: %s]\n", debugstr_aw(cmdLine)); InitLocale (); @@ -1594,22 +1639,22 @@ SetEnvironmentVariable (_T("PROMPT"), _T("$P$G")); - if (argc >= 2 && !_tcsncmp (argv[1], _T("/?"), 2)) - { - ConOutResPaging(TRUE,STRING_CMD_HELP8); - cmd_exit(0); - } SetConsoleMode (hIn, ENABLE_PROCESSED_INPUT); #ifdef INCLUDE_CMD_CHDIR InitLastPath (); #endif - if (argc >= 2) - { - for (i = 1; i < argc; i++) - { - if (!_tcsicmp (argv[i], _T("/p"))) + for (ptr = cmdLine; *ptr; ptr++) + { + if (*ptr == _T('/')) + { + if (ptr[1] == _T('?')) + { + ConOutResPaging(TRUE,STRING_CMD_HELP8); + cmd_exit(0); + } + else if (_totlower(ptr[1]) == _T('p')) { if (!IsExistingFile (_T("\\autoexec.bat"))) { @@ -1626,56 +1671,38 @@ } bCanExit = FALSE; } - else if (!_tcsicmp (argv[i], _T("/c"))) + else if (_totlower(ptr[1]) == _T('c')) { /* This just runs a program and exits */ - ++i; - if (i < argc) - { - _tcscpy (commandline, argv[i]); - while (++i < argc) - { - _tcscat (commandline, _T(" ")); - _tcscat (commandline, argv[i]); - } - - ParseCommandLine(commandline); - cmd_exit (ProcessInput (TRUE)); - } - else - { - cmd_exit (0); - } + GetCmdLineCommand(commandline, &ptr[2], AlwaysStrip); + ParseCommandLine(commandline); + cmd_exit (ProcessInput (TRUE)); } - else if (!_tcsicmp (argv[i], _T("/k"))) + else if (_totlower(ptr[1]) == _T('k')) { /* This just runs a program and remains */ - ++i; - if (i < argc) - { - _tcscpy (commandline, _T("\"")); - _tcscat (commandline, argv[i]); - _tcscat (commandline, _T("\"")); - while (++i < argc) - { - _tcscat (commandline, _T(" ")); - _tcscat (commandline, argv[i]); - } - ParseCommandLine(commandline); - } + GetCmdLineCommand(commandline, &ptr[2], AlwaysStrip); + ParseCommandLine(commandline); + ShowVersion = FALSE; + break; + } + else if (_totlower(ptr[1]) == _T('s')) + { + AlwaysStrip = TRUE; } #ifdef INCLUDE_CMD_COLOR - else if (!_tcsnicmp (argv[i], _T("/t:"), 3)) + else if (!_tcsnicmp(ptr, _T("/t:"), 3)) { /* process /t (color) argument */ - wDefColor = (WORD)_tcstoul (&argv[i][3], NULL, 16); + wDefColor = (WORD)_tcstoul(&ptr[3], &ptr, 16); wColor = wDefColor; SetScreenColor (wColor, TRUE); } #endif } } - else + + if (ShowVersion) { /* Display a simple version string */ ConOutPrintf(_T("ReactOS Operating System [Version %s-%s]\n"), @@ -1710,7 +1737,7 @@ } -static VOID Cleanup (int argc, const TCHAR *argv[]) +static VOID Cleanup() { /* run cmdexit.bat */ if (IsExistingFile (_T("cmdexit.bat"))) @@ -1782,13 +1809,13 @@ CMD_ModuleHandle = GetModuleHandle(NULL); /* check switches on command-line */ - Initialize(argc, argv); + Initialize(); /* call prompt routine */ nExitCode = ProcessInput(FALSE); /* do the cleanup */ - Cleanup(argc, argv); + Cleanup(); cmd_exit(nExitCode); return(nExitCode);
15 years, 9 months
1
0
0
0
[dchapyshev] 39794: - Add winetests for mscms, msvcrtd, quartz, secur32
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Fri Feb 27 20:57:06 2009 New Revision: 39794 URL:
http://svn.reactos.org/svn/reactos?rev=39794&view=rev
Log: - Add winetests for mscms, msvcrtd, quartz, secur32 Added: trunk/rostests/winetests/mscms/mscms.rbuild (with props) trunk/rostests/winetests/mscms/profile.c (with props) trunk/rostests/winetests/mscms/testlist.c (with props) trunk/rostests/winetests/msvcrtd/debug.c (with props) trunk/rostests/winetests/msvcrtd/msvcrtd.rbuild (with props) trunk/rostests/winetests/msvcrtd/testlist.c (with props) trunk/rostests/winetests/quartz/avisplitter.c (with props) trunk/rostests/winetests/quartz/filtergraph.c (with props) trunk/rostests/winetests/quartz/filtermapper.c (with props) trunk/rostests/winetests/quartz/memallocator.c (with props) trunk/rostests/winetests/quartz/misc.c (with props) trunk/rostests/winetests/quartz/quartz.rbuild (with props) trunk/rostests/winetests/quartz/referenceclock.c (with props) trunk/rostests/winetests/quartz/testlist.c (with props) trunk/rostests/winetests/quartz/videorenderer.c (with props) trunk/rostests/winetests/secur32/main.c (with props) trunk/rostests/winetests/secur32/ntlm.c (with props) trunk/rostests/winetests/secur32/schannel.c (with props) trunk/rostests/winetests/secur32/secur32.c (with props) trunk/rostests/winetests/secur32/secur32.rbuild (with props) trunk/rostests/winetests/secur32/testlist.c (with props) Modified: trunk/rostests/winetests/directory.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/directory.rbuil…
Added: trunk/rostests/winetests/mscms/mscms.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mscms/mscms.rbu…
Added: trunk/rostests/winetests/mscms/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mscms/profile.c…
Added: trunk/rostests/winetests/mscms/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mscms/testlist.…
Added: trunk/rostests/winetests/msvcrtd/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrtd/debug.c…
Added: trunk/rostests/winetests/msvcrtd/msvcrtd.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrtd/msvcrtd…
Added: trunk/rostests/winetests/msvcrtd/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrtd/testlis…
Added: trunk/rostests/winetests/quartz/avisplitter.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/quartz/avisplit…
Added: trunk/rostests/winetests/quartz/filtergraph.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/quartz/filtergr…
Added: trunk/rostests/winetests/quartz/filtermapper.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/quartz/filterma…
Added: trunk/rostests/winetests/quartz/memallocator.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/quartz/memalloc…
Added: trunk/rostests/winetests/quartz/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/quartz/misc.c?r…
Added: trunk/rostests/winetests/quartz/quartz.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/quartz/quartz.r…
Added: trunk/rostests/winetests/quartz/referenceclock.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/quartz/referenc…
Added: trunk/rostests/winetests/quartz/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/quartz/testlist…
Added: trunk/rostests/winetests/quartz/videorenderer.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/quartz/videoren…
Added: trunk/rostests/winetests/secur32/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/secur32/main.c?…
Added: trunk/rostests/winetests/secur32/ntlm.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/secur32/ntlm.c?…
Added: trunk/rostests/winetests/secur32/schannel.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/secur32/schanne…
Added: trunk/rostests/winetests/secur32/secur32.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/secur32/secur32…
Added: trunk/rostests/winetests/secur32/secur32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/secur32/secur32…
Added: trunk/rostests/winetests/secur32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/secur32/testlis…
15 years, 9 months
1
0
0
0
[dchapyshev] 39793: - Add winetests for pdh, qmgr, rasapi32, serialui, snmpapi, spoolss, twain_32, userenv, wldap32
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Fri Feb 27 20:32:07 2009 New Revision: 39793 URL:
http://svn.reactos.org/svn/reactos?rev=39793&view=rev
Log: - Add winetests for pdh, qmgr, rasapi32, serialui, snmpapi, spoolss, twain_32, userenv, wldap32 Added: trunk/rostests/winetests/pdh/ (with props) trunk/rostests/winetests/pdh/pdh.c (with props) trunk/rostests/winetests/pdh/pdh.rbuild (with props) trunk/rostests/winetests/pdh/testlist.c (with props) trunk/rostests/winetests/qmgr/ (with props) trunk/rostests/winetests/qmgr/enum_files.c (with props) trunk/rostests/winetests/qmgr/enum_jobs.c (with props) trunk/rostests/winetests/qmgr/file.c (with props) trunk/rostests/winetests/qmgr/job.c (with props) trunk/rostests/winetests/qmgr/qmgr.c (with props) trunk/rostests/winetests/qmgr/qmgr.rbuild (with props) trunk/rostests/winetests/qmgr/testlist.c (with props) trunk/rostests/winetests/rasapi32/ (with props) trunk/rostests/winetests/rasapi32/rasapi.c (with props) trunk/rostests/winetests/rasapi32/rasapi32.rbuild (with props) trunk/rostests/winetests/rasapi32/testlist.c (with props) trunk/rostests/winetests/serialui/ (with props) trunk/rostests/winetests/serialui/confdlg.c (with props) trunk/rostests/winetests/serialui/serialui.rbuild (with props) trunk/rostests/winetests/serialui/testlist.c (with props) trunk/rostests/winetests/snmpapi/ (with props) trunk/rostests/winetests/snmpapi/snmpapi.rbuild (with props) trunk/rostests/winetests/snmpapi/testlist.c (with props) trunk/rostests/winetests/snmpapi/util.c (with props) trunk/rostests/winetests/spoolss/ (with props) trunk/rostests/winetests/spoolss/spoolss.c (with props) trunk/rostests/winetests/spoolss/spoolss.rbuild (with props) trunk/rostests/winetests/spoolss/testlist.c (with props) trunk/rostests/winetests/twain_32/ (with props) trunk/rostests/winetests/twain_32/dsm.c (with props) trunk/rostests/winetests/twain_32/testlist.c (with props) trunk/rostests/winetests/twain_32/twain_32.rbuild (with props) trunk/rostests/winetests/userenv/ (with props) trunk/rostests/winetests/userenv/testlist.c (with props) trunk/rostests/winetests/userenv/userenv.c (with props) trunk/rostests/winetests/userenv/userenv.rbuild (with props) trunk/rostests/winetests/wldap32/ (with props) trunk/rostests/winetests/wldap32/parse.c (with props) trunk/rostests/winetests/wldap32/testlist.c (with props) trunk/rostests/winetests/wldap32/wldap32.rbuild (with props) Modified: trunk/rostests/winetests/directory.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/directory.rbuil…
Added: trunk/rostests/winetests/pdh/pdh.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/pdh/pdh.c?rev=3…
Added: trunk/rostests/winetests/pdh/pdh.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/pdh/pdh.rbuild?…
Added: trunk/rostests/winetests/pdh/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/pdh/testlist.c?…
Added: trunk/rostests/winetests/qmgr/enum_files.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/enum_files…
Added: trunk/rostests/winetests/qmgr/enum_jobs.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/enum_jobs.…
Added: trunk/rostests/winetests/qmgr/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/file.c?rev…
Added: trunk/rostests/winetests/qmgr/job.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/job.c?rev=…
Added: trunk/rostests/winetests/qmgr/qmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/qmgr.c?rev…
Added: trunk/rostests/winetests/qmgr/qmgr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/qmgr.rbuil…
Added: trunk/rostests/winetests/qmgr/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/testlist.c…
Added: trunk/rostests/winetests/rasapi32/rasapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rasapi32/rasapi…
Added: trunk/rostests/winetests/rasapi32/rasapi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rasapi32/rasapi…
Added: trunk/rostests/winetests/rasapi32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rasapi32/testli…
Added: trunk/rostests/winetests/serialui/confdlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/serialui/confdl…
Added: trunk/rostests/winetests/serialui/serialui.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/serialui/serial…
Added: trunk/rostests/winetests/serialui/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/serialui/testli…
Added: trunk/rostests/winetests/snmpapi/snmpapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/snmpapi/snmpapi…
Added: trunk/rostests/winetests/snmpapi/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/snmpapi/testlis…
Added: trunk/rostests/winetests/snmpapi/util.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/snmpapi/util.c?…
Added: trunk/rostests/winetests/spoolss/spoolss.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/spoolss/spoolss…
Added: trunk/rostests/winetests/spoolss/spoolss.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/spoolss/spoolss…
Added: trunk/rostests/winetests/spoolss/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/spoolss/testlis…
Added: trunk/rostests/winetests/twain_32/dsm.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/twain_32/dsm.c?…
Added: trunk/rostests/winetests/twain_32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/twain_32/testli…
Added: trunk/rostests/winetests/twain_32/twain_32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/twain_32/twain_…
Added: trunk/rostests/winetests/userenv/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/userenv/testlis…
Added: trunk/rostests/winetests/userenv/userenv.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/userenv/userenv…
Added: trunk/rostests/winetests/userenv/userenv.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/userenv/userenv…
Added: trunk/rostests/winetests/wldap32/parse.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wldap32/parse.c…
Added: trunk/rostests/winetests/wldap32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wldap32/testlis…
Added: trunk/rostests/winetests/wldap32/wldap32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wldap32/wldap32…
15 years, 10 months
1
0
0
0
[dchapyshev] 39792: - Add twain.h from Wine
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Fri Feb 27 20:30:46 2009 New Revision: 39792 URL:
http://svn.reactos.org/svn/reactos?rev=39792&view=rev
Log: - Add twain.h from Wine Added: trunk/reactos/include/psdk/twain.h (with props) Added: trunk/reactos/include/psdk/twain.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/twain.h?rev=3…
============================================================================== --- trunk/reactos/include/psdk/twain.h (added) +++ trunk/reactos/include/psdk/twain.h [iso-8859-1] Fri Feb 27 20:30:46 2009 @@ -1,0 +1,1849 @@ +/* ======================================================================== *\ + + Copyright (C) 1991, 1992 TWAIN Working Group: Aldus, Caere, Eastman-Kodak, + Hewlett-Packard and Logitech Corporations. All rights reserved. + + Copyright (C) 1997 TWAIN Working Group: Bell+Howell, Canon, DocuMagix, + Fujitsu, Genoa Technology, Hewlett-Packard, Kofax Imaging Products, and + Ricoh Corporation. All rights reserved. + + Copyright (C) 1998 TWAIN Working Group: Adobe Systems Incorporated, + Canon Information Systems, Eastman Kodak Company, + Fujitsu Computer Products of America, Genoa Technology, + Hewlett-Packard Company, Intel Corporation, Kofax Image Products, + JFL Peripheral Solutions Inc., Ricoh Corporation, and Xerox Corporation. + All rights reserved. + + TWAIN.h - This is the definitive include file for applications and + data sources written to the TWAIN specification. + It defines constants, data structures, messages etc. + for the public interface to TWAIN. + + Revision History: + version 1.0, March 6, 1992. TWAIN 1.0. + version 1.1, January 1993. Tech Notes 1.1 + version 1.5, June 1993. Specification Update 1.5 + Change DC to TW + Change filename from DC.H to TWAIN.H + version 1.5, July 1993. Remove spaces from country identifiers + + version 1.7, July 1997 Added Capabilities and data structure for + document imaging and digital cameras. + KHL. + version 1.7, July 1997 Inserted Borland compatible structure packing + directives provided by Mentor. JMH + version 1.7, Aug 1997 Expanded file tabs to spaces. + NOTE: future authors should be sure to have + their editors set to automatically expand tabs + to spaces (original tab setting was 4 spaces). + version 1.7, Sept 1997 Added job control values + Added return codes + version 1.7, Sept 1997 changed definition of pRGBRESPONSE to + pTW_RGBRESPONSE + version 1.7 Aug 1998 Added missing TWEI_BARCODEROTATION values + TWBCOR_ types JMH + version 1.8 August 1998 Added new types and definitions required + for 1.8 Specification JMH + version 1.8 January 1999 Changed search mode from SRCH_ to TWBD_ as + in 1.8 Specification, added TWBT_MAXICODE JMH + version 1.8 January 1999 Removed undocumented duplicate AUTO<cap> JMH +\* ======================================================================== */ + +#ifndef TWAIN +#define TWAIN + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" + +/* The Twain structures must be packed on 2 byte alignment */ +#include "pshpack2.h" + +#undef FAR +#define FAR + +/**************************************************************************** + * TWAIN Version * + ****************************************************************************/ +#define TWON_PROTOCOLMINOR 8 /* Changed for Version 1.8 */ +#define TWON_PROTOCOLMAJOR 1 + +/**************************************************************************** + * Platform Dependent Definitions and Typedefs * + ****************************************************************************/ + +/* Define one of the following, depending on the platform */ +/* #define _MAC_ */ +/* #define _UNIX_ */ +#define _MSWIN_ + +#ifdef _MSWIN_ + typedef HANDLE TW_HANDLE; + typedef LPVOID TW_MEMREF; + typedef BYTE * HPBYTE; + typedef void * HPVOID; +#endif /* _MSWIN_ */ + +#ifdef _MAC_ +#define PASCAL pascal +#define FAR + typedef Handle TW_HANDLE; + typedef char *TW_MEMREF; +#endif /* _MAC_ */ + +#ifdef _UNIX_ +/* #define PASCAL pascal */ +#define FAR + typedef unsigned char *TW_HANDLE; + typedef unsigned char *TW_MEMREF; +#endif /* _UNIX_ */ + +/**************************************************************************** + * Type Definitions * + ****************************************************************************/ + +/* String types. These include room for the strings and a NULL char, * + * or, on the Mac, a length byte followed by the string. * + * TW_STR255 must hold less than 256 chars so length fits in first byte. */ +typedef char TW_STR32[34], FAR *pTW_STR32; +typedef char TW_STR64[66], FAR *pTW_STR64; +typedef char TW_STR128[130], FAR *pTW_STR128; +typedef char TW_STR255[256], FAR *pTW_STR255; + +/* Numeric types. */ +typedef char TW_INT8, FAR *pTW_INT8; +typedef short TW_INT16, FAR *pTW_INT16; +typedef LONG TW_INT32, FAR *pTW_INT32; +typedef unsigned char TW_UINT8, FAR *pTW_UINT8; +typedef unsigned short TW_UINT16, FAR *pTW_UINT16; +typedef ULONG TW_UINT32, FAR *pTW_UINT32; +typedef unsigned short TW_BOOL, FAR *pTW_BOOL; + +/* Fixed point structure type. */ +typedef struct { + TW_INT16 Whole; /* maintains the sign */ + TW_UINT16 Frac; +} TW_FIX32, FAR *pTW_FIX32; + +/**************************************************************************** + * Structure Definitions * + ****************************************************************************/ + +/* No DAT needed. */ +typedef struct { + TW_FIX32 X; + TW_FIX32 Y; + TW_FIX32 Z; +} TW_CIEPOINT, FAR * pTW_CIEPOINT; + +/* No DAT needed. */ +typedef struct { + TW_FIX32 StartIn; + TW_FIX32 BreakIn; + TW_FIX32 EndIn; + TW_FIX32 StartOut; + TW_FIX32 BreakOut; + TW_FIX32 EndOut; + TW_FIX32 Gamma; + TW_FIX32 SampleCount; /* if =0 use the gamma */ +} TW_DECODEFUNCTION, FAR * pTW_DECODEFUNCTION; + +/* No DAT needed. */ +typedef struct { + TW_UINT8 Index; /* Value used to index into the color table. */ + TW_UINT8 Channel1; /* First tri-stimulus value (e.g Red) */ + TW_UINT8 Channel2; /* Second tri-stimulus value (e.g Green) */ + TW_UINT8 Channel3; /* Third tri-stimulus value (e.g Blue) */ +} TW_ELEMENT8, FAR * pTW_ELEMENT8; + +/* No DAT. Defines a frame rectangle in ICAP_UNITS coordinates. */ +typedef struct { + TW_FIX32 Left; + TW_FIX32 Top; + TW_FIX32 Right; + TW_FIX32 Bottom; +} TW_FRAME, FAR * pTW_FRAME; + +/* No DAT needed. Used to manage memory buffers. */ +typedef struct { + TW_UINT32 Flags; /* Any combination of the TWMF_ constants. */ + TW_UINT32 Length; /* Number of bytes stored in buffer TheMem. */ + TW_MEMREF TheMem; /* Pointer or handle to the allocated memory buffer. */ +} TW_MEMORY, FAR * pTW_MEMORY; + +/* No DAT needed. */ +typedef struct { + TW_DECODEFUNCTION Decode[3]; + TW_FIX32 Mix[3][3]; +} TW_TRANSFORMSTAGE, FAR * pTW_TRANSFORMSTAGE; + +/* No DAT needed. Describes version of software currently running. */ +typedef struct { + TW_UINT16 MajorNum; /* Major revision number of the software. */ + TW_UINT16 MinorNum; /* Incremental revision number of the software. */ + TW_UINT16 Language; /* e.g. TWLG_SWISSFRENCH */ + TW_UINT16 Country; /* e.g. TWCY_SWITZERLAND */ + TW_STR32 Info; /* e.g. "1.0b3 Beta release" */ +} TW_VERSION, FAR * pTW_VERSION; + +/* TWON_ARRAY. Container for array of values (a simplified TW_ENUMERATION) */ +typedef struct { + TW_UINT16 ItemType; + TW_UINT32 NumItems; /* How many items in ItemList */ + TW_UINT8 ItemList[1]; /* Array of ItemType values starts here */ +} TW_ARRAY, FAR * pTW_ARRAY; + +/* TWON_ENUMERATION. Container for a collection of values. */ +typedef struct { + TW_UINT16 ItemType; + TW_UINT32 NumItems; /* How many items in ItemList */ + TW_UINT32 CurrentIndex; /* Current value is in ItemList[CurrentIndex] */ + TW_UINT32 DefaultIndex; /* Powerup value is in ItemList[DefaultIndex] */ + TW_UINT8 ItemList[1]; /* Array of ItemType values starts here */ +} TW_ENUMERATION, FAR * pTW_ENUMERATION; + +/* TWON_ONEVALUE. Container for one value. */ +typedef struct { + TW_UINT16 ItemType; + TW_UINT32 Item; +} TW_ONEVALUE, FAR * pTW_ONEVALUE; + +/* TWON_RANGE. Container for a range of values. */ +typedef struct { + TW_UINT16 ItemType; + TW_UINT32 MinValue; /* Starting value in the range. */ + TW_UINT32 MaxValue; /* Final value in the range. */ + TW_UINT32 StepSize; /* Increment from MinValue to MaxValue. */ + TW_UINT32 DefaultValue; /* Power-up value. */ + TW_UINT32 CurrentValue; /* The value that is currently in effect. */ +} TW_RANGE, FAR * pTW_RANGE; + +/* DAT_CAPABILITY. Used by application to get/set capability from/in a data source. */ +typedef struct { + TW_UINT16 Cap; /* id of capability to set or get, e.g. CAP_BRIGHTNESS */ + TW_UINT16 ConType; /* TWON_ONEVALUE, _RANGE, _ENUMERATION or _ARRAY */ + TW_HANDLE hContainer; /* Handle to container of type Dat */ +} TW_CAPABILITY, FAR * pTW_CAPABILITY; + +/* DAT_CIECOLOR. */ +typedef struct { + TW_UINT16 ColorSpace; + TW_INT16 LowEndian; + TW_INT16 DeviceDependent; + TW_INT32 VersionNumber; + TW_TRANSFORMSTAGE StageABC; + TW_TRANSFORMSTAGE StageLMN; + TW_CIEPOINT WhitePoint; + TW_CIEPOINT BlackPoint; + TW_CIEPOINT WhitePaper; + TW_CIEPOINT BlackInk; + TW_FIX32 Samples[1]; +} TW_CIECOLOR, FAR * pTW_CIECOLOR; + +/* DAT_EVENT. For passing events down from the application to the DS. */ +typedef struct { + TW_MEMREF pEvent; /* Windows pMSG or Mac pEvent. */ + TW_UINT16 TWMessage; /* TW msg from data source, e.g. MSG_XFERREADY */ +} TW_EVENT, FAR * pTW_EVENT; + +/* DAT_GRAYRESPONSE */ +typedef struct { + TW_ELEMENT8 Response[1]; +} TW_GRAYRESPONSE, FAR * pTW_GRAYRESPONSE; + +/* DAT_IDENTITY. Identifies the program/library/code resource. */ +typedef struct { + TW_UINT32 Id; /* Unique number. In Windows, application hWnd */ + TW_VERSION Version; /* Identifies the piece of code */ + TW_UINT16 ProtocolMajor; /* Application and DS must set to TWON_PROTOCOLMAJOR */ + TW_UINT16 ProtocolMinor; /* Application and DS must set to TWON_PROTOCOLMINOR */ + TW_UINT32 SupportedGroups; /* Bit field OR combination of DG_ constants */ + TW_STR32 Manufacturer; /* Manufacturer name, e.g. "Hewlett-Packard" */ + TW_STR32 ProductFamily; /* Product family name, e.g. "ScanJet" */ + TW_STR32 ProductName; /* Product name, e.g. "ScanJet Plus" */ +} TW_IDENTITY, FAR * pTW_IDENTITY; + +/* DAT_IMAGEINFO. Application gets detailed image info from DS with this. */ +typedef struct { + TW_FIX32 XResolution; /* Resolution in the horizontal */ + TW_FIX32 YResolution; /* Resolution in the vertical */ + TW_INT32 ImageWidth; /* Columns in the image, -1 if unknown by DS*/ + TW_INT32 ImageLength; /* Rows in the image, -1 if unknown by DS */ + TW_INT16 SamplesPerPixel; /* Number of samples per pixel, 3 for RGB */ + TW_INT16 BitsPerSample[8]; /* Number of bits for each sample */ + TW_INT16 BitsPerPixel; /* Number of bits for each padded pixel */ + TW_BOOL Planar; /* True if Planar, False if chunky */ + TW_INT16 PixelType; /* How to interp data; photo interp (TWPT_) */ + TW_UINT16 Compression; /* How the data is compressed (TWCP_xxxx) */ +} TW_IMAGEINFO, FAR * pTW_IMAGEINFO; + +/* DAT_IMAGELAYOUT. Provides image layout information in current units. */ +typedef struct { + TW_FRAME Frame; /* Frame coords within larger document */ + TW_UINT32 DocumentNumber; + TW_UINT32 PageNumber; /* Reset when you go to next document */ + TW_UINT32 FrameNumber; /* Reset when you go to next page */ +} TW_IMAGELAYOUT, FAR * pTW_IMAGELAYOUT; + +/* DAT_IMAGEMEMXFER. Used to pass image data (e.g. in strips) from DS to application.*/ +typedef struct { + TW_UINT16 Compression; /* How the data is compressed */ + TW_UINT32 BytesPerRow; /* Number of bytes in a row of data */ + TW_UINT32 Columns; /* How many columns */ + TW_UINT32 Rows; /* How many rows */ + TW_UINT32 XOffset; /* How far from the side of the image */ + TW_UINT32 YOffset; /* How far from the top of the image */ + TW_UINT32 BytesWritten; /* How many bytes written in Memory */ + TW_MEMORY Memory; /* Mem struct used to pass actual image data */ +} TW_IMAGEMEMXFER, FAR * pTW_IMAGEMEMXFER; + +/* Changed in 1.1: QuantTable, HuffmanDC, HuffmanAC TW_MEMREF -> TW_MEMORY */ +/* DAT_JPEGCOMPRESSION. Based on JPEG Draft International Std, ver 10918-1. */ +typedef struct { + TW_UINT16 ColorSpace; /* One of the TWPT_xxxx values */ + TW_UINT32 SubSampling; /* Two word "array" for subsampling values */ + TW_UINT16 NumComponents; /* Number of color components in image */ + TW_UINT16 RestartFrequency; /* Frequency of restart marker codes in MDU's */ + TW_UINT16 QuantMap[4]; /* Mapping of components to QuantTables */ + TW_MEMORY QuantTable[4]; /* Quantization tables */ + TW_UINT16 HuffmanMap[4]; /* Mapping of components to Huffman tables */ + TW_MEMORY HuffmanDC[2]; /* DC Huffman tables */ + TW_MEMORY HuffmanAC[2]; /* AC Huffman tables */ +} TW_JPEGCOMPRESSION, FAR * pTW_JPEGCOMPRESSION; + +/* DAT_PALETTE8. Color palette when TWPT_PALETTE pixels xfer'd in mem buf. */ +typedef struct { + TW_UINT16 NumColors; /* Number of colors in the color table. */ + TW_UINT16 PaletteType; /* TWPA_xxxx, specifies type of palette. */ + TW_ELEMENT8 Colors[256]; /* Array of palette values starts here. */ +} TW_PALETTE8, FAR * pTW_PALETTE8; + +/* DAT_PENDINGXFERS. Used with MSG_ENDXFER to indicate additional data. */ +typedef struct { + TW_UINT16 Count; + union { + TW_UINT32 EOJ; + TW_UINT32 Reserved; + } u; +} TW_PENDINGXFERS, FAR *pTW_PENDINGXFERS; + +/* DAT_RGBRESPONSE */ +typedef struct { + TW_ELEMENT8 Response[1]; +} TW_RGBRESPONSE, FAR * pTW_RGBRESPONSE; + +/* DAT_SETUPFILEXFER. Sets up DS to application data transfer via a file. */ +typedef struct { + TW_STR255 FileName; + TW_UINT16 Format; /* Any TWFF_ constant */ + TW_INT16 VRefNum; /* Used for Mac only */ +} TW_SETUPFILEXFER, FAR * pTW_SETUPFILEXFER; + +/* DAT_SETUPMEMXFER. Sets up DS to application data transfer via a memory buffer. */ +typedef struct { + TW_UINT32 MinBufSize; + TW_UINT32 MaxBufSize; + TW_UINT32 Preferred; +} TW_SETUPMEMXFER, FAR * pTW_SETUPMEMXFER; + +/* DAT_STATUS. Application gets detailed status info from a data source with this. */ +typedef struct { + TW_UINT16 ConditionCode; /* Any TWCC_ constant */ + TW_UINT16 Reserved; /* Future expansion space */ +} TW_STATUS, FAR * pTW_STATUS; + +/* DAT_USERINTERFACE. Coordinates UI between application and data source. */ +typedef struct { + TW_BOOL ShowUI; /* TRUE if DS should bring up its UI */ + TW_BOOL ModalUI; /* For Mac only - true if the DS's UI is modal */ + TW_HANDLE hParent; /* For windows only - Application window handle */ +} TW_USERINTERFACE, FAR * pTW_USERINTERFACE; + +/* SDH - 03/21/95 - TWUNK */ +/* DAT_TWUNKIDENTITY. Provides DS identity and 'other' information necessary */ +/* across thunk link. */ +typedef struct { + TW_IDENTITY identity; /* Identity of data source. */ + TW_STR255 dsPath; /* Full path and file name of data source. */ +} TW_TWUNKIDENTITY, FAR * pTW_TWUNKIDENTITY; + +/* SDH - 03/21/95 - TWUNK */ +/* Provides DS_Entry parameters over thunk link. */ +typedef struct +{ + TW_INT8 destFlag; /* TRUE if dest is not NULL */ + TW_IDENTITY dest; /* Identity of data source (if used) */ + TW_INT32 dataGroup; /* DSM_Entry dataGroup parameter */ + TW_INT16 dataArgType; /* DSM_Entry dataArgType parameter */ + TW_INT16 message; /* DSM_Entry message parameter */ + TW_INT32 pDataSize; /* Size of pData (0 if NULL) */ + /* TW_MEMREF pData; */ /* Based on implementation specifics, a */ + /* pData parameter makes no sense in this */ + /* structure, but data (if provided) will be*/ + /* appended in the data block. */ + } TW_TWUNKDSENTRYPARAMS, FAR * pTW_TWUNKDSENTRYPARAMS; + +/* SDH - 03/21/95 - TWUNK */ +/* Provides DS_Entry results over thunk link. */ +typedef struct +{ + TW_UINT16 returnCode; /* Thunker DsEntry return code. */ + TW_UINT16 conditionCode; /* Thunker DsEntry condition code. */ + TW_INT32 pDataSize; /* Size of pData (0 if NULL) */ + /* TW_MEMREF pData; */ /* Based on implementation specifics, a */ + /* pData parameter makes no sense in this */ + /* structure, but data (if provided) will be*/ + /* appended in the data block. */ +} TW_TWUNKDSENTRYRETURN, FAR * pTW_TWUNKDSENTRYRETURN; + +/* WJD - 950818 */ +/* Added for 1.6 Specification */ +/* TWAIN 1.6 CAP_SUPPORTEDCAPSEXT structure */ +typedef struct +{ + TW_UINT16 Cap; /* Which CAP/ICAP info is relevant to */ + TW_UINT16 Properties; /* Messages this CAP/ICAP supports */ +} TW_CAPEXT, FAR * pTW_CAPEXT; + +/* ----------------------------------------------------------------------- *\ + + Version 1.7: Added Following data structure for Document Imaging + July 1997 Enhancement. + KHL TW_CUSTOMDSDATA -- For Saving and Restoring Source's + state. + TW_INFO -- Each attribute for extended image + information. + TW_EXTIMAGEINFO -- Extended image information structure. + +\* ----------------------------------------------------------------------- */ + +typedef struct { + TW_UINT32 InfoLength; /* Length of Information in bytes. */ + TW_HANDLE hData; /* Place holder for data, DS Allocates */ +}TW_CUSTOMDSDATA, FAR *pTW_CUSTOMDSDATA; + +typedef struct { + TW_UINT16 InfoID; + TW_UINT16 ItemType; + TW_UINT16 NumItems; + TW_UINT16 CondCode; + TW_UINT32 Item; +}TW_INFO, FAR* pTW_INFO; + +typedef struct { + TW_UINT32 NumInfos; + TW_INFO Info[1]; +}TW_EXTIMAGEINFO, FAR* pTW_EXTIMAGEINFO; + +/* Added 1.8 */ + +/* DAT_AUDIOINFO, information about audio data */ +typedef struct { + TW_STR255 Name; /* name of audio data */ + TW_UINT32 Reserved; /* reserved space */ +} TW_AUDIOINFO, FAR * pTW_AUDIOINFO; + +/* DAT_DEVICEEVENT, information about events */ +typedef struct { + TW_UINT32 Event; /* One of the TWDE_xxxx values. */ + TW_STR255 DeviceName; /* The name of the device that generated the event */ + TW_UINT32 BatteryMinutes; /* Battery Minutes Remaining */ + TW_INT16 BatteryPercentage; /* Battery Percentage Remaining */ + TW_INT32 PowerSupply; /* Power Supply */ + TW_FIX32 XResolution; /* Resolution */ + TW_FIX32 YResolution; /* Resolution */ + TW_UINT32 FlashUsed2; /* Flash Used2 */ + TW_UINT32 AutomaticCapture; /* Automatic Capture */ + TW_UINT32 TimeBeforeFirstCapture; /* Automatic Capture */ + TW_UINT32 TimeBetweenCaptures; /* Automatic Capture */ +} TW_DEVICEEVENT, FAR * pTW_DEVICEEVENT; + +/* DAT_FILESYSTEM, information about TWAIN file system */ +typedef struct { + /* DG_CONTROL / DAT_FILESYSTEM / MSG_xxxx fields */ + TW_STR255 InputName; /* The name of the input or source file */ + TW_STR255 OutputName; /* The result of an operation or the name of a destination file */ + TW_MEMREF Context; /* Source specific data used to remember state information */ + /* DG_CONTROL / DAT_FILESYSTEM / MSG_DELETE field */ + int Recursive; /* recursively delete all sub-directories */ + /* DG_CONTROL / DAT_FILESYSTEM / MSG_GETINFO fields */ + TW_INT32 FileType; /* One of the TWFT_xxxx values */ + TW_UINT32 Size; /* Size of current FileType */ + TW_STR32 CreateTimeDate; /* creation date of the file */ + TW_STR32 ModifiedTimeDate; /* last date the file was modified */ + TW_UINT32 FreeSpace; /* bytes of free space on the current device */ + TW_INT32 NewImageSize; /* estimate of the amount of space a new image would take up */ + TW_UINT32 NumberOfFiles; /* number of files, depends on FileType */ + TW_UINT32 NumberOfSnippets; /**/ + char Reserved[512]; /**/ +} TW_FILESYSTEM, FAR * pTW_FILESYSTEM; + +/* DAT_PASSTHRU, device dependent data to pass through Data Source */ +typedef struct { + TW_MEMREF pCommand; /* Pointer to Command buffer */ + TW_UINT32 CommandBytes; /* Number of bytes in Command buffer */ + TW_INT32 Direction; /* One of the TWDR_xxxx values. Defines the direction of data flow */ + TW_MEMREF pData; /* Pointer to Data buffer */ + TW_UINT32 DataBytes; /* Number of bytes in Data buffer */ + TW_UINT32 DataBytesXfered; /* Number of bytes successfully transferred */ +} TW_PASSTHRU, FAR * pTW_PASSTHRU; + +/* DAT_SETUPAUDIOFILEXFER, information required to setup an audio file transfer */ +typedef struct { + TW_STR255 FileName; /* full path target file */ + TW_UINT16 Format; /* one of TWAF_xxxx */ + TW_INT16 VRefNum; +} TW_SETUPAUDIOFILEXFER, FAR * pTW_SETUPAUDIOFILEXFER; + +/**************************************************************************** + * Generic Constants * + ****************************************************************************/ + +#define TWON_ARRAY 3 /* indicates TW_ARRAY container */ +#define TWON_ENUMERATION 4 /* indicates TW_ENUMERATION container */ +#define TWON_ONEVALUE 5 /* indicates TW_ONEVALUE container */ +#define TWON_RANGE 6 /* indicates TW_RANGE container */ + +#define TWON_ICONID 962 /* res Id of icon used in USERSELECT lbox */ +#define TWON_DSMID 461 /* res Id of the DSM version num resource */ +#define TWON_DSMCODEID 63 /* res Id of the Mac SM Code resource */ + +#define TWON_DONTCARE8 0xff +#define TWON_DONTCARE16 0xffff +#define TWON_DONTCARE32 0xffffffff + +/* Flags used in TW_MEMORY structure. */ +#define TWMF_APPOWNS 0x1 +#define TWMF_DSMOWNS 0x2 +#define TWMF_DSOWNS 0x4 +#define TWMF_POINTER 0x8 +#define TWMF_HANDLE 0x10 + +/* Palette types for TW_PALETTE8 */ +#define TWPA_RGB 0 +#define TWPA_GRAY 1 +#define TWPA_CMY 2 + +/* There are four containers used for capabilities negotiation: + * TWON_ONEVALUE, TWON_RANGE, TWON_ENUMERATION, TWON_ARRAY + * In each container structure ItemType can be TWTY_INT8, TWTY_INT16, etc. + * The kind of data stored in the container can be determined by doing + * DCItemSize[ItemType] where the following is defined in TWAIN glue code: + * DCItemSize[]= { sizeof(TW_INT8), + * sizeof(TW_INT16), + * etc. + * sizeof(TW_UINT32) }; + * + */ + +#define TWTY_INT8 0x0000 /* Means Item is a TW_INT8 */ +#define TWTY_INT16 0x0001 /* Means Item is a TW_INT16 */ +#define TWTY_INT32 0x0002 /* Means Item is a TW_INT32 */ + +#define TWTY_UINT8 0x0003 /* Means Item is a TW_UINT8 */ +#define TWTY_UINT16 0x0004 /* Means Item is a TW_UINT16 */ +#define TWTY_UINT32 0x0005 /* Means Item is a TW_UINT32 */ + +#define TWTY_BOOL 0x0006 /* Means Item is a TW_BOOL */ + +#define TWTY_FIX32 0x0007 /* Means Item is a TW_FIX32 */ + +#define TWTY_FRAME 0x0008 /* Means Item is a TW_FRAME */ + +#define TWTY_STR32 0x0009 /* Means Item is a TW_STR32 */ +#define TWTY_STR64 0x000a /* Means Item is a TW_STR64 */ +#define TWTY_STR128 0x000b /* Means Item is a TW_STR128 */ +#define TWTY_STR255 0x000c /* Means Item is a TW_STR255 */ + +/**************************************************************************** + * Capability Constants * + ****************************************************************************/ + +/* ICAP_BITORDER values (BO_ means Bit Order) */ +#define TWBO_LSBFIRST 0 +#define TWBO_MSBFIRST 1 + +/* ICAP_COMPRESSION values (CP_ means ComPression ) */ +#define TWCP_NONE 0 +#define TWCP_PACKBITS 1 +#define TWCP_GROUP31D 2 /* Follows CCITT spec (no End Of Line) */ +#define TWCP_GROUP31DEOL 3 /* Follows CCITT spec (has End Of Line) */ +#define TWCP_GROUP32D 4 /* Follows CCITT spec (use cap for K Factor) */ +#define TWCP_GROUP4 5 /* Follows CCITT spec */ +#define TWCP_JPEG 6 /* Use capability for more info */ +#define TWCP_LZW 7 /* Must license from Unisys and IBM to use */ +#define TWCP_JBIG 8 /* For Bitonal images -- Added 1.7 KHL */ +/* Added 1.8 */ +#define TWCP_PNG 9 +#define TWCP_RLE4 10 +#define TWCP_RLE8 11 +#define TWCP_BITFIELDS 12 + + +/* ICAP_IMAGEFILEFORMAT values (FF_means File Format) */ +#define TWFF_TIFF 0 /* Tagged Image File Format */ +#define TWFF_PICT 1 /* Macintosh PICT */ +#define TWFF_BMP 2 /* Windows Bitmap */ +#define TWFF_XBM 3 /* X-Windows Bitmap */ +#define TWFF_JFIF 4 /* JPEG File Interchange Format */ +#define TWFF_FPX 5 /* Flash Pix */ +#define TWFF_TIFFMULTI 6 /* Multi-page tiff file */ +#define TWFF_PNG 7 +#define TWFF_SPIFF 8 +#define TWFF_EXIF 9 + + +/* ICAP_FILTER values (FT_ means Filter Type) */ +#define TWFT_RED 0 +#define TWFT_GREEN 1 +#define TWFT_BLUE 2 +#define TWFT_NONE 3 +#define TWFT_WHITE 4 +#define TWFT_CYAN 5 +#define TWFT_MAGENTA 6 +#define TWFT_YELLOW 7 +#define TWFT_BLACK 8 + +/* ICAP_LIGHTPATH values (LP_ means Light Path) */ +#define TWLP_REFLECTIVE 0 +#define TWLP_TRANSMISSIVE 1 + +/* ICAP_LIGHTSOURCE values (LS_ means Light Source) */ +#define TWLS_RED 0 +#define TWLS_GREEN 1 +#define TWLS_BLUE 2 +#define TWLS_NONE 3 +#define TWLS_WHITE 4 +#define TWLS_UV 5 +#define TWLS_IR 6 + +/* ICAP_ORIENTATION values (OR_ means ORientation) */ +#define TWOR_ROT0 0 +#define TWOR_ROT90 1 +#define TWOR_ROT180 2 +#define TWOR_ROT270 3 +#define TWOR_PORTRAIT TWOR_ROT0 +#define TWOR_LANDSCAPE TWOR_ROT270 + +/* ICAP_PLANARCHUNKY values (PC_ means Planar/Chunky ) */ +#define TWPC_CHUNKY 0 +#define TWPC_PLANAR 1 + +/* ICAP_PIXELFLAVOR values (PF_ means Pixel Flavor) */ +#define TWPF_CHOCOLATE 0 /* zero pixel represents darkest shade */ +#define TWPF_VANILLA 1 /* zero pixel represents lightest shade */ + +/* ICAP_PIXELTYPE values (PT_ means Pixel Type) */ +#define TWPT_BW 0 /* Black and White */ +#define TWPT_GRAY 1 +#define TWPT_RGB 2 +#define TWPT_PALETTE 3 +#define TWPT_CMY 4 +#define TWPT_CMYK 5 +#define TWPT_YUV 6 +#define TWPT_YUVK 7 +#define TWPT_CIEXYZ 8 + +/* ICAP_SUPPORTEDSIZES values (SS_ means Supported Sizes) */ +#define TWSS_NONE 0 +#define TWSS_A4LETTER 1 +#define TWSS_B5LETTER 2 +#define TWSS_USLETTER 3 +#define TWSS_USLEGAL 4 +/* Added 1.5 */ +#define TWSS_A5 5 +#define TWSS_B4 6 +#define TWSS_B6 7 +/*#define TWSS_B 8 */ +/* Added 1.7 */ +#define TWSS_USLEDGER 9 +#define TWSS_USEXECUTIVE 10 +#define TWSS_A3 11 +#define TWSS_B3 12 +#define TWSS_A6 13 +#define TWSS_C4 14 +#define TWSS_C5 15 +#define TWSS_C6 16 +/* Added 1.8 */ +#define TWSS_4A0 17 +#define TWSS_2A0 18 +#define TWSS_A0 19 +#define TWSS_A1 20 +#define TWSS_A2 21 +#define TWSS_A4 TWSS_A4LETTER +#define TWSS_A7 22 +#define TWSS_A8 23 +#define TWSS_A9 24 +#define TWSS_A10 25 +#define TWSS_ISOB0 26 +#define TWSS_ISOB1 27 +#define TWSS_ISOB2 28 +#define TWSS_ISOB3 TWSS_B3 +#define TWSS_ISOB4 TWSS_B4 +#define TWSS_ISOB5 29 +#define TWSS_ISOB6 TWSS_B6 +#define TWSS_ISOB7 30 +#define TWSS_ISOB8 31 +#define TWSS_ISOB9 32 +#define TWSS_ISOB10 33 +#define TWSS_JISB0 34 +#define TWSS_JISB1 35 +#define TWSS_JISB2 36 +#define TWSS_JISB3 37 +#define TWSS_JISB4 38 +#define TWSS_JISB5 TWSS_B5LETTER +#define TWSS_JISB6 39 +#define TWSS_JISB7 40 +#define TWSS_JISB8 41 +#define TWSS_JISB9 42 +#define TWSS_JISB10 43 +#define TWSS_C0 44 +#define TWSS_C1 45 +#define TWSS_C2 46 +#define TWSS_C3 47 +#define TWSS_C7 48 +#define TWSS_C8 49 +#define TWSS_C9 50 +#define TWSS_C10 51 +#define TWSS_USSTATEMENT 52 +#define TWSS_BUSINESSCARD 53 + +/* ICAP_XFERMECH values (SX_ means Setup XFer) */ +#define TWSX_NATIVE 0 +#define TWSX_FILE 1 +#define TWSX_MEMORY 2 + +/* ICAP_UNITS values (UN_ means UNits) */ +#define TWUN_INCHES 0 +#define TWUN_CENTIMETERS 1 +#define TWUN_PICAS 2 +#define TWUN_POINTS 3 +#define TWUN_TWIPS 4 +#define TWUN_PIXELS 5 + +/* Added 1.5 */ +/* ICAP_BITDEPTHREDUCTION values (BR_ means Bitdepth Reduction) */ +#define TWBR_THRESHOLD 0 +#define TWBR_HALFTONE 1 +#define TWBR_CUSTHALFTONE 2 +#define TWBR_DIFFUSION 3 + +/* Added 1.7 */ +/* ICAP_DUPLEX values */ +#define TWDX_NONE 0 +#define TWDX_1PASSDUPLEX 1 +#define TWDX_2PASSDUPLEX 2 + +/* Added 1.7 */ +/* TWEI_BARCODETYPE values */ +#define TWBT_3OF9 0 +#define TWBT_2OF5INTERLEAVED 1 +#define TWBT_2OF5NONINTERLEAVED 2 +#define TWBT_CODE93 3 +#define TWBT_CODE128 4 +#define TWBT_UCC128 5 +#define TWBT_CODABAR 6 +#define TWBT_UPCA 7 +#define TWBT_UPCE 8 +#define TWBT_EAN8 9 +#define TWBT_EAN13 10 +#define TWBT_POSTNET 11 +#define TWBT_PDF417 12 +/* Added 1.8 */ +#define TWBT_2OF5INDUSTRIAL 13 +#define TWBT_2OF5MATRIX 14 +#define TWBT_2OF5DATALOGIC 15 +#define TWBT_2OF5IATA 16 +#define TWBT_3OF9FULLASCII 17 +#define TWBT_CODABARWITHSTARTSTOP 18 +#define TWBT_MAXICODE 19 + +/* Added 1.7 */ +/* TWEI_DESKEWSTATUS values */ +#define TWDSK_SUCCESS 0 +#define TWDSK_REPORTONLY 1 +#define TWDSK_FAIL 2 +#define TWDSK_DISABLED 3 + +/* Added 1.7 */ +/* TWEI_PATCHCODE values */ +#define TWPCH_PATCH1 0 +#define TWPCH_PATCH2 1 +#define TWPCH_PATCH3 2 +#define TWPCH_PATCH4 3 +#define TWPCH_PATCH6 4 +#define TWPCH_PATCHT 5 + +/* Added 1.7 */ +/* CAP_JOBCONTROL values */ +#define TWJC_NONE 0 +#define TWJC_JSIC 1 +#define TWJC_JSIS 2 +#define TWJC_JSXC 3 +#define TWJC_JSXS 4 + +/* Added 1.7 */ +/* TWEI_BARCODEROTATION values (BCOR_ means barcode rotation) */ +#define TWBCOR_ROT0 0 +#define TWBCOR_ROT90 1 +#define TWBCOR_ROT180 2 +#define TWBCOR_ROT270 3 +#define TWBCOR_ROTX 4 + +/* Added 1.8 */ +/* ACAP_AUDIOFILEFORMAT values (AF_ means audio format) */ +#define TWAF_WAV 0 +#define TWAF_AIFF 1 +#define TWAF_AU 3 +#define TWAF_SND 4 + +/* CAP_ALARMS values (AL_ means alarms) */ +#define TWAL_ALARM 0 +#define TWAL_FEEDERERROR 1 +#define TWAL_FEEDERWARNING 2 +#define TWAL_BARCODE 3 +#define TWAL_DOUBLEFEED 4 +#define TWAL_JAM 5 +#define TWAL_PATCHCODE 6 +#define TWAL_POWER 7 +#define TWAL_SKEW 8 + +/* CAP_CLEARBUFFERS values (CB_ means clear buffers) */ +#define TWCB_AUTO 0 +#define TWCB_CLEAR 1 +#define TWCB_NOCLEAR 2 + +/* CAP_DEVICEEVENT values (DE_ means device event) */ +#define TWDE_CUSTOMEVENTS 0x8000 +#define TWDE_CHECKAUTOMATICCAPTURE 0 +#define TWDE_CHECKBATTERY 1 +#define TWDE_CHECKDEVICEONLINE 2 +#define TWDE_CHECKFLASH 3 +#define TWDE_CHECKPOWERSUPPLY 4 +#define TWDE_CHECKRESOLUTION 5 +#define TWDE_DEVICEADDED 6 +#define TWDE_DEVICEOFFLINE 7 +#define TWDE_DEVICEREADY 8 +#define TWDE_DEVICEREMOVED 9 +#define TWDE_IMAGECAPTURED 10 +#define TWDE_IMAGEDELETED 11 +#define TWDE_PAPERDOUBLEFEED 12 +#define TWDE_PAPERJAM 13 +#define TWDE_LAMPFAILURE 14 +#define TWDE_POWERSAVE 15 +#define TWDE_POWERSAVENOTIFY 16 + +/* CAP_FEEDERALIGNMENT values (FA_ means feeder alignment) */ +#define TWFA_NONE 0 +#define TWFA_LEFT 1 +#define TWFA_CENTER 2 +#define TWFA_RIGHT 3 + +/* CAP_FEEDERORDER values (FO_ means feeder order) */ +#define TWFO_FIRSTPAGEFIRST 0 +#define TWFO_LASTPAGEFIRST 1 + +/* CAP_FILESYSTEM values (FS_ means file system) */ +#define TWFS_FILESYSTEM 0 +#define TWFS_RECURSIVEDELETE 1 + +/* CAP_POWERSUPPLY values (PS_ means power supply) */ +#define TWPS_EXTERNAL 0 +#define TWPS_BATTERY 1 + +/* CAP_PRINTER values (PR_ means printer) */ +#define TWPR_IMPRINTERTOPBEFORE 0 +#define TWPR_IMPRINTERTOPAFTER 1 +#define TWPR_IMPRINTERBOTTOMBEFORE 2 +#define TWPR_IMPRINTERBOTTOMAFTER 3 +#define TWPR_ENDORSERTOPBEFORE 4 +#define TWPR_ENDORSERTOPAFTER 5 +#define TWPR_ENDORSERBOTTOMBEFORE 6 +#define TWPR_ENDORSERBOTTOMAFTER 7 + +/* CAP_PRINTERMODE values (PM_ means printer mode) */ +#define TWPM_SINGLESTRING 0 +#define TWPM_MULTISTRING 1 +#define TWPM_COMPOUNDSTRING 2 + +/* ICAP_BARCODESEARCHMODE values (TWBD_ means search) */ +#define TWBD_HORZ 0 +#define TWBD_VERT 1 +#define TWBD_HORZVERT 2 +#define TWBD_VERTHORZ 3 + +/* ICAP_FLASHUSED2 values (FL_ means flash) */ +#define TWFL_NONE 0 +#define TWFL_OFF 1 +#define TWFL_ON 2 +#define TWFL_AUTO 3 +#define TWFL_REDEYE 4 + +/* ICAP_FLIPROTATION values (FR_ means flip rotation) */ +#define TWFR_BOOK 0 +#define TWFR_FANFOLD 1 + +/* ICAP_IMAGEFILTER values (IF_ means image filter) */ +#define TWIF_NONE 0 +#define TWIF_AUTO 1 +#define TWIF_LOWPASS 2 +#define TWIF_BANDPASS 3 +#define TWIF_HIGHPASS 4 +#define TWIF_TEXT TWIF_BANDPASS +#define TWIF_FINELINE TWIF_HIGHPASS + +/* ICAP_NOISEFILTER values (NF_ means noise filter) */ +#define TWNF_NONE 0 +#define TWNF_AUTO 1 +#define TWNF_LONEPIXEL 2 +#define TWNF_MAJORITYRULE 3 + +/* ICAP_OVERSCAN values (OV_ means overscan) */ +#define TWOV_NONE 0 +#define TWOV_AUTO 1 +#define TWOV_TOPBOTTOM 2 +#define TWOV_LEFTRIGHT 3 +#define TWOV_ALL 4 + +/* TW_FILESYSTEM.FileType values (FT_ means file type) */ +#define TWFY_CAMERA 0 +#define TWFY_CAMERATOP 1 +#define TWFY_CAMERABOTTOM 2 +#define TWFY_CAMERAPREVIEW 3 +#define TWFY_DOMAIN 4 +#define TWFY_HOST 5 +#define TWFY_DIRECTORY 6 +#define TWFY_IMAGE 7 +#define TWFY_UNKNOWN 8 + +/**************************************************************************** + * Country Constants * + ****************************************************************************/ + +#define TWCY_AFGHANISTAN 1001 +#define TWCY_ALGERIA 213 +#define TWCY_AMERICANSAMOA 684 +#define TWCY_ANDORRA 033 +#define TWCY_ANGOLA 1002 +#define TWCY_ANGUILLA 8090 +#define TWCY_ANTIGUA 8091 +#define TWCY_ARGENTINA 54 +#define TWCY_ARUBA 297 +#define TWCY_ASCENSIONI 247 +#define TWCY_AUSTRALIA 61 +#define TWCY_AUSTRIA 43 +#define TWCY_BAHAMAS 8092 +#define TWCY_BAHRAIN 973 +#define TWCY_BANGLADESH 880 +#define TWCY_BARBADOS 8093 +#define TWCY_BELGIUM 32 +#define TWCY_BELIZE 501 +#define TWCY_BENIN 229 +#define TWCY_BERMUDA 8094 +#define TWCY_BHUTAN 1003 +#define TWCY_BOLIVIA 591 +#define TWCY_BOTSWANA 267 +#define TWCY_BRITAIN 6 +#define TWCY_BRITVIRGINIS 8095 +#define TWCY_BRAZIL 55 +#define TWCY_BRUNEI 673 +#define TWCY_BULGARIA 359 +#define TWCY_BURKINAFASO 1004 +#define TWCY_BURMA 1005 +#define TWCY_BURUNDI 1006 +#define TWCY_CAMAROON 237 +#define TWCY_CANADA 2 +#define TWCY_CAPEVERDEIS 238 +#define TWCY_CAYMANIS 8096 +#define TWCY_CENTRALAFREP 1007 +#define TWCY_CHAD 1008 +#define TWCY_CHILE 56 +#define TWCY_CHINA 86 +#define TWCY_CHRISTMASIS 1009 +#define TWCY_COCOSIS 1009 +#define TWCY_COLOMBIA 57 +#define TWCY_COMOROS 1010 +#define TWCY_CONGO 1011 +#define TWCY_COOKIS 1012 +#define TWCY_COSTARICA 506 +#define TWCY_CUBA 005 +#define TWCY_CYPRUS 357 +#define TWCY_CZECHOSLOVAKIA 42 +#define TWCY_DENMARK 45 +#define TWCY_DJIBOUTI 1013 +#define TWCY_DOMINICA 8097 +#define TWCY_DOMINCANREP 8098 +#define TWCY_EASTERIS 1014 +#define TWCY_ECUADOR 593 +#define TWCY_EGYPT 20 +#define TWCY_ELSALVADOR 503 +#define TWCY_EQGUINEA 1015 +#define TWCY_ETHIOPIA 251 +#define TWCY_FALKLANDIS 1016 +#define TWCY_FAEROEIS 298 +#define TWCY_FIJIISLANDS 679 +#define TWCY_FINLAND 358 +#define TWCY_FRANCE 33 +#define TWCY_FRANTILLES 596 +#define TWCY_FRGUIANA 594 +#define TWCY_FRPOLYNEISA 689 +#define TWCY_FUTANAIS 1043 +#define TWCY_GABON 241 +#define TWCY_GAMBIA 220 +#define TWCY_GERMANY 49 +#define TWCY_GHANA 233 +#define TWCY_GIBRALTER 350 +#define TWCY_GREECE 30 +#define TWCY_GREENLAND 299 +#define TWCY_GRENADA 8099 +#define TWCY_GRENEDINES 8015 +#define TWCY_GUADELOUPE 590 +#define TWCY_GUAM 671 +#define TWCY_GUANTANAMOBAY 5399 +#define TWCY_GUATEMALA 502 +#define TWCY_GUINEA 224 +#define TWCY_GUINEABISSAU 1017 +#define TWCY_GUYANA 592 +#define TWCY_HAITI 509 +#define TWCY_HONDURAS 504 +#define TWCY_HONGKONG 852 +#define TWCY_HUNGARY 36 +#define TWCY_ICELAND 354 +#define TWCY_INDIA 91 +#define TWCY_INDONESIA 62 +#define TWCY_IRAN 98 +#define TWCY_IRAQ 964 +#define TWCY_IRELAND 353 +#define TWCY_ISRAEL 972 +#define TWCY_ITALY 39 +#define TWCY_IVORYCOAST 225 +#define TWCY_JAMAICA 8010 +#define TWCY_JAPAN 81 +#define TWCY_JORDAN 962 +#define TWCY_KENYA 254 +#define TWCY_KIRIBATI 1018 +#define TWCY_KOREA 82 +#define TWCY_KUWAIT 965 +#define TWCY_LAOS 1019 +#define TWCY_LEBANON 1020 +#define TWCY_LIBERIA 231 +#define TWCY_LIBYA 218 +#define TWCY_LIECHTENSTEIN 41 +#define TWCY_LUXENBOURG 352 +#define TWCY_MACAO 853 +#define TWCY_MADAGASCAR 1021 +#define TWCY_MALAWI 265 +#define TWCY_MALAYSIA 60 +#define TWCY_MALDIVES 960 +#define TWCY_MALI 1022 +#define TWCY_MALTA 356 +#define TWCY_MARSHALLIS 692 +#define TWCY_MAURITANIA 1023 +#define TWCY_MAURITIUS 230 +#define TWCY_MEXICO 3 +#define TWCY_MICRONESIA 691 +#define TWCY_MIQUELON 508 +#define TWCY_MONACO 33 +#define TWCY_MONGOLIA 1024 +#define TWCY_MONTSERRAT 8011 +#define TWCY_MOROCCO 212 +#define TWCY_MOZAMBIQUE 1025 +#define TWCY_NAMIBIA 264 +#define TWCY_NAURU 1026 +#define TWCY_NEPAL 977 +#define TWCY_NETHERLANDS 31 +#define TWCY_NETHANTILLES 599 +#define TWCY_NEVIS 8012 +#define TWCY_NEWCALEDONIA 687 +#define TWCY_NEWZEALAND 64 +#define TWCY_NICARAGUA 505 +#define TWCY_NIGER 227 +#define TWCY_NIGERIA 234 +#define TWCY_NIUE 1027 +#define TWCY_NORFOLKI 1028 +#define TWCY_NORWAY 47 +#define TWCY_OMAN 968 +#define TWCY_PAKISTAN 92 +#define TWCY_PALAU 1029 +#define TWCY_PANAMA 507 +#define TWCY_PARAGUAY 595 +#define TWCY_PERU 51 +#define TWCY_PHILLIPPINES 63 +#define TWCY_PITCAIRNIS 1030 +#define TWCY_PNEWGUINEA 675 +#define TWCY_POLAND 48 +#define TWCY_PORTUGAL 351 +#define TWCY_QATAR 974 +#define TWCY_REUNIONI 1031 +#define TWCY_ROMANIA 40 +#define TWCY_RWANDA 250 +#define TWCY_SAIPAN 670 +#define TWCY_SANMARINO 39 +#define TWCY_SAOTOME 1033 +#define TWCY_SAUDIARABIA 966 +#define TWCY_SENEGAL 221 +#define TWCY_SEYCHELLESIS 1034 +#define TWCY_SIERRALEONE 1035 +#define TWCY_SINGAPORE 65 +#define TWCY_SOLOMONIS 1036 +#define TWCY_SOMALI 1037 +#define TWCY_SOUTHAFRICA 27 +#define TWCY_SPAIN 34 +#define TWCY_SRILANKA 94 +#define TWCY_STHELENA 1032 +#define TWCY_STKITTS 8013 +#define TWCY_STLUCIA 8014 +#define TWCY_STPIERRE 508 +#define TWCY_STVINCENT 8015 +#define TWCY_SUDAN 1038 +#define TWCY_SURINAME 597 +#define TWCY_SWAZILAND 268 +#define TWCY_SWEDEN 46 +#define TWCY_SWITZERLAND 41 +#define TWCY_SYRIA 1039 +#define TWCY_TAIWAN 886 +#define TWCY_TANZANIA 255 +#define TWCY_THAILAND 66 +#define TWCY_TOBAGO 8016 +#define TWCY_TOGO 228 +#define TWCY_TONGAIS 676 +#define TWCY_TRINIDAD 8016 +#define TWCY_TUNISIA 216 +#define TWCY_TURKEY 90 +#define TWCY_TURKSCAICOS 8017 +#define TWCY_TUVALU 1040 +#define TWCY_UGANDA 256 +#define TWCY_USSR 7 +#define TWCY_UAEMIRATES 971 +#define TWCY_UNITEDKINGDOM 44 +#define TWCY_USA 1 +#define TWCY_URUGUAY 598 +#define TWCY_VANUATU 1041 +#define TWCY_VATICANCITY 39 +#define TWCY_VENEZUELA 58 +#define TWCY_WAKE 1042 +#define TWCY_WALLISIS 1043 +#define TWCY_WESTERNSAHARA 1044 +#define TWCY_WESTERNSAMOA 1045 +#define TWCY_YEMEN 1046 +#define TWCY_YUGOSLAVIA 38 +#define TWCY_ZAIRE 243 +#define TWCY_ZAMBIA 260 +#define TWCY_ZIMBABWE 263 +/* Added for 1.8 */ +#define TWCY_ALBANIA 355 +#define TWCY_ARMENIA 374 +#define TWCY_AZERBAIJAN 994 +#define TWCY_BELARUS 375 +#define TWCY_BOSNIAHERZGO 387 +#define TWCY_CAMBODIA 855 +#define TWCY_CROATIA 385 +#define TWCY_CZECHREPUBLIC 420 +#define TWCY_DIEGOGARCIA 246 +#define TWCY_ERITREA 291 +#define TWCY_ESTONIA 372 +#define TWCY_GEORGIA 995 +#define TWCY_LATVIA 371 +#define TWCY_LESOTHO 266 +#define TWCY_LITHUANIA 370 +#define TWCY_MACEDONIA 389 +#define TWCY_MAYOTTEIS 269 +#define TWCY_MOLDOVA 373 +#define TWCY_MYANMAR 95 +#define TWCY_NORTHKOREA 850 +#define TWCY_PUERTORICO 787 +#define TWCY_RUSSIA 7 +#define TWCY_SERBIA 381 +#define TWCY_SLOVAKIA 421 +#define TWCY_SLOVENIA 386 +#define TWCY_SOUTHKOREA 82 +#define TWCY_UKRAINE 380 +#define TWCY_USVIRGINIS 340 +#define TWCY_VIETNAM 84 + +/**************************************************************************** + * Language Constants * + ****************************************************************************/ + +#define TWLG_DAN 0 /* Danish */ +#define TWLG_DUT 1 /* Dutch */ +#define TWLG_ENG 2 /* International English */ +#define TWLG_FCF 3 /* French Canadian */ +#define TWLG_FIN 4 /* Finnish */ +#define TWLG_FRN 5 /* French */ +#define TWLG_GER 6 /* German */ +#define TWLG_ICE 7 /* Icelandic */ +#define TWLG_ITN 8 /* Italian */ +#define TWLG_NOR 9 /* Norwegian */ +#define TWLG_POR 10 /* Portuguese */ +#define TWLG_SPA 11 /* Spanish */ +#define TWLG_SWE 12 /* Swedish */ +#define TWLG_USA 13 /* U.S. English */ +/* Added for 1.8 */ +#define TWLG_USERLOCALE -1 +#define TWLG_AFRIKAANS 14 +#define TWLG_ALBANIA 15 +#define TWLG_ARABIC 16 +#define TWLG_ARABIC_ALGERIA 17 +#define TWLG_ARABIC_BAHRAIN 18 +#define TWLG_ARABIC_EGYPT 19 +#define TWLG_ARABIC_IRAQ 20 +#define TWLG_ARABIC_JORDAN 21 +#define TWLG_ARABIC_KUWAIT 22 +#define TWLG_ARABIC_LEBANON 23 +#define TWLG_ARABIC_LIBYA 24 +#define TWLG_ARABIC_MOROCCO 25 +#define TWLG_ARABIC_OMAN 26 +#define TWLG_ARABIC_QATAR 27 +#define TWLG_ARABIC_SAUDIARABIA 28 +#define TWLG_ARABIC_SYRIA 29 +#define TWLG_ARABIC_TUNISIA 30 +#define TWLG_ARABIC_UAE 31 /* United Arabic Emirates */ +#define TWLG_ARABIC_YEMEN 32 +#define TWLG_BASQUE 33 +#define TWLG_BYELORUSSIAN 34 +#define TWLG_BULGARIAN 35 +#define TWLG_CATALAN 36 +#define TWLG_CHINESE 37 +#define TWLG_CHINESE_HONGKONG 38 +#define TWLG_CHINESE_PRC 39 /* People's Republic of China */ +#define TWLG_CHINESE_SINGAPORE 40 +#define TWLG_CHINESE_SIMPLIFIED 41 +#define TWLG_CHINESE_TAIWAN 42 +#define TWLG_CHINESE_TRADITIONAL 43 +#define TWLG_CROATIA 44 +#define TWLG_CZECH 45 +#define TWLG_DANISH TWLG_DAN +#define TWLG_DUTCH TWLG_DUT +#define TWLG_DUTCH_BELGIAN 46 +#define TWLG_ENGLISH TWLG_ENG +#define TWLG_ENGLISH_AUSTRALIAN 47 +#define TWLG_ENGLISH_CANADIAN 48 +#define TWLG_ENGLISH_IRELAND 49 +#define TWLG_ENGLISH_NEWZEALAND 50 +#define TWLG_ENGLISH_SOUTHAFRICA 51 +#define TWLG_ENGLISH_UK 52 +#define TWLG_ENGLISH_USA TWLG_USA +#define TWLG_ESTONIAN 53 +#define TWLG_FAEROESE 54 +#define TWLG_FARSI 55 +#define TWLG_FINNISH TWLG_FIN +#define TWLG_FRENCH TWLG_FRN +#define TWLG_FRENCH_BELGIAN 56 +#define TWLG_FRENCH_CANADIAN TWLG_FCF +#define TWLG_FRENCH_LUXEMBOURG 57 +#define TWLG_FRENCH_SWISS 58 +#define TWLG_GERMAN TWLG_GER +#define TWLG_GERMAN_AUSTRIAN 59 +#define TWLG_GERMAN_LUXEMBOURG 60 +#define TWLG_GERMAN_LIECHTENSTEIN 61 +#define TWLG_GERMAN_SWISS 62 +#define TWLG_GREEK 63 +#define TWLG_HEBREW 64 +#define TWLG_HUNGARIAN 65 +#define TWLG_ICELANDIC TWLG_ICE +#define TWLG_INDONESIAN 66 +#define TWLG_ITALIAN TWLG_ITN +#define TWLG_ITALIAN_SWISS 67 +#define TWLG_JAPANESE 68 +#define TWLG_KOREAN 69 +#define TWLG_KOREAN_JOHAB 70 +#define TWLG_LATVIAN 71 +#define TWLG_LITHUANIAN 72 +#define TWLG_NORWEGIAN TWLG_NOR +#define TWLG_NORWEGIAN_BOKMAL 73 +#define TWLG_NORWEGIAN_NYNORSK 74 +#define TWLG_POLISH 75 +#define TWLG_PORTUGUESE TWLG_POR +#define TWLG_PORTUGUESE_BRAZIL 76 +#define TWLG_ROMANIAN 77 +#define TWLG_RUSSIAN 78 +#define TWLG_SERBIAN_LATIN 79 +#define TWLG_SLOVAK 80 +#define TWLG_SLOVENIAN 81 +#define TWLG_SPANISH TWLG_SPA +#define TWLG_SPANISH_MEXICAN 82 +#define TWLG_SPANISH_MODERN 83 +#define TWLG_SWEDISH TWLG_SWE +#define TWLG_THAI 84 +#define TWLG_TURKISH 85 +#define TWLG_UKRANIAN 86 +/* More stuff added for 1.8 */ +#define TWLG_ASSAMESE 87 +#define TWLG_BENGALI 88 +#define TWLG_BIHARI 89 +#define TWLG_BODO 90 +#define TWLG_DOGRI 91 +#define TWLG_GUJARATI 92 +#define TWLG_HARYANVI 93 +#define TWLG_HINDI 94 +#define TWLG_KANNADA 95 +#define TWLG_KASHMIRI 96 +#define TWLG_MALAYALAM 97 +#define TWLG_MARATHI 98 +#define TWLG_MARWARI 99 +#define TWLG_MEGHALAYAN 100 +#define TWLG_MIZO 101 +#define TWLG_NAGA 102 +#define TWLG_ORISSI 103 +#define TWLG_PUNJABI 104 +#define TWLG_PUSHTU 105 +#define TWLG_SERBIAN_CYRILLIC 106 +#define TWLG_SIKKIMI 107 +#define TWLG_SWEDISH_FINLAND 108 +#define TWLG_TAMIL 109 +#define TWLG_TELUGU 110 +#define TWLG_TRIPURI 111 +#define TWLG_URDU 112 +#define TWLG_VIETNAMESE 113 + +/**************************************************************************** + * Data Groups * + ****************************************************************************/ + +/* More Data Groups may be added in the future. + * Possible candidates include text, vector graphics, sound, etc. + * NOTE: Data Group constants must be powers of 2 as they are used + * as bitflags when Application asks DSM to present a list of DSs. + */ + +#define DG_CONTROL 0x0001L /* data pertaining to control */ +#define DG_IMAGE 0x0002L /* data pertaining to raster images */ +/* Added 1.8 */ +#define DG_AUDIO 0x0004L /* data pertaining to audio */ + +/**************************************************************************** + * Data Argument Types * + ****************************************************************************/ + +/* SDH - 03/23/95 - WATCH */ +/* The thunker requires knowledge about size of data being passed in the */ +/* lpData parameter to DS_Entry (which is not readily available due to */ +/* type LPVOID. Thus, we key off the DAT_ argument to determine the size. */ +/* This has a couple implications: */ +/* 1) Any additional DAT_ features require modifications to the thunk code */ +/* for thunker support. */ +/* 2) Any applications which use the custom capabilities are not supported */ +/* under thunking since we have no way of knowing what size data (if */ +/* any) is being passed. */ + +#define DAT_NULL 0x0000 /* No data or structure. */ +#define DAT_CUSTOMBASE 0x8000 /* Base of custom DATs. */ + +/* Data Argument Types for the DG_CONTROL Data Group. */ +#define DAT_CAPABILITY 0x0001 /* TW_CAPABILITY */ +#define DAT_EVENT 0x0002 /* TW_EVENT */ +#define DAT_IDENTITY 0x0003 /* TW_IDENTITY */ +#define DAT_PARENT 0x0004 /* TW_HANDLE, application win handle in Windows */ +#define DAT_PENDINGXFERS 0x0005 /* TW_PENDINGXFERS */ +#define DAT_SETUPMEMXFER 0x0006 /* TW_SETUPMEMXFER */ +#define DAT_SETUPFILEXFER 0x0007 /* TW_SETUPFILEXFER */ +#define DAT_STATUS 0x0008 /* TW_STATUS */ +#define DAT_USERINTERFACE 0x0009 /* TW_USERINTERFACE */ +#define DAT_XFERGROUP 0x000a /* TW_UINT32 */ +/* SDH - 03/21/95 - TWUNK */ +/* Additional message required for thunker to request the special */ +/* identity information. */ +#define DAT_TWUNKIDENTITY 0x000b /* TW_TWUNKIDENTITY */ +#define DAT_CUSTOMDSDATA 0x000c /* TW_CUSTOMDSDATA. */ +/* Added 1.8 */ +#define DAT_DEVICEEVENT 0x000d /* TW_DEVICEEVENT */ +#define DAT_FILESYSTEM 0x000e /* TW_FILESYSTEM */ +#define DAT_PASSTHRU 0x000f /* TW_PASSTHRU */ + +/* Data Argument Types for the DG_IMAGE Data Group. */ +#define DAT_IMAGEINFO 0x0101 /* TW_IMAGEINFO */ +#define DAT_IMAGELAYOUT 0x0102 /* TW_IMAGELAYOUT */ +#define DAT_IMAGEMEMXFER 0x0103 /* TW_IMAGEMEMXFER */ +#define DAT_IMAGENATIVEXFER 0x0104 /* TW_UINT32 loword is hDIB, PICHandle */ +#define DAT_IMAGEFILEXFER 0x0105 /* Null data */ +#define DAT_CIECOLOR 0x0106 /* TW_CIECOLOR */ +#define DAT_GRAYRESPONSE 0x0107 /* TW_GRAYRESPONSE */ +#define DAT_RGBRESPONSE 0x0108 /* TW_RGBRESPONSE */ +#define DAT_JPEGCOMPRESSION 0x0109 /* TW_JPEGCOMPRESSION */ +#define DAT_PALETTE8 0x010a /* TW_PALETTE8 */ +#define DAT_EXTIMAGEINFO 0x010b /* TW_EXTIMAGEINFO -- for 1.7 Spec. */ + +/* Added 1.8 */ +/* Data Argument Types for the DG_AUDIO Data Group. */ +#define DAT_AUDIOFILEXFER 0x0201 /* Null data */ +#define DAT_AUDIOINFO 0x0202 /* TW_AUDIOINFO */ +#define DAT_AUDIONATIVEXFER 0x0203 /* TW_UINT32 handle to WAV, (AIFF Mac) */ + +/**************************************************************************** + * Messages * + ****************************************************************************/ + +/* All message constants are unique. + * Messages are grouped according to which DATs they are used with.*/ + +#define MSG_NULL 0x0000 /* Used in TW_EVENT structure */ +#define MSG_CUSTOMBASE 0x8000 /* Base of custom messages */ + +/* Generic messages may be used with any of several DATs. */ +#define MSG_GET 0x0001 /* Get one or more values */ +#define MSG_GETCURRENT 0x0002 /* Get current value */ +#define MSG_GETDEFAULT 0x0003 /* Get default (e.g. power up) value */ +#define MSG_GETFIRST 0x0004 /* Get first of a series of items, e.g. DSs */ +#define MSG_GETNEXT 0x0005 /* Iterate through a series of items. */ +#define MSG_SET 0x0006 /* Set one or more values */ +#define MSG_RESET 0x0007 /* Set current value to default value */ +#define MSG_QUERYSUPPORT 0x0008 /* Get supported operations on the cap. */ + +/* Messages used with DAT_NULL */ +#define MSG_XFERREADY 0x0101 /* The data source has data ready */ +#define MSG_CLOSEDSREQ 0x0102 /* Request for Application. to close DS */ +#define MSG_CLOSEDSOK 0x0103 /* Tell the Application. to save the state. */ +/* Added 1.8 */ +#define MSG_DEVICEEVENT 0X0104 /* Some event has taken place */ + +/* Messages used with a pointer to a DAT_STATUS structure */ +#define MSG_CHECKSTATUS 0x0201 /* Get status information */ + +/* Messages used with a pointer to DAT_PARENT data */ +#define MSG_OPENDSM 0x0301 /* Open the DSM */ +#define MSG_CLOSEDSM 0x0302 /* Close the DSM */ + +/* Messages used with a pointer to a DAT_IDENTITY structure */ +#define MSG_OPENDS 0x0401 /* Open a data source */ +#define MSG_CLOSEDS 0x0402 /* Close a data source */ +#define MSG_USERSELECT 0x0403 /* Put up a dialog of all DS */ + +/* Messages used with a pointer to a DAT_USERINTERFACE structure */ +#define MSG_DISABLEDS 0x0501 /* Disable data transfer in the DS */ +#define MSG_ENABLEDS 0x0502 /* Enable data transfer in the DS */ +#define MSG_ENABLEDSUIONLY 0x0503 /* Enable for saving DS state only. */ + +/* Messages used with a pointer to a DAT_EVENT structure */ +#define MSG_PROCESSEVENT 0x0601 + +/* Messages used with a pointer to a DAT_PENDINGXFERS structure */ +#define MSG_ENDXFER 0x0701 + +/* Added 1.8 */ +/* Messages used with a pointer to a DAT_FILESYSTEM structure */ +#define MSG_CHANGEDIRECTORY 0x0801 +#define MSG_CREATEDIRECTORY 0x0802 +#define MSG_DELETE 0x0803 +#define MSG_FORMATMEDIA 0x0804 +#define MSG_GETCLOSE 0x0805 +#define MSG_GETFIRSTFILE 0x0806 +#define MSG_GETINFO 0x0807 +#define MSG_GETNEXTFILE 0x0808 +#define MSG_RENAME 0x0809 + +/* Messages used with a pointer to a DAT_PASSTHRU structure */ +#define MSG_PASSTHRU 0x0901 + +/**************************************************************************** + * Capabilities * + ****************************************************************************/ + +#define CAP_CUSTOMBASE 0x8000 /* Base of custom capabilities */ + +/* all data sources are REQUIRED to support these caps */ +#define CAP_XFERCOUNT 0x0001 + +/* image data sources are REQUIRED to support these caps */ +#define ICAP_COMPRESSION 0x0100 +#define ICAP_PIXELTYPE 0x0101 +#define ICAP_UNITS 0x0102 /* default is TWUN_INCHES */ +#define ICAP_XFERMECH 0x0103 + +/* all data sources MAY support these caps */ +#define CAP_AUTHOR 0x1000 +#define CAP_CAPTION 0x1001 +#define CAP_FEEDERENABLED 0x1002 +#define CAP_FEEDERLOADED 0x1003 +#define CAP_TIMEDATE 0x1004 +#define CAP_SUPPORTEDCAPS 0x1005 +#define CAP_EXTENDEDCAPS 0x1006 +#define CAP_AUTOFEED 0x1007 +#define CAP_CLEARPAGE 0x1008 +#define CAP_FEEDPAGE 0x1009 +#define CAP_REWINDPAGE 0x100a +#define CAP_INDICATORS 0x100b /* Added 1.1 */ +#define CAP_SUPPORTEDCAPSEXT 0x100c /* Added 1.6 */ +#define CAP_PAPERDETECTABLE 0x100d /* Added 1.6 */ +#define CAP_UICONTROLLABLE 0x100e /* Added 1.6 */ +#define CAP_DEVICEONLINE 0x100f /* Added 1.6 */ +#define CAP_AUTOSCAN 0x1010 /* Added 1.6 */ +#define CAP_THUMBNAILSENABLED 0x1011 /* Added 1.7 */ +#define CAP_DUPLEX 0x1012 /* Added 1.7 */ +#define CAP_DUPLEXENABLED 0x1013 /* Added 1.7 */ +#define CAP_ENABLEDSUIONLY 0x1014 /* Added 1.7 */ +#define CAP_CUSTOMDSDATA 0x1015 /* Added 1.7 */ +#define CAP_ENDORSER 0x1016 /* Added 1.7 */ +#define CAP_JOBCONTROL 0x1017 /* Added 1.7 */ +#define CAP_ALARMS 0x1018 /* Added 1.8 */ +#define CAP_ALARMVOLUME 0x1019 /* Added 1.8 */ +#define CAP_AUTOMATICCAPTURE 0x101a /* Added 1.8 */ +#define CAP_TIMEBEFOREFIRSTCAPTURE 0x101b /* Added 1.8 */ +#define CAP_TIMEBETWEENCAPTURES 0x101c /* Added 1.8 */ +#define CAP_CLEARBUFFERS 0x101d /* Added 1.8 */ +#define CAP_MAXBATCHBUFFERS 0x101e /* Added 1.8 */ +#define CAP_DEVICETIMEDATE 0x101f /* Added 1.8 */ +#define CAP_POWERSUPPLY 0x1020 /* Added 1.8 */ +#define CAP_CAMERAPREVIEWUI 0x1021 /* Added 1.8 */ +#define CAP_DEVICEEVENT 0x1022 /* Added 1.8 */ +#define CAP_PAGEMULTIPLEACQUIRE 0x1023 /* Added 1.8 */ +#define CAP_SERIALNUMBER 0x1024 /* Added 1.8 */ +#define CAP_FILESYSTEM 0x1025 /* Added 1.8 */ +#define CAP_PRINTER 0x1026 /* Added 1.8 */ +#define CAP_PRINTERENABLED 0x1027 /* Added 1.8 */ +#define CAP_PRINTERINDEX 0x1028 /* Added 1.8 */ +#define CAP_PRINTERMODE 0x1029 /* Added 1.8 */ +#define CAP_PRINTERSTRING 0x102a /* Added 1.8 */ +#define CAP_PRINTERSUFFIX 0x102b /* Added 1.8 */ +#define CAP_LANGUAGE 0x102c /* Added 1.8 */ +#define CAP_FEEDERALIGNMENT 0x102d /* Added 1.8 */ +#define CAP_FEEDERORDER 0x102e /* Added 1.8 */ +#define CAP_PAPERBINDING 0x102f /* Added 1.8 */ +#define CAP_REACQUIREALLOWED 0x1030 /* Added 1.8 */ +#define CAP_PASSTHRU 0x1031 /* Added 1.8 */ +#define CAP_BATTERYMINUTES 0x1032 /* Added 1.8 */ +#define CAP_BATTERYPERCENTAGE 0x1033 /* Added 1.8 */ +#define CAP_POWERDOWNTIME 0x1034 /* Added 1.8 */ + +/* image data sources MAY support these caps */ +#define ICAP_AUTOBRIGHT 0x1100 +#define ICAP_BRIGHTNESS 0x1101 +#define ICAP_CONTRAST 0x1103 +#define ICAP_CUSTHALFTONE 0x1104 +#define ICAP_EXPOSURETIME 0x1105 +#define ICAP_FILTER 0x1106 +#define ICAP_FLASHUSED 0x1107 +#define ICAP_GAMMA 0x1108 +#define ICAP_HALFTONES 0x1109 +#define ICAP_HIGHLIGHT 0x110a +#define ICAP_IMAGEFILEFORMAT 0x110c +#define ICAP_LAMPSTATE 0x110d +#define ICAP_LIGHTSOURCE 0x110e +#define ICAP_ORIENTATION 0x1110 +#define ICAP_PHYSICALWIDTH 0x1111 +#define ICAP_PHYSICALHEIGHT 0x1112 +#define ICAP_SHADOW 0x1113 +#define ICAP_FRAMES 0x1114 +#define ICAP_XNATIVERESOLUTION 0x1116 +#define ICAP_YNATIVERESOLUTION 0x1117 +#define ICAP_XRESOLUTION 0x1118 +#define ICAP_YRESOLUTION 0x1119 +#define ICAP_MAXFRAMES 0x111a +#define ICAP_TILES 0x111b +#define ICAP_BITORDER 0x111c +#define ICAP_CCITTKFACTOR 0x111d +#define ICAP_LIGHTPATH 0x111e +#define ICAP_PIXELFLAVOR 0x111f +#define ICAP_PLANARCHUNKY 0x1120 +#define ICAP_ROTATION 0x1121 +#define ICAP_SUPPORTEDSIZES 0x1122 +#define ICAP_THRESHOLD 0x1123 +#define ICAP_XSCALING 0x1124 +#define ICAP_YSCALING 0x1125 +#define ICAP_BITORDERCODES 0x1126 +#define ICAP_PIXELFLAVORCODES 0x1127 +#define ICAP_JPEGPIXELTYPE 0x1128 +#define ICAP_TIMEFILL 0x112a +#define ICAP_BITDEPTH 0x112b +#define ICAP_BITDEPTHREDUCTION 0x112c /* Added 1.5 */ +#define ICAP_UNDEFINEDIMAGESIZE 0x112d /* Added 1.6 */ +#define ICAP_IMAGEDATASET 0x112e /* Added 1.7 */ +#define ICAP_EXTIMAGEINFO 0x112f /* Added 1.7 */ +#define ICAP_MINIMUMHEIGHT 0x1130 /* Added 1.7 */ +#define ICAP_MINIMUMWIDTH 0x1131 /* Added 1.7 */ +#define ICAP_AUTODISCARDBLANKPAGES 0x1134 /* Added 1.8 */ +#define ICAP_FLIPROTATION 0x1136 /* Added 1.8 */ +#define ICAP_BARCODEDETECTIONENABLED 0x1137 /* Added 1.8 */ +#define ICAP_SUPPORTEDBARCODETYPES 0x1138 /* Added 1.8 */ +#define ICAP_BARCODEMAXSEARCHPRIORITIES 0x1139 /* Added 1.8 */ +#define ICAP_BARCODESEARCHPRIORITIES 0x113a /* Added 1.8 */ +#define ICAP_BARCODESEARCHMODE 0x113b /* Added 1.8 */ +#define ICAP_BARCODEMAXRETRIES 0x113c /* Added 1.8 */ +#define ICAP_BARCODETIMEOUT 0x113d /* Added 1.8 */ +#define ICAP_ZOOMFACTOR 0x113e /* Added 1.8 */ +#define ICAP_PATCHCODEDETECTIONENABLED 0x113f /* Added 1.8 */ +#define ICAP_SUPPORTEDPATCHCODETYPES 0x1140 /* Added 1.8 */ +#define ICAP_PATCHCODEMAXSEARCHPRIORITIES 0x1141 /* Added 1.8 */ +#define ICAP_PATCHCODESEARCHPRIORITIES 0x1142 /* Added 1.8 */ +#define ICAP_PATCHCODESEARCHMODE 0x1143 /* Added 1.8 */ +#define ICAP_PATCHCODEMAXRETRIES 0x1144 /* Added 1.8 */ +#define ICAP_PATCHCODETIMEOUT 0x1145 /* Added 1.8 */ +#define ICAP_FLASHUSED2 0x1146 /* Added 1.8 */ +#define ICAP_IMAGEFILTER 0x1147 /* Added 1.8 */ +#define ICAP_NOISEFILTER 0x1148 /* Added 1.8 */ +#define ICAP_OVERSCAN 0x1149 /* Added 1.8 */ +#define ICAP_AUTOMATICBORDERDETECTION 0x1150 /* Added 1.8 */ +#define ICAP_AUTOMATICDESKEW 0x1151 /* Added 1.8 */ +#define ICAP_AUTOMATICROTATE 0x1152 /* Added 1.8 */ + +/* image data sources MAY support these audio caps */ +#define ACAP_AUDIOFILEFORMAT 0x1201 /* Added 1.8 */ +#define ACAP_XFERMECH 0x1202 /* Added 1.8 */ + +/* ----------------------------------------------------------------------- *\ + + Version 1.7: Following is Extended Image Info Attributes. + July 1997 + KHL + +\* ----------------------------------------------------------------------- */ + +#define TWEI_BARCODEX 0x1200 +#define TWEI_BARCODEY 0x1201 +#define TWEI_BARCODETEXT 0x1202 +#define TWEI_BARCODETYPE 0x1203 +#define TWEI_DESHADETOP 0x1204 +#define TWEI_DESHADELEFT 0x1205 +#define TWEI_DESHADEHEIGHT 0x1206 +#define TWEI_DESHADEWIDTH 0x1207 +#define TWEI_DESHADESIZE 0x1208 +#define TWEI_SPECKLESREMOVED 0x1209 +#define TWEI_HORZLINEXCOORD 0x120A +#define TWEI_HORZLINEYCOORD 0x120B +#define TWEI_HORZLINELENGTH 0x120C +#define TWEI_HORZLINETHICKNESS 0x120D +#define TWEI_VERTLINEXCOORD 0x120E +#define TWEI_VERTLINEYCOORD 0x120F +#define TWEI_VERTLINELENGTH 0x1210 +#define TWEI_VERTLINETHICKNESS 0x1211 +#define TWEI_PATCHCODE 0x1212 +#define TWEI_ENDORSEDTEXT 0x1213 +#define TWEI_FORMCONFIDENCE 0x1214 +#define TWEI_FORMTEMPLATEMATCH 0x1215 +#define TWEI_FORMTEMPLATEPAGEMATCH 0x1216 +#define TWEI_FORMHORZDOCOFFSET 0x1217 +#define TWEI_FORMVERTDOCOFFSET 0x1218 +#define TWEI_BARCODECOUNT 0x1219 +#define TWEI_BARCODECONFIDENCE 0x121A +#define TWEI_BARCODEROTATION 0x121B +#define TWEI_BARCODETEXTLENGTH 0x121C +#define TWEI_DESHADECOUNT 0x121D +#define TWEI_DESHADEBLACKCOUNTOLD 0x121E +#define TWEI_DESHADEBLACKCOUNTNEW 0x121F +#define TWEI_DESHADEBLACKRLMIN 0x1220 +#define TWEI_DESHADEBLACKRLMAX 0x1221 +#define TWEI_DESHADEWHITECOUNTOLD 0x1222 +#define TWEI_DESHADEWHITECOUNTNEW 0x1223 +#define TWEI_DESHADEWHITERLMIN 0x1224 +#define TWEI_DESHADEWHITERLAVE 0x1225 +#define TWEI_DESHADEWHITERLMAX 0x1226 +#define TWEI_BLACKSPECKLESREMOVED 0x1227 +#define TWEI_WHITESPECKLESREMOVED 0x1228 +#define TWEI_HORZLINECOUNT 0x1229 +#define TWEI_VERTLINECOUNT 0x122A +#define TWEI_DESKEWSTATUS 0x122B +#define TWEI_SKEWORIGINALANGLE 0x122C +#define TWEI_SKEWFINALANGLE 0x122D +#define TWEI_SKEWCONFIDENCE 0x122E +#define TWEI_SKEWWINDOWX1 0x122F +#define TWEI_SKEWWINDOWY1 0x1230 +#define TWEI_SKEWWINDOWX2 0x1231 +#define TWEI_SKEWWINDOWY2 0x1232 +#define TWEI_SKEWWINDOWX3 0x1233 +#define TWEI_SKEWWINDOWY3 0x1234 +#define TWEI_SKEWWINDOWX4 0x1235 +#define TWEI_SKEWWINDOWY4 0x1236 + +#define TWEJ_NONE 0x0000 +#define TWEJ_MIDSEPARATOR 0x0001 +#define TWEJ_PATCH1 0x0002 +#define TWEJ_PATCH2 0x0003 +#define TWEJ_PATCH3 0x0004 +#define TWEJ_PATCH4 0x0005 +#define TWEJ_PATCH6 0x0006 +#define TWEJ_PATCHT 0x0007 + +/*************************************************************************** + * Return Codes and Condition Codes section * + ***************************************************************************/ + +/* Return Codes: DSM_Entry and DS_Entry may return any one of these values. */ +#define TWRC_CUSTOMBASE 0x8000 + +#define TWRC_SUCCESS 0 +#define TWRC_FAILURE 1 /* Application may get TW_STATUS for info on failure */ +#define TWRC_CHECKSTATUS 2 /* "tried hard"; get status */ +#define TWRC_CANCEL 3 +#define TWRC_DSEVENT 4 +#define TWRC_NOTDSEVENT 5 +#define TWRC_XFERDONE 6 +#define TWRC_ENDOFLIST 7 /* After MSG_GETNEXT if nothing left */ +#define TWRC_INFONOTSUPPORTED 8 +#define TWRC_DATANOTAVAILABLE 9 + +/* Condition Codes: Application gets these by doing DG_CONTROL DAT_STATUS MSG_GET. */ +#define TWCC_CUSTOMBASE 0x8000 + +#define TWCC_SUCCESS 0 /* It worked! */ +#define TWCC_BUMMER 1 /* Failure due to unknown causes */ +#define TWCC_LOWMEMORY 2 /* Not enough memory to perform operation */ +#define TWCC_NODS 3 /* No Data Source */ +#define TWCC_MAXCONNECTIONS 4 /* DS is connected to max possible applications */ +#define TWCC_OPERATIONERROR 5 /* DS or DSM reported error, application shouldn't */ +#define TWCC_BADCAP 6 /* Unknown capability */ +#define TWCC_BADPROTOCOL 9 /* Unrecognized MSG DG DAT combination */ +#define TWCC_BADVALUE 10 /* Data parameter out of range */ +#define TWCC_SEQERROR 11 /* DG DAT MSG out of expected sequence */ +#define TWCC_BADDEST 12 /* Unknown destination Application/Source in DSM_Entry */ +#define TWCC_CAPUNSUPPORTED 13 /* Capability not supported by source */ +#define TWCC_CAPBADOPERATION 14 /* Operation not supported by capability */ +#define TWCC_CAPSEQERROR 15 /* Capability has dependency on other capability */ +/* Added 1.8 */ +#define TWCC_DENIED 16 /* File System operation is denied (file is protected) */ +#define TWCC_FILEEXISTS 17 /* Operation failed because file already exists. */ +#define TWCC_FILENOTFOUND 18 /* File not found */ +#define TWCC_NOTEMPTY 19 /* Operation failed because directory is not empty */ +#define TWCC_PAPERJAM 20 /* The feeder is jammed */ +#define TWCC_PAPERDOUBLEFEED 21 /* The feeder detected multiple pages */ +#define TWCC_FILEWRITEERROR 22 /* Error writing the file (meant for things like disk full conditions) */ +#define TWCC_CHECKDEVICEONLINE 23 /* The device went offline prior to or during this operation */ + + +/* bit patterns: for query the operation that are supported by the data source on a capability */ +/* Application gets these through DG_CONTROL/DAT_CAPABILITY/MSG_QUERYSUPPORT */ +/* Added 1.6 */ +#define TWQC_GET 0x0001 +#define TWQC_SET 0x0002 +#define TWQC_GETDEFAULT 0x0004 +#define TWQC_GETCURRENT 0x0008 +#define TWQC_RESET 0x0010 + + +/**************************************************************************** + * Entry Points * + ****************************************************************************/ + +/********************************************************************** + * Function: DSM_Entry, the only entry point into the Data Source Manager. + * + * Parameters: + * pOrigin Identifies the source module of the message. This could + * identify an Application, a Source, or the Source Manager. + * + * pDest Identifies the destination module for the message. + * This could identify an application or a data source. + * If this is NULL, the message goes to the Source Manager. + * + * DG The Data Group. + * Example: DG_IMAGE. + * + * DAT The Data Attribute Type. + * Example: DAT_IMAGEMEMXFER. + * + * MSG The message. Messages are interpreted by the destination module + * with respect to the Data Group and the Data Attribute Type. + * Example: MSG_GET. + * + * pData A pointer to the data structure or variable identified + * by the Data Attribute Type. + * Example: (TW_MEMREF)&ImageMemXfer + * where ImageMemXfer is a TW_IMAGEMEMXFER structure. + * + * Returns: + * ReturnCode + * Example: TWRC_SUCCESS. + * + ********************************************************************/ + +/* Don't mangle the name "DSM_Entry" if we're compiling in C++! */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#ifdef _MSWIN_ +TW_UINT16 FAR PASCAL DSM_Entry( pTW_IDENTITY pOrigin, + pTW_IDENTITY pDest, + TW_UINT32 DG, + TW_UINT16 DAT, + TW_UINT16 MSG, + TW_MEMREF pData); + +typedef TW_UINT16 (FAR PASCAL *DSMENTRYPROC)(pTW_IDENTITY, pTW_IDENTITY, + TW_UINT32, TW_UINT16, + TW_UINT16, TW_MEMREF); +#else /* _MSWIN_ */ + +/*FAR PASCAL TW_UINT16 DSM_Entry( pTW_IDENTITY pOrigin, + pTW_IDENTITY pDest, + TW_UINT32 DG, + TW_UINT16 DAT, + TW_UINT16 MSG, + TW_MEMREF pData);*/ + +typedef TW_UINT16 (*DSMENTRYPROC)(pTW_IDENTITY, pTW_IDENTITY, + TW_UINT32, TW_UINT16, + TW_UINT16, TW_MEMREF); +#endif /* _MSWIN_ */ + +#ifdef __cplusplus +} +#endif /* cplusplus */ + + +/********************************************************************** + * Function: DS_Entry, the entry point provided by a Data Source. + * + * Parameters: + * pOrigin Identifies the source module of the message. This could + * identify an application or the Data Source Manager. + * + * DG The Data Group. + * Example: DG_IMAGE. + * + * DAT The Data Attribute Type. + * Example: DAT_IMAGEMEMXFER. + * + * MSG The message. Messages are interpreted by the data source + * with respect to the Data Group and the Data Attribute Type. + * Example: MSG_GET. + * + * pData A pointer to the data structure or variable identified + * by the Data Attribute Type. + * Example: (TW_MEMREF)&ImageMemXfer + * where ImageMemXfer is a TW_IMAGEMEMXFER structure. + * + * Returns: + * ReturnCode + * Example: TWRC_SUCCESS. + * + * Note: + * The DSPROC type is only used by an application when it calls + * a Data Source directly, bypassing the Data Source Manager. + * + ********************************************************************/ +/* Don't mangle the name "DS_Entry" if we're compiling in C++! */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ +#ifdef _MSWIN_ + TW_UINT16 DECLSPEC_EXPORT PASCAL DS_Entry (pTW_IDENTITY pOrigin, + TW_UINT32 DG, + TW_UINT16 DAT, + TW_UINT16 MSG, + TW_MEMREF pData); + + typedef TW_UINT16 (FAR PASCAL *DSENTRYPROC) (pTW_IDENTITY pOrigin, + TW_UINT32 DG, + TW_UINT16 DAT, + TW_UINT16 MSG, + TW_MEMREF pData); +#else /* _MSWIN_ */ +/*FAR PASCAL TW_UINT16 DS_Entry( pTW_IDENTITY pOrigin, + TW_UINT32 DG, + TW_UINT16 DAT, + TW_UINT16 MSG, + TW_MEMREF pData);*/ + +typedef TW_UINT16 (*DSENTRYPROC)(pTW_IDENTITY, + TW_UINT32, TW_UINT16, + TW_UINT16, TW_MEMREF); +#endif /* _MSWIN_ */ +#ifdef __cplusplus +} +#endif /* cplusplus */ + +/* The Twain structures must be packed on 2 byte alignment */ +#include "poppack.h" + +#endif /* TWAIN */ Propchange: trunk/reactos/include/psdk/twain.h ------------------------------------------------------------------------------ svn:eol-style = native
15 years, 10 months
1
0
0
0
[dchapyshev] 39791: - Add winetests for msctf, msvfw32, ntdsapi, ntprint, oleacc
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Fri Feb 27 19:45:02 2009 New Revision: 39791 URL:
http://svn.reactos.org/svn/reactos?rev=39791&view=rev
Log: - Add winetests for msctf, msvfw32, ntdsapi, ntprint, oleacc Added: trunk/rostests/winetests/msctf/ (with props) trunk/rostests/winetests/msctf/inputprocessor.c (with props) trunk/rostests/winetests/msctf/msctf.rbuild (with props) trunk/rostests/winetests/msctf/testlist.c (with props) trunk/rostests/winetests/msvfw32/ (with props) trunk/rostests/winetests/msvfw32/msvfw.c (with props) trunk/rostests/winetests/msvfw32/msvfw32.rbuild (with props) trunk/rostests/winetests/msvfw32/testlist.c (with props) trunk/rostests/winetests/ntdsapi/ (with props) trunk/rostests/winetests/ntdsapi/ntdsapi.c (with props) trunk/rostests/winetests/ntdsapi/ntdsapi.rbuild (with props) trunk/rostests/winetests/ntdsapi/testlist.c (with props) trunk/rostests/winetests/ntprint/ (with props) trunk/rostests/winetests/ntprint/ntprint.c (with props) trunk/rostests/winetests/ntprint/ntprint.rbuild (with props) trunk/rostests/winetests/ntprint/testlist.c (with props) trunk/rostests/winetests/oleacc/ (with props) trunk/rostests/winetests/oleacc/main.c (with props) trunk/rostests/winetests/oleacc/oleacc.rbuild (with props) trunk/rostests/winetests/oleacc/testlist.c (with props) Modified: trunk/rostests/winetests/directory.rbuild Modified: trunk/rostests/winetests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/directory.rbuil…
============================================================================== --- trunk/rostests/winetests/directory.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/directory.rbuild [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -91,6 +91,9 @@ <directory name="msacm32"> <xi:include href="msacm32/msacm32.rbuild" /> </directory> + <directory name="msctf"> + <xi:include href="msctf/msctf.rbuild" /> + </directory> <directory name="mshtml"> <xi:include href="mshtml/mshtml.rbuild" /> </directory> @@ -103,6 +106,9 @@ <directory name="msvcrt"> <xi:include href="msvcrt/msvcrt.rbuild" /> </directory> + <directory name="msvfw32"> + <xi:include href="msvfw32/msvfw32.rbuild" /> + </directory> <directory name="msxml3"> <xi:include href="msxml3/msxml3.rbuild" /> </directory> @@ -112,11 +118,20 @@ <directory name="ntdll"> <xi:include href="ntdll/ntdll.rbuild" /> </directory> + <directory name="ntdsapi"> + <xi:include href="ntdsapi/ntdsapi.rbuild" /> + </directory> + <directory name="ntprint"> + <xi:include href="ntprint/ntprint.rbuild" /> + </directory> <directory name="odbccp32"> <xi:include href="odbccp32/odbccp32.rbuild" /> </directory> <directory name="ole32"> <xi:include href="ole32/ole32.rbuild" /> + </directory> + <directory name="oleacc"> + <xi:include href="oleacc/oleacc.rbuild" /> </directory> <directory name="oleaut32"> <xi:include href="oleaut32/oleaut32.rbuild" /> Propchange: trunk/rostests/winetests/msctf/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Fri Feb 27 19:45:02 2009 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rostests/winetests/msctf/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rostests/winetests/msctf/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/winetests/msctf/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/rostests/winetests/msctf/inputprocessor.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msctf/inputproc…
============================================================================== --- trunk/rostests/winetests/msctf/inputprocessor.c (added) +++ trunk/rostests/winetests/msctf/inputprocessor.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,155 @@ +/* + * Unit tests for ITfInputProcessor + * + * Copyright 2009 Aric Stewart, CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdio.h> + +#define COBJMACROS +#include "wine/test.h" +#include "winuser.h" +#include "shlwapi.h" +#include "shlguid.h" +#include "comcat.h" +#include "initguid.h" +#include "msctf.h" + +static ITfInputProcessorProfiles* g_ipp; +static LANGID gLangid; +static ITfCategoryMgr * g_cm; + +DEFINE_GUID(CLSID_FakeService, 0xEDE1A7AD,0x66DE,0x47E0,0xB6,0x20,0x3E,0x92,0xF8,0x24,0x6B,0xF3); +DEFINE_GUID(CLSID_TF_InputProcessorProfiles, 0x33c53a50,0xf456,0x4884,0xb0,0x49,0x85,0xfd,0x64,0x3e,0xcf,0xed); +DEFINE_GUID(CLSID_TF_CategoryMgr, 0xA4B544A1,0x438D,0x4B41,0x93,0x25,0x86,0x95,0x23,0xE2,0xD6,0xC7); +DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745c63,0xb2f0,0x4784,0x8b,0x67,0x5e,0x12,0xc8,0x70,0x1a,0x31); +DEFINE_GUID(GUID_TFCAT_TIP_SPEECH, 0xB5A73CD1,0x8355,0x426B,0xA1,0x61,0x25,0x98,0x08,0xF2,0x6B,0x14); +DEFINE_GUID(GUID_TFCAT_TIP_HANDWRITING, 0x246ecb87,0xc2f2,0x4abe,0x90,0x5b,0xc8,0xb3,0x8a,0xdd,0x2c,0x43); +DEFINE_GUID (GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER, 0x046B8C80,0x1647,0x40F7,0x9B,0x21,0xB9,0x3B,0x81,0xAA,0xBC,0x1B); +DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); + + +static HRESULT initialize(void) +{ + HRESULT hr; + CoInitialize(NULL); + hr = CoCreateInstance (&CLSID_TF_InputProcessorProfiles, NULL, + CLSCTX_INPROC_SERVER, &IID_ITfInputProcessorProfiles, (void**)&g_ipp); + if (SUCCEEDED(hr)) + hr = CoCreateInstance (&CLSID_TF_CategoryMgr, NULL, + CLSCTX_INPROC_SERVER, &IID_ITfCategoryMgr, (void**)&g_cm); + return hr; +} + +static void cleanup(void) +{ + if (g_ipp) + ITfInputProcessorProfiles_Release(g_ipp); + if (g_cm) + ITfCategoryMgr_Release(g_cm); + CoUninitialize(); +} + +static void test_Register(void) +{ + HRESULT hr; + + static const WCHAR szDesc[] = {'F','a','k','e',' ','W','i','n','e',' ','S','e','r','v','i','c','e',0}; + static const WCHAR szFile[] = {'F','a','k','e',' ','W','i','n','e',' ','S','e','r','v','i','c','e',' ','F','i','l','e',0}; + + hr = ITfInputProcessorProfiles_Register(g_ipp, &CLSID_FakeService); + ok(SUCCEEDED(hr),"Unable to register text service(%x)\n",hr); + hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService, gLangid, &CLSID_FakeService, szDesc, sizeof(szDesc)/sizeof(WCHAR), szFile, sizeof(szFile)/sizeof(WCHAR), 1); + ok(SUCCEEDED(hr),"Unable to add Language Profile (%x)\n",hr); +} + +static void test_Unregister(void) +{ + HRESULT hr; + hr = ITfInputProcessorProfiles_Unregister(g_ipp, &CLSID_FakeService); + ok(SUCCEEDED(hr),"Unable to unregister text service(%x)\n",hr); +} + +static void test_EnumInputProcessorInfo(void) +{ + IEnumGUID *ppEnum; + BOOL found = FALSE; + + if (SUCCEEDED(ITfInputProcessorProfiles_EnumInputProcessorInfo(g_ipp, &ppEnum))) + { + ULONG fetched; + GUID g; + while (IEnumGUID_Next(ppEnum, 1, &g, &fetched) == S_OK) + { + if(IsEqualGUID(&g,&CLSID_FakeService)) + found = TRUE; + } + } + ok(found,"Did not find registered text service\n"); +} + +static void test_EnumLanguageProfiles(void) +{ + BOOL found = FALSE; + IEnumTfLanguageProfiles *ppEnum; + if (SUCCEEDED(ITfInputProcessorProfiles_EnumLanguageProfiles(g_ipp,gLangid,&ppEnum))) + { + TF_LANGUAGEPROFILE profile; + while (IEnumTfLanguageProfiles_Next(ppEnum,1,&profile,NULL)==S_OK) + { + if (IsEqualGUID(&profile.clsid,&CLSID_FakeService)) + { + found = TRUE; + ok(profile.langid == gLangid, "LangId Incorrect\n"); + todo_wine ok(IsEqualGUID(&profile.catid,&GUID_TFCAT_TIP_KEYBOARD), "CatId Incorrect\n"); + ok(IsEqualGUID(&profile.guidProfile,&CLSID_FakeService), "guidProfile Incorrect\n"); + } + } + } + ok(found,"Registered text service not found\n"); +} + +static void test_RegisterCategory(void) +{ + HRESULT hr; + hr = ITfCategoryMgr_RegisterCategory(g_cm, &CLSID_FakeService, &GUID_TFCAT_TIP_KEYBOARD, &CLSID_FakeService); + ok(SUCCEEDED(hr),"ITfCategoryMgr_RegisterCategory failed\n"); +} + +static void test_UnregisterCategory(void) +{ + HRESULT hr; + hr = ITfCategoryMgr_UnregisterCategory(g_cm, &CLSID_FakeService, &GUID_TFCAT_TIP_KEYBOARD, &CLSID_FakeService); + todo_wine ok(SUCCEEDED(hr),"ITfCategoryMgr_UnregisterCategory failed\n"); +} + +START_TEST(inputprocessor) +{ + if (SUCCEEDED(initialize())) + { + gLangid = GetUserDefaultLCID(); + test_Register(); + test_RegisterCategory(); + test_EnumInputProcessorInfo(); + test_EnumLanguageProfiles(); + test_UnregisterCategory(); + test_Unregister(); + } + else + skip("Unable to create InputProcessor\n"); + cleanup(); +} Propchange: trunk/rostests/winetests/msctf/inputprocessor.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/msctf/msctf.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msctf/msctf.rbu…
============================================================================== --- trunk/rostests/winetests/msctf/msctf.rbuild (added) +++ trunk/rostests/winetests/msctf/msctf.rbuild [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,11 @@ +<module name="msctf_winetest" type="win32cui" installbase="bin" installname="msctf_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> + <include base="msctf_winetest">.</include> + <file>inputprocessor.c</file> + <file>testlist.c</file> + <library>wine</library> + <library>ole32</library> + <library>user32</library> + <library>kernel32</library> + <library>ntdll</library> +</module> Propchange: trunk/rostests/winetests/msctf/msctf.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/msctf/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msctf/testlist.…
============================================================================== --- trunk/rostests/winetests/msctf/testlist.c (added) +++ trunk/rostests/winetests/msctf/testlist.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,15 @@ +/* Automatically generated file; DO NOT EDIT!! */ + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + +#define STANDALONE +#include "wine/test.h" + +extern void func_inputprocessor(void); + +const struct test winetest_testlist[] = +{ + { "inputprocessor", func_inputprocessor }, + { 0, 0 } +}; Propchange: trunk/rostests/winetests/msctf/testlist.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/winetests/msvfw32/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Fri Feb 27 19:45:02 2009 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rostests/winetests/msvfw32/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rostests/winetests/msvfw32/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/winetests/msvfw32/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/rostests/winetests/msvfw32/msvfw.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvfw32/msvfw.c…
============================================================================== --- trunk/rostests/winetests/msvfw32/msvfw.c (added) +++ trunk/rostests/winetests/msvfw32/msvfw.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,59 @@ +/* + * Unit tests for video playback + * + * Copyright 2008 Jörg Höhle + * Copyright 2008 Austin English + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <vfw.h> + +#include "wine/test.h" + +static void test_OpenCase(void) +{ + HIC h; + /* Open a compressor with combinations of lowercase + * and uppercase compressortype and handler. + */ + h = ICOpen(mmioFOURCC('v','i','d','c'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS); + ok(0!=h,"ICOpen(vidc.msvc) failed\n"); + if (h) { + ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); + } + h = ICOpen(mmioFOURCC('v','i','d','c'),mmioFOURCC('M','S','V','C'),ICMODE_DECOMPRESS); + ok(0!=h,"ICOpen(vidc.MSVC) failed\n"); + if (h) { + ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); + } + h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS); + todo_wine ok(0!=h,"ICOpen(VIDC.msvc) failed\n"); + if (h) { + ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); + } + h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('M','S','V','C'),ICMODE_DECOMPRESS); + todo_wine ok(0!=h,"ICOpen(VIDC.MSVC) failed\n"); + if (h) { + ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); + } +} + +START_TEST(msvfw) +{ + test_OpenCase(); +} Propchange: trunk/rostests/winetests/msvfw32/msvfw.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/msvfw32/msvfw32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvfw32/msvfw32…
============================================================================== --- trunk/rostests/winetests/msvfw32/msvfw32.rbuild (added) +++ trunk/rostests/winetests/msvfw32/msvfw32.rbuild [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,10 @@ +<module name="msvfw32_winetest" type="win32cui" installbase="bin" installname="msvfw32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> + <include base="msvfw32_winetest">.</include> + <file>msvfw.c</file> + <file>testlist.c</file> + <library>wine</library> + <library>msvfw32</library> + <library>kernel32</library> + <library>ntdll</library> +</module> Propchange: trunk/rostests/winetests/msvfw32/msvfw32.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/msvfw32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvfw32/testlis…
============================================================================== --- trunk/rostests/winetests/msvfw32/testlist.c (added) +++ trunk/rostests/winetests/msvfw32/testlist.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,15 @@ +/* Automatically generated file; DO NOT EDIT!! */ + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + +#define STANDALONE +#include "wine/test.h" + +extern void func_msvfw(void); + +const struct test winetest_testlist[] = +{ + { "msvfw", func_msvfw }, + { 0, 0 } +}; Propchange: trunk/rostests/winetests/msvfw32/testlist.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/winetests/ntdsapi/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Fri Feb 27 19:45:02 2009 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rostests/winetests/ntdsapi/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rostests/winetests/ntdsapi/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/winetests/ntdsapi/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/rostests/winetests/ntdsapi/ntdsapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdsapi/ntdsapi…
============================================================================== --- trunk/rostests/winetests/ntdsapi/ntdsapi.c (added) +++ trunk/rostests/winetests/ntdsapi/ntdsapi.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,99 @@ +/* + * Copyright (C) 2008 Robert Shearman (for CodeWeavers) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winnls.h" +#include "rpc.h" +#include "rpcdce.h" +#include "ntdsapi.h" + +#include "wine/test.h" + +static const char *wine_dbgstr_w(LPCWSTR str) +{ + static char buf[512]; + if (!str) + return "(null)"; + WideCharToMultiByte(CP_ACP, 0, str, -1, buf, sizeof(buf), NULL, NULL); + return buf; +} + +static void test_DsMakeSpn(void) +{ + DWORD ret; + WCHAR spn[256]; + DWORD spn_length; + static const WCHAR wszServiceClass[] = {'c','l','a','s','s',0}; + static const WCHAR wszServiceHost[] = {'h','o','s','t',0}; + static const WCHAR wszInstanceName[] = {'i','n','s','t','a','n','c','e',0}; + static const WCHAR wszReferrer[] = {'r','e','f','e','r','r','e','r',0}; + static const WCHAR wszSpn1[] = {'c','l','a','s','s','/','h','o','s','t',0}; + static const WCHAR wszSpn2[] = {'c','l','a','s','s','/','i','n','s','t','a','n','c','e','/','h','o','s','t',0}; + static const WCHAR wszSpn3[] = {'c','l','a','s','s','/','i','n','s','t','a','n','c','e',':','5','5','5','/','h','o','s','t',0}; + static const WCHAR wszSpn4[] = {'c','l','a','s','s','/','i','n','s','t','a','n','c','e',':','5','5','5','/','h','o','s','t',0}; + static const WCHAR wszSpn5[] = {'c','l','a','s','s','/','h','o','s','t',':','5','5','5',0}; + + spn[0] = '\0'; + + spn_length = sizeof(spn)/sizeof(spn[0]); + ret = DsMakeSpnW(NULL, NULL, NULL, 0, NULL, &spn_length, spn); + ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); + + spn_length = sizeof(spn)/sizeof(spn[0]); + ret = DsMakeSpnW(NULL, wszServiceHost, NULL, 0, NULL, &spn_length, spn); + ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); + + spn_length = sizeof(spn)/sizeof(spn[0]); + ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 0, NULL, &spn_length, spn); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(!lstrcmpW(spn, wszSpn1), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); + ok(spn_length == lstrlenW(wszSpn1) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn1) + 1, spn_length); + + spn_length = sizeof(spn)/sizeof(spn[0]); + ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 0, NULL, &spn_length, spn); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(!lstrcmpW(spn, wszSpn2), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); + ok(spn_length == lstrlenW(wszSpn2) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn2) + 1, spn_length); + + spn_length = sizeof(spn)/sizeof(spn[0]); + ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, NULL, &spn_length, spn); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(!lstrcmpW(spn, wszSpn3), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); + ok(spn_length == lstrlenW(wszSpn3) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn3) + 1, spn_length); + + spn_length = sizeof(spn)/sizeof(spn[0]); + ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, wszReferrer, &spn_length, spn); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(!lstrcmpW(spn, wszSpn4), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); + ok(spn_length == lstrlenW(wszSpn4) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn4) + 1, spn_length); + + spn_length = sizeof(spn)/sizeof(spn[0]); + ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 555, wszReferrer, &spn_length, spn); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(!lstrcmpW(spn, wszSpn5), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); + ok(spn_length == lstrlenW(wszSpn5) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn5) + 1, spn_length); +} + +START_TEST( ntdsapi ) +{ + test_DsMakeSpn(); +} Propchange: trunk/rostests/winetests/ntdsapi/ntdsapi.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/ntdsapi/ntdsapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdsapi/ntdsapi…
============================================================================== --- trunk/rostests/winetests/ntdsapi/ntdsapi.rbuild (added) +++ trunk/rostests/winetests/ntdsapi/ntdsapi.rbuild [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,10 @@ +<module name="ntdsapi_winetest" type="win32cui" installbase="bin" installname="ntdsapi_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> + <include base="ntdsapi_winetest">.</include> + <file>ntdsapi.c</file> + <file>testlist.c</file> + <library>wine</library> + <library>ntdsapi</library> + <library>kernel32</library> + <library>ntdll</library> +</module> Propchange: trunk/rostests/winetests/ntdsapi/ntdsapi.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/ntdsapi/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdsapi/testlis…
============================================================================== --- trunk/rostests/winetests/ntdsapi/testlist.c (added) +++ trunk/rostests/winetests/ntdsapi/testlist.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,15 @@ +/* Automatically generated file; DO NOT EDIT!! */ + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + +#define STANDALONE +#include "wine/test.h" + +extern void func_ntdsapi(void); + +const struct test winetest_testlist[] = +{ + { "ntdsapi", func_ntdsapi }, + { 0, 0 } +}; Propchange: trunk/rostests/winetests/ntdsapi/testlist.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/winetests/ntprint/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Fri Feb 27 19:45:02 2009 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rostests/winetests/ntprint/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rostests/winetests/ntprint/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/winetests/ntprint/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/rostests/winetests/ntprint/ntprint.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntprint/ntprint…
============================================================================== --- trunk/rostests/winetests/ntprint/ntprint.c (added) +++ trunk/rostests/winetests/ntprint/ntprint.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,230 @@ +/* + * Unit test suite for the Spooler Setup API (Printing) + * + * Copyright 2007 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include <stdarg.h> +#include <stdio.h> + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "wingdi.h" +#include "wine/test.h" + + +/* ##### */ + +static HMODULE hdll; +static HANDLE (WINAPI *pPSetupCreateMonitorInfo)(LPVOID, LPVOID, LPVOID); +static VOID (WINAPI *pPSetupDestroyMonitorInfo)(HANDLE); +static BOOL (WINAPI *pPSetupEnumMonitor)(HANDLE, DWORD, LPWSTR, LPDWORD); + +/* ########################### */ + +static LPCSTR load_functions(void) +{ + LPCSTR ptr; + + ptr = "ntprint.dll"; + hdll = LoadLibraryA(ptr); + if (!hdll) return ptr; + + ptr = "PSetupCreateMonitorInfo"; + pPSetupCreateMonitorInfo = (VOID *) GetProcAddress(hdll, ptr); + if (!pPSetupCreateMonitorInfo) return ptr; + + ptr = "PSetupDestroyMonitorInfo"; + pPSetupDestroyMonitorInfo = (VOID *) GetProcAddress(hdll, ptr); + if (!pPSetupDestroyMonitorInfo) return ptr; + + ptr = "PSetupEnumMonitor"; + pPSetupEnumMonitor = (VOID *) GetProcAddress(hdll, ptr); + if (!pPSetupEnumMonitor) return ptr; + + return NULL; +} + +/* ########################### */ + +static void test_PSetupCreateMonitorInfo(VOID) +{ + HANDLE mi; + BYTE buffer[1024] ; + + SetLastError(0xdeadbeef); + mi = pPSetupCreateMonitorInfo(NULL, NULL, NULL); + ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); + if (mi) pPSetupDestroyMonitorInfo(mi); + + + memset(buffer, 0, sizeof(buffer)); + SetLastError(0xdeadbeef); + mi = pPSetupCreateMonitorInfo(buffer, NULL, NULL); + ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); + if (mi) pPSetupDestroyMonitorInfo(mi); + +} + +/* ########################### */ + +static void test_PSetupDestroyMonitorInfo(VOID) +{ + HANDLE mi; + + + SetLastError(0xdeadbeef); + pPSetupDestroyMonitorInfo(NULL); + /* lasterror is returned */ + trace("returned with %u\n", GetLastError()); + + SetLastError(0xdeadbeef); + mi = pPSetupCreateMonitorInfo(NULL, NULL, NULL); + ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); + + if (!mi) return; + + SetLastError(0xdeadbeef); + pPSetupDestroyMonitorInfo(mi); + /* lasterror is returned */ + trace("returned with %u\n", GetLastError()); + + /* Try to destroy the handle twice crash with native ntprint.dll */ + if (0) { + SetLastError(0xdeadbeef); + pPSetupDestroyMonitorInfo(mi); + trace(" with %u\n", GetLastError()); + } + +} + +/* ########################### */ + +static void test_PSetupEnumMonitor(VOID) +{ + HANDLE mi; + WCHAR buffer[MAX_PATH+2]; + DWORD minsize = 0; + DWORD size; + DWORD res; + DWORD index=0; + + SetLastError(0xdeadbeef); + mi = pPSetupCreateMonitorInfo(NULL, NULL, NULL); + if (!mi) { + skip("PSetupCreateMonitorInfo\n"); + return; + } + + minsize = 0; + SetLastError(0xdeadbeef); + res = pPSetupEnumMonitor(mi, 0, NULL, &minsize); + ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER) && (minsize > 0), + "got %u with %u and %u (expected '0' with ERROR_INSUFFICIENT_BUFFER " + "and '> 0')\n", res, GetLastError(), minsize); + + + size = sizeof(buffer) / sizeof(buffer[0]); + if ((minsize + 1) > size) { + skip("overflow: %u\n", minsize); + pPSetupDestroyMonitorInfo(mi); + return; + } + + if (0) { + /* XP: ERROR_INVALID_PARAMETER, w2k: Crash */ + SetLastError(0xdeadbeef); + size = sizeof(buffer) / sizeof(buffer[0]); + res = pPSetupEnumMonitor(NULL, 0, buffer, &size); + ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), + "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", + res, GetLastError()); + } + + if (0) { + /* XP: Crash, w2k: Success (how can that work?) */ + SetLastError(0xdeadbeef); + size = sizeof(buffer) / sizeof(buffer[0]); + res = pPSetupEnumMonitor(mi, 0, NULL, &size); + trace("got %u with %u and %u\n", res, GetLastError(), size); + } + + if (0) { + /* XP: ERROR_INVALID_PARAMETER, w2k: Crash */ + SetLastError(0xdeadbeef); + res = pPSetupEnumMonitor(mi, 0, buffer, NULL); + ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), + "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", + res, GetLastError()); + } + + SetLastError(0xdeadbeef); + size = minsize - 1; + res = pPSetupEnumMonitor(mi, 0, buffer, &size); + ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), + "got %u with %u and %u (expected '0' with ERROR_INSUFFICIENT_BUFFER)\n", + res, GetLastError(), size); + + + SetLastError(0xdeadbeef); + size = minsize; + res = pPSetupEnumMonitor(mi, 0, buffer, &size); + ok( res, "got %u with %u and %u (expected '!= 0')\n", + res, GetLastError(), size); + + SetLastError(0xdeadbeef); + size = minsize + 1; + res = pPSetupEnumMonitor(mi, 0, buffer, &size); + ok( res, "got %u with %u and %u (expected '!= 0')\n", + res, GetLastError(), size); + + /* try max. 20 monitors */ + while (res && (index < 20)) { + SetLastError(0xdeadbeef); + buffer[0] = '\0'; + size = sizeof(buffer) / sizeof(buffer[0]); + res = pPSetupEnumMonitor(mi, index, buffer, &size); + ok( res || (GetLastError() == ERROR_NO_MORE_ITEMS), + "(%u) got %u with %u and %u (expected '!=0' or: '0' with " + "ERROR_NO_MORE_ITEMS)\n", index, res, GetLastError(), size); + + if (res) index++; + } + pPSetupDestroyMonitorInfo(mi); + +} + +/* ########################### */ + +START_TEST(ntprint) +{ + LPCSTR ptr; + + /* ntprint.dll does not exist on win9x */ + ptr = load_functions(); + if (ptr) { + skip("%s not found\n", ptr); + return; + } + + test_PSetupCreateMonitorInfo(); + test_PSetupDestroyMonitorInfo(); + test_PSetupEnumMonitor(); + +} Propchange: trunk/rostests/winetests/ntprint/ntprint.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/ntprint/ntprint.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntprint/ntprint…
============================================================================== --- trunk/rostests/winetests/ntprint/ntprint.rbuild (added) +++ trunk/rostests/winetests/ntprint/ntprint.rbuild [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,9 @@ +<module name="ntprint_winetest" type="win32cui" installbase="bin" installname="ntprint_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> + <include base="ntprint_winetest">.</include> + <file>ntprint.c</file> + <file>testlist.c</file> + <library>wine</library> + <library>kernel32</library> + <library>ntdll</library> +</module> Propchange: trunk/rostests/winetests/ntprint/ntprint.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/ntprint/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntprint/testlis…
============================================================================== --- trunk/rostests/winetests/ntprint/testlist.c (added) +++ trunk/rostests/winetests/ntprint/testlist.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,15 @@ +/* Automatically generated file; DO NOT EDIT!! */ + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + +#define STANDALONE +#include "wine/test.h" + +extern void func_ntprint(void); + +const struct test winetest_testlist[] = +{ + { "ntprint", func_ntprint }, + { 0, 0 } +}; Propchange: trunk/rostests/winetests/ntprint/testlist.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/winetests/oleacc/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Fri Feb 27 19:45:02 2009 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rostests/winetests/oleacc/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rostests/winetests/oleacc/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/winetests/oleacc/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/rostests/winetests/oleacc/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleacc/main.c?r…
============================================================================== --- trunk/rostests/winetests/oleacc/main.c (added) +++ trunk/rostests/winetests/oleacc/main.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,141 @@ +/* + * oleacc tests + * + * Copyright 2008 Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <oleacc.h> +#include "wine/test.h" + +static void test_getroletext(void) +{ + INT ret, role; + CHAR buf[2], *buff; + WCHAR bufW[2], *buffW; + + /* wrong role number */ + ret = GetRoleTextA(-1, NULL, 0); + ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret); + buf[0] = '*'; + ret = GetRoleTextA(-1, buf, 2); + ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret); + ok(buf[0] == '*' || + broken(buf[0] == 0), /* Win98 and WinMe */ + "GetRoleTextA modified buffer on wrong role number\n"); + buf[0] = '*'; + ret = GetRoleTextA(-1, buf, 0); + ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret); + ok(buf[0] == '*', "GetRoleTextA modified buffer on wrong role number\n"); + + ret = GetRoleTextW(-1, NULL, 0); + ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret); + bufW[0] = '*'; + ret = GetRoleTextW(-1, bufW, 2); + ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret); + ok(bufW[0] == '\0' || + broken(bufW[0] == '*'), /* Win98 and WinMe */ + "GetRoleTextW doesn't return NULL char on wrong role number\n"); + bufW[0] = '*'; + ret = GetRoleTextW(-1, bufW, 0); + ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret); + + /* zero role number - not documented */ + ret = GetRoleTextA(0, NULL, 0); + ok(ret > 0, "GetRoleTextA doesn't return (>0) for zero role number, got %d\n", ret); + ret = GetRoleTextW(0, NULL, 0); + ok(ret > 0, "GetRoleTextW doesn't return (>0) for zero role number, got %d\n", ret); + + /* NULL buffer, return length */ + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 0); + ok(ret > 0, "GetRoleTextA doesn't return length on NULL buffer, got %d\n", ret); + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 1); + ok(ret > 0, "GetRoleTextA doesn't return length on NULL buffer, got %d\n", ret); + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 0); + ok(ret > 0, "GetRoleTextW doesn't return length on NULL buffer, got %d\n", ret); + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 1); + ok(ret > 0, "GetRoleTextW doesn't return length on NULL buffer, got %d\n", ret); + + /* use a smaller buffer */ + buf[0] = '*'; + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buf, 1); + ok(ret == 0, "GetRoleTextA returned wrong length\n"); + ok(buf[0] == '\0', "GetRoleTextA returned not zero-length buffer\n"); + buf[1] = '*'; + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buf, 2); + ok(ret == 1 || + ret == 0, /* Vista and W2K8 */ + "GetRoleTextA returned wrong length, got %d, expected 0 or 1\n", ret); + if (ret == 1) + ok(buf[1] == '\0', "GetRoleTextA returned not zero-length buffer : (%c)\n", buf[1]); + + bufW[0] = '*'; + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, bufW, 1); + ok(ret == 0, "GetRoleTextW returned wrong length, got %d, expected 1\n", ret); + ok(bufW[0] == '\0', "GetRoleTextW returned not zero-length buffer\n"); + bufW[1] = '*'; + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, bufW, 2); + ok(ret == 1, "GetRoleTextW returned wrong length, got %d, expected 1\n", ret); + ok(bufW[1] == '\0', "GetRoleTextW returned not zero-length buffer\n"); + + /* use bigger buffer */ + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 0); + buff = HeapAlloc(GetProcessHeap(), 0, 2*ret); + buff[2*ret-1] = '*'; + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buff, 2*ret); + ok(buff[2*ret-1] == '*', "GetRoleTextA shouldn't modify this part of buffer\n"); + HeapFree(GetProcessHeap(), 0, buff); + + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 0); + buffW = HeapAlloc(GetProcessHeap(), 0, 2*ret*sizeof(WCHAR)); + buffW[2*ret-1] = '*'; + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, buffW, 2*ret); + ok(buffW[2*ret-1] == '*', "GetRoleTextW shouldn't modify this part of buffer\n"); + HeapFree(GetProcessHeap(), 0, buffW); + + /* check returned length for all roles */ + for(role = 0; role <= ROLE_SYSTEM_OUTLINEBUTTON; role++){ + CHAR buff2[100]; + WCHAR buff2W[100]; + + /* NT4 and W2K don't clear the buffer on a nonexistent role in the A-call */ + memset(buff2, 0, sizeof(buff2)); + + ret = GetRoleTextA(role, NULL, 0); + /* Win98 up to W2K miss some of the roles */ + if (role >= ROLE_SYSTEM_SPLITBUTTON) + ok(ret > 0 || broken(ret == 0), "Expected the role %d to be present\n", role); + else + ok(ret > 0, "Expected the role to be present\n"); + + GetRoleTextA(role, buff2, sizeof(buff2)); + ok(ret == lstrlenA(buff2), + "GetRoleTextA: returned length doesn't match returned buffer for role %d\n", role); + + /* Win98 and WinMe don't clear the buffer on a nonexistent role in the W-call */ + memset(buff2W, 0, sizeof(buff2W)); + + ret = GetRoleTextW(role, NULL, 0); + GetRoleTextW(role, buff2W, sizeof(buff2W)/sizeof(WCHAR)); + ok(ret == lstrlenW(buff2W), + "GetRoleTextW: returned length doesn't match returned buffer for role %d\n", role); + } +} + +START_TEST(main) +{ + test_getroletext(); +} Propchange: trunk/rostests/winetests/oleacc/main.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/oleacc/oleacc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleacc/oleacc.r…
============================================================================== --- trunk/rostests/winetests/oleacc/oleacc.rbuild (added) +++ trunk/rostests/winetests/oleacc/oleacc.rbuild [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,10 @@ +<module name="oleacc_winetest" type="win32cui" installbase="bin" installname="oleacc_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> + <include base="oleacc_winetest">.</include> + <file>main.c</file> + <file>testlist.c</file> + <library>wine</library> + <library>kernel32</library> + <library>oleacc</library> + <library>ntdll</library> +</module> Propchange: trunk/rostests/winetests/oleacc/oleacc.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/oleacc/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleacc/testlist…
============================================================================== --- trunk/rostests/winetests/oleacc/testlist.c (added) +++ trunk/rostests/winetests/oleacc/testlist.c [iso-8859-1] Fri Feb 27 19:45:02 2009 @@ -1,0 +1,15 @@ +/* Automatically generated file; DO NOT EDIT!! */ + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + +#define STANDALONE +#include "wine/test.h" + +extern void func_main(void); + +const struct test winetest_testlist[] = +{ + { "main", func_main }, + { 0, 0 } +}; Propchange: trunk/rostests/winetests/oleacc/testlist.c ------------------------------------------------------------------------------ svn:eol-style = native
15 years, 10 months
1
0
0
0
[dchapyshev] 39790: - Add winetests for inetcomm, inetmib1, itss, localspl, localui
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Fri Feb 27 19:23:50 2009 New Revision: 39790 URL:
http://svn.reactos.org/svn/reactos?rev=39790&view=rev
Log: - Add winetests for inetcomm, inetmib1, itss, localspl, localui Added: trunk/rostests/winetests/inetcomm/ (with props) trunk/rostests/winetests/inetcomm/inetcomm.rbuild (with props) trunk/rostests/winetests/inetcomm/mimeintl.c (with props) trunk/rostests/winetests/inetcomm/mimeole.c (with props) trunk/rostests/winetests/inetcomm/testlist.c (with props) trunk/rostests/winetests/inetmib1/ (with props) trunk/rostests/winetests/inetmib1/inetmib1.rbuild (with props) trunk/rostests/winetests/inetmib1/main.c (with props) trunk/rostests/winetests/inetmib1/testlist.c (with props) trunk/rostests/winetests/itss/ (with props) trunk/rostests/winetests/itss/data.chm (with props) trunk/rostests/winetests/itss/itss.rbuild (with props) trunk/rostests/winetests/itss/protocol.c (with props) trunk/rostests/winetests/itss/rsrc.rc (with props) trunk/rostests/winetests/itss/testlist.c (with props) trunk/rostests/winetests/localspl/ (with props) trunk/rostests/winetests/localspl/localmon.c (with props) trunk/rostests/winetests/localspl/localspl.rbuild (with props) trunk/rostests/winetests/localspl/testlist.c (with props) trunk/rostests/winetests/localui/ (with props) trunk/rostests/winetests/localui/localui.c (with props) trunk/rostests/winetests/localui/localui.rbuild (with props) trunk/rostests/winetests/localui/testlist.c (with props) Modified: trunk/rostests/winetests/directory.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/directory.rbuil…
Added: trunk/rostests/winetests/inetcomm/inetcomm.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetcomm/inetco…
Added: trunk/rostests/winetests/inetcomm/mimeintl.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetcomm/mimein…
Added: trunk/rostests/winetests/inetcomm/mimeole.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetcomm/mimeol…
Added: trunk/rostests/winetests/inetcomm/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetcomm/testli…
Added: trunk/rostests/winetests/inetmib1/inetmib1.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetmib1/inetmi…
Added: trunk/rostests/winetests/inetmib1/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetmib1/main.c…
Added: trunk/rostests/winetests/inetmib1/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetmib1/testli…
Added: trunk/rostests/winetests/itss/data.chm URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/itss/data.chm?r…
Added: trunk/rostests/winetests/itss/itss.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/itss/itss.rbuil…
Added: trunk/rostests/winetests/itss/protocol.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/itss/protocol.c…
Added: trunk/rostests/winetests/itss/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/itss/rsrc.rc?re…
Added: trunk/rostests/winetests/itss/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/itss/testlist.c…
Added: trunk/rostests/winetests/localspl/localmon.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/localspl/localm…
Added: trunk/rostests/winetests/localspl/localspl.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/localspl/locals…
Added: trunk/rostests/winetests/localspl/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/localspl/testli…
Added: trunk/rostests/winetests/localui/localui.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/localui/localui…
Added: trunk/rostests/winetests/localui/localui.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/localui/localui…
Added: trunk/rostests/winetests/localui/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/localui/testlis…
15 years, 10 months
1
0
0
0
[dchapyshev] 39789: - Add DNS_RRSET_INIT, DNS_RRSET_ADD, DNS_RRSET_TERMINATE
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Fri Feb 27 18:59:01 2009 New Revision: 39789 URL:
http://svn.reactos.org/svn/reactos?rev=39789&view=rev
Log: - Add DNS_RRSET_INIT, DNS_RRSET_ADD, DNS_RRSET_TERMINATE Modified: trunk/reactos/include/psdk/windns.h Modified: trunk/reactos/include/psdk/windns.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/windns.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/windns.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/windns.h [iso-8859-1] Fri Feb 27 18:59:01 2009 @@ -469,6 +469,27 @@ PDNS_RECORD pLastRR; } DNS_RRSET, *PDNS_RRSET; +#define DNS_RRSET_INIT( rrset ) \ +{ \ + PDNS_RRSET _prrset = &(rrset); \ + _prrset->pFirstRR = NULL; \ + _prrset->pLastRR = (PDNS_RECORD) &_prrset->pFirstRR; \ +} + +#define DNS_RRSET_ADD( rrset, pnewRR ) \ +{ \ + PDNS_RRSET _prrset = &(rrset); \ + PDNS_RECORD _prrnew = (pnewRR); \ + _prrset->pLastRR->pNext = _prrnew; \ + _prrset->pLastRR = _prrnew; \ +} + +#define DNS_RRSET_TERMINATE( rrset ) \ +{ \ + PDNS_RRSET _prrset = &(rrset); \ + _prrset->pLastRR->pNext = NULL; \ +} + DNS_STATUS WINAPI DnsAcquireContextHandle_A(DWORD,PVOID,HANDLE*); DNS_STATUS WINAPI DnsAcquireContextHandle_W(DWORD,PVOID,HANDLE*); DNS_STATUS WINAPI DnsExtractRecordsFromMessage_W(PDNS_MESSAGE_BUFFER,WORD,PDNS_RECORD*);
15 years, 10 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
56
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200