How to use SHGetPathFromIDListEx()?

Hello Forum,

Previoulsy, I was using the SHGetPathFromIDList() to get the browser path in the Localised manner. This works till, Vista was not come into picture.

But now in the Vista peticularly in the Japanise Vista OS same funtion gives me the output in the English fomate which was giving in the Japanise format for the JPN - WinXP - 2002.

In the MSDN it is mentioned that for Vista support SHGetPathFromIDListEx() function should use. I am using the same but still that is not solving my problem. I am using following way to achieve the same:

// Browse for a folder and return its PIDL.
pidlBrowse = SHBrowseForFolder(&bi);

HINSTANCE hInst = LoadLibrary(“shell32.dll”);
if(hInst)
{
PFN fnPointer = (PFN)GetProcAddress( hInst, “SHGetPathFromIDListEx” );
if(fnPointer)
{
if((fnPointer)(pidlBrowse,(PWSTR) lpBuffer,MAX_PATH,GPFIDL_DEFAULT))
{
strFolder = lpBuffer;
bRet = TRUE;
}
}
}

Current Output -> lpBuffer contains English path for the JPN Charachters i.e. it is converting JPN string into English
Required OutPut–> lpBuffer should contain JPN path.

Can anybody tell me where am I going wrong? or What should I do to get the path in the JPN formate?

Thanks in advance.

-Jatin


Hello Forum,

Previoulsy, I was using the SHGetPathFromIDList() to get the browser path in the
Localised manner. This works till, Vista was not come into picture.

But now in the Vista peticularly in the Japanise Vista OS same funtion gives me
the output in the English fomate which was giving in the Japanise format for the
JPN - WinXP - 2002.

In the MSDN it is mentioned that for Vista support SHGetPathFromIDListEx()
function should use. I am using the same but still that is not solving my
problem. I am using following way to achieve the same:

// Browse for a folder and return its PIDL.
pidlBrowse = SHBrowseForFolder(&bi);

HINSTANCE hInst = LoadLibrary(“shell32.dll”);
if(hInst)
{
PFN fnPointer = (PFN)GetProcAddress( hInst, “SHGetPathFromIDListEx” );
if(fnPointer)
{
if((fnPointer)(pidlBrowse,(PWSTR) lpBuffer,MAX_PATH,GPFIDL_DEFAULT))
{
strFolder = lpBuffer;
bRet = TRUE;
}
}
}

Current Output -> lpBuffer contains English path for the JPN Charachters i.e. it
is converting JPN string into English
Required OutPut–> lpBuffer should contain JPN path.

Can anybody tell me where am I going wrong? or What should I do to get the path
in the JPN formate?


Thanks in advance.

-Jatin

TCHAR szPath[MAX_PATH+1];
LPITEMIDLIST pidl;
LPMALLOC pMalloc = NULL;
SHGetMalloc(&pMalloc);

SHGetSpecialFolderLocation ( NULL, CSIDL_STARTUP, &pidl );
SHGetPathFromIDList ( pidl, szPath );
//SHGetSpecialFolderPath(NULL, szPath, CSIDL_STARTUP , 0);

if(pidl)
{
pMalloc->Free(pidl);
}
pMalloc->Release();

??2007-04-17??xxxxx@mindtree.com д???
-------------------------------------------------------------------------------- Hello Forum, Previoulsy, I was using the SHGetPathFromIDList() to get the browser path in the Localised manner. This works till, Vista was not come into picture. But now in the Vista peticularly in the Japanise Vista OS same funtion gives me the output in the English fomate which was giving in the Japanise format for the JPN - WinXP - 2002. In the MSDN it is mentioned that for Vista support SHGetPathFromIDListEx() function should use. I am using the same but still that is not solving my problem. I am using following way to achieve the same: // Browse for a folder and return its PIDL. pidlBrowse = SHBrowseForFolder(&bi); HINSTANCE hInst = LoadLibrary(“shell32.dll”); if(hInst) { PFN fnPointer = (PFN)GetProcAddress( hInst, “SHGetPathFromIDListEx” ); if(fnPointer) { if((fnPointer)(pidlBrowse,(PWSTR) lpBuffer,MAX_PATH,GPFIDL_DEFAULT)) { strFolder = lpBuffer; bRet = TRUE; } } } Current Output -> lpBuffer contains English path for the JPN Charachters i.e. it is converting JPN string into English Required OutPut–> lpBuffer should contain JPN path. Can anybody tell me where am I going wrong? or What should I do to get the path in the JPN formate? -------------------------------------------------------------------------------- Thanks in advance. -Jatin — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer