ImmDisableIME在xp下的bug

在将模块从服务迁移到界面进程后,在XP系统中出现死机现象。经QA反馈,问题可能与ImmDisableIME函数有关。通过搜索找到相关资料(http://www.devsuperpage.com/search/Articles.aspx?G=10&ArtID=30180),测试代码表明该函数在XP下存在bug,可能导致系统崩溃。
摘要由CSDN通过智能技术生成


以前模块在服务里面跑什么问题,这次移到界面进程,提测的时候QA反馈在XP下死机,然后自己单步到ImmDisableIME的时候出问题。

搜了下, http://www.devsuperpage.com/search/Articles.aspx?G=10&ArtID=30180


测试代码:

// adfs.cpp : Defines the entry point for the application.
//

#include "stdafx.h"

#include <windows.h>
#include <wchar.h>
#include <tchar.h>
#include <assert.h>
#include <process.h>
#include <stdio.h>

#pragma comment(lib, "imm32.lib")


#define EXTRA_THREAD_WINDOW_CLASS		L"C668F583-87AA-11d5-AE65-00904F30013B"

HANDLE	g_hEvent = 0;
HWND	g_hExtraWnd = 0;

LRESULT CALLBACK ExtraWndProc(HWND hWnd, UINT message, 
							  WPARAM wParam, LPARAM lParam)
{
	return DefWindowProc(hWnd, message, wParam, 
		lParam);
}

void __cdecl  ExtraThread(void* lParam)
{
	WNDCLASS wc;
	wchar_t szClassName[] = EXTRA_THREAD_WINDOW_CLASS;
	wc.style		
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
使用MFC编写的基于WINCE, WM6.x操作系统的 关于输入法控制函数的示例代码。 10/29/2008 The following table shows Input Method Manager (IMM) functions with a description of the purpose of each. In This Section EnumRegisterWordProc This function is an application-defined callback function used with the ImmEnumRegisterWord function. It is used to process data of register strings. ImmAssociateContext This function associates the specified input context with the specified window. ImmAssociateContextEx This function changes the association between the input method context and the specified window or its children. ImmConfigureIME This function displays the configuration dialog box for the IME. ImmCreateContext This function creates a new input context, allocating memory for the context and initializing it. ImmCreateIMCC This function enables an IME to create a new input method context (IMC) component that is a member of an IMC. ImmDestroyContext This function releases the input context and frees any memory associated with it. ImmDestroyIMCC This function enables an IME to destroy an input method context (IMC) component that is a member of an IMC. ImmDisableIME This function disables the IME for the current thread. ImmEnumRegisterWord This function enumerates the register strings having the specified reading string, style, and register string. ImmEscape This function carries out IME–specific subfunctions and is used mainly for locale-specific functions. ImmGenerateMessage This function enables an IME to generate messages that are sent to the window associated with the input method context (IMC). ImmGetCandidateList This function retrieves a specified candidate list, copying the list to the specified buffer. ImmGetCandidateListCount This function retrieves the size, in bytes, of the candidate lists. ImmGetCandidateWindow This function gets information about the candidate list window. ImmGetCompositionFont This function retrieves information about the logical font currently used to display characters in the composition window. ImmGetCompositionString This function retrieves information about the composition string. ImmGetCompositionWindow This function gets information about the composition window. ImmGetContext This function retrieves the input context associated with the specified window. ImmGetConversionList This function retrieves the list of characters or words from one character or word. ImmGetConversionStatus This function gets the current conversion status. ImmGetConversionStatusForeground This function retrieves the current IME conversion and sentences modes for the foreground thread. ImmGetDefaultIMEWnd This function gets the default window handle to the IME class. ImmGetDescription This function copies the description of the IME to the specified buffer. ImmGetGuideLine This function gets information about errors. Applications use the information to notify users. ImmGetHotKey This function retrieves the value of the IME hot key. ImmGetIMCCLockCount This function enables an IME to get the lock count of the input method context (IMC) component. ImmGetIMCCSize This function enables an IME to get the size of the input method context (IMC) component. ImmGetIMEFileName This function gets the file name of the IME associated with the specified keyboard layout. ImmGetImeMenuItems This function retrieves the menu items that are registered in the IME menu. ImmGetOpenStatus
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值