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.
Difference between WriteValue und WriteMultipleValues
I noticed similar things with Delphi earlier. For example, when the string is not in a property variant, Delphi passes NULL instead of an empty string, so we had to change the COM interfaces to allow NULL in place of strings, etc. (all other OLE automation controllers pass in empty strings as non-null BSTR-s, which is how it should be).
I how this is achievable on your side, and I would be curious to know the solution.
If this turns out to be impossible (or too difficult), we would think of how to resolve it in the component. The problem is that doing so, if possible, would bring other risks.
Regards
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
And, I am sorry, one more question: Can you verify in debugger that for empty strings, what ends up in lclWriteValueArgument.Value is actually a variant containing an empty VT_BSTR, and not an empty variant (VT_EMPTY) or something else?
Please Log in or Create an account to join the conversation.
WriteValue call:
PendingWriteValue is a variant variable.
Please Log in or Create an account to join the conversation.
Best regards
Please Log in or Create an account to join the conversation.
I discovered a critical difference in variant handling between WriteValue and WriteMultipleValues.
When I write an empty string to an OPC variable, it works using the WriteValue procedure. But when I do the same using WriteMultipleValues, I get an exception saying "BadTypeMismatch". For strings inequal empty string it works with both procedures.
Is there a workaround for us, when we want to stay with WriteMultipleValues? Or do you have to fix something in the library?
Regards
Please Log in or Create an account to join the conversation.