Stubs from CW, part 2b

Duane Clark dclark at akamail.com
Sat Jan 26 15:56:56 CST 2002


A few more files, needed before the previous part 2 will compile and 
run. So I guess that makes this part 2 of part 2.

Modified files:
	win32		: init.c
	include		: winbase.h
	include		: wininet.h

Log message:
	Codeweavers
	Many added and partially implemented stubs.

-------------- next part --------------
Index: win32/init.c
===================================================================
RCS file: /home/wine/wine/win32/init.c,v
retrieving revision 1.17
diff -u -r1.17 init.c
--- win32/init.c	2001/02/14 23:11:20	1.17
+++ win32/init.c	2002/01/26 20:05:08
@@ -8,6 +8,8 @@
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include <errno.h>
+
 #include "winnls.h"
 #include "winbase.h"
 #include "winerror.h"
@@ -33,9 +35,16 @@
     BOOL ret;
     __TRY
     {
-      ret = (-1!=gethostname(name,*size));
-      if (ret)
-	*size = strlen(name);
+	char host_name[256];
+	TRACE("*size = %ld\n", *size);
+	ret = (gethostname(host_name, sizeof(host_name)) != -1);
+	if (ret)
+	{
+	    lstrcpynA(name, host_name, *size);
+	    *size = strlen(name);
+	}
+	else
+	    WARN("gethostname: %s\n", strerror(errno));
     }
     __EXCEPT(page_fault)
     {
@@ -43,7 +52,8 @@
       return FALSE;
     }
     __ENDTRY
-     
+
+    TRACE("returning (%ld) %s\n", *size, debugstr_a(name));
     return ret;
 }
 
@@ -60,3 +70,14 @@
     return ret;
 }
 
+BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT type, LPSTR name, LPDWORD size)
+{
+    FIXME("(%d, %p, %p) semi-stub!\n", type, name, size);
+    return GetComputerNameA(name, size);
+}
+
+BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT type, LPWSTR name, LPDWORD size)
+{
+    FIXME("(%d, %p, %p) semi-stub!\n", type, name, size);
+    return GetComputerNameW(name, size);
+}
Index: include/winbase.h
===================================================================
RCS file: /home/wine/wine/include/winbase.h,v
retrieving revision 1.132
diff -u -r1.132 winbase.h
--- include/winbase.h	2001/12/26 19:50:59	1.132
+++ include/winbase.h	2002/01/26 20:05:09
@@ -977,7 +977,20 @@
 
 typedef void CALLBACK (*PAPCFUNC)(ULONG_PTR);
 typedef void CALLBACK (*PTIMERAPCROUTINE)(LPVOID,DWORD,DWORD);
-  
+
+typedef enum _COMPUTER_NAME_FORMAT
+{
+	ComputerNameNetBIOS,
+	ComputerNameDnsHostname,
+	ComputerNameDnsDomain,
+	ComputerNameDnsFullyQualified,
+	ComputerNamePhysicalNetBIOS,
+	ComputerNamePhysicalDnsHostname,
+	ComputerNamePhysicalDnsDomain,
+	ComputerNamePhysicalDnsFullyQualified,
+	ComputerNameMax
+} COMPUTER_NAME_FORMAT;
+
 /*DWORD WINAPI GetVersion( void );*/
 BOOL WINAPI GetVersionExA(OSVERSIONINFOA*);
 BOOL WINAPI GetVersionExW(OSVERSIONINFOW*);
@@ -1063,6 +1076,7 @@
 #define     BuildCommDCBAndTimeouts WINELIB_NAME_AW(BuildCommDCBAndTimeouts)
 BOOL        WINAPI CancelIo(HANDLE);
 BOOL        WINAPI CancelWaitableTimer(HANDLE);
+BOOL        WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL);
 BOOL        WINAPI ClearCommBreak(HANDLE);
 BOOL        WINAPI ClearCommError(HANDLE,LPDWORD,LPCOMSTAT);
 BOOL        WINAPI ClearEventLogA(HANDLE,LPCSTR);
@@ -1179,9 +1193,12 @@
 LPSTR       WINAPI GetCommandLineA(void);
 LPWSTR      WINAPI GetCommandLineW(void);
 #define     GetCommandLine WINELIB_NAME_AW(GetCommandLine)
