I am told Severity values
should read "NOTICE", "WARNING",
"FATAL" or "STOP" – sorry for the typo.
De : keilholz, werner
[mailto:werner.keilholz@cstb.fr]
extern "C"
__declspec(dllimport) void _cdecl MESSAGES(int* errorCode,char* message, char*
severity, int* unitNo, int* typeNo, int n, int m);
char Message[800];
strcpy(Message, "Its before 10"); char Severity[10];
strcpy(Severity, "NOTICE"); int errCode = 1;
int Unit = 4; // put
your unit number here – typically info[0]
int Type = 6; // put
your type number here - typically info[1]
if (time < 10)
messages(&errCode, Message, Severity, &Unit, &Type,
strlen(Message), strlen(Severity)); Severity
can be « NOTICE », « WARNING » or «ERROR» The ‘trick’ is that FORTRAN passes string
lengths as additional, hidden arguments – you have to add them at the end
of any function using one or several strings as an argument, in the same order
as the arguments (one per string passed). (See Trnsys.h or TrnsysFunctions.f90
if the function is missing in Trnsys.h for function prototypes). Werner De :
ericjhwilson@gmail.com [mailto:ericjhwilson@gmail.com] De la part de Eric Wilson Hello all, // REPORT ANY PROBLEMS THAT HAVE BEEN FOUND USING
CALLS LIKE THIS:
call Messages(errorCode,message,severity,unitNo,typeNo) ...but that is for Fortran. Does anyone know how to do it in C++?
|