 ZhuoCao
		
			ZhuoCao
		
		
		
		
		
		
		
		
	
			03-11-2013 08:28 PM
Hi Guys:
I am little lost on how to execute below for my call library function node, please give me your best shot and thank you in advance:
GetHardwareInfo
This function takes a pointer to an array of bytes which will be loaded with three values:
1. I2C frequency (note that the value returned is the I2C frequency divided by 2)
2. 3.3V Power Output State (0 = ‘On’ and 1=’Off’)
3. 5V Power Output State (0 = ‘On’ and 1=’Off’)
C/C++:
int GetHardwareInfo(uchar *HardwareData); 
Regards,
Joey
Solved! Go to Solution.
 James_R
		
			James_R
		
		
		
		
		
		
		
		
	
			03-11-2013 11:53 PM
GetValueByPointer.xnode
C:\Program Files (x86)\National Instruments\LabVIEW 2012\vi.lib\Utility\importsl\GetValueByPointer
 nathand
		
			nathand
		
		
		
		
		
		
		
		
	
			03-12-2013 12:53 AM
@ZhuoCao wrote:
GetHardwareInfo
This function takes a pointer to an array of bytes which will be loaded with three values:
An array of bytes is an array of 8-bit values (U8 or I8). Configure the Call Library node for that parameter as an array of U8, passed by Array Data Pointer.
03-12-2013 12:12 PM
Hello:
How do I pass the (uchar *Hardwaredata) into the DLL? It is suppose to be a pointer value, I am not sure how to set it up. What value do I connect to it in the block diagram, is it a string input?
 
 Bublina
		
			Bublina
		
		
		
		
		
		
		
		
	
			03-12-2013 12:43 PM
Hi,
For more, go : Help - Find examples, then Search, type DLL and open Call DLL example !
 nathand
		
			nathand
		
		
		
		
		
		
		
		
	
			03-12-2013 01:27 PM
No need to typecast to a string, just pass the array directly:
 Bublina
		
			Bublina
		
		
		
		
		
		
		
		
	
			03-12-2013 01:58 PM
Or some other of those many methods left 🙂
03-12-2013 03:28 PM
Thanks for all the support guys, unfortunately I tried both methodologies and still having error 1097 for passing the string pointer and the u8 array pointer. See below, am I missing anything else? I made two queries to the DLL and able to get the correct values back so I know I am connected to the DLL.
 Bublina
		
			Bublina
		
		
		
		
		
		
		
		
	
			03-12-2013 03:38 PM
Do you have the function code, especially the part where it operates the input *uchar ?
03-12-2013 03:40 PM - edited 03-12-2013 03:41 PM
No I don't, I will contact vendor below and see if I get more details on the function call.