GetLuaReturnCode()

Converts the primary and secondary return codes in the VCB to a printable string. This function provides a standard set of error strings for use by LUA applications.

Syntax

int WINAPI GetLuaReturnCode (lua_common* vcb,
                             UINT buffer_length,
                             unsigned char* buffer_addr);
Parameters
vcb
Supplied parameter; specifies the address of the verb control block.
buffer_length
Supplied parameter; specifies the length (in bytes) of the buffer pointed to by buffer_addr. The recommended length is 256.
buffer_addr
Supplied/returned parameter; specifies the address of the buffer that will hold the formatted, null-terminated string; the length of the string in the specified buffer.
0x20000001
The parameters are not valid; the function could not read from the specified verb control block or could not write to the specified buffer.
0x20000002
The specified buffer is too small.

Usage

The descriptive error string returned in buffer_addr does not terminate with a new line character (/n).

Examples

The following example shows how to call WINRUI32.DLL. The header file for this DLL is WINLUA.H. This example calls the RUI DLL to issue an RUI verb from a program:
  #include "WINLUA.H"                           /* LUA C include file for
                                                   the LUA Application. */
  . . .


  . . .

  example()
  {
  LUA_VERB_RECORD    VerbRecord;                /* Declare VerbRecord as a verb
                                                   control block using the
                                                   TYPEDEF in WINLUA.H */
  . . .

  WINRUI((LUA_VERB_RECORD *) &VerbRecord);      /* Call the RUI API */
  . . .
  }