Ignore:
Timestamp:
Oct 28, 2011, 2:04:25 AM (14 years ago)
Author:
dmik
Message:

Extern "C".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/src/kernel32/oslibwps.cpp

    r9889 r21755  
    3737     *pszFilename1 = 0;
    3838}
     39
     40extern "C" {
     41
    3942//******************************************************************************
    4043// ODIN_DisableFolderShellLink
    4144//
    42 // Disable object creation in Odin folder. Desktop shortcuts will still be 
     45// Disable object creation in Odin folder. Desktop shortcuts will still be
    4346// created as WPS objects on the desktop.
    4447//
     
    8487       }
    8588   }
    86    else { 
     89   else {
    8790       dprintf(("OSLibWinCreateObject: pszLink == NULL!!"));
    8891       goto fail;
     
    115118
    116119   fWin32App = ODIN_IsWin32App(pszPath);
    117    if(!fWin32App) 
     120   if(!fWin32App)
    118121   {//don't use the PE loader; use the program path directly
    119122        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);
     
    182185    strcpy(szLinkFile, lpszLink);
    183186    strupr(szLinkFile);
    184     if(strstr(szLinkFile, ".LNK")) 
     187    if(strstr(szLinkFile, ".LNK"))
    185188    {//could be a shelllink file, check for magic string at start of the file
    186189       FILE *lnkfile;
     
    190193
    191194       char  szMagic[sizeof(WPS_SHELLLINK_MAGIC)];
    192  
     195
    193196       memset(szMagic, 0, sizeof(szMagic));
    194197       fread(szMagic, sizeof(szMagic)-1, 1, lnkfile);
     
    203206//******************************************************************************
    204207// OSLibWinDeleteObject
    205 // 
     208//
    206209// Delete object with object id stored in the file
    207210//
    208211// Parameters:
    209 // 
     212//
    210213//     LPSTR lpszLink        - shelllink file
    211214//
     
    226229
    227230    char  szMagic[sizeof(WPS_SHELLLINK_MAGIC)];
    228  
     231
    229232    memset(szMagic, 0, sizeof(szMagic));
    230233    fread(szMagic, sizeof(szMagic)-1, 1, lnkfile);
    231234
    232     if(!strcmp(szMagic, WPS_SHELLLINK_MAGIC)) 
     235    if(!strcmp(szMagic, WPS_SHELLLINK_MAGIC))
    233236    {
    234237        fseek(lnkfile, 0, SEEK_END);
    235238        wpsobjectidsize = ftell(lnkfile) - sizeof(WPS_SHELLLINK_MAGIC) + 2;
    236239        fseek(lnkfile, sizeof(WPS_SHELLLINK_MAGIC)-1, SEEK_SET);
    237        
     240
    238241        memset(szObjectId, 0, sizeof(szObjectId));
    239242        szObjectId[0] = '<';
     
    251254//******************************************************************************
    252255//******************************************************************************
     256
     257} // extern "C"
Note: See TracChangeset for help on using the changeset viewer.