- Posts: 13
- Thank you received: 2
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.
- Forum
- Discussions
- QuickOPC-UA in COM
- Connection, Reconnections, Certificates
- ApplicationName used for certificate in C++ COM Project
ApplicationName used for certificate in C++ COM Project
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I have just realised my error. I was using an underscore within the __uuidof call i.e.
_EasyUAApplicationPtr easyAppPtr(__uuidof(_EasyUAApplication))
but using
_EasyUAApplicationPtr easyAppPtr(__uuidof(EasyUAApplication))
Creates the object. I'll look at adjusting the ApplicationName now.
Regards
Colin
Please Log in or Create an account to join the conversation.
Unfortunately I still get the same "Class not registered" error after uninstalling 2022.2 and installing 2023.1 and rebuilding the C++ application.
I also tested and got the same error when adding the line to one of your examples ..\Examples-COM\CPP\VisualStudio\Win32\UADocExamples\_EasyUAClient\DiscoverLocalServers.Main.cpp
. . .
namespace _EasyUAClient
{
void DiscoverLocalServers::Main()
{
// Initialize the COM library
CoInitializeEx(NULL, COINIT_MULTITHREADED);
{
_EasyUAApplicationPtr easyAppPtr(__uuidof(_EasyUAApplication));
. . .
Should this work or should I use a different way to set the ApplicationName (or other certificate details) with C++/COM in 2023.1?
Regards
Colin
Please Log in or Create an account to join the conversation.
And, the method you have "guessed" should be the right one. I.e. instantiate the EasyUAApplication object. It is not in 2022.2 but it is in 2023.1.
Please uninstall the old version first, in order to prevent possible conflicts.
Best regards
Please Log in or Create an account to join the conversation.
Thanks for the quick response. Yes I can upgrade to 2023.1.
Regards
Colin
Please Log in or Create an account to join the conversation.
I will give you the answer, but let me ask first: Can't you upgrade to version 2023.1?
The reason I am asking that the location of these parameters have changed in 2023.1 - so if you can upgrade, or anticipate an upgrade anyway, it would be better to do it in the new way already.
Best regards
Please Log in or Create an account to join the conversation.
I am working with an unmanaged C++ project and would like to be able to set the "ApplicationName" property. In C# it is done as follows:
// Set the application name, which determines the subject of the client certificate.
// Note that this only works once in each host process.
EasyUAApplication.Instance.ApplicationParameters.ApplicationManifest.ApplicationName = "QuickOPC - CSharp example application";
How can the global "EasyUAApplication" object be accessed using the C++ COM interfaces?
I tried to create an object as follows:
_EasyUAApplicationPtr easyAppPtr(__uuidof(_EasyUAApplication));
but this throws a "Class not registered" error.
I can access and use other QuickOPC objects, so the issue is just limited to the _EasyUAApplication class, so assume this is a special case. Can't find any examples.
I am Using QuickOPC 2022.2.
Regards
Colin
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-UA in COM
- Connection, Reconnections, Certificates
- ApplicationName used for certificate in C++ COM Project