19991025-14:58 GMT+1 Victor Szel <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
1999-10-25 13:12:31 +00:00
parent 27d16f04f0
commit de9e545bcf
2 changed files with 7 additions and 5 deletions

View File

@@ -1,3 +1,8 @@
19991025-14:58 GMT+1 Victor Szel <info@szelvesz.hu>
* source/rtl/net.c
+ Name buffer length corrected.
* Using a better API call for the same job.
19991025-12:37 GMT+1 Victor Szel <info@szelvesz.hu>
+ source/tools/ctcrypt.c
+ source/tools/ctchrmix.c

View File

@@ -60,15 +60,12 @@ HARBOUR HB_NETNAME( void )
{
#if defined(_Windows) || defined(WINNT)
{
HKEY hKey;
DWORD ulLen = 128;
DWORD ulLen = MAX_COMPUTERNAME_LENGTH + 1;
char * pszValue = hb_xgrab( ulLen );
pszValue[ 0 ] = '\0';
RegOpenKey( HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ComputerName", &hKey );
RegQueryValueEx( hKey, "ComputerName", NULL, NULL, pszValue, &ulLen );
RegCloseKey( hKey );
GetComputerName( pszValue, &ulLen );
hb_retc( pszValue );
hb_xfree( pszValue );