Tao.Lua SDK Documentation

Lua.lua_cpcall Method 

Calls the C function func in protected mode. func starts with only one element in its stack, a light userdata containing ud. In case of errors, lua_cpcall returns the same error codes as lua_pcall, plus the error object on the top of the stack; otherwise, it returns zero, and does not change the stack. All values returned by func are discarded.

[Visual Basic]
Public Shared Function lua_cpcall( _
   ByVal L As IntPtr, _
   ByVal func As lua_CFunction, _
   ByVal ud As IntPtr _
) As Integer
[C#]
public static int lua_cpcall(
   IntPtr L,
   lua_CFunction func,
   IntPtr ud
);

Parameters

L
func
ud

Return Value

See Also

Lua Class | Tao.Lua Namespace