Changeset 21755 for branches/gcc-kmk/src/kernel32/oslibwps.cpp
- Timestamp:
- Oct 28, 2011, 2:04:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/kernel32/oslibwps.cpp
r9889 r21755 37 37 *pszFilename1 = 0; 38 38 } 39 40 extern "C" { 41 39 42 //****************************************************************************** 40 43 // ODIN_DisableFolderShellLink 41 44 // 42 // Disable object creation in Odin folder. Desktop shortcuts will still be 45 // Disable object creation in Odin folder. Desktop shortcuts will still be 43 46 // created as WPS objects on the desktop. 44 47 // … … 84 87 } 85 88 } 86 else { 89 else { 87 90 dprintf(("OSLibWinCreateObject: pszLink == NULL!!")); 88 91 goto fail; … … 115 118 116 119 fWin32App = ODIN_IsWin32App(pszPath); 117 if(!fWin32App) 120 if(!fWin32App) 118 121 {//don't use the PE loader; use the program path directly 119 122 sprintf(pszSetupString, "PROGTYPE=PM;OBJECTID=<%s%s>;EXENAME=%s;SET BEGINLIBPATH=%s;STARTUPDIR=%s;ICONFILE=%s;PARAMETERS=", (fDesktop) ? WPS_SHELLLINK_DESKTOP : "", pszName, pszPath, szSystemDir, szWorkDir, pszIcoPath); … … 182 185 strcpy(szLinkFile, lpszLink); 183 186 strupr(szLinkFile); 184 if(strstr(szLinkFile, ".LNK")) 187 if(strstr(szLinkFile, ".LNK")) 185 188 {//could be a shelllink file, check for magic string at start of the file 186 189 FILE *lnkfile; … … 190 193 191 194 char szMagic[sizeof(WPS_SHELLLINK_MAGIC)]; 192 195 193 196 memset(szMagic, 0, sizeof(szMagic)); 194 197 fread(szMagic, sizeof(szMagic)-1, 1, lnkfile); … … 203 206 //****************************************************************************** 204 207 // OSLibWinDeleteObject 205 // 208 // 206 209 // Delete object with object id stored in the file 207 210 // 208 211 // Parameters: 209 // 212 // 210 213 // LPSTR lpszLink - shelllink file 211 214 // … … 226 229 227 230 char szMagic[sizeof(WPS_SHELLLINK_MAGIC)]; 228 231 229 232 memset(szMagic, 0, sizeof(szMagic)); 230 233 fread(szMagic, sizeof(szMagic)-1, 1, lnkfile); 231 234 232 if(!strcmp(szMagic, WPS_SHELLLINK_MAGIC)) 235 if(!strcmp(szMagic, WPS_SHELLLINK_MAGIC)) 233 236 { 234 237 fseek(lnkfile, 0, SEEK_END); 235 238 wpsobjectidsize = ftell(lnkfile) - sizeof(WPS_SHELLLINK_MAGIC) + 2; 236 239 fseek(lnkfile, sizeof(WPS_SHELLLINK_MAGIC)-1, SEEK_SET); 237 240 238 241 memset(szObjectId, 0, sizeof(szObjectId)); 239 242 szObjectId[0] = '<'; … … 251 254 //****************************************************************************** 252 255 //****************************************************************************** 256 257 } // extern "C"
Note:
See TracChangeset
for help on using the changeset viewer.