Difference between revisions of "ISInterface:AddTopLevelObject"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ==Syntax== | ||
+ | *bool AddTopLevelObject(char *Name, fLSTopLevelObject Function) | ||
== Purpose == | == Purpose == | ||
− | + | To create [[LavishScript:Top-Level_Objects|Top-Level_Objects]] | |
== Usage == | == Usage == | ||
=== Parameters === | === Parameters === | ||
+ | *char *Name | ||
+ | :'''[in]'''Name of the Top-Level Object | ||
+ | *fLSTopLevelObject Function | ||
+ | :'''[in]'''Function the TLO executes | ||
=== Return Value === | === Return Value === | ||
− | + | *bool | |
+ | :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 == | ||
* [[ISXDK:ISInterface|ISInterface]] | * [[ISXDK:ISInterface|ISInterface]] | ||
+ | * [[LavishScript:Top-Level_Objects|Top-Level_Objects]] | ||
[[Category:ISXDK]] | [[Category:ISXDK]] | ||
[[Category:ISInterface]] | [[Category:ISInterface]] |
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; }