Difference between revisions of "ISXDK"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 14: Line 14:
  
 
==== Commands ====
 
==== Commands ====
 +
Commands provide an interface for the end user to control your functionality.  Commands are actually extensions to [[LavishScript]] rather than Inner Space, though you pass your command definitions to LavishScript through the Inner Space interface.  LavishScript command functions follow the standard prototype for a console program -- int __cdecl main(int argc, char *argv[]).  As with console programs, argv[0] is the name of the command and is included in argc.  The actual arguments start with argv[1]. 
 +
 +
Your command functions need to return a value.  Returning a negative number indicates a fatal error that should immediately end the script, if any.  If you need to indicate such an error, you should return -1, in case other values are used for different purposes in the future.  Returning a number greater than or equal to 0 indicates success.  0 should always indicate a plain old "success".  You may choose to return different positive values to indicate different success conditions for future use.  At present, the return value is not used other than to check for an error that should end the script, but it will be accessible to scripts in a future release.  No positive return values will be reserved for future use by LavishScript.
  
 
==== Data Types ====
 
==== Data Types ====

Revision as of 00:36, 29 April 2005

Introduction

ISXDK, short for Inner Space Extension Development Kit, is used for developing extensions for Inner Space sessions.

Installation

Installation of ISXDK is very simple. Download and run the installer, and have it install to anywhere you want -- it doesn't matter where it is in relation to your source code, so long as you remember where it is. After installation, you need to add the include and library paths to Visual Studio so they will be used automatically when you #include <isxdk.h> from your code and link to isxdk.lib.

Getting Started with ISXDK

The following ISXDK documentation will assume, in most cases, that you are a proficient C++ developer. This is not a C/C++ tutorial -- if you need one, please start by finding one. You should at least be familiar with calling conventions and function prototypes before attempting to create an extension (specifically, you need to know why your functions need to look exactly like the examples).

This section of the documentation explains the basics of the ISXDK, and each of the main things that you may be developing in an Inner Space extension.

Concepts

Inner Space extensions, on the most basic level, simply deal with an extension interface (ISXInterface) and the Inner Space interface (ISInterface). These interfaces provide a method of two-way communication between your extension and Inner Space. Inner Space generally does not need anything from your extension -- just initialization, shutdown, and version. These are the three functions your extension will provide that are accessible to Inner Space (though the version function is hidden to you). Your extension, however, needs many functions from Inner Space. (ISInterface) provides many fuctions to allow your extension to do everything you want it to do. If anything is missing that you feel you need access to, make sure to ask and it may be provided in a new ISXDK version.

Commands

Commands provide an interface for the end user to control your functionality. Commands are actually extensions to LavishScript rather than Inner Space, though you pass your command definitions to LavishScript through the Inner Space interface. LavishScript command functions follow the standard prototype for a console program -- int __cdecl main(int argc, char *argv[]). As with console programs, argv[0] is the name of the command and is included in argc. The actual arguments start with argv[1].

Your command functions need to return a value. Returning a negative number indicates a fatal error that should immediately end the script, if any. If you need to indicate such an error, you should return -1, in case other values are used for different purposes in the future. Returning a number greater than or equal to 0 indicates success. 0 should always indicate a plain old "success". You may choose to return different positive values to indicate different success conditions for future use. At present, the return value is not used other than to check for an error that should end the script, but it will be accessible to scripts in a future release. No positive return values will be reserved for future use by LavishScript.

Data Types

Services

Top-Level Objects

Utilities

mkisx

Struct2LSType

Tutorials

Samples

Reference

Callback Functions

Classes

Functions

Macros

Structures

Troubleshooting

Compile Errors

Believe it or not, compile errors are not the fault of Inner Space or ISXDK. Nearly all complaints about compile errors are somehow blamed on the development kit, whereas the fault actually lies in the developer's proficiency with C or C++. Errors or warnings are clearly described by the compiler, and you should be able to resolve the issues on your own. If you are unable to do so, feel free to ask -- but be aware that you will be more likely to learn something about C or C++ than to find a bug that needs to be fixed.

See Also