IImePad, IImePadApplet Interface specification

Overview

IImePad, IImePadApplet are both COM based interface of MSIME98. IImePad provides the Architecture for non hardware keyboard input method (software keyboard, HW recognition, etc.) IImePad manages IImePadApplet, and intermediates between other IME Component and IImePadApplet. The Request for inputting composition string from IImePadApplet is transfer to other MSIME Component through IImePad.

IImePadApplet is one interface for ImePad's Applet. Applet is implemented as DLL module. It provides IImePadApplet interface as inproc server. Users can implement multiple IImePadApplet interfaces in one DLL. To specify and emulate IImePadApplet interface in Applet DLL, Applet has to provide IImeSpecifyApplets interface also. All interacts are global interface, defined in imepad.h

This documents describes interface definition of IImePad, IImePadApplet, and IImeSpecifyApplets to realize these implementations.

IImePad

The IImePad interface specifies methods that handle several requests from IImePadApplet. Only one method Request() is provided, and IImePadApplet can request several methods with RequestId.

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interface

AddRef

Increment reference count

Release

Decrement reference count


IImePad methods

Description

Request

request several method with RequestId.


IImePad::Request

The Request() is called by IImePadApplet with RequestId to handle composition string, and other requests.

HRESULT Request(
    IImePadApplet *pIImePadApplet,
    INT reqId,
    WPARAM wParam,
    LPARAM lParam
); 

ImePadApplet [in] set self Applet Interface pointer.

reqId [in] specifies IMEPAD's Request ID

wParam [in/out] Specifies additional Request ID specific information

Param [in/out] Specifies additional Request ID specific information

Return Value

   S_OK    Success 
   S_FALSE Failure

Remarks

Request method is similar to Win32API's SendMessage(). Set the Request ID and request id related wParam, lParam value.


RequestID

IMEPADREQ_INSERTSTRING

Applet can use IMEPADREQ_INSERTSTRING to insert string to Application as composition string.

wParam = (WPARAM)lpwstr;
lParam = 0;

Parameters

lpwstr Value of wParam, Point to the null-terminated string that is to be inserted to the Application.

Return value

S_OK     success
S_FALSE error

IMEPADREQ_INSERTSTRINGCANDIDATE

Applet can use IMEPADREQ_INSERTSTRINGCANDIDATE to insert string and its candidate string to Application.

wParam = (LPIMESTRINGCANDIDATE)lpStringCandidate;
lParam = 0;

Parameters

lpitem

Value of wParam, Point to the IMESTRINGCANDIDATE structure, that includes NULL terminated LPWSTR list.


Return Value

S_OK success
S_FALSE error

IMEPADREQ_SENDCONTROL

Applet can use IMEPADREQ_SENDCONTROL to control composition string,  caret, etc., in Application.

wParam = (WPARAM)ctrl;<
lParam = 0; 

ctrl Value of wParam, specifies Control value that requests IME to process composition string, caret position.

Value

Meaning

IMEPADCTRL_CONVERTALL

Convert all composition string

IMEPADCTRL_DETERMINALL

Determines all composition string

IMEPADCTRL_DETERMINCHAR

Determines specified count's composition string char.

IMEPADCTRL_CLEARALL

Clear all composition string

IMEPADCTRL_CARETLEFT

Move character caret to left

IMEPADCTRL_CARETRIGHT

Move character caret to right

IMEPADCTRL_CARETTOP

Move character caret to the top of composition string

IMEPADCTRL_CARETBOTTOM

Move character caret to the end of composition string

IMEPADCTRL_CARETBACKSPACE

Delete composition string's character before caret (like BACKSPACE key)

IMEPADCTRL_CARETDELETE

Delete composition string's character after caret (like DELETE key)

IMEPADCTRL_PHRASEDELETE

Delete composition string's phrase

IMEPADCTRL_INSERTSPACE

Insert space character. Full width or Half Width depends on IME configuration.

IMEPADCTRL_INSERTFULLSPACE

Insert FULL width space.

IMEPADCTRL_INSERTHALFSPACE

Insert Half width space.

IMEPADCTRL_ONIME

Set IME ON.

IMEPADCTRL_OFFIME

