Download MX Component Version 3 Programming Manual
Transcript
4 FUNCTIONS MELSOFT 4.3 Details of the Functions (Custom Interface) This section explains the details of the functions. The details of the functions in this section assume that the custom interface is used. The custom interface may be used on only Visual C++ . For the dispatch interface, refer to "Section 4.2 Details of the Functions (Dispatch Interface)". This section describes only the formats of the functions. For details of other than the formats, refer to "Section 4.2 Details of the Functions (Dispatch Interface)". R 4.3.1 Open (Communication line opening) hResult = object.Open( lplRetCode ) HRESULT LONG hResult lplRetCode Returned value of COM Output Returned value of communication function Output 4.3.2 Close (Communication line closing) hResult = object.Close( lplRetCode ) HRESULT LONG hResult lplRetCode Returned value of COM Output Returned value of communication function Output 4.3.3 ReadDeviceBlock (Device batch-read) hResult = object.ReadDeviceBlock( szDevice, lSize, lplData, lplRetCode ) HRESULT hResult Returned value of COM Output BSTR szDevice Device name Input LONG lSize Number of read points Input LONG lplData Read device values Output LONG lplRetCode Returned value of communication function Output 4.3.4 WriteDeviceBlock (Device batch-write) hResult = object.WriteDeviceBlock( szDevice, lSize, lplData, lplRetCode ) Returned value of COM HRESULT hResult Output Device name BSTR szDevice Input Number of write points LONG lSize Input Written device values lplData Input LONG Returned value of communication LONG lplRetCode Output function 4 - 60 4 - 60