QuickOPC User's Guide and Reference
_EasyUAClient Interface
Members  Example 



View with Navigation Tools
OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.ComTypes Namespace : _EasyUAClient Interface
Exposes OpcLabs.EasyOpc.UA.EasyUAClientCore to COM clients.
Object Model
_EasyUAClient Interface_AliasProvider InterfaceEasyUAInstanceParameters ClassEasyUAAdaptableParameters ClassStringObjectDictionary Class
Syntax
'Declaration
 
<CLSCompliantAttribute(False)>
<ComVisibleAttribute(True)>
<GuidAttribute("910344C0-F2A0-42D2-A65E-F3800437F52A")>
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)>
Public Interface _EasyUAClient 
 
'Usage
 
Dim instance As _EasyUAClient
Example

COM

// This example shows how to read value of a single node, and display it.

#include "stdafx.h"    // Includes "QuickOpc.h", and other commonly used files
#include "ReadValue.h"

namespace _EasyUAClient
{
    void ReadValue::Main()
    {
        // Initialize the COM library
        CoInitializeEx(NULL, COINIT_MULTITHREADED);
        {
            // Instantiate the client object
            _EasyUAClientPtr ClientPtr(__uuidof(EasyUAClient));

            // Perform the operation
            _variant_t value = ClientPtr->ReadValue(
                //L"http://opcua.demo-this.com:51211/UA/SampleServer", 
                L"opc.tcp://opcua.demo-this.com:51210/UA/SampleServer",
                L"nsu=http://test.org/UA/Data/ ;i=10853");
    
            // Display results
            _variant_t vString;
            vString.ChangeType(VT_BSTR, &value);
            _tprintf(_T("value: %s\n"), (LPCTSTR)CW2CT((_bstr_t)vString));
        }
         // Release all interface pointers BEFORE calling CoUninitialize()
        CoUninitialize();
    }
}
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also