Set IME OFF

IMEPADCTRL_ONPRECONVERSION

Set preconversion ON

IMEPADCTRL_OFFPRECONVERSION

Set preconversion OFF

IMEPADCTRL_PHONETICCANDIDATE Open IME's candidate

Return Value

S_OK Success
S_FALSE Failure

IMEPADREQ_GETCOMPOSITIONSTRING

Applet can use IMEPADREQ_GETCOMPOSTIONSTRING to get composition string in application.

wParam = (WPARAM)lpwstr;
lParam = (LPARAM)nMaxCount;

Parameters

lpwstr

Value of wParam. Points to the buffer that is to receive the current composition string text.

nMaxCount

Value of wParam. Specifies the maximum number of characters to be copied, including the terminating null character


Return Value

S_OK Success
S_FALSE Failure

IMEPADREQ_SETAPPLETSIZE

Applet can use IMEPADREQ_SETAPPLETSIZE to set new applet window size.

wParam = MAKEWPARAM(width, height);
lParam = no use

Parameters

Width, height Value of wParam. Set the new Applet width and height.


Return Value

S_OK Success
S_FALSE Failure


IMEPADREQ_SETAPPLETDATA

Applet can use IMEPADREQ_SETAPPLETDATA to set Applet original data. It is saved to registry, and can get it with IMEPADREQ_GETAPPLETDATA.

Param = (WPARAM)(PBYTE)pByte;
lParam = (LPARAM)(INT)size;

Parameters

pByte

Value of wParam. Set the address that you want to write it to the registry. You can get this data with IMEPADREQ_GETAPPLETDATA.

size

Value of lParam. Specify the pBytes's data size.

Return Value

S_OK Success
S_FALSE Failure

IMEPADREQ_GETAPPLETDATA

Applet can use IMEPADREQ_GETAPPLETDATA to get Applet original data.

wParam = (WPARAM)(PBYTE)pByte
lParam = (LPARMA)(INT)size

Parameters

pByte

Value of wParam. Set the buffer address that receive the applet's specified data.

size

Value of lParam. Specify the buffer's size.


IMEPADREQ_GETCOMPOSITIONSTRINGINFO

Applet can use IMEPADREQ_GETCOMPOSITIONSTRINGINFO to get current composition strings information.

wParam = (WPARAM)(LPIMECOMPOSITIONSTRINGINFO)lpImeCompInfo.
lParam = 0; //no use.

Structure

typedef struct tagIMECOMPOSITIONSTRINGINFO {
    INT iCompStrLen;
    INT iCaretPos; 
    INT iEditStart;
    INT iEditLen;
    INT iTargetStart;
    INT iTargetLen;
}IMECOMPOSITIONSTRINGINFO, *LPIMECOMPOSITIONSTRINGINFO;

iCompStrLen

The length of composition string

iCaretPos

The caret position in composition string

iEditStart

The start position in composition string which Applet can edit

iEditLen

The length of string that Applet can edit from iDetStart

iTargetStart

The start position in non-determined composition string

iTargetLen

The length of non-determined composition string from iTargetStart


Parameters

lpImeCompInfo

Value of wParam. Sepecify IMECOMPOSITIONSTRINGINFO structures address that receives the composition info.


Return Value

S_OK Success
S_FALSE Failure


IMEPADREQ_GETCOMPOSITIONSTRINGID

Applet can use IMEPADREQ_GETCOMPOSITIONSTRINID to get composition string and its each Characters ID

wParam = (WPARAM)(LPIMECHARINFO)lpCharInfo;
lParam = (LPARAM)(INT)dwMaxLen;

Structure

typedef struct tagIMECHARINFO {
   WCHAR wch;
   DWORD dwCharInfo;
}IMECHARINFO, *LPIMECHARINFO;

wch

Unicode character.

dwCharInfo

0xFF000000 & dwCharInfo: AppletId //Applet's Id
0x00FF & dwCharInfo: FEID_XX //Lang definition


0x0000FFFF & dwCharInfo : CharacterId


Parameters

lpCharInfo

Value of wParam. Address of buffer that is to receive IMESCHARINFO array. The length of this array is the same as that of the composition string that is returned by IMEPADREQ_GETCOMPOSITIONSTRING.

