Error on FWH 8.04 RESOLVED!!
Posted: Wed Apr 23, 2008 1:54 pm
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:
and
What is happening?
Thanks for all Linares!!
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 );
}
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);
}
Thanks for all Linares!!