#include <windows.h>
#include <msctf.h>
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize(0);
HRESULT hr = S_OK;
ITfInputProcessorProfiles *pProfiles;
hr = CoCreateInstance( CLSID_TF_InputProcessorProfiles,
NULL,
CLSCTX_INPROC_SERVER,
IID_ITfInputProcessorProfiles,
(LPVOID*)&pProfiles);
if(SUCCEEDED(hr))
{
IEnumTfLanguageProfiles* pEnumProf = 0;
hr = pProfiles->EnumLanguageProfiles(0x804, &pEnumProf);
if (SUCCEEDED(hr) && pEnumProf)
{
TF_LANGUAGEPROFILE proArr[2];
ULONG feOut = 0;
while (S_OK == pEnumP