Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
Mar 14, 2000

Using Names for Java Methods that Differ from the Name the DLL Uses

You can use a name for a Java method that is different from the name the DLL uses when it exports the function. For example. you may need to conform to naming conventions prescribed by your own site. In that case, just use the @dll.import directive along with the entrypoint modifier.

For example. if you wanted to use the GetSysColor function, but wanted to change the first letter to lowercase, you would include the following:

 
/**@dll.import ("USER32",entrypoint="GetSysColor") */
  static native int getSysColor(int nIndex); 
The entrypoint modifier has now set up the aliasing for you.
Manoj K.
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap