Manifest for 64 Bit

Manifest for 64 Bit

Postby Jimmy » Tue Aug 02, 2022 8:11 pm

hi,

i try to use Manifest for 64 Bit (MSVC)
i got ICON / BITMAP in App but "Description" is almost empty under 64 Bit ...

Code: Select all  Expand view  RUN
#include <windows.h>
#include <commctrl.h>

#ifndef __64__
  1 24 "WindowsXP.Manifest"
//  1 24 "Windows10.Manifest"
#else
  1 24 "WindowsXP.Manifest64"
#endif

//
LANGUAGE 0, SUBLANG_NEUTRAL
1 VERSIONINFO
    FILEVERSION     0,1,1,0
    PRODUCTVERSION  2,1,1,0
    FILEOS          VOS_NT_WINDOWS32
    FILETYPE        VFT_APP
    FILESUBTYPE     VFT2_UNKNOWN
    FILEFLAGSMASK   0x0000003F
    FILEFLAGS       0x00000000
{
    BLOCK "StringFileInfo"
    {
        BLOCK "040704B0"
        {
            VALUE "Comments", "Comments"
            VALUE "CompanyName", "Company"
            VALUE "FileDescription", "Description"
            VALUE "FileVersion", "2, 1, 1, 0"
            VALUE "InternalName", "Internal"
            VALUE "LegalCopyright", "Copyright 1983-2022"
            VALUE "LegalTrademarks", "Trademarks"
            VALUE "OriginalFilename", "Original"
            VALUE "PrivateBuild", "Build"
            VALUE "ProductName", "Product"
            VALUE "ProductVersion", "2, 1, 1, 0"
            VALUE "SpecialBuild", "Special"
            VALUE "VarFileInfo", "VarFile"
        }
    }
    BLOCK "VarFileInfo"
    {
        VALUE "Translation",   0x0407, 1252
    }
}

A1MAIN      ICON RES\VILM.ico

B1IMPORT    BITMAP .\RES\BLUE_UP.BMP
B1EXIT      BITMAP .\RES\EXIT.BMP
B1SOUND         BITMAP .\RES\SNDVOL32.BMP


Manifest work under BCC7 32 Bit so what i´m doing wrong :?:
Code: Select all  Expand view  RUN
   1 24 "Windows10.Manifest"

    VS_VERSION_INFO VERSIONINFO
     FILEVERSION 0,0,1,6
     PRODUCTVERSION 1,0,0,1
     FILEFLAGSMASK 0x3fL
    #ifdef _DEBUG
     FILEFLAGS 0x1L
    #else
     FILEFLAGS 0x0L
    #endif
     FILEOS 0x40004L
     FILETYPE 0x1L
     FILESUBTYPE 0x0L
    BEGIN
        BLOCK "StringFileInfo"
        BEGIN
            BLOCK "040904b0"
            BEGIN
             VALUE "FileDescription", "FiveWin VLC IPTV 32 Bit\000"
             VALUE "FileVersion", "0.6.9.0"
             VALUE "InternalName", "FWIPTV"
             VALUE "LegalCopyright", "Copyright © 1983-2022 Yiu-Software\000"
             VALUE "LegalTrademarks", "Harbour"
             VALUE "OriginalFilename", "FWIPTV.EXE"
             VALUE "CompanyName", "Yiu-Software"
             VALUE "ProductName", "IPTV"
             VALUE "ProductVersion", "1.0.0.0"
             VALUE "Comments", "Created by Auge & Ohr\000"
            END
        END
        BLOCK "VarFileInfo"
        BEGIN
            VALUE "Translation",  0x0407, 1252
        END
    END

A1MAIN      ICON RES\VILM.ico

B1IMPORT    BITMAP .\RES\BLUE_UP.BMP
B1EXIT      BITMAP .\RES\EXIT.BMP
B1SOUND         BITMAP .\RES\SNDVOL32.BMP
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Manifest for 64 Bit

Postby Antonio Linares » Wed Aug 03, 2022 4:24 am

Dear Jimmy,

Are you uing Microsoft Visual Studio Community to edit them ? We encourage you to use Visual Studio Community to manage them.

Please keep in mind that 32 and 64 bits manifest files may be different
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Manifest for 64 Bit

Postby Jimmy » Wed Aug 03, 2022 4:31 am

hi Antonio,
Antonio Linares wrote:Are you uing Microsoft Visual Studio Community to edit them ?
We encourage you to use Visual Studio Community to manage them.

i only use BUILGh64.BAT
have never start MSVC IDE ...

Antonio Linares wrote:Please keep in mind that 32 and 64 bits manifest files may be different

Yes, that seems different ...

did somebody have working 64 Bit *.RC where those Entry work :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Manifest for 64 Bit

Postby Enrico Maria Giordano » Wed Aug 03, 2022 9:24 pm

This is working for me (at least using BCC 7.30 64 bit):

Code: Select all  Expand view  RUN
1 24
{
 '3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31'
 '2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55 54'
 '46 2D 38 22 20 73 74 61 6E 64 61 6C 6F 6E 65 3D'
 '22 79 65 73 22 3F 3E 0D 0A 3C 61 73 73 65 6D 62'
 '6C 79 20 78 6D 6C 6E 73 3D 22 75 72 6E 3A 73 63'
 '68 65 6D 61 73 2D 6D 69 63 72 6F 73 6F 66 74 2D'
 '63 6F 6D 3A 61 73 6D 2E 76 31 22 20 6D 61 6E 69'
 '66 65 73 74 56 65 72 73 69 6F 6E 3D 22 31 2E 30'
 '22 3E 0D 0A 20 20 3C 64 65 70 65 6E 64 65 6E 63'
 '79 3E 0D 0A 20 20 20 20 3C 64 65 70 65 6E 64 65'
 '6E 74 41 73 73 65 6D 62 6C 79 3E 0D 0A 20 20 20'
 '20 20 20 3C 61 73 73 65 6D 62 6C 79 49 64 65 6E'
 '74 69 74 79 20 74 79 70 65 3D 22 77 69 6E 33 32'
 '22 20 6E 61 6D 65 3D 22 4D 69 63 72 6F 73 6F 66'
 '74 2E 57 69 6E 64 6F 77 73 2E 43 6F 6D 6D 6F 6E'
 '2D 43 6F 6E 74 72 6F 6C 73 22 20 76 65 72 73 69'
 '6F 6E 3D 22 36 2E 30 2E 30 2E 30 22 20 70 72 6F'
 '63 65 73 73 6F 72 41 72 63 68 69 74 65 63 74 75'
 '72 65 3D 22 61 6D 64 36 34 22 20 70 75 62 6C 69'
 '63 4B 65 79 54 6F 6B 65 6E 3D 22 36 35 39 35 62'
 '36 34 31 34 34 63 63 66 31 64 66 22 20 6C 61 6E'
 '67 75 61 67 65 3D 22 2A 22 20 2F 3E 0D 0A 20 20'
 '20 20 3C 2F 64 65 70 65 6E 64 65 6E 74 41 73 73'
 '65 6D 62 6C 79 3E 0D 0A 20 20 3C 2F 64 65 70 65'
 '6E 64 65 6E 63 79 3E 0D 0A 3C 2F 61 73 73 65 6D'
 '62 6C 79 3E'
}


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Manifest for 64 Bit

Postby Jimmy » Thu Aug 04, 2022 4:01 am

hi,
Enrico Maria Giordano wrote:This is working for me (at least using BCC 7.30 64 bit):

Thx for Answer.

i got Error at "3C" using MSVC and "Microsoft Resource Compiler"

---

it seem not a x86 / x64 "Problem"
i have use
Code: Select all  Expand view  RUN
processorArchitecture="X66"

or
Code: Select all  Expand view  RUN
processorArchitecture="*"

but still no "FileDescription", "CompanyName" etc.

i "only" get Icon and Bitmap
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Manifest for 64 Bit

Postby Enrico Maria Giordano » Thu Aug 04, 2022 7:42 am

Jimmy wrote:i got Error at "3C" using MSVC and "Microsoft Resource Compiler"


Sorry, never used "Microsoft Resource Compiler", I don't like the bloated, limited and bugged MS tools. You have to find what is the syntax it requires for base64 embeded resources. Probably it doesn't support them. You can use brcc32.exe, the BCC resource compiler to produce the RES from the RC.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Manifest for 64 Bit

Postby MOISES » Thu Aug 04, 2022 4:10 pm

Hi,

Try this under 32 and 64 bits:

filever.prg

Code: Select all  Expand view  RUN
#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local n

   for n = 1 to 12
       MsgInfo( GetFileVersionInfo( "filever.exe", n ) )
   next

