LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CP210xManufacturingDLL.h

Hi,
 
I am developing a production line test system that includes setting the PID, VID & serial number of a Silicon Labs CP2102 USB - UART bridge.
 
Silicon Labs have a DLL with exported header and lib files.
 
However, CVI (V7.0.0) will not compiler the header; producing the following error;
 
"CP210xManufacturingDLL.h"(166,31)   Illegal initialization for parameter 'bConvertToUnicode'.
 
CP210xDLL_API
CP210x_STATUS 
WINAPI
CP210x_SetSerialNumber(
 HANDLE cyHandle,
 LPVOID lpvSerialNumber,
 BYTE bLength,
 BOOL bConvertToUnicode = TRUE        <<<<<<<<<<<<<<< This line
 );
 
Removing the initalization removes the compiler error but will probably cause other errors.
 
Is there a bettor solution?
 
I have included "windows.h" before the dll header.
 
Cheers,
 
John C
0 Kudos
Message 1 of 4
(3,959 Views)

As long as you include all parameters to the dll function when you call it from CVI there should not be a problem.

JR

0 Kudos
Message 2 of 4
(3,955 Views)
Hi JR,
 
I see your point - thanks.
 
John C
0 Kudos
Message 3 of 4
(3,951 Views)

Hi, Johnc

 

Can you tell me how to slove this problem?

 

Thanks.

 

SCC 

0 Kudos
Message 4 of 4
(3,459 Views)