-BOOL      WINAPI GetComputerNameA(LPSTR,LPDWORD);
-BOOL      WINAPI GetComputerNameW(LPWSTR,LPDWORD);
+BOOL        WINAPI GetComputerNameA(LPSTR,LPDWORD);
+BOOL        WINAPI GetComputerNameW(LPWSTR,LPDWORD);
 #define     GetComputerName WINELIB_NAME_AW(GetComputerName)
+BOOL        WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
+BOOL        WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
+#define     GetComputerNameEx WINELIB_NAME_AW(GetComputerNameEx)
 HANDLE      WINAPI GetCurrentProcess(void);
 HANDLE      WINAPI GetCurrentThread(void);
 BOOL        WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,LPDWORD);
Index: include/wininet.h
===================================================================
RCS file: /home/wine/wine/include/wininet.h,v
retrieving revision 1.8
diff -u -r1.8 wininet.h
--- include/wininet.h	2000/12/07 23:14:29	1.8
+++ include/wininet.h	2002/01/26 20:05:10
@@ -1290,12 +1290,12 @@
     FILETIME LastSyncTime;      
                                 
     LPBYTE lpHeaderInfo;        
-    DWORD dwHeaderInfoSize;     
-    LPWSTR  lpszFileExtension;  
-    union {                     
+    DWORD dwHeaderInfoSize;
+    LPWSTR  lpszFileExtension;
+    union {
       DWORD dwReserved;
       DWORD dwExemptDelta;
-    } u;                          
+    } u;
 } INTERNET_CACHE_ENTRY_INFOW,* LPINTERNET_CACHE_ENTRY_INFOW;
 
 DECL_WINELIB_TYPE_AW(INTERNET_CACHE_ENTRY_INFO)
@@ -1344,7 +1344,7 @@
 
 
 BOOLAPI SetUrlCacheEntryInfoA(LPCSTR ,LPINTERNET_CACHE_ENTRY_INFOA ,DWORD);
-BOOLAPI SetUrlCacheEntryInfoW(LPCSTR ,LPINTERNET_CACHE_ENTRY_INFOW ,DWORD);
+BOOLAPI SetUrlCacheEntryInfoW(LPCWSTR ,LPINTERNET_CACHE_ENTRY_INFOW ,DWORD);
 #define SetUrlCacheEntryInfo  WINELIB_NAME_AW(SetUrlCacheEntryInfo)
 
 typedef LONGLONG GROUPID;
@@ -1359,7 +1359,7 @@
 INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryExA(
     LPCSTR ,DWORD ,DWORD ,GROUPID ,LPINTERNET_CACHE_ENTRY_INFOA ,LPDWORD ,LPVOID ,LPDWORD ,LPVOID );
 INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryExW(
-    LPCSTR ,DWORD ,DWORD ,GROUPID ,LPINTERNET_CACHE_ENTRY_INFOW ,LPDWORD ,LPVOID ,LPDWORD ,LPVOID );
+    LPCWSTR ,DWORD ,DWORD ,GROUPID ,LPINTERNET_CACHE_ENTRY_INFOW ,LPDWORD ,LPVOID ,LPDWORD ,LPVOID );
 #define FindFirstUrlCacheEntryEx  WINELIB_NAME_AW(FindFirstUrlCacheEntryEx)
 
 BOOLAPI FindNextUrlCacheEntryExA(HANDLE ,LPINTERNET_CACHE_ENTRY_INFOA ,LPDWORD ,LPVOID ,LPDWORD ,LPVOID);
@@ -1367,7 +1367,7 @@
 #define FindNextUrlCacheEntryEx  WINELIB_NAME_AW(FindNextUrlCacheEntryEx)
 
 INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR ,LPINTERNET_CACHE_ENTRY_INFOA ,LPDWORD);
-INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW(LPCSTR ,LPINTERNET_CACHE_ENTRY_INFOW ,LPDWORD);
+INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW(LPCWSTR ,LPINTERNET_CACHE_ENTRY_INFOW ,LPDWORD);
 #define FindFirstUrlCacheEntry  WINELIB_NAME_AW(FindFirstUrlCacheEntry)
 
 BOOLAPI FindNextUrlCacheEntryA(HANDLE ,LPINTERNET_CACHE_ENTRY_INFOA ,LPDWORD);


More information about the wine-patches mailing list