

This is the hackish part: This component needs to be registered on the machine, too.

Unfortunately there is no method for that, but I wrote a little component in VBScript which can do it. So what we need is to convert the DANodeElementCollection to ElasticVector. We designed the ElasticVector to get around a different deficiency in other tool (PowerScript). Besides other things, it is a COM collection indexed by an integer, which is what we need. I know we have an object in QuickOPC, called ElasticVector, which certainly can be consumed by Xojo. Currently, it is a hack, we can improve it later.

So at this point I would be lost don't you have some working example COM.IEnumVARIANT (perhaps with other object), or some other ideas worth exploring?īut, I found a workaround then. But I know that GetEnumerator works - other COM tools are using it - otherwise they wouldn't be able to consume this collection. But declaring the output variable as COM.IEnumVARIANT gives NilObjectException. I then found COM.IEnumVARIANT ( /IEnumVARIANT ), which seems to be precisely for what we need. In my original test, I was declaring the enumerator as OLEObject, and GetEnumerator succeeded but the result was nil. So if I get something wrong, you may know better.
#XOJO MSGBOX SOFTWARE#
Please Log in or Create an account to join the conversation.įirst of all, please understand that we are total Xojo beginners here - we cannot have advanced experience with all the tools and languages our software gets used from. Is that a new problem you want me to look at:? If so, create a separate forum topic for it (with possible link to this one). I do not understand "The other timeouts like writeitem / readitem give me a timeout exception.". Have you used some other OPC client (not based on QuickOPC), and is it also slow?ĥ. You have not answered my question about the Count of the returned collection before the transformation.Ĥ. Were the errors somehow suppressed, or how is it possible that the execution continued after the itmeout?ģ. And the error (failed HRESULT) should be transformed to run-time error in Xojo I suppose. In case of timeout, BrowseServers returns an error and not an empty collection.
#XOJO MSGBOX CODE#
There was no setting of the browse timeout in the code you posted - how comes?Ģ. Thank you for update, I am glad you got it working, but your post raised multiple questions on my side - can you please answer?ġ.
