Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

connect the c++ to quickopc

More
12 May 2017 17:59 #5148 by TONY CHIAM
ok, i think i already solve my problem, thank for help

Please Log in or Create an account to join the conversation.

More
09 May 2017 07:14 #5145 by admin
Replied by admin on topic connect the c++ to quickopc
There is no Write in the code you posted.

Please Log in or Create an account to join the conversation.

More
08 May 2017 06:41 - 08 May 2017 07:32 #5144 by TONY CHIAM
Hi, i already success to read the itemid and write new value, thank for help. But, when i want to combine read item and write item together. there are something error on it. How to solve it? Thank

***********************************************************************************************************
#include "stdafx.h"
#include <atlsafe.h>
#include <comutil.h>
#include <Windows.h>
#include "QuickOPC.h"
 
int _tmain(int argc, _TCHAR* argv[])
{
    // Initialize the COM library. Note: If you choose STA, you will be responsible for pumping messages.
    CoInitializeEx(NULL, COINIT_MULTITHREADED);
 
    // Instatiate the EasyOPC-DA client object
    _EasyDAClientPtr ClientPtr(__uuidof(EasyDAClient));
 
    _DAReadItemArgumentsPtr ItemArguments1Ptr(_uuidof(DAReadItemArguments));
    ItemArguments1Ptr->ServerDescriptor->ServerClass = L"Matrikon.OPC.OMRON.1";
	ItemArguments1Ptr->ItemDescriptor->ItemId = L".sensor";
 
	_DAItemValueArgumentsPtr ItemArguments2Ptr(_uuidof(DAItemValueArguments));
    ItemArguments2Ptr->ServerDescriptor->ServerClass = L"Matrikon.OPC.OMRON.1";
    ItemArguments2Ptr->ItemDescriptor->ItemId = L".motor";
    ItemArguments2Ptr->Value = CComVariant(OLESTR("True"));
 
 
    CComSafeArray<VARIANT> ArgumentsArray(2);
    ArgumentsArray.SetAt(0, _variant_t((IDispatch*)ItemArguments1Ptr));
	ArgumentsArray.SetAt(1, _variant_t((IDispatch*)ItemArguments2Ptr));
 
    LPSAFEARRAY pArgumentsArray = ArgumentsArray.Detach();
    CComSafeArray<VARIANT> ResultArray;
	ResultArray.Attach(ClientPtr->ReadMultipleItems(&pArgumentsArray));
    ArgumentsArray.Attach(pArgumentsArray);
 
 
    for (int i = ResultArray.GetLowerBound(0); i <= ResultArray.GetUpperBound(0); i++)
    {
        _DAVtqResultPtr DAVtqResultPtr(ResultArray[i]);
 
		_ExceptionPtr ExceptionPtr(DAVtqResultPtr->Exception);
		if (ExceptionPtr != NULL)
		{
	        _variant_t exceptionAsString(ExceptionPtr->ToString);
	        _tprintf(_T("results(%d).Exception.ToString(): %s\n"), i, exceptionAsString.bstrVal);
			continue;
		}
 
        _DAVtqPtr DAVtqPtr(DAVtqResultPtr->Vtq);
        _variant_t vtqAsString(DAVtqPtr->ToString);
        _tprintf(_T("results(%d).Vtq.ToString(): %s\n"), i, vtqAsString.bstrVal);
 
	}
 
	 for (int j = ResultArray.GetLowerBound(0); j <= ResultArray.GetUpperBound(0); j++)
	 {
		_OperationResultPtr OperationResultPtr(ResultArray[j].pdispVal);
        if (OperationResultPtr->Succeeded)
        {
            // Handle success here
            _tprintf(_T("%d: success\n"), j);
        }
        else
        {
            _ExceptionPtr ExceptionPtr = OperationResultPtr->Exception;
            // Handle failure here: you can use properties such as ExceptionPtr->HResult, ExceptionPtr->Message.
            _tprintf(_T("%d: failure: %s\n"), j, COLE2T(ExceptionPtr->Message));
		}
    }
 
    // Release all interface pointers BEFORE calling CoUninitialize()
    ResultArray.Destroy();
    ClientPtr = NULL;
 
    CoUninitialize();
 
    TCHAR line[80];
    _putts(_T("Press Enter to continue..."));
    _fgetts(line, sizeof(line), stdin);
 
	return 0;
 
}

