|
-
February 2nd, 2009, 10:59 AM
#5
Re: Creating Shortcut by IShellLink
 Originally Posted by FastCode2010
The errors by Dev C++
------------------------
4: error: `CString' was not declared in this scope
4: error: `CString' was not declared in this scope
5: error: initializer expression list treated as compound expression
5: error: expected `,' or `;' before '{' token
In function `int main()':
41: error: `CreateShortCut' cannot be used as a function
Execution terminated
Well, as I can see the problem is CString only (all further ones are caused by that), and it has nothing to do with shell link. You have to provide an implementation of CString class, or otherwise go with some other string implementation.
Code:
#include <comdef.h> // for _bstr_t
BOOL CreateShortCut(LPCTSTR file , LPCTSTR shortCut)
. . .
hr = pIPF->Save(_bstr_t(shortCut),FALSE);
. . .
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|