maybe I found an error in the function nSerialHD(). It always returns negative values.
If I change hb_retnl (..) to hb_retnll (..) it is working correct.
- Code: Select all Expand view
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_retnll( dwVolumeSerialNumber ); //<------
}
Can you check this, please