The documentation says that when mdlSystem_expandCfgVar() is used, you must free the resultant string by using mdlSystem_freeCfgVarBuffer(). Would that still apply when used in this manner?
char *fileToFind="$(_USTN_WORKSPACEROOT)Standards\\Data\\myFile.dat\0"; char keyinToSend[256]; sprintf_s( keyinToSend, sizeof(keyinToSend),"MyApp MyTask", mdlSystem_expandCfgVar(fileToFind) );
Thanks,
Bruce