VerQueryValue returning NULL for JNICALL
- From: "su_lal" <sujeeshlal@xxxxxxxxxxx>
- Date: Tue, 23 Aug 2005 18:13:13 +0530
Hi experts,
When I tired to extract the application names from a path Every thing
working perfectly expect for Java appliactions such as JBuilder, java EXEs
...etc. It runs perfectly when I tried to run without using JNICALL.. But
when I tried to use JNI it returns NULL
my code is like
buffLength=GetFileVersionInfoSize(pathOfExe,0);
if(GetFileVersionInfo(sTempStr.begin(),NULL,buffLength,szFileData))
{
bool bRet=VerQueryValue(szFileData,TEXT("\\VarFileInfo\\Translation"),
(void**)&lpTranslate,&nLen);
wsprintf( SubBlock,
TEXT("\\StringFileInfo\\%04x%04x\\FileDescription"),
lpTranslate[0].wLanguage,
lpTranslate[0].wCodePage);
VerQueryValue(szFileData,
SubBlock,
(void**)&lpBuffer,
&nLen);
}
//********
And output is like
1) EXE Path= C:\WINNT\Explorer.EXE
APPNAME = Windows Explorer // CORRECT
2)EXE Path= C:\JBuilder6\jdk1.3.1\bin\java.exe
APPNAME NAME= (null) //Error..
Why this happends?
Pls help
ani
.
- Follow-Ups:
- Re: VerQueryValue returning NULL for JNICALL
- From: William DePalo [MVP VC++]
- Re: VerQueryValue returning NULL for JNICALL
- Prev by Date: Re: Defining template class member functions in a separate module
- Next by Date: Re: "Microsofting" old Borland code
- Previous by thread: Visual C++ 6.0 serial port programming
- Next by thread: Re: VerQueryValue returning NULL for JNICALL
- Index(es):