/************************************************************************* * Function: Sys2ReplaceObjectClass * * * * Syntax: call Sys2ReplaceObjectClass orgObject , newObject, flag * * * * Params: orgObject - class being replaced * * newObject - new class name * * flag - TRUE - Replace the function of orgObject with * * function of newObject * * FALSE - Undo the replacement of orgObject with * * newObject * * * * Return: 0 if fail, 1 if succeed. * *************************************************************************/ unsigned long Sys2ReplaceObjectClass(unsigned char *name, unsigned long numargs, RXSTRING args[], char *queuename, RXSTRING *retstr) { bool replace; if (numargs != 3 || !RXVALIDSTRING(args[0]) || !RXVALIDSTRING(args[1])) return INVALID_ROUTINE; if(!stricmp(args[2].strptr,"FALSE") || !stricmp(args[2].strptr,"0")) { replace = FALSE; } else if(!stricmp(args[2].strptr,"TRUE") || !stricmp(args[2].strptr,"1")) { replace = TRUE; } else return INVALID_ROUTINE; RETVAL(WinReplaceObjectClass(args[0].strptr, args[1].strptr, replace)?1:0) }