nMaxCount

Value of lParam. Specify the maximum number of IMEPADCHARINFO in the current composition string

Return Value

S_OK Success
S_FALSE Failure

Remarks

dwCharInfo includes Applet's Id, Lang Definition, character id.



IMEPADREQ_INSERTSTRINGINFO

Applet can use IMEPADREQ_INSERTSTRINGINFO to insert string to composition string with Fareast id, and can get Character Info.


wParam = (WPARAM)(LPIMESTRINGINFO)lpStrInfo;
lParam = (LPARAM)dwStartPos;

Parameters

lpStrInfo

Value of wParam. Set IMESTRINFO structure's address.

dwStartPos

Value of lParam. Set composition string position to insert new string.


Structure

typedef struct tabIMESTRINGINFO {
    DWORD dwFarEastId;
    LPWSTR lpwstr;
}IMESTRINGINFO, *LPIMESTRINGINFO;

dwFarEastId

Set FarEast language Id(FEID_XXXX)

lpwstr

Set NULL terminated string.


Return value

If this value is 0, it means function failed, otherwise CharacterId(non-zero) of appended/changed string is "First" character's id. The type of ID is DWORD.



IMEPADREQ_CHANGESTRINGINFO

Applet can use IMEPADREQ_CHANGESTRINGINFO to change composition string with new string with Fareast Id. and can get Character Id.

wParam = (WPARAM)(LPIMESTRINGINFO)lpInfo;
lParam = MAKELPARAM(wStartPos, wLength);

Parameters

lpInfo

Set address of IMESTRINGINFO structure.

wStartPos

LOWORD of lParam. Position in composition string to delete.

wLength

HIWORD of lParam. Length of composition string to delete. wStartPos and wStartPos+wLength must be between iEditStart and iEditStart+iEditLen that are return by IMEPADREQ_COMPOSITIONSTRINGINFO.


Return value

if this value is 0, it means function failed, otherwise CharacterId(non-zero) of appended/changed string's "First" characters id. The type of ID is DWORD.



IMEPADREQ_CHANGESTRING

Applet can use IMEPADREQ_CHANGESTRING to change composition string.

wParam = (WPARAM)(LPWSTR)lpwstr;
lParam = MAKELPARAM(wStartPos, wLength);

Parameters

lpwstr

Value of wParam. Set NULL terminated string.

wStartPos

LOWORD of lParam. Set composition string start position to change.

wLength

HIWORD of lParam. Length of composition string to change.wStartPos and wStartPos+wLength must be between iEditStart and iEditStart+iEditLen that are return by IMEPADREQ_COMPOSITIONSTRINGINFO.


Return Value

S_OK Success
S_FALSE Failure

Remarks

Difference from IMEPADEQ_CHANGESTRING is return value and can set Far east id.



IMEPADREQ_INSERTSTRINGCANDIDATEINFO

Applet can use IMEPADREQ_INSERTSTRINGCANDIDATEINFO to insert string with Candidate, and get Character Id.

wParam = (WPARAM)(LPIMESTRINGCANDIDATEINFO)lpCandInfo;
lParam = (LPARAM)(DWORD)dwStartPos;

Parameters

lpCandInfo

Value of wParam. Specify IMESTRINGCANDIDATEINFO structure's address, that includes NULL terminated LPWSTR list.

dwStartPos

Value of lParam. Specify the position in composition string where the lpwstr should be inserted.

'0

' means the top of composition string. dwStartPos must be between iEditStart and iEditEnd which are returned by IMEPADREQ_COMPOSITIONSTRINGINFO.


Structures

typedef struct tabIMEFAREASTINFO { 
    DWORD dwSize; 
    DWORD dwMask; 
    DWORD dwData[1]; 
}IMEFAREASTINFO, *LPIMEFAREASTINFO;

dwSize

Total structure size.

dwType

Data type.

0:  Multi-WSZ string with double NULL termination.  Each string is the reading (or phonetic symbol) of lpwstr.

Others: Reserved for future use.

dwData

Fareast spec data.


