Hi Wade -
ProName is a 16-bit character array with this defintion:
typedef wchar_t ProName[PRO_NAME_SIZE];
Where PRO_NAME_SIZE is defined as "32". My guess is that this line:
sprintf(provalue, "NO");
is causing this error:
Incompatible types = from 'unsigned short [32] to char *
You'll need an extra ProStringToWstring() statement, or you could
try wsprintf() or wcscpy() instead of sprintf():
#include <wchar.h>
wcscpy( provalue, L"NO" ) ;
Note that I changed the string "NO" to L"NO", inidicating that
this is a 16-bit string value.
Hope this helps -
|+| M a r k |+|
- Mark Stallard
- Raytheon Company
- Sudbury, Massachusetts USA
"Wade Wyss" <->
07/31/2007 11:43 AM
Please respond to
"Wade Wyss" <->
To
-
cc
Subject
[proecus] - ProConfigoptGet()
I am trying to get the current value of an axis (on or off) using
ProConfigoptGet() According to what I see in the documentation this looks
correct. But I get the following warning on compile.
Incompatible types = from 'unsigned short [32] to char *
Code is:
// Toolkit variables for ProE
char prooption[32];
ProName provalue;
ProName woption;
ProLine wvalue;
// Variables for Turning off and back on the AXIS and displays that we
don't want in the drawing
ProLine axisvalue;
/***** Turn Off Axes *****/
sprintf(prooption, "AXIS_DISPLAY");
sprintf(provalue, "NO");
ProStringToWstring(woption, prooption);
ProStringToWstring(wvalue, provalue);
// Set a variable so that the current settings can be reset if needed
DebugPrint("Testing the value of AxisValue");
ProConfigoptGet(woption, axisvalue);
// Warning is on the above line
What am I doing wrong?
-----End Original Message-----