petesh / jna-mpr

Windows Mpr.dll for JNA
3 stars 2 forks source link

Problem running code #2

Open mak65kma opened 7 years ago

mak65kma commented 7 years ago

When running the code in Netbeans on Windows 10 I get the following error: Found library 'Mpr.dll' at Mpr.dll Exception in thread "main" com.sun.jna.LastErrorException: [2] The system cannot find the file specified. at com.sun.jna.Native.invokeInt(Native Method) at com.sun.jna.Function.invoke(Function.java:383) at com.sun.jna.Function.invoke(Function.java:315) at com.sun.jna.Library$Handler.invoke(Library.java:212) at com.sun.proxy.$Proxy0.WNetOpenEnumW(Unknown Source) at MprTest.testEnumW(MprTest.java:100) at MprTest.main(MprTest.java:125) Which file is the missing?

petesh commented 7 years ago

It's a bug in the implementation - there isn't a missing file; it's just a problem with the calling of the WNetOpenEnumW routine. It'd probably be easier to just take the code from the jna master if you want to have Mpr support.

dmigowski commented 5 years ago

You should note that in the Readme!

But I have to admid that without your sample I wouldn't have been able to use the mpr-code from JNA-platform. Thanks for that.