FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour nSerialHD Return not the same result
Posts: 36
Joined: Fri Jul 20, 2007 01:30 PM
nSerialHD Return not the same result
Posted: Sun Sep 09, 2007 03:11 PM

I just migrate my application from FW to FWH.
In FW nSerialHD() alway return the same number but in FWH will return the differance when I've change some detail in my source ( add or delete some function or procedure).
How can i solved this problem?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
nSerialHD Return not the same result
Posted: Sun Sep 09, 2007 09:39 PM
Please add this function to your main PRG:
#pragma BEGINDUMP

#include <hbapi.h>
#include <windows.h>

HB_FUNC( NSERIALHD )
{
   DWORD dwVolumeSerialNumber;
   BYTE VolumeNameBuffer[ 256 ];
   BYTE FileSystemNameBuffer[ 256 ];

   GetVolumeInformation( hb_pcount() ? hb_parc( 1 ): "C:\\",
                         ( char * ) VolumeNameBuffer, sizeof( VolumeNameBuffer ),
                         &dwVolumeSerialNumber, 0, 0,
                         ( char * ) FileSystemNameBuffer,
                         sizeof( FileSystemNameBuffer ) );

   hb_retnl( dwVolumeSerialNumber );
}

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 36
Joined: Fri Jul 20, 2007 01:30 PM
nSerialHD Return not the same result
Posted: Mon Sep 10, 2007 11:05 AM

It work!
Thank you,

Continue the discussion