Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

GetFileVersionInfoSize

843829Sep 23 2003 — edited Sep 24 2003
Hello all. The last view times I have posted in any forum I have not gotten many answers but I am really hoping I do on this one. I have been going at it all day and really need some pointers in hopes that someone can help me!!

I am trying to write some jni code to be able to find version info on certain files but using the version.dll file. So far I have:

JNIEXPORT void JNICALL
Java_testVersion_getFileVersion(JNIEnv *env, jobject obj, jstring st)
{
char* szFilename = strdup((*env)->GetStringUTFChars(env, st, 0));
DWORD set_to_zero;
DWORD version_buffer_size = GetFileVersionInfoSize((char *)st, &set_to_zero);

}

I know that it is not done but I was trying to do line by line so that I could see what was going on and compile as I go. My problem is that for some reason it will not link. Does anyone have any suggestions or has anyone done this before that could help me? Thank you.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2003
Added on Sep 23 2003
19 comments
536 views