Page 1 of 1

Error on FWH 8.04 RESOLVED!!

Posted: Wed Apr 23, 2008 1:54 pm
by JC
Hi Antonio!

I just buy the new version of fivewin ( 8.04 ) but some errors are occurring.

You could help me at that time, please?

I have two functions in .C that are not working in the now version:

Code: Select all

HARBOUR HB_FUN_GETCOMPUTERNAME( PARAMS ) {

   DWORD size = 255;
   LPTSTR name;

   name = _xgrab( size * sizeof(char) );

   GetComputerName( name, &size );

   _retc( name );
   _xfree( name );

}
and

Code: Select all

HARBOUR HB_FUN_FILEVERSION( PARAMS ) {

	long v1=0, v2=0, v3=0;       // Versões
	DWORD tamanho1, x;           // Tamanho, se zero, falhou
	unsigned long tamanho2;      // Tamando da informaçao lida
	LPTSTR arquivo = _parc(1);   // Ponteiro com o nome do arquivo
  LPTSTR retorno[15];            // Resultado da leitura para retorno
	LPVOID versao;               // Versão do programa
	LPVOID info;                 // Informação do programa
	VS_FIXEDFILEINFO * aInfo;    // Cast do ponteiro de informação

	tamanho1 = GetFileVersionInfoSize( arquivo, &x );

   if ( tamanho1 ) {

      versao = _xgrab( tamanho1 * sizeof(char) );

      if ( GetFileVersionInfo( arquivo, 0, tamanho1, versao ) ) {

         if ( VerQueryValue( versao, "\\", &info, &tamanho1) ) {

            aInfo = (VS_FIXEDFILEINFO *) info;

            v1 = HIWORD( aInfo -> dwProductVersionMS );
            v2 = LOWORD( aInfo -> dwProductVersionMS );
            v3 = HIWORD( aInfo -> dwProductVersionLS );

         }
      }

     _xfree( versao );
   }

   wsprintf(retorno, "%i.%i.%i", v1, v2, v3);
   _retc(retorno);

}
What is happening?
Thanks for all Linares!!

Posted: Wed Apr 23, 2008 2:48 pm
by JC
I can resolved this... Was a wrong parameter on .BC

Posted: Wed Apr 23, 2008 9:19 pm
by Antonio Linares
Very good :-)

Posted: Thu Apr 24, 2008 12:00 am
by JC
The 8.04 is amazing!

Very, very good!