◄Up► ◄Contents► ◄Index► ◄Back► ─────PWB Extensions───────────────────────────────────────────────────────── All extension functions must have the prototype: PWBFUNC funcname( unsigned argData, ARG far *pArg, flagType fMeta ); The return type macro contains all the type modifiers required for extension functions. The macro evaluates to the following attributes: flagType _pascal _loadds far The flagType return value of extension functions is a Boolean value. It can be tested by any PWB macro that calls your function, so it is good practice to return a meaningful value. You should return TRUE for success and FALSE for failure. You must define the following arguments even if your function does not use them (you can use different names): Argument Description argData Keystroke used to invoke the function. Should be ignored in extension functions. pArg Pointer to a structure that contains variable information about the arguments passed by the user. fMeta Flag for whether Meta was set by a previous Meta command. TRUE if Meta is set, FALSE if Meta is not set. See: ◄Extension Function Arguments► ◄Extension Argument Structure► TIP: If you do not use all arguments and you compile with a high warning level, the compiler produces a warning about unused formal arguments. Use the following pragma to suppress this warning. #pragma warning( disable:4100 ) //Allow unused arguments -♦-