• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mapping C(void *) void pointer - JNI---- !!!URGENT!!!!  RSS feed

 
Vidya Sagar Pallikonda
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I am using JNI to call c code that accesses sybase database from my java application.
In that I need to call a c routine which takes a void * as a parameter. Wht would be the equivalent parameter in Java for C's void * parameter that I can send while I make the call to that function.
This is how the function in C looks like..that I am calling from JNI..!!!
int CTInit(void *ref, int debugLevel)
What is that I should send for void *ref from java whenever I call CTInit function ?
An urgent help is highly appreciated since this is very urgent !!!
Thnks in adv,
SAGAR
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi SAGAR,
The $64000 question here is what does the CTInit() function do and, more importantly, what does it plan to do with that void pointer? If you didn't write the CTInit function yourself, then you need to completely understand what it is doing and what it expects. If you did not write the function yourself, then you probably need to write a proxy native function which can be called from your Java app and makes the call to CTInit for you.
Michael Morris
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!