Difference between revisions of "ISInterface:AddTopLevelObject"

From Lavish Software Wiki
Jump to navigation Jump to search
 
Line 13: Line 13:
 
:Returns true on success, false on failure
 
:Returns true on success, false on failure
 
== Examples ==
 
== Examples ==
 +
;Example code
 +
void ISXTest::RegisterTopLevelObjects()
 +
{
 +
    pISInterface->AddTopLevelObject("ISXTest",TLO_ISXTest);
 +
}
 +
void ISXTest::UnRegisterTopLevelObjects()
 +
{
 +
    pISInterface->RemoveTopLevelObject("ISXTest");
 +
}
 +
bool __cdecl TLO_ISXTest(int argc, char *argv[], LSTYPEVAR &Dest)
 +
{
 +
    Dest.Ptr="Hello World";
 +
    Dest.Type=pStringType;
 +
 +
    return true;
 +
}
  
 
== See Also ==
 
== See Also ==

Latest revision as of 01:19, 2 September 2005

Syntax

  • bool AddTopLevelObject(char *Name, fLSTopLevelObject Function)

Purpose

To create Top-Level_Objects

Usage

Parameters

  • char *Name
[in]Name of the Top-Level Object
  • fLSTopLevelObject Function
[in]Function the TLO executes

Return Value

  • bool
Returns true on success, false on failure

Examples

Example code
void ISXTest::RegisterTopLevelObjects()
{
    pISInterface->AddTopLevelObject("ISXTest",TLO_ISXTest);
}
void ISXTest::UnRegisterTopLevelObjects()
{
   pISInterface->RemoveTopLevelObject("ISXTest");
}
bool __cdecl TLO_ISXTest(int argc, char *argv[], LSTYPEVAR &Dest)
{
   Dest.Ptr="Hello World";
   Dest.Type=pStringType;

   return true;
}

See Also