typedef struct tagIMESTRINGCANDIDATEINFO {
    DWORD dwFarEastId;
   LPIMEFAREASTINFO lpFarEastInfo;
   DWORD fInfoMask;
    INT iSelIndex;
    UINT uCount;
    LPWSTR lpwstr[1];
}IMESTRINGCANDIDATEINFO, *LPIMESTRINGCANDIDATEINFO;

dwFarEastId

Set Lang definition(FEID_XXX)

lpFarEastInfo

Set Language spec data(Can be NULL)

fInfoMask

Set Info Mask. (INFOMASK_XXXX)

Value Meaning
INFOMASK_NONE Do not specify info mask.
INFOMASK_QUERY_CAND Notify() is called with IMEPN_QUERYCAND.
INFOMASK_APPLY_CAND Notify() is called with IMEPN_APPLYCAND.
INFOMASK_APPLY_CAND_EX Notify() is called with IMEPN_APPLYCAND_EX.
INFOMASK_STRING_FIX Candidate strings specified in lpwstr are not converted in IME.

iSelIndex

Set select index

uCount

Set Candidate string count

lpwstr

Set candidate string(NULL terminated)


Return value

If this value is 0, it means function failed. Otherwise Character Id(non-zero) of appended/changed string's "First" characters id. The type of ID is WORD.


Remarks

Applet can use this Interface to insert string with candidate and have two choices. You can control it with fInfoMask's value

  1. Send string with candidate.

  2. First, send string of top candidate. If IME tries to show candidate list on composition string, IME sends notify (IMEPN_QUERYCAND)to applet to tell that IME is about to show candidate. IMEPN_QUERYCAND notify comes with Character Id. If applet received this notify, applet can recognize what character's candidate that IME wants. Applet can call this interface to create and show candidate dynamically.



IMEPADREQ_CHANGESTRINGCANDIDATEINFO

Applet can use IMEPADREQ_CHANGETRINGCANDIDATEINFO to change composition string with Candidate, and get Character Id.

wParam = (WPARAM)(LPIMESTRINGCANDIDATEINFO)lpCandInfo;
lParam = MAKELPARAM(startPos, length);

Parameters

lpCandInfo

Value of wParam. Address of IMESTRINGCANDIDATEINFO structure.

startPos

LOWORD of lParam. Specify start position of changing string

length

HIWORD of lParam. Specify string length to be changed


Return value

If this value is 0, it means function failed. Otherwise Character Id(non-zero) of appended/changed strings's "First" characters id. The type of ID is WORD.


Remarks

This Interface is almost same as IMEPADREQ_INSERTSTRINGCANDIDATEINFO. The difference is that Applet can specify replace area of composition string.



IMEPADREQ_DELETESTRING

Applet can use IMEPADREQ_DELETESTRING to delete composition string.


wParam = MAKEWPARAM(wStartPos, wLength);
lParam = 0; //not used.

Parameters

wStartPos

LOWORD of wParam. Position in composition string to delete.

wLength

HIWORD of wParam. Length of composition string to delete. wStartPos and wStartPos+wLength must be between iEditStart and iEditStart+iEditLen that are return by IMEPADREQ_COMPOSITIONSTRINGINFO.


Return Value

S_OK success
S_FALSE error

IMEPADREQ_GETAPPLHWND

Applet can use IMEPADREQ_GETAPPLHWND to get Application window handle

wParam = (WPARAM)(HWND *)pHwnd;
lParam : not used

pHwnd Value of wParam, specifies HWND handle address to get Application window handle.

Return Value

S_OK success
S_FALSE error

IMEPADREQ_FORCEIMEPADWINDOWSHOW

Applet can use IMEPADREQ_FORCEIMPADWINDOWSHOW to keep imepad window visible.

wParam = (BOOL)fShow
lParam : not used

Remarks
In a normal case, IImePad UI is activated if IME's context is active. if Applet want to keep ImePad UI visible(when Applet invoke Property Dialog, etc.) Applet can keep ImePad UI visible with this request.


IMEPADREQ_POSTMODALNOTIFY

If Applet call Request with IMEPADREQ_POSTMODALNOTIFY, imepad call's applet's Notify() asynchronously with
specified notify id and user data. 

