nSerialHD Return not the same result

nSerialHD Return not the same result

Postby Surasak » Sun Sep 09, 2007 3: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?
Surasak
 
Posts: 29
Joined: Fri Jul 20, 2007 1:30 pm

Postby Antonio Linares » Sun Sep 09, 2007 9:39 pm

Please add this function to your main PRG:
Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Surasak » Mon Sep 10, 2007 11:05 am

It work!
Thank you,
Surasak
 
Posts: 29
Joined: Fri Jul 20, 2007 1:30 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken, wilsongamboa and 66 guests