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.

Visual C support/capability

More
07 Mar 2023 09:07 #11608 by support
Replied by support on topic Visual C support/capability
Hello.

Technically, Visual C, as any plain C compiler on Windows, is usable. That is, it is perfectly possible to create applications with it that will use QuickOPC/OPC Data Client; the objects will be accessed via COM API, same as what we do in C++.

However, the resulting code will be large and ugly. With use of some "helper" library, it can probably be made a bit nicer, but it will never be elegant, and easy to program.
Basically, even such such simple task that you mention (getting to instantiate the first object) will require several Windows API calls. Subsequent method calls will be a bit easier, but still bulky in terms of code needed.

I would not want the customer to make a bad choice. If he can achieve the goal with another library that is better suited, let him go for it. Only if our library has a feature that he absolutely needs and is not available elsewhere, then I would use it. In such case, I can help by providing initial guidance.

There are resources on Internet that would enable the customer (or you) to get a glimpse of what to expect, such as www.codeproject.com/Articles/13601/COM-in-plain-C (although I think that the approach in the article can be simplified by using the MIDL compiler, the principles are in there).

Best regards
The following user(s) said Thank You: nknox

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

More
06 Mar 2023 22:22 #11607 by nknox
Hello,

I have a customer who is looking into using Data Client to develop their client application, and they are inquiring about using C for it. I know Visual C++ is supported, but is it possible to create an OPC Data Client application in C? I believe any non-object-oriented language would have the issue of being incapable of instantiating the client object, but I just wanted to see if there was a known way around this. Any feedback would be appreciated!

Thanks,

Nicole

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

Moderators: support
Time to create page: 0.052 seconds