Jump to content

ActiveX Refnum and GUIDs


Recommended Posts

Hi there,

I looked for a way to get the IID from an ActiveX Refnum.

So I looked at the TypeDescriptor and fortunately

it contains not only the IID but also the CLSID and TypeLibrary

of the underlying interface.

post-15449-125559290383_thumb.png

But I'm still looking for a way to Check whether my Input Variant

contains an ActiveX Refnum. I can check for Refnum,

but it must be an _ActiveX_ Refnum, else my VI has to return an error.

Currently I'm checking the length of the TD but I don't think that's

an error-proof solution.

Has anyone a better idea?

GUIDsFromAxRefnum.vi

Link to post
Share on other sites

If you still want to test the variant type before trying the variant casting, the 6th byte in the typedesc will tell you the refnum type (value 7 is for ActiveX Automation references). Though I do agree the other way is probably faster.

Saludos,

Aitor

Thank you!:thumbup1:

I already noticed that this byte must have something to do with the Refnum type

but I was unsure. Is there any documentation about that? The LV documentation tells something about TDs of plain types but not much about Refnum TDs...

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.