Fix gcc 4.0 -Wpointer-sign warnings.

diff --git a/dlls/ole32/antimoniker.c b/dlls/ole32/antimoniker.c
index 8ec4513..6993b42 100644
--- a/dlls/ole32/antimoniker.c
+++ b/dlls/ole32/antimoniker.c
@@ -49,7 +49,7 @@
      */
     const IROTDataVtbl*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
 
-    ULONG ref; /* reference counter for this object */
+    LONG ref; /* reference counter for this object */
 
 } AntiMonikerImpl;
 
diff --git a/dlls/ole32/bindctx.c b/dlls/ole32/bindctx.c
index 3d19e06..6b427f4 100644
--- a/dlls/ole32/bindctx.c
+++ b/dlls/ole32/bindctx.c
@@ -52,7 +52,7 @@
 
     const IBindCtxVtbl *lpVtbl; /* VTable relative to the IBindCtx interface.*/
 
-    ULONG ref; /* reference counter for this object */
+    LONG ref; /* reference counter for this object */
 
     BindCtxObject* bindCtxTable; /* this is a table in which all bounded objects are stored*/
     DWORD          bindCtxTableLastIndex;  /* first free index in the table */
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 4368ef5..75b706d 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -122,7 +122,7 @@
   /*
    * Reference count of this object
    */
-  ULONG                      ref;
+  LONG                       ref;
 };
 
 typedef struct OLEClipbrd OLEClipbrd;
@@ -145,7 +145,7 @@
   /*
    * Reference count of this object
    */
-  DWORD                        ref;
+  LONG                         ref;
 
   /*
    * IUnknown implementation of the parent data object.
diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h
index de3fcc8..3289b11 100644
--- a/dlls/ole32/compobj_private.h
+++ b/dlls/ole32/compobj_private.h
@@ -112,7 +112,7 @@
   OXID oxid;                /* object exported ID (RO) */
   OID oid;                  /* object ID (RO) */
   struct list interfaces;   /* imported interfaces (CS cs) */
-  DWORD refs;               /* proxy reference count (LOCK) */
+  LONG refs;                /* proxy reference count (LOCK) */
   CRITICAL_SECTION cs;      /* thread safety for this object and children */
   ULONG sorflags;           /* STDOBJREF flags (RO) */
   IRemUnknown *remunk;      /* proxy to IRemUnknown used for lifecycle management (CS cs) */
