SmcWInit


Function

Performs initialization of the device.

Format

Ret =SmcWInit( DeviceName, Id )

Parameters

DeviceName [ VB.NET: String ] [ C, C++: char * ] [ C#: string ] [ Python: ctypes.c_char_p ]
Specify the device name set in property page of Device Manager or by the setting tool.

Id [ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of the variable for receiving the ID.
The following functions can access the value stored in this variable.

Return Value

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

0

Terminated normally

Non-zero

Terminated abnormally

See also: Error code details

Remarks

It is necessary to initialize it first to access the device.

Example

The device is initialized.

VB.NET
Dim Ret As Integer
Dim DeviceName As String
Dim Id As Short
DeviceName = "SMC000"
Ret = SmcWInit( DeviceName , Id )

C, C++
long Ret;
char *DeviceName ="SMC000";
short Id;
Ret = SmcWInit( DeviceName , &Id );

C#
int Ret;
string DeviceName ="SMC000";
short Id;
Ret = Smc.WInit( DeviceName , out Id );

Python
Ret = ctypes.c_long()
DeviceName = "SMC000"
Id = ctypes.c_short()
Ret.value = csmc.SmcWInit( DeviceName , ctypes.byref(Id) )

See Also

SmcWExit