Ignore:
Timestamp:
Jun 28, 2011, 6:50:51 PM (14 years ago)
Author:
Silvan Scherrer
Message:

samba server 3.5: reworked os2_getexename()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/lib/os2helper.c

    r483 r586  
    9797
    9898// get the exe name (including path)
    99 bool os2_GetExeName(char *sExeName)
     99bool os2_GetExeName(char *sExeName, int lExeName)
    100100{
    101101        APIRET rc = NO_ERROR;
     
    110110
    111111        // with the module name we get the path (including the exe name)
    112         rc = DosQueryModuleName(ppib->pib_hmte, sizeof(sExeName), sExeName);
     112        rc = DosQueryModuleName(ppib->pib_hmte, lExeName, sExeName);
    113113        if (rc != NO_ERROR)
    114114        {
     
    124124        char sDrive [_MAX_PATH], sDir [_MAX_DIR];
    125125
    126         if (!os2_GetExeName(sExeName))
     126        if (!os2_GetExeName(sExeName, sizeof(sExeName)))
    127127                return false;
    128128
     
    133133        strcpy(buff, sDrive);
    134134
    135         return 0;
     135        return true;
    136136}
    137137
     
    142142        char sDrive [_MAX_PATH], sDir [_MAX_DIR], sName[_MAX_PATH];
    143143
    144         if (!os2_GetExeName(sExeName))
     144        if (!os2_GetExeName(sExeName, sizeof(sExeName)))
    145145                return false;
    146146
Note: See TracChangeset for help on using the changeset viewer.