return nil

//----------------------------------------------------------------------------//


#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

HB_FUNC( GETFILEVERSIONINFO )
{
   char * szFile  = hb_parc( 1 );
   UINT uAction   = HB_ISNUM( 2 ) ? hb_parni( 2 ) : 1;
   DWORD dwHandle = 0;
   DWORD dwSize   = GetFileVersionInfoSize( szFile, &dwHandle );
   char * szOut   = NULL;
   BOOL  bOk      = FALSE;

   if( dwSize )
   {
      char * szBlock = ( char * ) hb_xgrab( 255 );
      char * szSubBlock = ( char * ) hb_xgrab( 255 );
      HGLOBAL hMem = GlobalAlloc( GMEM_MOVEABLE, dwSize );
      VS_FIXEDFILEINFO * vsInfo;
      UINT nLen = 0;

      if( hMem )
      {
         LPVOID pMem = GlobalLock( hMem );

         if( pMem && GetFileVersionInfo( szFile, dwHandle, dwSize, pMem ) )
         {
            if( VerQueryValue( pMem, "\\VarFileInfo\\Translation", ( LPVOID * ) &vsInfo, &nLen ) )
            {
               *( LPDWORD ) vsInfo = MAKELONG( HIWORD( *( LPDWORD ) vsInfo ), LOWORD( *( LPDWORD ) vsInfo ) );

               sprintf( szBlock, "\\StringFileInfo\\%08lx\\", *( LPDWORD )( vsInfo ) );

               switch( uAction )
               {
                  case 1:
                     sprintf( szSubBlock, "%s%s", szBlock, "Comments" );
                     break;

                  case 2:
                     sprintf( szSubBlock, "%s%s", szBlock, "CompanyName" );
                     break;

                  case 3:
                     sprintf( szSubBlock, "%s%s", szBlock, "FileDescription" );
                     break;

                  case 4:
                     sprintf( szSubBlock, "%s%s", szBlock, "FileVersion" );
                     break;

                  case 5:
                     sprintf( szSubBlock, "%s%s", szBlock, "InternalName" );
                     break;

                  case 6:
                     sprintf( szSubBlock, "%s%s", szBlock, "LegalCopyright" );
                     break;

                  case 7:
                     sprintf( szSubBlock, "%s%s", szBlock, "LegalTrademarks" );
                     break;

                  case 8:
                     sprintf( szSubBlock, "%s%s", szBlock, "OriginalFilename" );
                     break;

                  case 9:
                     sprintf( szSubBlock, "%s%s", szBlock, "PrivateBuild" );
                     break;

                  case 10:
                     sprintf( szSubBlock, "%s%s", szBlock, "ProductName" );
                     break;

                  case 11:
                     sprintf( szSubBlock, "%s%s", szBlock, "ProductVersion" );
                     break;

                  case 12:
                     sprintf( szSubBlock, "%s%s", szBlock, "SpecialBuild" );
                     break;
               }

               if( VerQueryValue( pMem, szSubBlock, ( LPVOID * ) &szOut, &nLen ) )
                  bOk = TRUE;

               hb_xfree( szBlock );
               hb_xfree( szSubBlock );
            }

            GlobalUnlock( hMem );
            GlobalFree( hMem );
         }
      }
   }

   if( bOk )
      hb_retc( szOut );
   else
      hb_retc( "" );
}

#pragma ENDDUMP

//----------------------------------------------------------------------------//

 



filever.rc

Code: Select all  Expand view  RUN
LANGUAGE LANG_SPANISH,SUBLANG_SPANISH_MODERN

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3F
FILEFLAGS 0x0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904B0"
    BEGIN
      VALUE "Comments", "This is a test to manage FileVersion resource\0"
      VALUE "CompanyName", "FiveTech Software\0"
      VALUE "FileDescription", "FileVer.prg demo\0"
      VALUE "FileVersion", "1.0.0.0\0"
      VALUE "InternalName", "FileVer.prg / FileVer.rc\0"
      VALUE "LegalCopyright", "www.fivetechsoft.com\0"
      VALUE "LegalTrademarks", "FiveTech Software S.L.\0"
      VALUE "OriginalFilename", "FileVer.prg\0"
      VALUE "ProductName", "FileVer.prg demo\0"
      VALUE "ProductVersion", "1.0.0.0\0"
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x409, 0x4B0
  END
END

 
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 45 guests