Hi I am trying to pass a reference of HBITMAP data structure from a native method to a java class. Can anyone help me regarding this?? thanks Padmanabh
Hi, You cannot directly access a structure referenced in a native code and access the members in the Java code. What you can do is that convert the entire structure into a bytestream equivalent and return to the Java code as jbytearray so that you can have the data available in the structure. Please state the exact requirement so that I can help. Why do you want to pass the HBITMAP handle to the Java code? -------------- Vijay
Hi thanks for an immediate response. here is what i want to do. I am using a native api to generate a barcode component and i want to display this barcode as a BufferredImage in java. I can trasfer this thru system clipboard but i would like to avoid it since it is not threadsafe. So i need to transfer the HBITMAP data structure to java. For that i thought of getting the rgb array from HBITMAP and return as jbytearray ( which u have mentioned in ur answer ). but i dont know how exactly to get the rgb bytes from HBITMAP. and i dont know whether using this byte array and creating a raster ( or something ) in java will work. pls help regards, Padmanabh
Hi, I am not that much aware in the areas of imaging using Java. Please refer javax.swing.ImageIcon whether it could do any help, that supports only gif and jpeg.