*********************************************************************************************************
'opctest4.exe': Loaded 'C:\Users\User\Documents\visual studio 2010\Projects\opctest4\Debug\opctest4.exe', Symbols loaded.
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\ole32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcr100d.dll', Symbols loaded.
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\combase.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\sechost.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\user32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\bcryptprimitives.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\imm32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\msctf.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\kernel.appcore.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\mscoree.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\sxs.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\version.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcr120_clr0400.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
First-chance exception at 0x76865b68 in opctest4.exe: 0x04242420: 0x4242420.
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\mscorlib\225759bb87c854c0fff27b1d84858c21\mscorlib.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System\52cca48930e580e3189eac47158c20be\System.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Core\55560c2014611e9119f99923c9ebdeef\System.Core.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\OpcLabs.Eas885fecfd#\8c146d2b66c241cb0ec8677fc9b229b5\OpcLabs.EasyOpcClassic.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\cryptsp.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\rsaenh.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\bcrypt.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\OpcLabs.BaseLib\ed036ed93bd541a0605c8ea3552cec47\OpcLabs.BaseLib.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Xml\d86b080a37c60a872c82b912a2a63dac\System.Xml.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.ServiceModel\96e6f58004d8c324911b65df51f8550d\System.ServiceModel.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Runteb92aa12#\c56771a9cfb87e660d60453e232abe27\System.Runtime.Serialization.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\SMDiagnostics\4a2a848ea1fea1a74d5aa2f1c21c5ce8\SMDiagnostics.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Servd1dec626#\52e9ac689c75dd011f0f7e827551e985\System.ServiceModel.Internals.ni.dll', Cannot find or open the PDB file
First-chance exception at 0x76865b68 in opctest4.exe: Microsoft C++ exception: EEMessageException at memory location 0x0062cc70..
First-chance exception at 0x76865b68 in opctest4.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Configuration\46957030830964165644b52b0696c5d9\System.Configuration.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\shell32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\SHCore.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clrjit.dll', Cannot find or open the PDB file
First-chance exception at 0x76865b68 in opctest4.exe: Microsoft C++ exception: EEFileLoadException at memory location 0x0062a824..
First-chance exception at 0x76865b68 in opctest4.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
'opctest4.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Xaml\6d09f865a22e2f903b74476769e1b76a\System.Xaml.ni.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\mpr.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\profapi.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'ImageAtBase0x10000000', Loading disabled by Include/Exclude setting.
'opctest4.exe': Loaded 'ImageAtBase0x7e80000', Loading disabled by Include/Exclude setting.
'opctest4.exe': Unloaded 'ImageAtBase0x10000000'
'opctest4.exe': Loaded 'C:\WINDOWS\Microsoft.NET\assembly\GAC_32\App_Web_OpcLabs.EasyOpcClassicRaw.x86\v4.0_5.41.1144.1__6faddca41dacb409\App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\mfc140u.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\dbghelp.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\vcruntime140.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-stdio-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-string-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-heap-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-runtime-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcp140.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-filesystem-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-convert-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-utility-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-math-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-time-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-multibyte-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-locale-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-environment-l1-1-0.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\nsi.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\ucrtbase.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll', Cannot find or open the PDB file
First-chance exception at 0x76865b68 in opctest4.exe: Microsoft C++ exception: EEFileLoadException at memory location 0x0062b084..
First-chance exception at 0x76865b68 in opctest4.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x76865b68 in opctest4.exe: Microsoft C++ exception: EEMessageException at memory location 0x0062ea1c..
First-chance exception at 0x76865b68 in opctest4.exe: 0xE0434352: 0xe0434352.
First-chance exception at 0x76865b68 in opctest4.exe: Microsoft C++ exception: _com_error at memory location 0x0062f55c..
Unhandled exception at 0x76865b68 in opctest4.exe: Microsoft C++ exception: _com_error at memory location 0x0062f55c..
'opctest4.exe': Loaded 'C:\ProgramData\QvodPlayer\QvodWebBase\1.0.0.54\QvodWebBase.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\winhttp.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\Program Files\360\360safe\safemon\safemon.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.18006_none_a9ec6aab013aafee\comctl32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\psapi.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\wininet.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\netapi32.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\iertutil.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\userenv.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\netutils.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\srvcli.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\wkscli.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\Program Files (x86)\Common Files\Microsoft Shared\Ink\tiptsf.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'opctest4.exe': Loaded 'C:\WINDOWS\SysWOW64\oleacc.dll', Cannot find or open the PDB file
opctest4.exe has triggered a breakpoint
Last edit: 08 May 2017 07:32 by support.

Please Log in or Create an account to join the conversation.

More
07 May 2017 10:09 #5143 by support
Replied by support on topic connect the c++ to quickopc
This error is reported by the server, and it means that the ItemID you chose, i.e. "test/test/#Enabled" is not what the server expects.

There are several ways how to figure out the correct Item ID. I suggest the following:

1. From the QuickOPC Launcher app or Start menu, choose and run Demo Applications (.NET) -> Demo Application (OPC-DA). Note: If you do not have "Demo Application (.NET)" node, you need to reinstall QuickOCP and include ".NET development" besides "COM development".

