LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

create shortcut to folder

Solved!
Go to solution
Solution
Accepted by topic author JGS

To be honest, I am not sure what dependency CLSID_FolderShortcut has on Internet Explorer. I was able to just define the  _WIN32_IE before including the header file like:

 

#define _WIN32_IE 0x0500

 

or you can add it to the Compiler Defines in Build Options like:

 

/D_WIN32_IE=0x0501

 

Here is an MSDN article that explains what the value of this definition might be:

 

http://msdn.microsoft.com/en-us/library/aa383745%28v=vs.85%29.aspx

 

Even with this, I can run the code, but I get an error using CLSID_FolderShortcut. I have tried to get more information about CLSID_FolderShortcut and how to use it, but there are not many resources provided by Microsoft that I could find. Maybe someone here has some insight?

 

However, I was able produce a folder shortcut using CLSID_ShellLink. Use the exact same code as you did for a file, but specify the path to a directory instead of a file.

National Instruments
Message 11 of 12
(996 Views)

It works ! Thank you all.

 

The CVI version works when ignoring the MSDN comment about CLSID_FolderShortcut and therefore avoiding the conditional _WIN32_IE definition. And I replaced the uuid.lib in ...\CVI2010\sdk\lib\msvc64. I have a (never finished) working code.

 

I also tried the VB proposed example in an Excel macro. This works beautiful and I archived it for some future alternative.

 

Regards, Jos

 

0 Kudos
Message 12 of 12
(985 Views)