wParam = (WPARAM)notifyCode
lParam = (LPARAM)dwUserData;

Return Value

S_OK success
S_FALSE error

IImePadApplet

The IImePadApplet interface specifies methods called from IImePad, Create window, and several notify.

IUnknown Method

Description

QueryInterface

Returns pointers to supported interface

AddRef

Increment reference count

Release

Decrement reference count


IImePadApplet methods

Description

Initialize

Initialize Applet

Terminate

Terminate Applet

GetAppletConfig

Get applet configuration data

CreateUI

Called to Create applet window

Notify

Send notify


IImePadApplet::Initialize

The Initialize() method is called from IImePad to initialize IImePadApplet.

HRESULT Initialize(
   IUnknown *pIUnknown //IUnknown pointer to query IImePad
);

Parameters

pIUnknown
  [in] address of IUnknown interface. IImePadApplet can get IImePad interface pointer with using QueryInterface()

Remarks

When ImePad user interface created, IImePad calls this method, and sets IImePad interface pointer as argument. Applet can call pIImePad->Request() method with this pointer.


IImePadApplet::Terminate

The Terminate() method is called from IImePad to terminate IImePadApplet.

HRESULT Terminate(VOID);

Remarks
 
IImePad calls this method when finish to use IImePadApplet.

IImePadApplet::GetAppletConfig

The GetAppletConfig() is called from IImePad to get IImePadApplet's configuration data.

HRESULT GetAppletConfig(
    LPIMEAPPLETCFG lpCfg 
);

Return Value

S_OK success
S_FALSE error

Remarks

This method is called from IImePad to get Applet specific data. This method can be called before Calling Initialize () method. LPIMEAPPLETCFG data definition is as follows:

Structure

typedef struct tagAPPLETCFG {
    DWORD dwConfig; 
    WCHAR wchTitle[MAX_APPLETTITLE]; 
    WCHAR wchTitleFontFace[MAX_FONTFACE]; 
    DWORD dwCharSet; 
    INT iCategory; 
    HICON hIcon;
    LPARAM lReserved1;
    LPARAM lReserved2;
}MEAPPLETCFG, *LPIMEAPPLETCFG;

dwConfig

set combination of IPACFG_XXXX

IPACFG_NONE

Nothing

IPACFG_PROPERTY

Applet has property Dialog. If this flag has set, IImePad call Notify() with IMEPN_CFG

IPACFG_HELP

Applet has Help. If this flag has set, IImePad call Notify() with IMEPN_HELP

IPACFG_TITLE

wchTitle is Valid

IPACFG_TITLEFONTFACE

wchTitleFontFace & dwCharSet is Valid

IPACFG_CATEGORY

iCategory is Valid.

wchTitle

set Applet's title name with Unicode

wchTitleFontFace

set applet's title's fontFace name.

dwCharSet

set title's font'fontcter set.

iCategory

set Applets category id.

Value Meaning
IPACID_NONE Do not specify category.
IPACID_SOFTKEY Kind of soft keyboard applet.
IPACID_HANDWRITING Kind of HandWriting applet.
IPACID_STROKESEARCH Kind of Kanji character search applet with strokes.
IPACID_RADICALSEARCH Kind of Kanji character search applet with Radical
IPACID_SYMBOLSEARCH Kind of character search or symbol list applet.
IPACID_VOICE Kind of voice recognition applet.
IPACID_EPWING Kind of epwing applet.
IPACID_OCR Kind of OCR applet.

hIcon

set Icon handle for ImePad AppeltApplet's

lReserved1

Reserved

lReserved2

Reserved



IImePadApplet::CreateUI

The CreateUI() is called from IImePad to get Applet's window handle, style, size. Applet can set its window style, sizing policy.

HRESULT CreateUI(

    HWND hwndParent, 
    LPIMEAPPLETUI lpAppletUI
);

hwndParent

[in] window handle of IImePad GUI. Applet can create window as its child window.

lpAppletUI

[in] address of IMEAPPLETUI structure. Applet can set it's window style.

Structure

