//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Confidential Trade Secret. // Copyright 1987-2001 Data Access Corporation, Miami FL, USA // All Rights reserved // DataFlex is a registered trademark of Data Access Corporation. // // Module: // GetComputerName.Pkg // // Purpose: // Defines interface to WinAPI function GetComputerName // // Author: // Vincent Oorsprong // // Date: // 2001, June, 4th // //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #IFNDEF GET_RdsGetComputerName Define MAX_COMPUTERNAME_LENGTH For 15 External_Function WinAPI_RdsGetComputerName "GetComputerNameA" Kernel32.Dll Pointer lpComputerName DWord nNameSize Returns Integer // 2003-07-29 ------------------------------------ Start Nils G. Svedmyr #If PKG_Version<|CI9 Function RdsGetComputerName For Desktop Returns String #ELSE Function RdsGetComputerName Desktop Returns String #ENDIF // 2003-07-29 ------------------------------------ Stop Nils G. Svedmyr String sComputerName DWord dwNameSize Integer iRetval ZeroString MAX_COMPUTERNAME_LENGTH To sComputerName Move MAX_COMPUTERNAME_LENGTH To dwNameSize Move (WinAPI_RdsGetComputerName (AddressOf (sComputerName), AddressOf (dwNameSize))) To iRetval Function_Return (CString (sComputerName)) End_Function // RdsGetComputerName #ENDIF