2. Next to the "Server class", type "Matrikon.OPC.OMRON.1". Alternatively, press the "< Browse servers..." button, and select the server by browsing.

3. Press the "< Browse items" button.

4. Navigate in the tree, and select the desired item in the list. The Item ID is then displayed near the bottom of the dialog, in the "Node information" box, and also (editable) in the "Item ID" text field.

5. Copy the precise Item ID into your program.

I hope this helps.

Please Log in or Create an account to join the conversation.

More
07 May 2017 08:52 #5142 by TONY CHIAM
It looks like the programming cannot read the itemid that i put
The console window shows

*********************************************************************************************
results(0).Excaption.ToString(): System.Runtime.InteropServices.COMException (0x
C0040008): The item defination does not conform to the server's syntax.
Press enter to continue...
**********************************************************************************************

Please Log in or Create an account to join the conversation.

More
06 May 2017 12:50 #5141 by support
Replied by support on topic connect the c++ to quickopc
What you have provided is a contents of debugger output window. I do not see anything particularly wrong in it.

I suppose the program has actually started, and show a console window with its output. If so, please provide the contents of the console window.

Best regards

Please Log in or Create an account to join the conversation.

More
06 May 2017 08:11 #5140 by TONY CHIAM
The output said cannot find or open the file, how to solve it? Thank

*****************************************************************************************
'opctest3.exe': Loaded 'C:\Users\User\Documents\visual studio 2010\Projects\opctest3\Debug\opctest3.exe', Symbols loaded.
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\ole32.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcr100d.dll', Symbols loaded.
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\combase.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\sechost.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\user32.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\bcryptprimitives.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\imm32.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\msctf.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\kernel.appcore.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\mscoree.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\sxs.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\version.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcr120_clr0400.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
First-chance exception at 0x76a55b68 in opctest3.exe: 0x04242420: 0x4242420.
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\mscorlib\225759bb87c854c0fff27b1d84858c21\mscorlib.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System\52cca48930e580e3189eac47158c20be\System.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Core\55560c2014611e9119f99923c9ebdeef\System.Core.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\OpcLabs.Eas885fecfd#\8c146d2b66c241cb0ec8677fc9b229b5\OpcLabs.EasyOpcClassic.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\cryptsp.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\rsaenh.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\bcrypt.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\OpcLabs.BaseLib\ed036ed93bd541a0605c8ea3552cec47\OpcLabs.BaseLib.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Xml\d86b080a37c60a872c82b912a2a63dac\System.Xml.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.ServiceModel\96e6f58004d8c324911b65df51f8550d\System.ServiceModel.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Runteb92aa12#\c56771a9cfb87e660d60453e232abe27\System.Runtime.Serialization.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\SMDiagnostics\4a2a848ea1fea1a74d5aa2f1c21c5ce8\SMDiagnostics.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Servd1dec626#\52e9ac689c75dd011f0f7e827551e985\System.ServiceModel.Internals.ni.dll', Cannot find or open the PDB file
First-chance exception at 0x76a55b68 in opctest3.exe: Microsoft C++ exception: EEMessageException at memory location 0x0111cd30..
First-chance exception at 0x76a55b68 in opctest3.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Configuration\46957030830964165644b52b0696c5d9\System.Configuration.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\shell32.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\SHCore.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clrjit.dll', Cannot find or open the PDB file
First-chance exception at 0x76a55b68 in opctest3.exe: Microsoft C++ exception: EEFileLoadException at memory location 0x0111a8e4..
First-chance exception at 0x76a55b68 in opctest3.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
'opctest3.exe': Loaded 'C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Xaml\6d09f865a22e2f903b74476769e1b76a\System.Xaml.ni.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\mpr.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\profapi.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'ImageAtBase0x10000000', Loading disabled by Include/Exclude setting.
'opctest3.exe': Loaded 'ImageAtBase0x7690000', Loading disabled by Include/Exclude setting.
'opctest3.exe': Unloaded 'ImageAtBase0x10000000'
'opctest3.exe': Loaded 'C:\WINDOWS\Microsoft.NET\assembly\GAC_32\App_Web_OpcLabs.EasyOpcClassicRaw.x86\v4.0_5.41.1144.1__6faddca41dacb409\App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\mfc140u.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\dbghelp.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\vcruntime140.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-stdio-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-string-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-heap-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-runtime-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcp140.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-filesystem-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-convert-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-utility-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-math-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-time-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-multibyte-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-locale-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\api-ms-win-crt-environment-l1-1-0.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\nsi.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\ucrtbase.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll', Cannot find or open the PDB file
First-chance exception at 0x76a55b68 in opctest3.exe: Microsoft C++ exception: EEFileLoadException at memory location 0x0111b144..
First-chance exception at 0x76a55b68 in opctest3.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\opccomn_ps.dll', Cannot find or open the PDB file
'opctest3.exe': Loaded 'C:\WINDOWS\SysWOW64\opcproxy.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x21b0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2280) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x15e4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x215c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1adc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1c28) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x18f8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1be0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xd5c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x220c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x21a8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x5d8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x211c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xd1c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x364) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xb7c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1130) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2374) has exited with code 0 (0x0).
The program '[3188] opctest3.exe: Native' has exited with code 0 (0x0).
************************************************************************************************

