how to call win api from java
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   J_Guru
Posted On:   Sunday, July 28, 2002 05:40 AM

what are the parameter types that our native methods have for windows API call say in VB shutdown dialog function declaration is Public Declare Function SHShutDownDialog Lib "shell32" _ Alias "#60" _ (ByVal dwReserved As Long) As Long Then I could call that like this SHShutDownDialog 0 ------------------------------ my question is how we do that in java public class ShutDown { static { System.loadLibrary("shell32"); } //how do I declare public native void SHShutDownDialog(long flag); public static void main (String arg[]) {    More>>
			
what are the parameter types that our native methods have for windows API call

say in VB shutdown dialog function declaration is

Public Declare Function SHShutDownDialog Lib "shell32" _
Alias "#60" _
(ByVal dwReserved As Long) As Long

Then I could call that like this

SHShutDownDialog 0

------------------------------

my question is how we do that in java

public class ShutDown {
static {
System.loadLibrary("shell32");
}
//how do I declare
public native void SHShutDownDialog(long flag);

public static void main (String arg[]) {
ShutDown shutdown = new ShutDown();
//how should I call
shutdown.SHShutDownDialog (0);
}
}

//this doesn't work... how should i declare and call the
//native function

Thanks
Any help appreciated.
   <<Less
About | Sitemap | Contact