tapi fixes from CW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Modified files:
	dlls/tapi32		: line.c
	include			: tapi.h

Log message:
	Codeweavers
	Don't try to set fields in nonexistant lpLineCountryList.
	Supply valid tapi codes.

Index: dlls/tapi32/line.c
===================================================================
RCS file: /home/wine/wine/dlls/tapi32/line.c,v
retrieving revision 1.11
diff -u -r1.11 line.c
--- dlls/tapi32/line.c	2000/08/08 20:49:17	1.11
+++ dlls/tapi32/line.c	2002/01/27 01:31:06
@@ -286,7 +286,15 @@
     DWORD dwAvailSize, dwOffset, i;
     LPLINECOUNTRYENTRY lpLCE;
 
-    TRACE("(%08lx, %08lx, %p): stub.\n", dwCountryID, dwAPIVersion, lpLineCountryList);
+    if(!lpLineCountryList) {
+	TRACE("(%08lx, %08lx, %p): stub. Returning LINEERR_INVALPOINTER\n",
+	      dwCountryID, dwAPIVersion, lpLineCountryList);
+        return LINEERR_INVALPOINTER;
+    }
+
+    TRACE("(%08lx, %08lx, %p(%ld)): stub.\n", 
+	  dwCountryID, dwAPIVersion, lpLineCountryList,
+	  lpLineCountryList->dwTotalSize);
 
     dwAvailSize = lpLineCountryList->dwTotalSize;
     dwOffset = sizeof (LINECOUNTRYLIST);
@@ -294,11 +302,9 @@
     if(dwAvailSize<dwOffset)
         return LINEERR_STRUCTURETOOSMALL;
 
-    if(!lpLineCountryList)
-        return LINEERR_INVALPOINTER;
-
     memset(lpLineCountryList, 0, dwAvailSize);
 
+    lpLineCountryList->dwTotalSize         = dwAvailSize;
     lpLineCountryList->dwUsedSize          = dwOffset;
     lpLineCountryList->dwNumCountries      = 0;
     lpLineCountryList->dwCountryListSize   = 0;
@@ -330,7 +336,7 @@
         lpLineCountryList->dwCountryListSize += len;
         lpLineCountryList->dwUsedSize += sizeof (LINECOUNTRYENTRY); /* maybe wrong */
 
-        TRACE("Adding country %s at %p\n", TAPI_LCList[i].lpCountryName, lpLCE);
+        TRACE("Adding country %s at %p\n", TAPI_LCList[i].lpCountryName, &lpLCE[i]);
 
         lpLCE[i].dwCountryID   = TAPI_LCList[i].dwCountryID;
         lpLCE[i].dwCountryCode = TAPI_LCList[i].dwCountryCode;
Index: include/tapi.h
===================================================================
RCS file: /home/wine/wine/include/tapi.h,v
retrieving revision 1.6
diff -u -r1.6 tapi.h
--- include/tapi.h	2000/07/23 14:22:25	1.6
+++ include/tapi.h	2002/01/27 01:31:06
@@ -19,15 +19,14 @@
 typedef HANDLE HPHONE, *LPHPHONE;
 typedef HANDLE HPHONEAPP, *LPHPHONEAPP;
 
-/* FIXME: bogus codes !! */
-#define TAPIERR_REQUESTFAILED          20
-#define LINEERR_INCOMPATIBLEAPIVERSION 1
-#define LINEERR_NOMEM                  1
-#define LINEERR_INIFILECORRUPT         1
-#define LINEERR_OPERATIONFAILED        1
-#define LINEERR_INVALCOUNTRYCODE       1
-#define LINEERR_STRUCTURETOOSMALL      1
-#define LINEERR_INVALPOINTER           1
+#define TAPIERR_REQUESTFAILED            -16L
+#define LINEERR_INCOMPATIBLEAPIVERSION  0x8000000C
+#define LINEERR_NOMEM                   0x80000044
+#define LINEERR_INIFILECORRUPT          0x8000000E
+#define LINEERR_OPERATIONFAILED         0x80000048
+#define LINEERR_INVALCOUNTRYCODE        0x80000022
+#define LINEERR_STRUCTURETOOSMALL       0x8000004D
+#define LINEERR_INVALPOINTER            0x80000035
 
 typedef struct lineaddresscaps_tag {
     DWORD dwTotalSize;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux