The function expects a SAFEARRAY. Try the following
SAFEARRAY *keySafeArray;
//Alt-B, D, Alt-B
int strokes[] = {VAL_UNDERLINE_MODIFIER | 'B','D',VAL_UNDERLINE_MODIFIER | 'B'};
CA_Array1DToSafeArray (strokes, CAVT_INT, 3, &keySafeArray);
CVI_AppFakeKeystrokes (newCVI, NULL, keySafeArray, &returnVal);
This will build the distribution kit correctly provided you
- have already built a release EXE/DLL. Otherwise, CVI will prompt you to do it and you would need to have addtional keystrokes for that. Use the CVI_AppSetActiveConfiguration() to set the configuration and build the exe before you attempt to build the dist kit.
- have already set the CDK options previously. The dist kit will build with whatever options the CDK dialog was saved with previously. This is something you will need to do manually before you automate the process.
If you run into timing issues, you can use the CVI_AppSetKeystrokeInterval function.
Hope this helps
Bilal Durrani
NI