Jump to content
Fivewin Brasil

Arquitetura 32 ou 64 bits


macs

Recommended Posts

Look:

#include "Fivewin.ch"
	//----------------------------------------------------------------------------//
// Test inicial: Menu standard non style
//
//----------------------------------------------------------------------------//
	Static oWnd
Static oFont
Static nHFont
Static cFont
Static nWFont
	Function Main()
	   cFont    := "Verdana"
   nHFont   := 14
   DEFINE FONT oFont NAME cFont SIZE 0, -nHFont
   DEFINE WINDOW oWnd ;
      TITLE "Test Menu" + " - Ver.: " + FWVERSION + if( IsExe64(),      ;
            "  ( 64", "  ( 32" ) + " bits ) - " + FWString( "User" ) +  ;
            ": " + WNetGetUser() + " - " + hb_Compiler() + " - " + OS() ;
            + " - Version: " + cWinVersion()                                      ;
      MENU MenuSal() ;
      COLOR CLR_WHITE, METRO_STEEL
     
     
   ACTIVATE WINDOW oWnd MAXIMIZED
   RELEASE FONT oFont
	Return nil
	//----------------------------------------------------------------------------//
	Function MenuSal()
	local oMnu
	   MENU oMnu FONT oFont 2013 ADJUST ;
      NOBORDER ; //UPPERMNU ;
      COLORSEPARATOR CLR_RED ;
      COLORMENU CLR_HGRAY, CLR_BLUE ;
      COLORSELECT METRO_STEEL, METRO_STEEL, RGB( 0, 0, 1 ) ;
      COLORLEFT CLR_WHITE ;
      COLORRIGHT CLR_HGRAY ;  //      NOINHERIT ;   //      FACTOR 4 ;
      ROUND 1 ;  //5   //      RIGHTSPACE 10 ;
      HEIGHT 1.0 * 2
      MENUITEM "Datos   "
         MENU
            MENUITEM "Proveedores"  ACTION MsgInfo( "Proveedores" )
            MENUITEM "Clientes" ACTION MsgInfo( "Clientes" )
            SEPARATOR
            MENUITEM "Articulos" ACTION MsgInfo( "Articulos" )
            SEPARATOR
            MENUITEM "Fichero de Zonas" ACTION MsgInfo( "Fichero de Zonas" )
            MENUITEM "Ficheros Auxiliares"
            MENU
               MENUITEM "Agentes"
               SEPARATOR
               MENUITEM "Formas de Pago"
               MENUITEM "Entidades Bancarias"
            ENDMENU
            MENUITEM "Tools"
            MENU
               MENUITEM "Copia de Seguridad"
               MENUITEM "Herramientas"
               SEPARATOR
               MENUITEM "Otros"
               MENU 
                  MENUITEM "Item 1"  ACTION MsgInfo( "Item_1" )
                  SEPARATOR
                  MENUITEM "Item 2" ACTION MsgInfo( "Item_2" )
               ENDMENU
            ENDMENU
         ENDMENU
      MENUITEM "Otros Items" ACTION oWnd:End ()            
         MENU 
            MENUITEM "Item 1"  ACTION MsgInfo( "Item_1" )
            MENUITEM "Item 2" ACTION MsgInfo( "Item_2" )
            MENUITEM "Item 3" ACTION MsgInfo( "Item_3" )
            MENUITEM "Item 4" ACTION MsgInfo( "Item_4" )
            SEPARATOR
            MENUITEM "Item 5" ACTION MsgInfo( "Item_5" )
            MENU
               MENUITEM "Item 51" ACTION MsgInfo( "Item_51" )
               MENUITEM "Item 52" ACTION MsgInfo( "Item_52" )
               SEPARATOR
               MENUITEM "Item 53" ACTION MsgInfo( "Item_53" )
               MENUITEM "Item 54" ACTION MsgInfo( "Item_54" )
               MENUITEM "Item 55" ACTION MsgInfo( "Item_55" )
            ENDMENU
            MENUITEM "Item 6" ACTION MsgInfo( "Item_6" )
            MENUITEM "Item 7" ACTION MsgInfo( "Item_7" )
         ENDMENU
      MENUITEM "Salir"
         MENU
            MENUITEM "Abandonar Test" ACTION oWnd:End()
            SEPARATOR
            MENUITEM "Historico"
            MENUITEM "Simbolo Sistema"
         ENDMENU
   ENDMENU
                                                           
Return oMnu
//----------------------------------------------------------------------------//

Abs

Link to comment
Share on other sites

#define  HKEY_LOCAL_MACHINE  2147483650  // 0x80000002
	function IsWindows10()
	   local oReg := TReg32():New( HKEY_LOCAL_MACHINE,;
                               "SOFTWARE\Microsoft\Windows NT\CurrentVersion",;
                               .f. )
   local cProductName := oReg:Get( "ProductName" )
	   oReg:Close()
return "Windows 10" $ cProductName

Abs.

Link to comment
Share on other sites

FUNCTION WIN32_64BITS
   if ISWOW64()
      ShowMsg( "Windows 64 bits" )
   else
      ShowMsg( "Windows 32 bits" )
   endif
return nil

#pragma BEGINDUMP

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

typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);

LPFN_ISWOW64PROCESS fnIsWow64Process;

HB_FUNC( ISWOW64 )
{
    BOOL bIsWow64 = FALSE;

    fnIsWow64Process = ( LPFN_ISWOW64PROCESS )
                       GetProcAddress( GetModuleHandle( TEXT( "kernel32" ) ), "IsWow64Process" );

    if( fnIsWow64Process )
        bIsWow64 = ! fnIsWow64Process( GetCurrentProcess(), &bIsWow64 );

    hb_retl( bIsWow64 );
}

#pragma ENDDUMP

 

Link to comment
Share on other sites

Dears, e assim, o que retorna?

#Include "FiveWin.ch"
	FUNCTION WIN32_64BITS
	   IF ISWOW64()
	      MsgInfo( "Windows 64 bits", cWinVersion() )
	   ELSE
	      MsgInfo( "Windows 32 bits", cWinVersion() )
	   ENDIF
	RETURN NIL
	#pragma BEGINDUMP
	#include <windows.h>
#include <hbapi.h>
	typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
	LPFN_ISWOW64PROCESS fnIsWow64Process;
	HB_FUNC( ISWOW64 )
{
    BOOL bIsWow64 = FALSE;
	    fnIsWow64Process = ( LPFN_ISWOW64PROCESS )
                       GetProcAddress( GetModuleHandle( TEXT( "kernel32" ) ), "IsWow64Process" );
	    if( fnIsWow64Process )
        bIsWow64 = ! fnIsWow64Process( GetCurrentProcess(), &bIsWow64 );
	    hb_retl( bIsWow64 );
}
#pragma ENDDUMP


 

Abs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...