Error on FWH 8.04 RESOLVED!!

Post Reply
User avatar
JC
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil
Contact:

Error on FWH 8.04 RESOLVED!!

Post 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!!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil
Contact:

Post by JC »

I can resolved this... Was a wrong parameter on .BC
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Very good :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
JC
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil
Contact:

Post by JC »

The 8.04 is amazing!

Very, very good!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Post Reply