Hello,
Happened to need to call some methods from C++ generated Windows DLL (I do not have access to its source, but methods prototype are available). Looking around I have tried to use JNA examples.
I have compiled with SLC the library though when I try to use the method in B4J I get :
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
The C++ method prototype is:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
and I though to have the JNA side method prototype like:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
The SDK I can not post as it is licensed, but I can attach the attempted JNA code as I have it so far. I do not have experience with JNA or Java and will appreciate any help here or private.
Gabi.
			
			Happened to need to call some methods from C++ generated Windows DLL (I do not have access to its source, but methods prototype are available). Looking around I have tried to use JNA examples.
I have compiled with SLC the library though when I try to use the method in B4J I get :
			
				B4X:
			
		
		
		java.lang.Error: Invalid memory access
...
	The C++ method prototype is:
			
				B4X:
			
		
		
		C++ method :
unsigned short ASTDiscoverDevice(int &DeviceNum, char deviceName[][17],
unsigned char* deviceType);
	and I though to have the JNA side method prototype like:
			
				B4X:
			
		
		
		public int ASTDiscoverDevice(int DeviceNum, byte[] deviceName, byte[] deviceType);
	The SDK I can not post as it is licensed, but I can attach the attempted JNA code as I have it so far. I do not have experience with JNA or Java and will appreciate any help here or private.
Gabi.