19991025-14:58 GMT+1 Victor Szel <info@szelvesz.hu>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user