views:

57

answers:

4

I need to programmatically create a shortcut using C++.

How can I do this using Win32 SDK?

What API function can be used for this purpose?

+3  A: 

It's a COM API, here's C++ code for it:

http://www.codeproject.com/KB/winsdk/makelink.aspx

Lou Franco
+2  A: 

Try Windows Shell Links. This page also contains a C++ example. Descriptive Snippet:

Using Shell Links

This section contains examples that demonstrate how to create and resolve shortcuts from within a Win32-based application. This section assumes you are familiar with Win32, C++, and OLE COM programming.

Paul Sasik
+1  A: 

This MSDN artice, Shell Links, provide a comprehensive tutorial about the subject with code example.

Vantomex