Jump to content

External Library Method


Recommended Posts

Hi to all

I'm playing with the Windows Shell, and i have a function to convert Path Names to PIDLs, in C++, so I'm traslating it to LabVIEW, using Call Library Function Node. The problem is that one of the lines of the function says:

hr = pShellFolder -> ParseDisplayName(NULL, NULL, wsPath, &nCharsParsed, ppidl,NULL);

How can i call this method?

And another question, Where can i find info about convert C++ code to LV code? (I mean, like datatypes, help about Call library Function Node, etc)

Thanks in advance.

Link to comment
  • 2 weeks later...

QUOTE (JCFC @ Jul 17 2008, 08:14 PM)

Hi to all

I'm playing with the Windows Shell, and i have a function to convert Path Names to PIDLs, in C++, so I'm traslating it to LabVIEW, using Call Library Function Node. The problem is that one of the lines of the function says:

hr = pShellFolder -> ParseDisplayName(NULL, NULL, wsPath, &nCharsParsed, ppidl,NULL);

How can i call this method?

And another question, Where can i find info about convert C++ code to LV code? (I mean, like datatypes, help about Call library Function Node, etc)

Thanks in advance.

You can't with the Call Library Node directly! This is C++ with function pointer virtual tables and simply can't be implemented with the Call Library Node unless you want to write lots and lots of nitty gritty code on the LabVIEW diagram which takes care of things a C++ compiler does for you without you having to worry about anything.

This is something were a wrapper DLL would be required which wraps the access to the virtual table function pointer into a normal C function and exports that one.

However in this particular case there are several exported Shell32 APIs that deal with PIDLs and are in fact already this kind of wrapper you want here. So researching MSDN to see what kind of functionality shell32 contains will certainly give you an exported API that does more or less exactly what you want to do here.

Rolf Kalbermatter

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
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.