@@ -124,12 +124,12 @@
 {
   struct list entry;       
 
-  DWORD refs;              /* refcount of the apartment (LOCK) */
+  LONG  refs;              /* refcount of the apartment (LOCK) */
   DWORD model;             /* threading model (RO) */
   DWORD tid;               /* thread id (RO) */
   HANDLE thread;           /* thread handle (RO) */
   OXID oxid;               /* object exporter ID (RO) */
-  DWORD ipidc;             /* interface pointer ID counter, starts at 1 (LOCK) */
+  LONG ipidc;              /* interface pointer ID counter, starts at 1 (LOCK) */
   HWND win;                /* message window (RO) */
   CRITICAL_SECTION cs;     /* thread safety */
   LPMESSAGEFILTER filter;  /* message filter (CS cs) */
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c
index 54cd7d4..87c483a 100644
--- a/dlls/ole32/compositemoniker.c
+++ b/dlls/ole32/compositemoniker.c
@@ -54,7 +54,7 @@
      */
     const IROTDataVtbl*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
 
-    ULONG ref; /* reference counter for this object */
+    LONG ref; /* reference counter for this object */
 
     IMoniker** tabMoniker; /* dynamaic table containing all components (monikers) of this composite moniker */
 
@@ -70,7 +70,7 @@
 
     const IEnumMonikerVtbl *lpVtbl;  /* VTable relative to the IEnumMoniker interface.*/
 
-    ULONG ref; /* reference counter for this object */
+    LONG ref; /* reference counter for this object */
 
     IMoniker** tabMoniker; /* dynamic table containing the enumerated monikers */
 
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index 8ee3412..f53fdb1 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -103,7 +103,7 @@
   /*
    * Reference count of this object
    */
-  ULONG ref;
+  LONG ref;
 
   /*
    * IUnknown implementation of the outer object.
diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c
index a387801..d59c3b6 100644
--- a/dlls/ole32/defaulthandler.c
+++ b/dlls/ole32/defaulthandler.c
@@ -78,7 +78,7 @@
   /*
    * Reference count of this object
    */
-  ULONG ref;
+  LONG ref;
 
   /*
    * IUnknown implementation of the outer object.
diff --git a/dlls/ole32/errorinfo.c b/dlls/ole32/errorinfo.c
index 5ac51df..dc3b41e 100644
--- a/dlls/ole32/errorinfo.c
+++ b/dlls/ole32/errorinfo.c
@@ -131,7 +131,7 @@
 	const IErrorInfoVtbl           *lpvtei;
 	const ICreateErrorInfoVtbl     *lpvtcei;
 	const ISupportErrorInfoVtbl    *lpvtsei;
-	DWORD				ref;
+	LONG				ref;
 
 	GUID m_Guid;
 	BSTR bstrSource;
diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c
index 2dcb532..a4e6a73 100644
--- a/dlls/ole32/filemoniker.c
+++ b/dlls/ole32/filemoniker.c
@@ -53,7 +53,7 @@
      */
     const IROTDataVtbl*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
 
-    ULONG ref; /* reference counter for this object */
+    LONG ref; /* reference counter for this object */
 
     LPOLESTR filePathName; /* path string identified by this filemoniker */
 
diff --git a/dlls/ole32/ftmarshal.c b/dlls/ole32/ftmarshal.c
index 0a17b34..6c0ad73 100644
--- a/dlls/ole32/ftmarshal.c
+++ b/dlls/ole32/ftmarshal.c
@@ -38,7 +38,7 @@
 
 typedef struct _FTMarshalImpl {
 	const IUnknownVtbl *lpVtbl;
-	DWORD ref;
+	LONG ref;
 	const IMarshalVtbl *lpvtblFTM;
 
 	IUnknown *pUnkOuter;
diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c
index 9895df6..ca73a22 100644
--- a/dlls/ole32/hglobalstream.c
+++ b/dlls/ole32/hglobalstream.c
@@ -60,7 +60,7 @@
   /*
    * Reference count
    */
-  ULONG		     ref;
+  LONG		     ref;
 
   /*
    * Support for the stream
diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c
index f0e940b..5c087f3 100644
--- a/dlls/ole32/ifs.c
+++ b/dlls/ole32/ifs.c
@@ -366,7 +366,7 @@
 
 typedef struct {
         const IMallocSpyVtbl *lpVtbl;
-        DWORD ref;
+        LONG ref;
 } _MallocSpy;
 
 /* this is the static object instance */
diff --git a/dlls/ole32/itemmoniker.c b/dlls/ole32/itemmoniker.c
index 42ce0a5..853c28a 100644
--- a/dlls/ole32/itemmoniker.c
+++ b/dlls/ole32/itemmoniker.c
@@ -52,7 +52,7 @@
      */
     const IROTDataVtbl*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
 
-    ULONG ref; /* reference counter for this object */
+    LONG ref; /* reference counter for this object */
 
     LPOLESTR itemName; /* item name identified by this ItemMoniker */
 
diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c
index ce69192..240a1b4 100644
--- a/dlls/ole32/marshal.c
+++ b/dlls/ole32/marshal.c
@@ -763,7 +763,7 @@
 typedef struct _StdMarshalImpl
 {
     const IMarshalVtbl	*lpvtbl;
-    DWORD		ref;
+    LONG		ref;
 
     IID			iid;
     DWORD		dwDestContext;
diff --git a/dlls/ole32/memlockbytes.c b/dlls/ole32/memlockbytes.c
index c9a3a1a..2cc93b4 100644
--- a/dlls/ole32/memlockbytes.c
+++ b/dlls/ole32/memlockbytes.c
@@ -57,7 +57,7 @@
   /*
    * Reference count
    */
-  ULONG        ref;
+  LONG        ref;
 
   /*
    * Support for the LockBytes object
diff --git a/dlls/ole32/memlockbytes16.c b/dlls/ole32/memlockbytes16.c
index 17eaac1..57cdce1 100644
--- a/dlls/ole32/memlockbytes16.c
+++ b/dlls/ole32/memlockbytes16.c
@@ -53,7 +53,7 @@
    * since we want to cast this in an ILockBytes pointer
    */
   const ILockBytes16Vtbl *lpVtbl;
-  ULONG        ref;
+  LONG        ref;
 
   /*
    * Support for the LockBytes object
diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c
index 816f506..1e7bf88 100644
--- a/dlls/ole32/moniker.c
+++ b/dlls/ole32/moniker.c
@@ -60,7 +60,7 @@
 typedef struct RunningObjectTableImpl
 {
     const IRunningObjectTableVtbl *lpVtbl;
-    ULONG ref;
+    LONG ref;
 
     struct list rot; /* list of ROT entries */
     CRITICAL_SECTION lock;
@@ -73,7 +73,7 @@
 static inline HRESULT WINAPI
 IrotRegister(DWORD *cookie)
 {
-    static DWORD last_cookie = 1;
+    static LONG last_cookie = 1;
     *cookie = InterlockedIncrement(&last_cookie);
     return S_OK;
 }
@@ -82,7 +82,7 @@
 typedef struct EnumMonikerImpl
 {
     const IEnumMonikerVtbl *lpVtbl;
-    ULONG      ref;
+    LONG ref;
 
     MInterfacePointer **monikers;
     ULONG moniker_count;
@@ -988,7 +988,7 @@
     const IUnknownVtbl *lpVtbl;
     const IMarshalVtbl *lpVtblMarshal;
     
-    ULONG ref;
+    LONG ref;
     IMoniker *moniker;
 } MonikerMarshal;
 
diff --git a/dlls/ole32/ole16.c b/dlls/ole32/ole16.c
index 57f24c8..0ef61a8 100644
--- a/dlls/ole32/ole16.c
+++ b/dlls/ole32/ole16.c
@@ -370,7 +370,7 @@
 
   if (ret == S_OK)
   {
-    DWORD buf2len;
+    LONG buf2len;
     char *buf2 = HeapAlloc(GetProcessHeap(), 0, 255);
     buf2len = 255;
     if (RegQueryValueA(xhkey, NULL, buf2, &buf2len))
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index bca4b9a..b3c9bd8 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -394,7 +394,7 @@
   DWORD   cbData;
   HKEY    clsidKey;
   LONG    hres;
-  LPBYTE  buffer;
+  LPSTR   buffer;
   HRESULT retVal;
   /*
    * Initialize the out parameter.
@@ -464,7 +464,7 @@
 			  "",
 			  NULL,
 			  &dwKeyType,
-			  buffer,
+			  (LPBYTE) buffer,
 			  &cbData);
 
   RegCloseKey(clsidKey);
diff --git a/dlls/ole32/oleobj.c b/dlls/ole32/oleobj.c
index eb630bc..0c77121 100644
--- a/dlls/ole32/oleobj.c
+++ b/dlls/ole32/oleobj.c
@@ -43,7 +43,7 @@
 {
   const IOleAdviseHolderVtbl *lpVtbl;
 
-  DWORD ref;
+  LONG ref;
 
   DWORD         maxSinks;
   IAdviseSink** arrayOfSinks;
@@ -357,7 +357,7 @@
 {
   const IDataAdviseHolderVtbl *lpVtbl;
 
-  DWORD                 ref;
+  LONG                  ref;
   DWORD                 maxCons;
   DataAdviseConnection* Connections;
 } DataAdviseHolder;
diff --git a/dlls/ole32/oleproxy.c b/dlls/ole32/oleproxy.c
index 400096f..a5c7898 100644
--- a/dlls/ole32/oleproxy.c
+++ b/dlls/ole32/oleproxy.c
@@ -88,7 +88,7 @@
  */
 typedef struct _CFStub {
     const IRpcStubBufferVtbl   *lpvtbl;
-    DWORD			ref;
+    LONG			ref;
 
     LPUNKNOWN			pUnkServer;
 } CFStub;
@@ -268,7 +268,7 @@
 typedef struct _CFProxy {
     const IClassFactoryVtbl		*lpvtbl_cf;
     const IRpcProxyBufferVtbl	*lpvtbl_proxy;
-    DWORD				ref;
+    LONG				ref;
 
     IRpcChannelBuffer			*chanbuf;
     IUnknown *outer_unknown;
@@ -459,7 +459,7 @@
 typedef struct
 {
     const IRpcStubBufferVtbl *lpVtbl;
-    ULONG refs;
+    LONG refs;
     IRemUnknown *iface;
 } RemUnkStub;
 
@@ -664,7 +664,7 @@
 typedef struct _RemUnkProxy {
     const IRemUnknownVtbl		*lpvtbl_remunk;
     const IRpcProxyBufferVtbl	*lpvtbl_proxy;
-    DWORD				refs;
+    LONG				refs;
 
     IRpcChannelBuffer			*chan;
     IUnknown *outer_unknown;
diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c
index da9535d..a68a7c8 100644
--- a/dlls/ole32/rpc.c
+++ b/dlls/ole32/rpc.c
@@ -88,7 +88,7 @@
 typedef struct
 {
     const IRpcChannelBufferVtbl *lpVtbl;
-    DWORD                  refs;
+    LONG                  refs;
 } RpcChannelBuffer;
 
 typedef struct
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index aab99dd..fe6d1fb 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -155,7 +155,7 @@
 typedef struct tagPropertyStorage_impl
 {
     const IPropertyStorageVtbl *vtbl;
-    DWORD ref;
+    LONG ref;
     CRITICAL_SECTION cs;
     IStream *stm;
     BOOL  dirty;
diff --git a/dlls/ole32/storage.c b/dlls/ole32/storage.c
index 715c3e6..3bdc063 100644
--- a/dlls/ole32/storage.c
+++ b/dlls/ole32/storage.c
@@ -956,7 +956,7 @@
 {
         /* IUnknown fields */
         const IStream16Vtbl            *lpVtbl;
-        DWORD                           ref;
+        LONG                            ref;
         /* IStream16 fields */
         SEGPTR                          thisptr; /* pointer to this struct as segmented */
         struct storage_pps_entry        stde;
@@ -1450,7 +1450,7 @@
 {
         /* IUnknown fields */
         const IStreamVtbl              *lpVtbl;
-        DWORD                           ref;
+        LONG                            ref;
         /* IStream32 fields */
         struct storage_pps_entry        stde;
         int                             ppsent;
@@ -1504,7 +1504,7 @@
 {
         /* IUnknown fields */
         const IStorage16Vtbl           *lpVtbl;
-        DWORD                           ref;
+        LONG                            ref;
         /* IStorage16 fields */
         SEGPTR                          thisptr; /* pointer to this struct as segmented */
         struct storage_pps_entry        stde;
diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h
index 4358a19..4061a06 100644
--- a/dlls/ole32/storage32.h
+++ b/dlls/ole32/storage32.h
@@ -222,7 +222,7 @@
   /*
    * Reference count of this object
    */
-  ULONG ref;
+  LONG ref;
 
   /*
    * Ancestor storage (top level)
@@ -430,7 +430,7 @@
   const IEnumSTATSTGVtbl *lpVtbl;    /* Needs to be the first item in the struct
 				* since we want to cast this in an IEnumSTATSTG pointer */
 
-  ULONG		 ref;		        /* Reference count */
+  LONG		 ref;		        /* Reference count */
   StorageImpl* parentStorage;         /* Reference to the parent storage */
   ULONG          firstPropertyNode;     /* Index of the root of the storage to enumerate */
 
@@ -487,7 +487,7 @@
   /*
    * Reference count
    */
-  ULONG		     ref;
+  LONG		     ref;
 
   /*
    * Storage that is the parent(owner) of the stream
diff --git a/dlls/ole32/stubmanager.c b/dlls/ole32/stubmanager.c
index 76cc8fa..4c253c9 100644
--- a/dlls/ole32/stubmanager.c
+++ b/dlls/ole32/stubmanager.c
@@ -539,7 +539,7 @@
 typedef struct rem_unknown
 {
     const IRemUnknownVtbl *lpVtbl;
-    ULONG refs;
+    LONG refs;
 } RemUnknown;
 
 static const IRemUnknownVtbl RemUnknown_Vtbl;