typedef struct tagIMEAPPLETUI {
    HWND hwnd;  
    DWORD dwStyle; 
    INT width; 
    INT height; 
    INT minWidth; 
    INT minHeight; 
    INT maxWidth; 
    INT maxHeight; 
    LPARAM lReserved1; 
    LPARAM lReserved2; 
}IMEAPPLETUI, *LPIMEAPPLETUI;

hwnd

Set the applet's window handle.

dwStyle

Set applet's window style. This is combination of below value.

IPAWS_ENABLED

Show Applet as Enabled window.

IPAWS_MAXMIZEBUTTON

Applet can be maximized.

IPAWS_SIZINGNOTIFY

Send IMEPN_SIZECHANGING notify to applet.

IPAWS_VERTICALFIXED

Vertically fixed.

IPAWS_HORIZONTALFIXED

Horizontally fixed.

IPAWS_SIZEFIXED

Size is fixed.

IPAWS_MAXWIDTHFIXED

Max width is fixed.

IPAWS_MAXHEIGHTFIXED

Max height is fixed.

IPAWS_MAXSIZEFIXED

Max size is fixed.

IPAWS_MINWIDTHFIXED

Min size is fixed.

width

Set the Applet window's initial width

height

Set the Applet window's initial height

minWidth

Set the Applet window's minimum width. It is valid only if IPAWS_MINWIDTHFIXED has set.

minHeight

Set the Applet window's minimum height. It is valid only if IPAWS_MINHEGHITFIXED has set

maxWidth

Set the Applet window's maximum width. It is valid only if IPAWS_MAXWIDTHFIXED has set.

maxHeight

Set the Applet window's maximum height. It is valid only if IPAWS_MAXHEIGHTFIXED has set.

lReserved1

Reserved

lReserved2

Reserved


Return Value

S_OK success
S_FALSE error


IImePadApplet::Notify

The Notify() is called from IImePad to notify some kind of information with notify code.

HRESULT Notify(
    IUnknown *pIUnknown, //Pointer of IUnknown to get IImePad interface pointer 
    INT notify, //notify code
    WPARAM wParam, //first parameter
    LPARAM lParam //second parameter
);

IUnknown *pIUnknown

[in] Pointer of IUnknown interface. To get IImePad interface pointer, use QueryInterface()

INT notify

[in] notify code

WPARAM wParam

[in/out] Specifies additional notify id specific information.

LPARAM lParam

[in/out] Specifies additional notify id specific information.


  


  


  


Return Value

S_OK success
S_FALSE error

notify code


IMEPN_ACTIVATE

lpwstr1 = (LPWSTR)wParam;
lpwstr2 = (LPWSTR)lParam;

IMEPN_ACTIVATE is called when IImePadApplet Window has activated. wParam, lParam maybe point reading, or converted string pointer if Applet has activated by MSIME. Normal case these value are NULL. so, if Applet use wParam & lParam as string, Applet must check this pointer is NULL or not.


IMEPN_INACTIVATE

wParam=0;
lParam=0;

IMEPN_INACTIVATE is called when IImePadApplet Window has inactivated.


IMEPN_CONFIG

wParam = 0;
lParam = 0;

IMEPN_CONFIG notification indicates that user select "Property" menu in IImePad GUI.This can be the trigger for the IImePadApplet to Show the applet specific configuration dialog.


IMEPN_MODECHANGED

convMode = (INT)wParam;
sentenceMode = (INT)lParam

IMEPN_MODECHANGED notification indicates that IME's Conversion mode or Sentence mode has changed. convMode and sentenceMode value is same that defined in imm.h


IMEPN_QUERYCAND

wParam = (WPARAM)(DWORD)dwCharInfo;
lParam = 0;

CharacterInfo

Value of wParam, that was provided by return value of IMEPAD interface,
IMEPADREQ_INSERTSTRINGCANDIDATEINFO,
IMEPADREQ_CHANGSTRINGCANDIDATEINFO, IMEPADREQ_INSERTSTRINGINFO,
IMEPADREQ_CHANGESTRINGINFO.


Remarks

If Applets inserted string with above interface, and fInfoMask includes NOTIFYMASK_QUERYCAND, when IME shows candidate of this character, IMEPAD sends this notify to Applet. If Applet can provide additional candidates at IMEPN_QUERYCNAD opportunity, it can add/change them through above INTERFACE. If there is no additional candidate in applet, applet has only to ignore this notify.


