Jump to content

.Net equivalents


Recommended Posts

Hi,

Are somewhere listed the .Net equivalents for the LabView data types.

Personally I am facing one problem with a cluster (LabView) which exported by ApplicationBuilder as a struct

typedef struct {

LStrHandle aaa;

LStrHandle bbb;

LStrHandle ccc;

LStrHandle ddd;

LStrHandle eee;

} TD2;

I am not sure how to define the TD2 struct into .Net.

Thank you,

Mihai PALADE

Link to comment
Hi,

Are somewhere listed the .Net equivalents for the LabView data types.

Personally I am facing one problem with a cluster (LabView) which exported by ApplicationBuilder as a struct

typedef struct {

LStrHandle aaa;

LStrHandle bbb;

LStrHandle ccc;

LStrHandle ddd;

LStrHandle eee;

} TD2;

I am not sure how to define the TD2 struct into .Net.

Thank you,

Mihai PALADE

I'm afraid you can't. An LStrHandle is a special LabVIEW datatype and there exists no direct .Net equivalent for it. As you can see in extcode.h, it is a pointer to a pointer to an int32 followed by the actual (non-unicode) character string. As such it is not even directly a long Pascal string (although with a pointer to such a beast you could simulate it) but I doubt that .Net even would support that one.

Rolf Kalbermatter

Link to comment
  • 2 months later...

It depends on how you're doing calls between LV and .Net. Check out Brian Tyler's blog (http://detritus.blogs.com/lycangeek/) for info on working with .Net and LabVIEW. Basically, .Net and LabVIEW can communicate via the ActiveX server, or via .Net calls in the block diagram. Clusters in LabVIEW get converted to Object[] in .Net. You have to know what the cluster looks like in order to get the data out, but it can be done. (In your case you have 5 strings, so that's not too bad, and it might be easier to drop a convert cluster to array down and just pass the String[] to .Net...) Also check out the vi.lib/dotnet.llb's To Object and To Variant vi's for passing complicated things like clusters into .Net.

Hope this helps!

bryancbates@gmail.com

Edit: forgot about dotnet.llb in vi.lib

Link to comment

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.