OPC Studio 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 InterfaceEasyUAClientInstanceParameters ClassEasyUAClientAdaptableParameters 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
Remarks

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

Example

COM

// This example shows how to read value of a single node, and display it.
//
// Find all latest examples here: https://opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Latest/examples.html .
// Missing some example? Ask us for it on our Online Forums, https://www.opclabs.com/forum/index ! You do not have to own
// a commercial license in order to use Online Forums, and we reply to every post.

#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