[Tpm4java-users] Fw: dll error
Brought to you by:
tews
From: Andrés R. L. <des...@ho...> - 2008-04-20 09:58:13
|
Hi Teena, the tpmddl.dll file is used as a wrapper for the tpm device driver dll, the problem is that tpmdll.dll could be wrong. You have to get the source files and recompile the tpmdll.dll file. If you look at the code you will see (tpmdll.c): opentpm = (MyTddli_Open) GetProcAddress(dll, "Tddli_Open"); there is where the tpmdll get the address of the Tddli_Open function from your tpm device driver. The problem is that the name of the function is wrong, in my case it was: opentpm = (MyTddli_Open) GetProcAddress(dll, "TDDL_Open"); Note that there are similar instructions in the code: closetpm = (MyTddli_Close) GetProcAddress(dll, "Tddli_Close"); transmittpm = (MyTddli_TransmitData) GetProcAddress(dll, "Tddli_TransmitData"); You should change them all. The name of the functions in you tmp device driver could be different. I send you the tpmddl.dll an the c code with the modifications. Bye, Andrés. ----- Original Message ----- From: Teena To: tpm...@li... Sent: Sunday, April 20, 2008 2:53 AM Subject: [Tpm4java-users] dll error Hi, I am using TPM4Java API for my project and I got a similar error as found in the mailing list: http://sourceforge.net/mailarchive/forum.php?thread_name=22960f8a0612040744s43fca120l9b47e98bab0f1248%40mail.gmail.com&forum_name=tpm4java-users Exception in thread "main" java.lang.RuntimeException: couldn't init dll code: -2 at de.datenzone.tpm4java.TddlJniDeviceDriver.<init>(TddlJniDeviceDriver.java:74) at de.datenzone.tpm4java.TssFactory.getLowlevel(TssFactory.java:164) at de.datenzone.tpm4java.TssFactory.getHighLevel(TssFactory.java:182) at de.datenzone.tpm4java.Sha1Sum.main(Sha1Sum.java:26) I have STMicroelectronics TPM chip and I have the required dll file in system32 folder(tpmddl.dll). Any pointers what is happening? Any help/suggestions will be highly appreciated. Thanks in advance!! -- Regards, Teena ------------------------------------------------------------------------------ ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ------------------------------------------------------------------------------ _______________________________________________ Tpm4java-users mailing list Tpm...@li... https://lists.sourceforge.net/lists/listinfo/tpm4java-users |