Changeset 8392 for trunk/src


Ignore:
Timestamp:
May 8, 2002, 5:02:59 PM (23 years ago)
Author:
sandervl
Message:

stubs for volume functions

Location:
trunk/src/kernel32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.DEF

    r8325 r8392  
    1 ; $Id: KERNEL32.DEF,v 1.134 2002-04-29 16:28:37 sandervl Exp $
     1; $Id: KERNEL32.DEF,v 1.135 2002-05-08 15:02:58 sandervl Exp $
    22
    33;Basis is Windows95 KERNEL32
     
    992992    GetSystemWindowsDirectoryW = _GetWindowsDirectoryW@8     @903
    993993
     994; Windows 2000 (and up) volume functions
     995    FindFirstVolumeA           = _FindFirstVolumeA@8            @904
     996    FindFirstVolumeW           = _FindFirstVolumeW@8            @905
     997    FindNextVolumeA            = _FindNextVolumeA@12            @906
     998    FindNextVolumeW            = _FindNextVolumeW@12            @907
     999    FindVolumeClose            = _FindVolumeClose@4             @908
     1000
     1001    FindFirstVolumeMountPointA = _FindFirstVolumeMountPointA@12 @909
     1002    FindFirstVolumeMountPointW = _FindFirstVolumeMountPointW@12 @910
     1003    FindNextVolumeMountPointA  = _FindNextVolumeMountPointA@12  @911
     1004    FindNextVolumeMountPointW  = _FindNextVolumeMountPointW@12  @912
     1005    FindVolumeMountPointClose  = _FindVolumeMountPointClose@4   @913
     1006 
     1007    GetVolumeNameForVolumeMountPointA = _GetVolumeNameForVolumeMountPointA@12 @914
     1008    GetVolumeNameForVolumeMountPointW = _GetVolumeNameForVolumeMountPointW@12 @915
     1009
     1010
    9941011;
    9951012; First free ordinal is 890
  • trunk/src/kernel32/dbgwrap.cpp

    r7935 r8392  
    656656
    657657
     658NODEF_DEBUGWRAP8(FindFirstVolumeA);
     659NODEF_DEBUGWRAP8(FindFirstVolumeW);
     660NODEF_DEBUGWRAP12(FindNextVolumeA);
     661NODEF_DEBUGWRAP12(FindNextVolumeW);
     662NODEF_DEBUGWRAP4(FindVolumeClose);
     663
     664NODEF_DEBUGWRAP12(FindFirstVolumeMountPointA);
     665NODEF_DEBUGWRAP12(FindFirstVolumeMountPointW);
     666NODEF_DEBUGWRAP12(FindNextVolumeMountPointA);
     667NODEF_DEBUGWRAP12(FindNextVolumeMountPointW);
     668NODEF_DEBUGWRAP4(FindVolumeMountPointClose);
     669 
     670NODEF_DEBUGWRAP12(GetVolumeNameForVolumeMountPointA);
     671NODEF_DEBUGWRAP12(GetVolumeNameForVolumeMountPointW);
     672
    658673#undef DBG_LOCALLOG
    659674#define DBG_LOCALLOG    DBG_mailslot
     
    719734DEBUGWRAP8(FatalAppExitW);
    720735DEBUGWRAP4(FatalExit);
    721 DEBUGWRAP4(Sleep);
     736DEBUGWRAP_LVL2_4(Sleep);
    722737DEBUGWRAP8(SleepEx);
    723738DEBUGWRAP8(WinExec);
  • trunk/src/kernel32/disk.cpp

    r8257 r8392  
    1 /* $Id: disk.cpp,v 1.33 2002-04-13 06:20:36 bird Exp $ */
     1/* $Id: disk.cpp,v 1.34 2002-05-08 15:02:58 sandervl Exp $ */
    22
    33/*
     
    8585       TVFSTOHPFS = 1
    8686       */
    87     if(lpSectorsPerCluster!=NULL)
     87    if(lpSectorsPerCluster!=NULL) 
    8888    {
    89       if(*lpSectorsPerCluster==1024 && PROFILE_GetOdinIniBool("DRIVESPACE","CLUSTERTO32",0))
     89      if(*lpSectorsPerCluster==1024 && PROFILE_GetOdinIniBool("DRIVESPACE","CLUSTERTO32",0)) 
    9090      {/* TVFS returns 1024 sectors per cluster */
    9191        dprintf(("KERNEL32:  GetDiskFreeSpaceA, TVFS-Drive detected. Faking clustersize to 32.\n"));
     
    206206    return(rc);
    207207}
    208 
    209 
    210 /**
    211  * Determin the type of a specific drive or the current drive.
    212  *
    213  * @returns DRIVE_UNKNOWN
    214  *          DRIVE_NO_ROOT_DIR
    215  *          DRIVE_CANNOTDETERMINE
    216  *          DRIVE_DOESNOTEXIST
    217  *          DRIVE_REMOVABLE
    218  *          DRIVE_FIXED
    219  *          DRIVE_REMOTE
    220  *          DRIVE_CDROM
    221  *          DRIVE_RAMDISK
    222  *
    223  * @param   lpszDrive   Root path of the drive in question.
    224  *                      NULL means the current drive.
    225  * @sketch
    226  *          If no drive Then
    227  *              Get Current Drive Index.
    228  *          ElseIf valid drive letter Then
    229  *              Convert to Drive Index.
    230  *          Else
    231  *              Return Error: Invalid root dir.
    232  *          Endif
    233  *          Call the OSLib worker function with the index.
    234  *          return it's result.
    235  *
    236  * @status  completely implemented and tested
    237  * @author  Sander
    238  * @remark  NT4, SP6 does not change the last error, regardless of the junk it receives!
    239  */
     208//******************************************************************************
     209//Note: NT4, SP6 does not change the last error, regardless of the junk it receives!
     210//******************************************************************************
    240211UINT WIN32API GetDriveTypeA(LPCSTR lpszDrive)
    241212{
    242     UINT    rc;
    243     ULONG   ulDrive = ~0;
    244 
    245     /* validate and convert input */
    246     if (!lpszDrive)
    247         ulDrive = OSLibDosQueryCurrentDisk() - 1;
    248     else if (*lpszDrive != '\0' && lpszDrive[1] == ':')
    249     {
    250         if (*lpszDrive >= 'A' && *lpszDrive <= 'Z')
    251             ulDrive = *lpszDrive - 'A';
    252         else if (*lpszDrive >= 'a' && *lpszDrive <= 'z')
    253             ulDrive = *lpszDrive - 'a';
    254 
    255         /*
    256          * Validate the rest of the path.
    257          * Note:    This validate is kind of weird.
    258          *          "c:\\\\\\\\\\\\" is ok
    259          *          "c:\\\\\\\\\\\\." is ok
    260          *          "c:\\\\\\\\\\\\........" is ok
    261          *          "c:\\\\\\\\\\\.\" is not ok
    262          *          "c:..............." is ok
    263          *          "c:\\ \ \ \ \ \\\\\" is not ok
    264          *          "c:\\ \ \ \ \ \\\\\" is not ok
    265          *          "c:\ . . . . . ." is ok
    266          *          "c:\/\/\/ . . . . ." is ok
    267          *          "c:\\\.\\\/\." is ok
    268          * I hope I got it right.
    269          */
    270         if (ulDrive != ~0)
    271         {
    272             LPCSTR lpsz = lpszDrive + 2;
    273 
    274             /* skip slashes and dots */
    275             while (*lpsz == '.' || *lpsz == '\\' || *lpsz == '/')
    276                 lpsz++;
    277             /* skip dot's and spaces. */
    278             while (*lpsz == ' ' || *lpsz == '.')
    279                 lpsz++;
    280             if (*lpsz)
    281                 ulDrive = ~0;
    282         }
    283     }
    284 
    285     /* check if validation failed */
    286     if (ulDrive == ~0)
    287     {
    288         dprintf(("KERNEL32:  GetDriveType(""%s"") -> DRIVE_NO_ROOT_DIR (%d)", lpszDrive, DRIVE_NO_ROOT_DIR));
     213   UINT rc;
     214   ULONG driveIndex;
     215
     216    if(lpszDrive == 0) {
     217        driveIndex = OSLibDosQueryCurrentDisk() - 1;
     218    }
     219    else
     220    if(*lpszDrive >= 'A' && *lpszDrive <= 'Z')
     221        driveIndex = (DWORD)(*lpszDrive - 'A');
     222    else
     223    if(*lpszDrive >= 'a' && *lpszDrive <= 'z') {
     224        driveIndex = (DWORD)(*lpszDrive - 'a');
     225    }
     226    else {
    289227        return DRIVE_NO_ROOT_DIR;   //return value checked in NT4, SP6 (GetDriveType(""), GetDriveType("4");
    290228    }
    291229
    292230    //NOTE: Although GetDriveTypeW handles -1, GetDriveTypeA crashes in NT 4, SP6
    293     rc = OSLibGetDriveType(ulDrive);
     231    rc = OSLibGetDriveType(driveIndex);
    294232    dprintf(("KERNEL32:  GetDriveType %s = %d", lpszDrive, rc));
    295233    return rc;
    296234}
    297 
    298 
    299 /**
    300  * Determin the type of a specific drive or the current drive.
    301  *
    302  * @returns DRIVE_UNKNOWN
    303  *          DRIVE_NO_ROOT_DIR
    304  *          DRIVE_CANNOTDETERMINE
    305  *          DRIVE_DOESNOTEXIST
    306  *          DRIVE_REMOVABLE
    307  *          DRIVE_FIXED
    308  *          DRIVE_REMOTE
    309  *          DRIVE_CDROM
    310  *          DRIVE_RAMDISK
    311  *
    312  * @param   lpszDrive   Root path of the drive in question.
    313  *                      NULL means the current drive.
    314  * @sketch
    315  *          If no drive Then
    316  *              Get Current Drive Index.
    317  *          ElseIf valid drive letter Then
    318  *              Convert to Drive Index.
    319  *          Else
    320  *              Return Error: Invalid root dir.
    321  *          Endif
    322  *          Call the OSLib worker function with the index.
    323  *          return it's result.
    324  *
    325  * @status  completely implemented and tested
    326  * @author  Sander
    327  * @remark  NT4, SP6 does not change the last error, regardless of the junk it receives!
    328  */
     235//******************************************************************************
     236//******************************************************************************
    329237UINT WIN32API GetDriveTypeW(LPCWSTR lpszDrive)
    330238{
     
    385293        }
    386294    }
    387     if(lpFileSystemNameBuffer || lpMaximumComponentLength || lpFileSystemFlags)
     295    if(lpFileSystemNameBuffer || lpMaximumComponentLength || lpFileSystemFlags) 
    388296    {
    389297        if(!lpFileSystemNameBuffer) {
     
    395303        if(rc == ERROR_SUCCESS) strcpy(szOrgFileSystemName, lpFileSystemNameBuffer);
    396304
    397         if(lpFileSystemNameBuffer)
     305        if(lpFileSystemNameBuffer) 
    398306        {
    399307            dprintf2(("File system name: %s", lpFileSystemNameBuffer));
    400             if(!strcmp(lpFileSystemNameBuffer, "JFS"))
     308            if(!strcmp(lpFileSystemNameBuffer, "JFS")) 
    401309            {
    402310                strcpy(lpFileSystemNameBuffer, "NTFS");
     
    408316                //do nothing
    409317            }
    410             else
     318            else 
    411319            {//pretend everything else is FAT16 (HPFS and FAT have the same file size limit)
    412320                strcpy(lpFileSystemNameBuffer, "FAT16");
     
    528436//******************************************************************************
    529437//******************************************************************************
    530 
     438HANDLE WIN32API FindFirstVolumeA(LPTSTR lpszVolumeName, DWORD cchBufferLength)
     439{
     440    return 0;
     441}
     442//******************************************************************************
     443//******************************************************************************
     444HANDLE WIN32API FindFirstVolumeW(LPWSTR lpszVolumeName, DWORD cchBufferLength)
     445{
     446    return 0;
     447}
     448//******************************************************************************
     449//******************************************************************************
     450BOOL WIN32API FindNextVolumeA(HANDLE hFindVolume, LPTSTR lpszVolumeName,
     451                              DWORD cchBufferLength)
     452{
     453    return FALSE;
     454}
     455//******************************************************************************
     456//******************************************************************************
     457BOOL WIN32API FindNextVolumeW(HANDLE hFindVolume, LPWSTR lpszVolumeName,
     458                              DWORD cchBufferLength)
     459{
     460    return FALSE;
     461}
     462//******************************************************************************
     463//******************************************************************************
     464BOOL WIN32API FindVolumeClose(HANDLE hFindVolume)
     465{
     466    return TRUE;
     467}
     468//******************************************************************************
     469//******************************************************************************
     470HANDLE WIN32API FindFirstVolumeMountPointA(LPTSTR lpszRootPathName,
     471                                           LPTSTR lpszVolumeMountPoint,
     472                                           DWORD cchBufferLength)
     473{
     474    return 0;
     475}
     476//******************************************************************************
     477//******************************************************************************
     478HANDLE WIN32API FindFirstVolumeMountPointW(LPWSTR lpszRootPathName,
     479                                           LPWSTR lpszVolumeMountPoint,
     480                                           DWORD cchBufferLength)
     481{
     482    return 0;
     483}
     484//******************************************************************************
     485//******************************************************************************
     486BOOL WIN32API FindNextVolumeMountPointA(HANDLE hFindVolumeMountPoint,
     487                                        LPTSTR lpszVolumeMountPoint,
     488                                        DWORD cchBufferLength)
     489{
     490    return FALSE;
     491}
     492//******************************************************************************
     493//******************************************************************************
     494BOOL WIN32API FindNextVolumeMountPointW(HANDLE hFindVolumeMountPoint,
     495                                        LPWSTR lpszVolumeMountPoint,
     496                                        DWORD cchBufferLength)
     497{
     498    return FALSE;
     499}
     500//******************************************************************************
     501//******************************************************************************
     502BOOL WIN32API FindVolumeMountPointClose(HANDLE hFindVolumeMountPoint)
     503{
     504    return TRUE;
     505}
     506//******************************************************************************
     507//******************************************************************************
     508BOOL WIN32API GetVolumeNameForVolumeMountPointA(LPCSTR lpszVolumeMountPoint,
     509                                                LPSTR lpszVolumeName,
     510                                                DWORD cchBufferLength)
     511{
     512    return FALSE;
     513}
     514//******************************************************************************
     515//******************************************************************************
     516BOOL WIN32API GetVolumeNameForVolumeMountPointW(LPCWSTR lpszVolumeMountPoint,
     517                                                LPWSTR lpszVolumeName,
     518                                                DWORD cchBufferLength)
     519{
     520    return FALSE;
     521}
     522//******************************************************************************
     523//******************************************************************************
  • trunk/src/kernel32/kernel32dbg.def

    r8325 r8392  
    1 ; $Id: kernel32dbg.def,v 1.10 2002-04-29 16:28:38 sandervl Exp $
     1; $Id: kernel32dbg.def,v 1.11 2002-05-08 15:02:59 sandervl Exp $
    22
    33;Basis is Windows95 KERNEL32
     
    992992    GetSystemWindowsDirectoryW = _DbgGetWindowsDirectoryW@8     @903
    993993
     994; Windows 2000 (and up) volume functions
     995    FindFirstVolumeA           = _DbgFindFirstVolumeA@8            @904
     996    FindFirstVolumeW           = _DbgFindFirstVolumeW@8            @905
     997    FindNextVolumeA            = _DbgFindNextVolumeA@12            @906
     998    FindNextVolumeW            = _DbgFindNextVolumeW@12            @907
     999    FindVolumeClose            = _DbgFindVolumeClose@4             @908
     1000
     1001    FindFirstVolumeMountPointA = _DbgFindFirstVolumeMountPointA@12 @909
     1002    FindFirstVolumeMountPointW = _DbgFindFirstVolumeMountPointW@12 @910
     1003    FindNextVolumeMountPointA  = _DbgFindNextVolumeMountPointA@12  @911
     1004    FindNextVolumeMountPointW  = _DbgFindNextVolumeMountPointW@12  @912
     1005    FindVolumeMountPointClose  = _DbgFindVolumeMountPointClose@4   @913
     1006
     1007    GetVolumeNameForVolumeMountPointA = _DbgGetVolumeNameForVolumeMountPointA@12 @914
     1008    GetVolumeNameForVolumeMountPointW = _DbgGetVolumeNameForVolumeMountPointW@12 @915
     1009
     1010
    9941011;
    9951012; First free ordinal is 890
Note: See TracChangeset for help on using the changeset viewer.