I want to know how to inequivocally identifying a certain Java program from a call to Win32 DLL through JNI.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, January 24, 2007 07:17 AM

I am writting a DLL that can be used in a Java program and should not be used in another programs without express permission. I want to identify the program that is using my DLL and I want to know how can I do it. I have thought about accessing the JVM and finding out wich classes are loaded, and then storing the CRC of those classes in my DLL database. But I would not know what I could consider a Java 'program'. I have also thought about learning from the JVM somehow wich class was the first one loaded [the one with a static main()] and then locating its .class on the disk. But that would leave me on the same dillema: what else could I consider part of the 'program'?    More>>

I am writting a DLL that can be used in a Java program and should not be used in another programs without express permission. I want to identify the program that is using my DLL and I want to know how can I do it.


I have thought about accessing the JVM and finding out wich classes are loaded, and then storing the CRC of those classes in my DLL database. But I would not know what I could consider a Java 'program'.


I have also thought about learning from the JVM somehow wich class was the first one loaded [the one with a static main()] and then locating its .class on the disk. But that would leave me on the same dillema: what else could I consider part of the 'program'?

   <<Less

Re: I want to know how to inequivocally identifying a certain Java program from a call to Win32 DLL through JNI.

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, January 27, 2007 10:50 AM

so have some magic cookie, some shared secret, that your DLL knows, and the calling program has to provide, or your DLL won't cooperate.
About | Sitemap | Contact