2012-11-22 18:09 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/contrib/hbwin/hbwin.hbx
* harbour/contrib/hbwin/wapi_winbase.c
+ added new function:
wapi_GetVolumeInformation( <cRootPath>, @<cVolumeName>, @<nSerial>,
@<nMaxComponentLength>, @<nFileSystemFlags>,
@<cFileSystemName> ) -> <lSuccess>
This commit is contained in:
@@ -10,6 +10,14 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2012-11-22 18:09 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/contrib/hbwin/hbwin.hbx
|
||||
* harbour/contrib/hbwin/wapi_winbase.c
|
||||
+ added new function:
|
||||
wapi_GetVolumeInformation( <cRootPath>, @<cVolumeName>, @<nSerial>,
|
||||
@<nMaxComponentLength>, @<nFileSystemFlags>,
|
||||
@<cFileSystemName> ) -> <lSuccess>
|
||||
|
||||
2012-11-22 17:16 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/src/rtl/dbedit.prg
|
||||
! fixed infinite loop introduced in my recent modification
|
||||
|
||||
@@ -96,6 +96,7 @@ DYNAMIC wapi_GetSystemMetrics
|
||||
DYNAMIC wapi_GetTextAlign
|
||||
DYNAMIC wapi_GetTextColor
|
||||
DYNAMIC wapi_GetTextFace
|
||||
DYNAMIC wapi_GetVolumeInformation
|
||||
DYNAMIC wapi_GetWindowsDirectory
|
||||
DYNAMIC wapi_ImageList_Add
|
||||
DYNAMIC wapi_ImageList_AddMasked
|
||||
|
||||
@@ -476,3 +476,63 @@ HB_FUNC( WAPI_QUERYPERFORMANCEFREQUENCY )
|
||||
hb_stornint( HBWAPI_GET_LARGEUINT( frequency ), 1 );
|
||||
hb_retl( result != 0 );
|
||||
}
|
||||
|
||||
/* wapi_GetVolumeInformation( <cRootPath>, @<cVolumeName>, @<nSerial>,
|
||||
* @<nMaxComponentLength>, @<nFileSystemFlags>,
|
||||
* @<cFileSystemName> ) -> <lSuccess>
|
||||
*/
|
||||
|
||||
HB_FUNC( WAPI_GETVOLUMEINFORMATION )
|
||||
{
|
||||
#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE )
|
||||
BOOL bResult;
|
||||
DWORD dwSerialNumber, dwMaxFileNameLen, dwFileSystemFlags;
|
||||
DWORD dwVolNameSize, dwFSNameSize;
|
||||
LPTSTR lpVolNameBuf, lpFSNameBuf;
|
||||
void * hRootPath;
|
||||
LPCTSTR lpRootPath;
|
||||
|
||||
dwSerialNumber = dwMaxFileNameLen = dwFileSystemFlags = 0;
|
||||
dwVolNameSize = dwFSNameSize = 0;
|
||||
lpVolNameBuf = lpFSNameBuf = NULL;
|
||||
lpRootPath = HB_PARSTR( 1, &hRootPath, NULL );
|
||||
if( HB_ISBYREF( 2 ) )
|
||||
{
|
||||
dwVolNameSize = MAX_PATH + 1;
|
||||
lpVolNameBuf = ( LPTSTR ) hb_xgrab( MAX_PATH + 1 );
|
||||
}
|
||||
if( HB_ISBYREF( 6 ) )
|
||||
{
|
||||
dwFSNameSize = MAX_PATH + 1;
|
||||
lpFSNameBuf = ( LPTSTR ) hb_xgrab( MAX_PATH + 1 );
|
||||
}
|
||||
|
||||
bResult = GetVolumeInformation( lpRootPath, /* RootPathName */
|
||||
lpVolNameBuf, /* VolumeName */
|
||||
dwVolNameSize, /* VolumeNameSize */
|
||||
&dwSerialNumber, /* VolumeSerialNumber */
|
||||
&dwMaxFileNameLen, /* MaxComponentLength */
|
||||
&dwFileSystemFlags, /* FileSystemFlags */
|
||||
lpFSNameBuf, /* FileSystemName */
|
||||
dwFSNameSize ); /* FileSystemSize */
|
||||
hb_strfree( hRootPath );
|
||||
|
||||
if( lpVolNameBuf )
|
||||
{
|
||||
HB_STORSTR( lpVolNameBuf, 2 );
|
||||
hb_xfree( lpVolNameBuf );
|
||||
}
|
||||
hb_stornint( dwSerialNumber, 3 );
|
||||
hb_stornint( dwMaxFileNameLen, 4 );
|
||||
hb_stornint( dwFileSystemFlags, 5 );
|
||||
if( lpFSNameBuf )
|
||||
{
|
||||
HB_STORSTR( lpFSNameBuf, 6 );
|
||||
hb_xfree( lpFSNameBuf );
|
||||
}
|
||||
|
||||
hb_retl( bResult != 0 );
|
||||
#else
|
||||
hb_retl( HB_FALSE );
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user