kapiaba Posted November 16, 2016 Report Share Posted November 16, 2016 C:\FWH1608\SOURCE\FUNCTION\GETSYSIN.PRG #include "FiveWin.ch" #define HORZRES 8 #define VERTRES 10 #Define BITSPIXEL 12 #define PLANES 14 #define LOGPIXELSX 88 #define LOGPIXELSY 90 #ifndef SM_DIGITIZER #define SM_DIGITIZER 94 #endif #ifndef SM_CMOUSEBUTTONS #define SM_CMOUSEBUTTONS 43 #endif //----------------------------------------------------------------------------// Function LargeFonts( nPixelX, nPixelY ) Local hDC hDC := CreateDC( "DISPLAY", "", "" ) nPixelX := GetDeviceCaps( hDC, LOGPIXELSX ) nPixelY := GetDeviceCaps( hDC, LOGPIXELSY ) DeleteDC( hDC ) Return ( nPixelX >= 120 ) //----------------------------------------------------------------------------// function DispFontPerSize() local hDC, nPixelX hDC = CreateDC( "DISPLAY", "", "" ) nPixelX = GetDeviceCaps( hDC, LOGPIXELSX ) DeleteDC( hDC ) return ( nPixelX / 96 ) //----------------------------------------------------------------------------// function ColorsQty() local hDC, nPlanes, nBitsPixel hDC = CreateDC( "DISPLAY", "", "" ) nPlanes = GetDeviceCaps( hDC, PLANES ) nBitsPixel = GetDeviceCaps( hDC, BITSPIXEL ) DeleteDC( hDC ) return Int( 2 ^ ( nPlanes * nBitsPixel ) ) //----------------------------------------------------------------------------// function ScrResolution( nWidth, nHeight ) local hDC hDC = CreateDC( "DISPLAY", "", "" ) nWidth = GetDeviceCaps( hDC, HORZRES ) nHeight = GetDeviceCaps( hDC, VERTRES ) DeleteDC( hDC ) return { nWidth, nHeight } //----------------------------------------------------------------------------// #define VER_PLATFORM_WIN32s 0 #define VER_PLATFORM_WIN32_WINDOWS 1 #define VER_PLATFORM_WIN32_NT 2 function cWinVersion() local aVersion := GetVersion() local cVersion := "" do case case aVersion[ 4 ] == VER_PLATFORM_WIN32_NT if aVersion[ 1 ] == 6 if aVersion[ 2 ] == 0 cVersion = "Vista" elseif aVersion[ 2 ] == 1 cVersion = "7" elseif aVersion[ 2 ] == 2 if IsWindows10() cVersion = "10" else cVersion = "8" endif endif endif if aVersion[ 1 ] == 5 if aVersion[ 2 ] == 2 cVersion = "Server 2003" elseif aVersion[ 2 ] == 1 cVersion = "XP" elseif aVersion[ 2 ] == 0 cVersion = "2000" endif endif if aVersion[ 1 ] <= 4 cVersion = "NT" endif case aVersion[ 4 ] == VER_PLATFORM_WIN32_WINDOWS if aVersion[ 1 ] == 4 if aVersion[ 2 ] == 90 cVersion = "ME" elseif aVersion[ 2 ] == 10 cVersion = "98" elseif aVersion[ 2 ] == 0 cVersion = "95" endif endif endcase cVersion += IF( IsWin64(), " 64 ", " 32 " ) + "Bits" return cVersion //----------------------------------------------------------------------------// function IsWinVista() return ( "Vista" $ cWinVersion() ) //----------------------------------------------------------------------------// function IsWinXP() return ( "XP" $ cWinVersion() ) //----------------------------------------------------------------------------// function IsWin2000() return ( "2000" $ cWinVersion() ) //----------------------------------------------------------------------------// function IsWin7() return "7" $ cWinVersion() //----------------------------------------------------------------------------// function IsWin8() return "8" == cWinVersion() //----------------------------------------------------------------------------// #define HKEY_LOCAL_MACHINE 2147483650 // 0x80000002 #ifndef HKEY_CURRENT_USER #define HKEY_CURRENT_USER 2147483649 // 0x80000001 #endif 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 //----------------------------------------------------------------------------// function FW_IsTouchScreen(); return ( GetSysMetrics( SM_DIGITIZER ) > 0 ) function FW_IsMousePresent(); return ( GetSysMetrics( SM_CMOUSEBUTTONS ) > 0 ) //----------------------------------------------------------------------------// function FW_IsTabletMode() local oReg, lTabletMode := .f. if IsWindows10() oReg:= TReg32():New( HKEY_CURRENT_USER,; "SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" ) lTabletMode := ( oReg:Get( "TabletMode", 0 ) > 0 ) endif return lTabletMode //----------------------------------------------------------------------------// function GetCPUSpeed() local oReg := TReg32():New( HKEY_LOCAL_MACHINE,; "HARDWARE\DESCRIPTION\System\CentralProcessor\0",; .F. ) local nCpuSpeed := oReg:Get( "~MHz", 0 ) oReg:Close() return nCpuSpeed //----------------------------------------------------------------------------// function GetSysFont() do case case ! IsWinNt() .and. ! IsWin95() // Win 3.1 return "System" endcase return If( IsWindows10() .or. IsWin8(), "Segoe UI", "Ms Sans Serif" ) // Win NT, 9x //----------------------------------------------------------------------------// function BorlandVersion() #ifdef __XHARBOUR__ local cHexVer := NumToHex( BorlandC() ) #else local cHexVer := hb_NumToHex( BorlandC() ) #endif return SubStr( cHexVer, 1, 1 ) + "." + SubStr( cHexVer, 2 ) //----------------------------------------------------------------------------// function SaveDesktop( cPngFileName ) local o := TWindow() DestroyWindow( o:hWnd ) o:hWnd = GetDesktopWindow() o:SaveToPng( cPngFileName ) return nil //----------------------------------------------------------------------------// #define SM_CXFULLSCREEN 16 #define SM_CYFULLSCREEN 17 function ScreenWidth() return GetSysMetrics( SM_CXFULLSCREEN ) function ScreenHeight() return GetSysMetrics( SM_CYFULLSCREEN ) function ScreenHeightMM() local hDC, nHeight hDC := GetDC( 0 ) nHeight := GetDeviceCaps( hDC, 6 ) // VERTSIZE = 6 ReleaseDC( hDC ) return nHeight function ScreenWidthMM() local hDC, nWidth hDC := GetDC( 0 ) nWidth := GetDeviceCaps( hDC, 4 ) // HORZSIZE = 4 ReleaseDC( hDC ) return nWidth function ScreenSize( lInches ) local hDC, nWidth, nHeight, nDiag hDC := GetDC( 0 ) nWidth := GetDeviceCaps( hDC, 4 ) // HORZSIZE = 4 nHeight := GetDeviceCaps( hDC, 6 ) // VERTSIZE = 6 ReleaseDC( hDC ) nDiag := SQRT( nWidth * nWidth + nHeight * nHeight ) return If( lInches == .t., nDiag / 25.4, nDiag ) //----------------------------------------------------------------------------// function IsWin64() return ! Empty( GetEnv( "ProgramFiles(x86)" ) ) //----------------------------------------------------------------------------// Quote Link to comment Share on other sites More sharing options...
Marca Posted November 16, 2016 Author Report Share Posted November 16, 2016 No meu server aqui que também é um 2003 consigo enviar normalmente utilizando as configurações do cliente mais no dele realmente não vai Falta alguma coisa, alguma dll ou até mesmo registrar alguma dll. Acredito ser algo neste sentido. Quote Link to comment Share on other sites More sharing options...
fladimir Posted November 17, 2016 Report Share Posted November 17, 2016 Aconteceu exatamente o mesmo comigo, funciona num 2003 e em outro não ai depois de tentar várias coisas e como temos q resolver, implementei a POG q comentei e esta ok. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.