ImmDisableIME在xp下的bug


以前模块在服务里面跑什么问题,这次移到界面进程,提测的时候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
在开发后台管理系统时,常见的 bug 有以下几种: 1. 数据显示错误:后台管理系统通常需要展示大量数据,可能会出现数据显示不正确的问题,比如数据缺失、数据重复、数据格式错误等。你可以检查数据源和数据处理逻辑,确保数据正确性。 2. 权限问题:后台管理系统一般会涉及到权限管理,不同用户可能有不同的权限。如果用户无法执行某些操作或者能够访问未授权的页面,可能是权限配置有问题。可以检查权限控制代码和数据库中的权限设置。 3. 表单验证问题:后台管理系统中常常包含表单提交操作,如果没有进行合适的表单验证,可能会导致数据错误或者安全问题。确保表单验证逻辑完善,并对用户输入进行合理的检查和过滤。 4. 数据库操作错误:后台管理系统通常需要对数据库进行增删改查操作,如果数据库操作有误,可能会导致数据错误或者无法正常操作。检查数据库操作的语句和逻辑,确保正确性和安全性。 5. 性能问题:后台管理系统可能面对大量的数据和并发请求,如果性能不佳,可能会导致页面加载缓慢或者响应延迟。使用性能分析工具,优化数据库查询、接口调用和前端渲染等环节。 当遇到后台管理系统的 bug 时,可以尝试以下解决方法: 1. 仔细检查代码,特别是涉及数据处理、权限控制和表单验证的部分。 2. 使用调试工具和日志记录,查看代码执行过程中的变量和错误信息。 3. 检查数据库操作,确保正确性和安全性。 4. 分析性能问题,优化关键路径和瓶颈点。 5. 如果遇到复杂问题,可以逐步缩小范围,创建最小可复现示例,以便更好地定位问题所在。 6. 寻求同事或开发者社区的帮助,分享问题并提供相关代码和错误信息。 希望这些信息对你有所帮助!如果你有更具体的问题或者需要进一步的帮助,请告诉我。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值