It appears that your browser does not comply with the W3C web standards which define how web pages are encoded, transmitted, and rendered. This site would look much better in a standards-compliant web browser, but its content is accessible to any browser or Internet device.
License : LGPL
/************************************************************************** * createshortcut.c * ---------------- * Author: Alan Doyle (alan.doyle@darkbyte.com) * Copyright: (c) 2005 Darkbyte Software * Release Version: 1.2 * Date Started: 2005/03/04 * * Create Shortcut ... Win32 API Version. * ************************************************************************** * * createshortcut.c is free software; you can redistribute it and/or modify * it under the terms of the Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * createshortcut.c is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the Lesser General Public License * along with createshortcut.c; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * *************************************************************************/ #include <stdio.h> #include <shlobj.h> /* ---------------------------------------------------------------------[<]- Function: CreateShortcut Synopsis: Create 'pcShortcut' with start path 'pcDestFile' in folder 'pcDestDir'. Returns : TRUE if successful, otherwise FALSE. ---------------------------------------------------------------------[>]-*/ BOOL CreateShortcut( PCHAR pcDestDir, PCHAR pcDestFile, PCHAR pcShortcut ) { IShellLink* psl; HRESULT hres; CHAR cLinkFile[MAX_PATH]; IPersistFile* ppf; BOOL bRetVal = FALSE; hres = CoInitialize(NULL); if (!SUCCEEDED(hres)) { /* Could not open the COM library */ return bRetVal; } sprintf(cLinkFile,"%s\\%s.lnk", pcDestDir, pcShortcut); hres = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLink, (LPVOID *)&psl); if (SUCCEEDED(hres)) { hres = psl->lpVtbl->SetPath(psl,pcDestFile); if (SUCCEEDED(hres)) { hres = psl->lpVtbl->QueryInterface(psl, &IID_IPersistFile, &ppf); if (SUCCEEDED(hres)) { WORD wsz[MAX_PATH]; MultiByteToWideChar(CP_ACP, 0, cLinkFile, -1, wsz, MAX_PATH); hres = ppf->lpVtbl->Save(ppf, wsz, STGM_READ); if (SUCCEEDED(hres)) bRetVal = TRUE; ppf->lpVtbl->Release(ppf); } } psl->lpVtbl->Release(psl); } CoUninitialize(); return bRetVal; }