SilverScreen Solid Modeler

spawn

spawn

Previous topic Next topic  

spawn

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

int spawn ( char *exe_name, char *arg_string, int minimize_memory, int text_mode )

 

char *exe_name;         // executable name

char *arg_string;       // arguments

int   minimize_memory;  // memory flag

int   text_mode;        // text mode flag

 

 




Synopsis

#include "silver.h"

 

The spawn function invokes the program exe_name and passes arg_string to it. exe_name must specify a full path to either a protected mode or real mode program. If minimize_memory is 1, SilverScreen will release as much memory as possible before invoking exe_name . If minimize_memory is 0, SilverScreen will invoke exe_name without releasing any memory. If text_mode is set to 1, SilverScreen will save the screen, enter text mode, invoke exe_name , enter graphics mode, and then restore the screen. If text_mode is 0, SilverScreen will invoke exe_name without entering text mode (this is provided primarily for applications which are to be seamlessly integrated with SilverScreen).

 

 

Parameters

exe_name is a null-terminated string specifying the name of the executable program. arg_string is a null-terminated string specifying the arguments that are given to the executable program. minimize_memory and text_mode are integer flag.

 

 

Return Value

spawn returns one of the following:

 

Value

Meaning

0

Success

2

File not found or path invalid

5

Access denied

8

Not enough memory to load program

10

Environment invalid

11

Invalid file format

12

Argument string exceeds 128 characters

 

Comments

If you are using spawn to invoke a protected mode program, there must be a memory manager present which supports VCPI version 1.0, and you probably want to set minimize_memory to 1.

 

 

See Also

system , system2 , system3