Please Log in or Create an account to join the conversation.

More
05 May 2017 09:21 #5139 by support
Replied by support on topic connect the c++ to quickopc
As before, please report the actual behavior, i.e. details of the error you are getting.

Please Log in or Create an account to join the conversation.

More
05 May 2017 09:01 - 05 May 2017 09:20 #5138 by TONY CHIAM
Hi, i already changing the import libid to #include "QuickOPC.h".It already successful debug and no any error. But, it look like cant read the itemid. Which part are wrong? Thx


*****************************************************************************************************
#include "stdafx.h"
#include <atlsafe.h>
#include <comutil.h>
#include <Windows.h>
#include "QuickOPC.h"
 
int _tmain(int argc, _TCHAR* argv[])
{
    // Initialize the COM library. Note: If you choose STA, you will be responsible for pumping messages.
    CoInitializeEx(NULL, COINIT_MULTITHREADED);
 
    // Instatiate the EasyOPC-DA client object
    _EasyDAClientPtr ClientPtr(__uuidof(EasyDAClient));
 
    _DAReadItemArgumentsPtr ReadItemArguments1Ptr(_uuidof(DAReadItemArguments));
    ReadItemArguments1Ptr->ServerDescriptor->ServerClass = L"Matrikon.OPC.OMRON.1";
	ReadItemArguments1Ptr->ItemDescriptor->ItemId = L"test/test/#Enabled";
 
 
    CComSafeArray<VARIANT> ArgumentsArray(1);
    ArgumentsArray.SetAt(0, _variant_t((IDispatch*)ReadItemArguments1Ptr));
 
    LPSAFEARRAY pArgumentsArray = ArgumentsArray.Detach();
    CComSafeArray<VARIANT> ResultArray;
	ResultArray.Attach(ClientPtr->ReadMultipleItems(&pArgumentsArray));
    ArgumentsArray.Attach(pArgumentsArray);
 
    for (int i = ResultArray.GetLowerBound(0); i <= ResultArray.GetUpperBound(0); i++)
    {
        _DAVtqResultPtr DAVtqResultPtr(ResultArray[i]);
 
		_ExceptionPtr ExceptionPtr(DAVtqResultPtr->Exception);
		if (ExceptionPtr != NULL)
		{
	        _variant_t exceptionAsString(ExceptionPtr->ToString);
	        _tprintf(_T("results(%d).Exception.ToString(): %s\n"), i, exceptionAsString.bstrVal);
			continue;
		}
 
        _DAVtqPtr DAVtqPtr(DAVtqResultPtr->Vtq);
        _variant_t vtqAsString(DAVtqPtr->ToString);
        _tprintf(_T("results(%d).Vtq.ToString(): %s\n"), i, vtqAsString.bstrVal);
    }
 
    // Release all interface pointers BEFORE calling CoUninitialize()
    ResultArray.Destroy();
    ClientPtr = NULL;
 
    CoUninitialize();
 
    TCHAR line[80];
    _putts(_T("Press Enter to continue..."));
    _fgetts(line, sizeof(line), stdin);
    return 0;
}
*****************************************************************************************************
Last edit: 05 May 2017 09:20 by support.

Please Log in or Create an account to join the conversation.

More
04 May 2017 14:16 #5137 by support
Replied by support on topic connect the c++ to quickopc
This is not your error. It is Microsoft problem we know about and are fighting with. What happens is that during the #import (well, in fact, during TLB generation on the target machine), some initial identified letter can get screwed up between uppercase and lowercase. That's also the reason for those weird 'rename' directives. And, "ItemId" happens to be one of those we have not treated yet in version 2016.2.

In the upcoming QuickOPC (2017.1), we will be delivering an include file that has all the imports, and also all the 'rename'-s, including ItemID. I am attaching this file to this forum post. It may be the fastest way to get it working, although we haven't tested it for backward compatibility with 2016.2.

Please try this by removing all your #import-s, and replace them by #include "QuickOPC.h".

Best regards

File Attachment:

File Name: QuickOpc.h
File Size:4 KB
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.132 seconds