Share via


Accessing the Conversion Service

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

To access the Pocket IME 2.0 conversion service:

  • Create an instance of the server and request a pointer to the IImeIPoint2 interface.
  • Call the CreateIImeIPointInstance function to create an instance of the IImeIPoint2 object and return a pointer to the IUnknown interface of the object.
  • Request a pointer to IImeIPoint2 interface in a subsequent call to the IUnknown::QueryInterface method.

The following code sample shows how to access the Pocket IME 2.0 conversion service:

Note

To make the following code example easier to read, error checking is not included. This code example should not be used in a release configuration unless it has been modified to include secure error handling.

// Get a proc address of CreateIImeIPointInstance
typedef HRESULT (WINAPI *fpCreateIP)   (REFCLSID clsid,
VOID **ppvObj);
fpCreateIP pfnCreateIP;
hLibKernel = LoadLibrary(TEXT("imejpp.dll"));
pfnCreateIP = (fpCreateIP) GetProcAddress(hLibKernel,
TEXT("CreateIImeIPointInstance"));
// Create an object
hRes = pfnCreateIP(IID_IUnknown, (VOID**) &pUnk);
// Request a pointer to IImeIPoint2 interface
pUnk->QueryInterface(IID_IImeIPoint2, (LPVOID*) &pIP);

See Also

Concepts

Creating a Notification Sink
Processing User Input from the Keyboard
Editing the Composition String
Processing User Input with Alternatives
Converting a Composition String
Creating the Candidate List
Determining the Composition String

Other Resources

Using the IImeIPoint2 Interface