diff --git a/dll/ntdll/ldr/ldrinit.c b/dll/ntdll/ldr/ldrinit.c index 955c9a23b8c..0fe05ae7923 100644 --- a/dll/ntdll/ldr/ldrinit.c +++ b/dll/ntdll/ldr/ldrinit.c @@ -1646,7 +1646,7 @@ LdrpInitializeProcessCompat(PVOID pProcessActctx, PVOID* pOldShimData) { if (LdrpDisableProcessCompatGuidDetection()) { - DPRINT1("LdrpInitializeProcessCompat: Not applying automatic fix for winver 0x%x due to policy\n", KnownCompatGuids[cur].Version); + DPRINT("LdrpInitializeProcessCompat: Not applying automatic fix for winver 0x%x due to policy\n", KnownCompatGuids[cur].Version); return; } @@ -1899,12 +1899,9 @@ LdrpInitializeProcess(IN PCONTEXT Context, &CommandLine); } - /* If the timeout is too long */ + /* If the CS timeout is longer than 1 hour, disable it */ if (RtlpTimeout.QuadPart < Int32x32To64(3600, -10000000)) - { - /* Then disable CS Timeout */ RtlpTimeoutDisable = TRUE; - } /* Initialize Critical Section Data */ RtlpInitDeferedCriticalSection(); diff --git a/dll/win32/comctl32/toolbar.c b/dll/win32/comctl32/toolbar.c index e2b6193b663..fcb7428c6d7 100644 --- a/dll/win32/comctl32/toolbar.c +++ b/dll/win32/comctl32/toolbar.c @@ -300,14 +300,6 @@ TOOLBAR_GetText(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *btnPtr) return lpText; } -static void -TOOLBAR_DumpTBButton(const TBBUTTON *tbb, BOOL fUnicode) -{ - TRACE("TBBUTTON: id %d, bitmap=%d, state=%02x, style=%02x, data=%p, stringid=%p (%s)\n", tbb->idCommand, - tbb->iBitmap, tbb->fsState, tbb->fsStyle, (void *)tbb->dwData, (void *)tbb->iString, - tbb->iString != -1 ? (fUnicode ? debugstr_w((LPWSTR)tbb->iString) : debugstr_a((LPSTR)tbb->iString)) : ""); -} - static void TOOLBAR_DumpButton(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *bP, INT btn_num) { @@ -377,24 +369,8 @@ static void set_stringT( TBUTTON_INFO *btn, const WCHAR *str, BOOL unicode ) static void free_string( TBUTTON_INFO *btn ) { set_string_index( btn, 0, TRUE ); - } -/*********************************************************************** -* TOOLBAR_CheckStyle -* -* This function validates that the styles set are implemented and -* issues FIXMEs warning of possible problems. In a perfect world this -* function should be null. -*/ -static void -TOOLBAR_CheckStyle (const TOOLBAR_INFO *infoPtr) -{ - if (infoPtr->dwStyle & TBSTYLE_REGISTERDROP) - FIXME("[%p] TBSTYLE_REGISTERDROP not implemented\n", infoPtr->hwndSelf); -} - - static INT TOOLBAR_SendNotify (NMHDR *nmhdr, const TOOLBAR_INFO *infoPtr, UINT code) { @@ -2018,8 +1994,6 @@ TOOLBAR_InternalInsertButtonsT(TOOLBAR_INFO *infoPtr, INT iIndex, UINT nAddButto TBUTTON_INFO *btnPtr = &infoPtr->buttons[iIndex + iButton]; INT_PTR str; - TOOLBAR_DumpTBButton(lpTbb + iButton, fUnicode); - ZeroMemory(btnPtr, sizeof(*btnPtr)); btnPtr->iBitmap = lpTbb[iButton].iBitmap; @@ -5267,7 +5241,6 @@ TOOLBAR_SetStyle (TOOLBAR_INFO *infoPtr, DWORD style) infoPtr->dwDTFlags = DT_CENTER | DT_END_ELLIPSIS; infoPtr->dwStyle = style; - TOOLBAR_CheckStyle(infoPtr); if ((dwOldStyle ^ style) & TBSTYLE_WRAPABLE) { @@ -5552,8 +5525,6 @@ TOOLBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs) OpenThemeData (hwnd, themeClass); #endif - TOOLBAR_CheckStyle (infoPtr); - return 0; } @@ -5632,9 +5603,6 @@ TOOLBAR_EraseBackground (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) break; case CDRF_SKIPDEFAULT: return TRUE; - default: - FIXME("[%p] response %d not handled to NM_CUSTOMDRAW (CDDS_PREERASE)\n", - infoPtr->hwndSelf, ntfret); } } @@ -5669,9 +5637,6 @@ TOOLBAR_EraseBackground (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) break; case CDRF_SKIPDEFAULT: return TRUE; - default: - FIXME("[%p] response %d not handled to NM_CUSTOMDRAW (CDDS_POSTERASE)\n", - infoPtr->hwndSelf, ntfret); } } return ret; diff --git a/dll/win32/iphlpapi/address.c b/dll/win32/iphlpapi/address.c index 2c124195fbd..e3ac92588c5 100644 --- a/dll/win32/iphlpapi/address.c +++ b/dll/win32/iphlpapi/address.c @@ -331,8 +331,8 @@ GetAdaptersAddresses( DWORD MIN_SIZE = 15 * 1024; PIP_ADAPTER_ADDRESSES PreviousAA = NULL; - FIXME("GetAdaptersAddresses - Semi Stub: Family %u, Flags 0x%08x, Reserved %p, pAdapterAddress %p, pOutBufLen %p.\n", - Family, Flags, Reserved, pAdapterAddresses, pOutBufLen); + TRACE("Family %u, Flags 0x%08x, Reserved %p, pAdapterAddress %p, pOutBufLen %p\n", + Family, Flags, Reserved, pAdapterAddresses, pOutBufLen); if (!pOutBufLen) return ERROR_INVALID_PARAMETER; @@ -488,9 +488,9 @@ GetAdaptersAddresses( CurrentAA->IfType = Entry->if_type; if(Entry->if_operstatus >= IF_OPER_STATUS_CONNECTING) CurrentAA->OperStatus = IfOperStatusUp; - else + else CurrentAA->OperStatus = IfOperStatusDown; - + /* Next items */ Ptr = (BYTE*)(CurrentAA + 1); diff --git a/drivers/filesystems/mup/mup.c b/drivers/filesystems/mup/mup.c index dfc4e71cf97..30a894a614b 100644 --- a/drivers/filesystems/mup/mup.c +++ b/drivers/filesystems/mup/mup.c @@ -1332,7 +1332,7 @@ MupRerouteOpen(PFILE_OBJECT FileObject, PWSTR FullPath; ULONG TotalLength; - DPRINT1("Rerouting %wZ with %wZ\n", &FileObject->FileName, &UncProvider->DeviceName); + DPRINT("Rerouting %wZ with %wZ\n", &FileObject->FileName, &UncProvider->DeviceName); /* Get the full path name (device name first, and requested file name appended) */ TotalLength = UncProvider->DeviceName.Length + FileObject->FileName.Length; @@ -1804,7 +1804,7 @@ QueryPathCompletionRoutine(PDEVICE_OBJECT DeviceObject, Prefix->ExternalAlloc = TRUE; /* Insert the accepted prefix in the table of known prefixes */ - DPRINT1("%wZ accepted %wZ\n", &Prefix->UncProvider->DeviceName, &Prefix->AcceptedPrefix); + DPRINT("%wZ accepted %wZ\n", &Prefix->UncProvider->DeviceName, &Prefix->AcceptedPrefix); ExAcquireResourceExclusiveLite(&MupPrefixTableLock, TRUE); if (RtlInsertUnicodePrefix(&MupPrefixTable, &Prefix->AcceptedPrefix, &Prefix->PrefixTableEntry)) { @@ -1923,7 +1923,7 @@ CreateRedirectedFile(PIRP Irp, return STATUS_INVALID_DEVICE_REQUEST; } - DPRINT1("Request for opening: %wZ\n", &FileObject->FileName); + DPRINT("Request for opening: %wZ\n", &FileObject->FileName); Referenced = FALSE; BreakOnFirst = TRUE; @@ -2130,7 +2130,7 @@ CreateRedirectedFile(PIRP Irp, ExReleaseResourceLite(&MasterQueryContext->QueryPathListLock); /* Query the provider !*/ - DPRINT1("Requesting UNC provider: %wZ\n", &UncProvider->DeviceName); + DPRINT("Requesting UNC provider: %wZ\n", &UncProvider->DeviceName); DPRINT("Calling: %wZ\n", &UncProvider->DeviceObject->DriverObject->DriverName); Status = IoCallDriver(UncProvider->DeviceObject, QueryIrp); } diff --git a/drivers/parallel/parport/fdo.c b/drivers/parallel/parport/fdo.c index 82590607f48..572468e2c21 100644 --- a/drivers/parallel/parport/fdo.c +++ b/drivers/parallel/parport/fdo.c @@ -1,7 +1,6 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: Parallel Port Function Driver - * FILE: drivers/parallel/parport/fdo.c * PURPOSE: FDO functions */ @@ -22,8 +21,6 @@ AddDeviceInternal(IN PDRIVER_OBJECT DriverObject, UNICODE_STRING DeviceName; NTSTATUS Status; - DPRINT("AddDeviceInternal()\n"); - ASSERT(DriverObject); ASSERT(Pdo); @@ -107,13 +104,6 @@ FdoStartDevice(IN PDEVICE_OBJECT DeviceObject, { PFDO_DEVICE_EXTENSION DeviceExtension; ULONG i; -// ULONG Vector = 0; -// KIRQL Dirql = 0; -// KAFFINITY Affinity = 0; -// KINTERRUPT_MODE InterruptMode = Latched; -// BOOLEAN ShareInterrupt = TRUE; - - DPRINT("FdoStartDevice ()\n"); DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; @@ -150,18 +140,13 @@ FdoStartDevice(IN PDEVICE_OBJECT DeviceObject, for (i = 0; i < ResourceList->List[0].PartialResourceList.Count; i++) { PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor = &ResourceList->List[0].PartialResourceList.PartialDescriptors[i]; - PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptorTranslated = &ResourceListTranslated->List[0].PartialResourceList.PartialDescriptors[i]; switch (PartialDescriptor->Type) { case CmResourceTypePort: - DPRINT("Port: BaseAddress 0x%lx Length %lu\n", - PartialDescriptor->u.Port.Start.u.LowPart, - PartialDescriptor->u.Port.Length); - if (DeviceExtension->BaseAddress == 0) { - if (PartialDescriptor->u.Port.Length < 4) + if (PartialDescriptor->u.Port.Length < 3) return STATUS_INSUFFICIENT_RESOURCES; DeviceExtension->BaseAddress = PartialDescriptor->u.Port.Start.u.LowPart; @@ -169,31 +154,13 @@ FdoStartDevice(IN PDEVICE_OBJECT DeviceObject, break; case CmResourceTypeInterrupt: - DPRINT("Interrupt: Level %lu Vector %lu\n", - PartialDescriptorTranslated->u.Interrupt.Level, - PartialDescriptorTranslated->u.Interrupt.Vector); - -// Dirql = (KIRQL)PartialDescriptorTranslated->u.Interrupt.Level; -// Vector = PartialDescriptorTranslated->u.Interrupt.Vector; -// Affinity = PartialDescriptorTranslated->u.Interrupt.Affinity; - -// if (PartialDescriptorTranslated->Flags & CM_RESOURCE_INTERRUPT_LATCHED) -// InterruptMode = Latched; -// else -// InterruptMode = LevelSensitive; - -// ShareInterrupt = (PartialDescriptorTranslated->ShareDisposition == CmResourceShareShared); break; default: - DPRINT1("Other resource: \n"); break; } } - DPRINT("New LPT port: Base 0x%lx\n", - DeviceExtension->BaseAddress); - if (!DeviceExtension->BaseAddress) return STATUS_INSUFFICIENT_RESOURCES; @@ -230,8 +197,6 @@ FdoCreateRawParallelPdo( HANDLE KeyHandle; NTSTATUS Status; - DPRINT("FdoCreateRawParallelPdo()\n"); - FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; /* Create new device object */ @@ -348,8 +313,6 @@ FdoQueryBusRelations( UNREFERENCED_PARAMETER(IrpSp); - DPRINT("FdoQueryBusRelations()\n"); - DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; ASSERT(DeviceExtension->Common.IsFDO); @@ -375,8 +338,6 @@ FdoQueryBusRelations( Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; - DPRINT("Done\n"); - return STATUS_SUCCESS; } @@ -388,8 +349,6 @@ NTAPI AddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo) { - DPRINT("AddDevice(%p %p)\n", DriverObject, Pdo); - /* Serial.sys is a legacy driver. AddDevice is called once * with a NULL Pdo just after the driver initialization. * Detect this case and return success. @@ -510,8 +469,6 @@ FdoPnp(IN PDEVICE_OBJECT DeviceObject, ULONG_PTR Information = 0; NTSTATUS Status; - DPRINT("FdoPnp()\n"); - Stack = IoGetCurrentIrpStackLocation(Irp); MinorFunction = Stack->MinorFunction; @@ -543,8 +500,6 @@ FdoPnp(IN PDEVICE_OBJECT DeviceObject, IRP_MN_SURPRISE_REMOVAL 0x17 */ case IRP_MN_START_DEVICE: /* 0x0 */ - DPRINT("IRP_MJ_PNP / IRP_MN_START_DEVICE\n"); - ASSERT(((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.PnpState == dsStopped); /* Call lower driver */ @@ -552,8 +507,8 @@ FdoPnp(IN PDEVICE_OBJECT DeviceObject, if (NT_SUCCESS(Status)) { Status = FdoStartDevice(DeviceObject, - Stack->Parameters.StartDevice.AllocatedResources, - Stack->Parameters.StartDevice.AllocatedResourcesTranslated); + Stack->Parameters.StartDevice.AllocatedResources, + Stack->Parameters.StartDevice.AllocatedResourcesTranslated); } break; @@ -561,7 +516,6 @@ FdoPnp(IN PDEVICE_OBJECT DeviceObject, switch (Stack->Parameters.QueryDeviceRelations.Type) { case BusRelations: - DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); Status = FdoQueryBusRelations(DeviceObject, Irp, Stack); Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -579,11 +533,9 @@ FdoPnp(IN PDEVICE_OBJECT DeviceObject, break; case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* (optional) 0xd */ - DPRINT("IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n"); return ForwardIrpAndForget(DeviceObject, Irp); default: - DPRINT("Unknown minor function 0x%x\n", MinorFunction); return ForwardIrpAndForget(DeviceObject, Irp); } @@ -602,8 +554,6 @@ FdoPower(IN PDEVICE_OBJECT DeviceObject, { PDEVICE_OBJECT LowerDevice; - DPRINT("FdoPower()\n"); - LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice; PoStartNextPowerIrp(Irp); IoSkipCurrentIrpStackLocation(Irp); diff --git a/drivers/parallel/parport/misc.c b/drivers/parallel/parport/misc.c index f9a27bc7350..e5a7951abfb 100644 --- a/drivers/parallel/parport/misc.c +++ b/drivers/parallel/parport/misc.c @@ -39,7 +39,6 @@ ForwardIrpAndWait(IN PDEVICE_OBJECT DeviceObject, KeInitializeEvent(&Event, NotificationEvent, FALSE); IoCopyCurrentIrpStackLocationToNext(Irp); - DPRINT("Calling lower device %p\n", LowerDevice); IoSetCompletionRoutine(Irp, ForwardIrpAndWaitCompletion, &Event, TRUE, TRUE, TRUE); Status = IoCallDriver(LowerDevice, Irp); diff --git a/drivers/parallel/parport/parport.c b/drivers/parallel/parport/parport.c index ce89c320a14..0f2ecb3e953 100644 --- a/drivers/parallel/parport/parport.c +++ b/drivers/parallel/parport/parport.c @@ -124,8 +124,6 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, { ULONG i; - DPRINT("Parport DriverEntry\n"); - DriverObject->DriverUnload = DriverUnload; DriverObject->DriverExtension->AddDevice = AddDevice; diff --git a/drivers/parallel/parport/pdo.c b/drivers/parallel/parport/pdo.c index 0760ffabb4c..45a624d7e2b 100644 --- a/drivers/parallel/parport/pdo.c +++ b/drivers/parallel/parport/pdo.c @@ -162,7 +162,6 @@ PdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { NTSTATUS Status; - DPRINT("PdoPnp()\n"); Status = Irp->IoStatus.Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -178,8 +177,6 @@ PdoPower(IN PDEVICE_OBJECT DeviceObject, NTSTATUS Status; PIO_STACK_LOCATION IoStack; - DPRINT("PdoPower()\n"); - IoStack = IoGetCurrentIrpStackLocation(Irp); switch (IoStack->MinorFunction) diff --git a/ntoskrnl/po/power.c b/ntoskrnl/po/power.c index fe26c0f4620..7b8a56b4ebc 100644 --- a/ntoskrnl/po/power.c +++ b/ntoskrnl/po/power.c @@ -33,9 +33,10 @@ SYSTEM_POWER_CAPABILITIES PopCapabilities; static NTSTATUS NTAPI -PopRequestPowerIrpCompletion(IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PVOID Context) +PopRequestPowerIrpCompletion( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PVOID Context) { PIO_STACK_LOCATION Stack; PREQUEST_POWER_COMPLETE CompletionRoutine; @@ -306,8 +307,7 @@ PoInitSystem(IN ULONG BootPhase) IoRegisterPlugPlayNotification(EventCategoryDeviceInterfaceChange, PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES, (PVOID)&GUID_DEVICE_SYS_BUTTON, - IopRootDeviceNode-> - PhysicalDeviceObject->DriverObject, + IopRootDeviceNode->PhysicalDeviceObject->DriverObject, PopAddRemoveSysCapsCallback, NULL, &NotificationEntry); @@ -316,8 +316,7 @@ PoInitSystem(IN ULONG BootPhase) IoRegisterPlugPlayNotification(EventCategoryDeviceInterfaceChange, PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES, (PVOID)&GUID_DEVICE_LID, - IopRootDeviceNode-> - PhysicalDeviceObject->DriverObject, + IopRootDeviceNode->PhysicalDeviceObject->DriverObject, PopAddRemoveSysCapsCallback, NULL, &NotificationEntry); @@ -482,15 +481,15 @@ PoSetHiberRange(IN PVOID HiberContext, */ NTSTATUS NTAPI -PoCallDriver(IN PDEVICE_OBJECT DeviceObject, - IN OUT PIRP Irp) +PoCallDriver( + IN PDEVICE_OBJECT DeviceObject, + IN OUT PIRP Irp) { NTSTATUS Status; /* Forward to Io -- FIXME! */ Status = IoCallDriver(DeviceObject, Irp); - /* Return status */ return Status; } @@ -525,12 +524,13 @@ PoRegisterSystemState(IN PVOID StateHandle, */ NTSTATUS NTAPI -PoRequestPowerIrp(IN PDEVICE_OBJECT DeviceObject, - IN UCHAR MinorFunction, - IN POWER_STATE PowerState, - IN PREQUEST_POWER_COMPLETE CompletionFunction, - IN PVOID Context, - OUT PIRP *pIrp OPTIONAL) +PoRequestPowerIrp( + IN PDEVICE_OBJECT DeviceObject, + IN UCHAR MinorFunction, + IN POWER_STATE PowerState, + IN PREQUEST_POWER_COMPLETE CompletionFunction, + IN PVOID Context, + OUT PIRP *pIrp OPTIONAL) { PDEVICE_OBJECT TopDeviceObject; PIO_STACK_LOCATION Stack; @@ -625,7 +625,6 @@ VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp) { - UNIMPLEMENTED_ONCE; } /* @@ -999,7 +998,6 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction, } /* You should not have made it this far */ - // ASSERTMSG("System is still up and running?!\n", FALSE); DPRINT1("System is still up and running, you may not have chosen a yet supported power option: %u\n", PopAction.Action); break; } diff --git a/sdk/lib/cmlib/hivewrt.c b/sdk/lib/cmlib/hivewrt.c index ef4ceb001b6..157eb206290 100644 --- a/sdk/lib/cmlib/hivewrt.c +++ b/sdk/lib/cmlib/hivewrt.c @@ -13,6 +13,7 @@ static BOOLEAN CMAPI HvpWriteLog( PHHIVE RegistryHive) { +#if 0 // UNIMPLEMENTED ULONG FileOffset; UINT32 BufferSize; UINT32 BitmapSize; @@ -22,13 +23,6 @@ HvpWriteLog( ULONG LastIndex; PVOID BlockPtr; BOOLEAN Success; - static ULONG PrintCount = 0; - - if (PrintCount++ == 0) - { - UNIMPLEMENTED; - } - return TRUE; ASSERT(RegistryHive->ReadOnly == FALSE); ASSERT(RegistryHive->BaseBlock->Length == @@ -139,7 +133,7 @@ HvpWriteLog( { DPRINT("FileFlush failed\n"); } - +#endif // UNIMPLEMENTED return TRUE; } @@ -277,7 +271,6 @@ CMAPI HvHiveWillShrink(IN PHHIVE RegistryHive) { /* No shrinking yet */ - UNIMPLEMENTED; return FALSE; } diff --git a/win32ss/gdi/gdi32/objects/text.c b/win32ss/gdi/gdi32/objects/text.c index e00e01e50fe..cee5daff71f 100644 --- a/win32ss/gdi/gdi32/objects/text.c +++ b/win32ss/gdi/gdi32/objects/text.c @@ -540,7 +540,7 @@ ExtTextOutW( } else // Do nothing, old explorer pops this off. { - DPRINT1("GdiBCExtTextOut nothing\n"); + DPRINT("GdiBCExtTextOut nothing\n"); return TRUE; } } // Max 580 wchars, if offset 0 diff --git a/win32ss/user/user32/misc/imm.c b/win32ss/user/user32/misc/imm.c index b06bb5da1d8..265e4dc2196 100644 --- a/win32ss/user/user32/misc/imm.c +++ b/win32ss/user/user32/misc/imm.c @@ -1,11 +1,8 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll - * FILE: win32ss/user/user32/misc/imm.c * PURPOSE: User32.dll Imm functions * PROGRAMMER: Dmitry Chapyshev (dmitry@reactos.org) - * UPDATE HISTORY: - * 01/27/2009 Created */ #include @@ -17,16 +14,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(user32); #define IMM_INIT_MAGIC 0x19650412 - Imm32ApiTable gImmApiEntries = {0}; HINSTANCE ghImm32 = NULL; BOOL bImmInitializing = FALSE; BOOL ImmApiTableZero = TRUE; - /* - * This function should not be implemented, it is used, - * if you can not load function from imm32.dll + * This function should not be implemented, it is used, + * if you can not load function from imm32.dll */ BOOL WINAPI IMM_ImmIsIME(HKL hKL) { return 0; } HIMC WINAPI IMM_ImmAssociateContext(HWND hwnd, HIMC himc) { return 0; } @@ -46,55 +41,47 @@ UINT WINAPI IMM_ImmProcessKey(HWND hwnd, HKL hkl, UINT Vk, LPARAM lParam, DWORD HRESULT WINAPI GetImmFileName(PWSTR lpBuffer, UINT uSize) { - UINT length; - STRSAFE_LPWSTR Safe = lpBuffer; + UINT length; + STRSAFE_LPWSTR Safe = lpBuffer; - length = GetSystemDirectoryW(lpBuffer, uSize); - if ( length && length < uSize ) - { - StringCchCatW(Safe, uSize, L"\\"); - return StringCchCatW(Safe, uSize, L"imm32.dll"); - } - return StringCchCopyW(Safe, uSize, L"imm32.dll"); -} + length = GetSystemDirectoryW(lpBuffer, uSize); + if (length && length < uSize) + { + StringCchCatW(Safe, uSize, L"\\"); + return StringCchCatW(Safe, uSize, L"imm32.dll"); + } + return StringCchCopyW(Safe, uSize, L"imm32.dll"); +} -/* - * @unimplemented - */ +// @unimplemented BOOL WINAPI IntInitializeImmEntryTable(VOID) { WCHAR ImmFile[MAX_PATH]; HMODULE imm32 = ghImm32; if (gImmApiEntries.pImmIsIME != 0) - { - ERR("Imm Api Table Init 1\n"); - return TRUE; - } + return TRUE; GetImmFileName(ImmFile, sizeof(ImmFile)); - TRACE("File %ws\n",ImmFile); if (imm32 == NULL) - { - imm32 = GetModuleHandleW(ImmFile); - } + imm32 = GetModuleHandleW(ImmFile); if (imm32 == NULL) { imm32 = ghImm32 = LoadLibraryW(ImmFile); if (imm32 == NULL) { - ERR("Did not load!\n"); - return FALSE; + ERR("Did not load\n"); + return FALSE; } return TRUE; } if (ImmApiTableZero) { - ImmApiTableZero = FALSE; - ZeroMemory(&gImmApiEntries, sizeof(Imm32ApiTable)); + ImmApiTableZero = FALSE; + ZeroMemory(&gImmApiEntries, sizeof(Imm32ApiTable)); } gImmApiEntries.pImmIsIME = (BOOL (WINAPI*)(HKL)) GetProcAddress(imm32, "ImmIsIME"); @@ -161,13 +148,11 @@ BOOL WINAPI IntInitializeImmEntryTable(VOID) if (!gImmApiEntries.pImmNotifyIME) gImmApiEntries.pImmNotifyIME = IMM_ImmNotifyIME; - /* - * TODO: Load more functions from imm32.dll - * Function like IMPSetIMEW, IMPQueryIMEW etc. call functions - * from imm32.dll through pointers in the structure gImmApiEntries. - * I do not know whether it is necessary to initialize a table - * of functions to load user32 (DLL_PROCESS_ATTACH) - */ + // TODO: Load more functions from imm32.dll + // Function like IMPSetIMEW, IMPQueryIMEW etc. call functions + // from imm32.dll through pointers in the structure gImmApiEntries. + // I do not know whether it is necessary to initialize a table + // of functions to load user32 (DLL_PROCESS_ATTACH) gImmApiEntries.pImmRegisterClient = (BOOL (WINAPI*)(PVOID, HINSTANCE)) GetProcAddress(imm32, "ImmRegisterClient"); if (!gImmApiEntries.pImmRegisterClient) @@ -182,46 +167,39 @@ BOOL WINAPI IntInitializeImmEntryTable(VOID) BOOL WINAPI InitializeImmEntryTable(VOID) { - bImmInitializing = TRUE; - return IntInitializeImmEntryTable(); + bImmInitializing = TRUE; + return IntInitializeImmEntryTable(); } BOOL WINAPI User32InitializeImmEntryTable(DWORD magic) { - TRACE("Imm (%x)\n", magic); - if (magic != IMM_INIT_MAGIC) return FALSE; if (gImmApiEntries.pImmIsIME != 0) - { - ERR("Imm Api Table Init 2\n"); - return TRUE; - } + return TRUE; IntInitializeImmEntryTable(); if (ghImm32 == NULL && !bImmInitializing) { - WCHAR ImmFile[MAX_PATH]; - GetImmFileName(ImmFile, sizeof(ImmFile)); - ghImm32 = LoadLibraryW(ImmFile); - if (ghImm32 == NULL) - { - ERR("Did not load! 2\n"); - return FALSE; - } + WCHAR ImmFile[MAX_PATH]; + GetImmFileName(ImmFile, sizeof(ImmFile)); + ghImm32 = LoadLibraryW(ImmFile); + if (ghImm32 == NULL) + { + ERR("Did not load\n"); + return FALSE; + } } -#if 0 // For real Imm32.dll testing!!!! +#if 0 // For real Imm32.dll testing if (ghImm32 && !gImmApiEntries.pImmRegisterClient(&gSharedInfo, ghImm32)) - { - ERR("Wine is stubed!\n"); - } + ERR("Wine is stubed\n"); #endif return TRUE; } -LRESULT WINAPI ImeWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode ) // ReactOS +LRESULT WINAPI ImeWndProc_common(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode) // ReactOS { PWND pWnd; PIMEUI pimeui; @@ -229,32 +207,32 @@ LRESULT WINAPI ImeWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa pWnd = ValidateHwnd(hwnd); if (pWnd) { - if (!pWnd->fnid) - { - if (msg != WM_NCCREATE) - { - if (unicode) - return DefWindowProcW(hwnd, msg, wParam, lParam); - return DefWindowProcA(hwnd, msg, wParam, lParam); - } - NtUserSetWindowFNID(hwnd, FNID_IME); - pimeui = HeapAlloc( GetProcessHeap(), 0, sizeof(IMEUI) ); - SetWindowLongPtrW(hwnd, 0, (LONG_PTR)pimeui); - } - else - { - if (pWnd->fnid != FNID_IME) - { - ERR("Wrong window class for Ime! fnId 0x%x\n",pWnd->fnid); - return 0; - } - pimeui = ((PIMEWND)pWnd)->pimeui; - if (pimeui == NULL) - { - ERR("Window is not set to IME!\n"); - return 0; - } - } + if (!pWnd->fnid) + { + if (msg != WM_NCCREATE) + { + if (unicode) + return DefWindowProcW(hwnd, msg, wParam, lParam); + return DefWindowProcA(hwnd, msg, wParam, lParam); + } + NtUserSetWindowFNID(hwnd, FNID_IME); + pimeui = HeapAlloc(GetProcessHeap(), 0, sizeof(IMEUI)); + SetWindowLongPtrW(hwnd, 0, (LONG_PTR)pimeui); + } + else + { + if (pWnd->fnid != FNID_IME) + { + ERR("Wrong window class for Ime\n"); + return 0; + } + pimeui = ((PIMEWND)pWnd)->pimeui; + if (pimeui == NULL) + { + ERR("Window is not set to IME\n"); + return 0; + } + } } if (msg==WM_CREATE || msg==WM_NCCREATE) @@ -262,13 +240,13 @@ LRESULT WINAPI ImeWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa if (msg==WM_NCDESTROY) { - HeapFree( GetProcessHeap(), 0, pimeui ); + HeapFree(GetProcessHeap(), 0, pimeui); SetWindowLongPtrW(hwnd, 0, 0); NtUserSetWindowFNID(hwnd, FNID_DESTROY); } if (unicode) - return DefWindowProcW(hwnd, msg, wParam, lParam); + return DefWindowProcW(hwnd, msg, wParam, lParam); return DefWindowProcA(hwnd, msg, wParam, lParam); } @@ -282,32 +260,28 @@ LRESULT WINAPI ImeWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) return ImeWndProc_common(hwnd, msg, wParam, lParam, TRUE); } -BOOL -WINAPI -UpdatePerUserImmEnabling(VOID) +BOOL WINAPI UpdatePerUserImmEnabling(VOID) { - BOOL Ret = NtUserCallNoParam(NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING); - if ( Ret ) - { - if ( gpsi->dwSRVIFlags & SRVINFO_IMM32 ) + BOOL Ret = NtUserCallNoParam(NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING); + if (Ret) { - HMODULE imm32 = GetModuleHandleW(L"imm32.dll"); - if ( !imm32 ) - { - imm32 = LoadLibraryW(L"imm32.dll"); - if (!imm32) + if (gpsi->dwSRVIFlags & SRVINFO_IMM32) { - ERR("UPUIE: Imm32 not installed!\n"); - Ret = FALSE; + HMODULE imm32 = GetModuleHandleW(L"imm32.dll"); + if (!imm32) + { + imm32 = LoadLibraryW(L"imm32.dll"); + if (!imm32) + { + ERR("Imm32 not installed\n"); + Ret = FALSE; + } + } } - } } - } - return Ret; + return Ret; } -static const WCHAR imeW[] = {'I','M','E',0}; - BOOL WINAPI RegisterIMEClass(VOID) @@ -318,24 +292,19 @@ RegisterIMEClass(VOID) ZeroMemory(&WndClass, sizeof(WndClass)); WndClass.cbSize = sizeof(WndClass); - WndClass.lpszClassName = imeW; + WndClass.lpszClassName = L"IME"; WndClass.style = CS_GLOBALCLASS; WndClass.lpfnWndProc = ImeWndProcW; WndClass.cbWndExtra = sizeof(LONG_PTR); WndClass.hCursor = LoadCursorW(NULL, IDC_ARROW); - atom = RegisterClassExWOWW( &WndClass, - 0, - FNID_IME, - 0, - FALSE); + atom = RegisterClassExWOWW(&WndClass, 0, FNID_IME, 0, FALSE); if (atom) { - RegisterDefaultClasses |= ICLASS_TO_MASK(ICLS_IME); - TRACE("Register IME Class!\n"); - return TRUE; + RegisterDefaultClasses |= ICLASS_TO_MASK(ICLS_IME); + return TRUE; } - ERR("Failed to register IME Class!\n"); + ERR("Failed to register IME Class\n"); return FALSE; } @@ -344,8 +313,7 @@ RegisterIMEClass(VOID) */ BOOL WINAPI CliImmSetHotKey(DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKl) { - UNIMPLEMENTED; - return FALSE; + return FALSE; } /* @@ -355,7 +323,6 @@ BOOL WINAPI IMPSetIMEW(HWND hwnd, LPIMEPROW ime) { - UNIMPLEMENTED; return FALSE; } @@ -366,7 +333,6 @@ BOOL WINAPI IMPQueryIMEW(LPIMEPROW ime) { - UNIMPLEMENTED; return FALSE; } @@ -377,7 +343,6 @@ BOOL WINAPI IMPGetIMEW(HWND hwnd, LPIMEPROW ime) { - UNIMPLEMENTED; return FALSE; } @@ -388,7 +353,6 @@ BOOL WINAPI IMPSetIMEA(HWND hwnd, LPIMEPROA ime) { - UNIMPLEMENTED; return FALSE; } @@ -399,7 +363,6 @@ BOOL WINAPI IMPQueryIMEA(LPIMEPROA ime) { - UNIMPLEMENTED; return FALSE; } @@ -410,7 +373,6 @@ BOOL WINAPI IMPGetIMEA(HWND hwnd, LPIMEPROA ime) { - UNIMPLEMENTED; return FALSE; } @@ -421,7 +383,6 @@ LRESULT WINAPI SendIMEMessageExW(HWND hwnd, LPARAM lparam) { - UNIMPLEMENTED; return FALSE; } @@ -432,7 +393,6 @@ LRESULT WINAPI SendIMEMessageExA(HWND hwnd, LPARAM lparam) { - UNIMPLEMENTED; return FALSE; } @@ -443,7 +403,6 @@ BOOL WINAPI WINNLSEnableIME(HWND hwnd, BOOL enable) { - UNIMPLEMENTED; return FALSE; } @@ -454,7 +413,6 @@ BOOL WINAPI WINNLSGetEnableStatus(HWND hwnd) { - UNIMPLEMENTED; return FALSE; }