IMEPN_APPLYCAND

wParam = (DWORD)dwCharInfo;
lParam = (INT)nSelectedCand;

dwCharInfo

Value of wParam, which was provided by IMEPAD to Applet in the function call of
IMEPADREQ_INSERTSTRINGCANDIDATEINFO,
IMEPADREQ_CHANGSTRINGCANDIDATEINFO,
IMEPADREQ_INSERTSTRINGINFO,
IMEPADREQ_CHANGESTRINGINFO.

nSelectedCand

Value of lParam, specifies the number of the candidate chosen by user.

Remarks

If a user chooses one of the candidate in IME candidate list, and these candidate are inserted with IMEPADREQ_INSERTSTRINGCANDIDATEINFO, IMEPADREQ_CHANGESTRINGCANDIDATEINFO, IME will notify which candidate has selected by user through this notify. if Applet receives this notify, Applet should call IImePad::Request with IMEPADREQ_CHANGESTRING(INFO) and apply the proper changes of the composition string.


IMEPN_APPLYCANDEX

wParam = (DWORD)dwCharInfo;
lParam = (LPAPPLYCANDEXPARAM)lpApplyCandExParam;
typedef struct tagAPPLYCANDEXPARAM
{
    DWORD dwSize;  
            //Specifies the size of  
the structure, in bytes.
    LPWSTR lpwstrDisplay;    //Display string is set.
    LPWSTR lpwstrReading;    //Reading string is set.
    DWORD dwReserved;        //Reserved.
} APPLYCANDEXPARAM, *LPAPPLYCANDEXPARAM;

dwCharInfo

Value of wParam, which was provided by IMEPAD to Applet in the function call of


IMEPADREQ_INSERTSTRINGCANDIDATEINFO,


IMEPADREQ_CHANGSTRINGCANDIDATEINFO

lpApplyCandExParam

Value of lParam, pointer to APPLYCANDEXPARAM structure.

Remarks

If a user chooses one of the candidates in IME candidate list, and these candidate are inserted with IMEPADREQ_INSERTSTRINGCANDIDATEINFO, IMEPADREQ_CHANGESTRINGCANDIDATEINFO with INFOMASK_APPLYCAND_EX, IME will notify with this info. So applet can know what Reading string and Display string has selected in IME candidate list.

IImeSpecifyApplets

The IImeSpecifyApplets interface specifies methods called from IImePad, to emulate IImePadApplet's interface.

IUnknown Method

Description

QueryInterface

Returns pointers to supported interface

AddRef

Increment reference count

Release

Decrement reference count


IImePadApplet methods

Description

GetAppletIIDList

ReteruReturns IImePadApplet's interface ID List.

IImeSpecifyApplet::GetAppletIIDList

The GetAppletIIDList() is called from IImePad to emulate how many IImePadApplet's interfaces are implemimplemented

HRESULT GetAppletIIDList(
   REFIID refiid, //IImePadApplet IID
   LPAPPLETIIDLIST lpIIDList //address of APPLETIIDLIST
);

refiid

[in] IID of IImePadApplet. This IID defined in imepad.h as IID_IImePadApplet. This is for future enhancement of IImePadApplet.

lpIIDList

[in/out] address of APPLETIIDLIST. set Applet's IID list and it's count.

Structure

typedef struct tagAPPLETIDLIST {
   INT count;
   IID *pIIDList;
}APPLETIDLIST, *LPAPPLETIDLIST;

count

Set the IID count imepleimplementedis applet

pIIDList

Set the IID List. this must be Allocated with CoTaskMemAlloc().


Remarks

This method is called from IImePad, to emulate how many IImePadApplet interfaces are implemented in this Applet DLL module. Applet must compare refiid & IID_ImePadApplet that defined in imepad.h. and if refiid is same as IID_IImePadApplet that are compiled with imepad.h, applet can set IID list to pIIDList Because in the future, IImePadApplet may be enhanced. If IImePadApplet interface has enhanced, IID_IImePadApplet will be changed.