GenOpenApplication


Function

Start C-WaveformGenerator and allow to access.

Format

Ret = GenOpenApplication ( DeviceName, AppId, OpenMode)

Parameters

DeviceName [ VB.NET: String ] [ C++: char * ] [ C#: string ] [ Python: ctypes.c_char_p ]

Specify the device name.

AppId [ VB.NET: Short  ] [ C++: short * ] [ C#: out short] [Python : ctypes.POINTER(ctypes.c_short) ]

Application ID is returned.
By using this Application ID, you can access C-WaveformGenerator in the following functions.

OpenMode [ VB.NET: UShort ] [ C++: unsigned short ] [ C#: ushort ] [ Python: ctypes.c_ushort ]

Specifies the screen startup status.

Value

[Dec]

Macro

Description

0

GEN_PARAM_WINDOW_OFF

Minimize

1

GEN_PARAM_WINDOW_NORMAL

Normal size for each application

2

GEN_PARAM_WINDOW_MAX

Maximize

Return Value

Ret [ VB.NET: Integer ] [ C++: long ] [ C#: int ] [ Python: ctypes.c_long ]

Definition

Return Value

Description

GEN_ERR_SUCCESS

0

Normal completed

GEN_ERR_OPEN_APPLICATION

102

Cannot use C-WaveformGenerator because other application is using

GEN_ERR_APPLICATION_SIZE

10000

Unable to specify screen size

The others (See also: Error Code List)

Remarks

Start the application and allow access.

If C-WaveformGenerator is not installed, this function is not available.
Please set the device that is supported by C-WaveformGenerator.

Example

Start the application by specifying AIO000 with the normal size of the application.

VB.NET

Dim Ret As Integer

Dim AppId As Short

Ret = GenOpenApplication("AIO000", AppId, 1)

 

C++

long Ret;

short AppId;

Ret = GenOpenApplication("AIO000", &AppId, 1);

 

C#

int Ret;

short AppId;

Ret = gen.OpenApplication("AIO000", out AppId, 1);

 

Python

Ret = ctypes.c_long()

AppId = ctypes.c_short()

Ret.value = cgen_api.GenOpenApplication ("AIO000" , ctypes.byref(AppId))

 

See Also

GenCloseApplication