AdvertisementI'm writing JNI application for some C++ code. I don't have implementations of any functions but I'm pass values of parameters through my java program. e.g. in following OpenDevice function I can pass parallel port parameter(defined in C++) through Java. The implementation is just calling the function. It works.
........DWORD and BYTE are defined as unsigned long and unsigned char respectively.
now I want to read 'buffer' but when I try to read the buffer, the JVM fails.
Would any1 help me in above?
AdvertisementThe C function takes BYTE*, then the problem can be that you are not handling the Java native stuff correctly. Generally, you must have more C warpper code to create a jbyteArray using NewByteArray() in jni.h and copy data from BYTE buffer to it.
Can you show your Java native method signature?
- 1Changes in vendor details 10-11
- 2Help with PDF creation using CFDOCUMENT / iText 10-11
- 3I cant call a procedure within a data template 11-30
- 4Lockbox issue for discount amount and incorrect reference 11-30
- 5Oracle PO & PDOI 11-30
- 6It make sense changing from DB persistence mode to DBFS (or FSDB)mode? 11-30
- 7Restore old version of a document 11-30
- 8How to make HTTP call to encoded URL? 11-30
- 5200 : Error in executing query -- Hyperion Financial Reporting10/11
- Cannot sign in to verify my email address(new user)10/11
- Error 1935. An error occurred during the installation of assembly...10/11
- Can you use the itunes gift card to pay for apps, too?10/11
- My iTunes deleted everything in my library, again!10/11
- HP PAVILLION TS 15 NOTEBOOK11/30
- Add the carrier description/name on a sales order11/30
- Database access JSP page11/30
- Loading external .swf files issue...11/30
- Safarai for Windows crashes11/30