Release 961208

Sun Dec  8 14:51:57 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [configure.in]
	Added check to see if the compiler supports building a DLL when
	the --with-dll option is used.

	* [controls/listbox.c]
	Don't send LBN_SELCHANGE too often.
	Added WM_CHARTOITEM support.

	* [Make.rules.in] [library/Makefile.in]
	Build winestub.o and link it with Winelib programs.

	* [objects/text.c]
	Added support for '&&' in DrawText().

	* [tools/build.c]
	Added -o option.

Sat Dec 7 12:07:07 1996  Andrew Lewycky <plewycky@oise.utoronto.ca>

	* [win32/thread.c]
	GetCurrentThread(): return -2 (current thread pseudo-handle).
	GetCurrentThreadId(): return GetCurrentTask().

	* [objects/font.c] [if1632/gdi32.spec]
	GetTextExtentPoint32{A,W}Buggy(): for future bug-compatibility.

	* [win32/findfile.c]
	FindClose(): ignore INVALID_HANDLE_VALUE (like Win95).

	* [windows/hook.c] [include/hook.h] [if1632/user.spec]
	  [if1632/user32.spec] [windows/focus.c] [windows/message.c]
	  [windows/nonclient.c] [windows/win.c] [windows/winpos.c]
	Hooks rewritten to support Win32.

	* [misc/winsock.c]
	WINSOCK_select(): need to put sockets with errors into exceptfds.
	WINSOCK_socket(): fix error return.

	* [windows/win.c]
	SetWindowWord(): call SetParent on GWW_HWNDPARENT.

Wed Dec  4 22:03:05 1996  Andrew Taylor <andrew@riscan.com>

	* [files/dos_fs.c]
	Check if buf is NULL before copying string in GetFullPathName32A().

Wed Dec  4 21:40:59 1996  Robert Pouliot <krynos@clic.net>

        * [graphics/wing.c] [if1632/wing.spec]
	Implemented many WinG functions, but some don't seem to
	work correctly (probably due to the one not done).
	
Wed Dec  4 03:38:25 1996  Lee Jaekil <juria@puma.kaitech.re.kr>

	* [misc/main.c]
	Implemented a few more of the SystemParametersInfo() cases.

Sun Dec  1 22:30:00 1996  Alex Korobka <alex@trantor.pharm.sunysb.edu> 

	* [controls/button.c]
	Improved focus rectangle painting.

	* [windows/dialog.c] [windows/defdlg.c]
	Fixed IE3.0 problems with DWL_MSGRESULT.

Sun Dec  1 20:49:32 1996  Albrecht Kleine  <kleine@ak.sax.de>

	* [files/profile.c]
	Changed error handling in PROFILE_SetString().
diff --git a/include/dialog.h b/include/dialog.h
index dd01585..eb95f2f 100644
--- a/include/dialog.h
+++ b/include/dialog.h
@@ -14,20 +14,29 @@
    * This structure is stored into the window extra bytes (cbWndExtra).
    * sizeof(DIALOGINFO) must be <= DLGWINDOWEXTRA (=30).
    */
+
+#pragma pack(1)
+
 typedef struct
 {
-    INT32       msgResult;   /* Result of EndDialog() / Default button id */
-    HWINDOWPROC dlgProc;     /* Dialog procedure */
-    LONG        userInfo;    /* User information (for DWL_USER) */
+    INT32       msgResult;   /* +00 Last message result */
+    HWINDOWPROC dlgProc;     /* +04 Dialog procedure */
+    LONG        userInfo;    /* +08 User information (for DWL_USER) */
+
+    /* implementation-dependent part */
+
     HWND16      hwndFocus;   /* Current control with focus */
     HFONT16     hUserFont;   /* Dialog font */
     HMENU16     hMenu;       /* Dialog menu */
     WORD        xBaseUnit;   /* Dialog units (depends on the font) */
     WORD        yBaseUnit;
+    INT32	idResult;    /* EndDialog() result / default pushbutton ID */
     WORD        fEnd;        /* EndDialog() called for this dialog */
     HGLOBAL16   hDialogHeap;
 } DIALOGINFO;
 
+#pragma pack(4)
+
 extern BOOL32 DIALOG_Init(void);
 
 #endif  /* DIALOG_H */
diff --git a/include/hook.h b/include/hook.h
index 2a9857b..21c0196 100644
--- a/include/hook.h
+++ b/include/hook.h
@@ -9,12 +9,23 @@
 
 #include "windows.h"
 
-extern HANDLE16 HOOK_GetHook( INT16 id , HQUEUE16 hQueue );
-extern LRESULT HOOK_CallHooks( INT16 id, INT16 code,
-                               WPARAM16 wParam, LPARAM lParam );
-extern HOOKPROC16 HOOK_GetProc16( HHOOK hook );
-extern void HOOK_ResetQueueHooks( HQUEUE16 hQueue );
+#define HOOK_WIN16   0x0
+#define HOOK_WIN32   0x1
+#define HOOK_UNICODE 0x2
+
+#define HOOK_MAPTYPE (HOOK_WIN32 | HOOK_UNICODE)
+
+extern HOOKPROC16 HOOK_GetProc16( HHOOK hhook );
+extern BOOL32 HOOK_IsHooked( INT16 id );
+extern LRESULT HOOK_CallHooks16( INT16 id, INT16 code, WPARAM16 wParam,
+				 LPARAM lParam );
+extern LRESULT HOOK_CallHooks32A( INT32 id, INT32 code, WPARAM32 wParam,
+				  LPARAM lParam );
+extern LRESULT HOOK_CallHooks32W( INT32 id, INT32 code, WPARAM32 wParam,
+				  LPARAM lParam );
 extern void HOOK_FreeModuleHooks( HMODULE16 hModule );
 extern void HOOK_FreeQueueHooks( HQUEUE16 hQueue );
+extern void HOOK_ResetQueueHooks( HQUEUE16 hQueue );
+extern HOOKPROC32 HOOK_GetProc( HHOOK hook );
 
 #endif  /* __WINE_HOOK_H */
diff --git a/include/windows.h b/include/windows.h
index 2cf3596..6571cc0 100644
--- a/include/windows.h
+++ b/include/windows.h
@@ -583,15 +583,16 @@
 {
     BOOL16    fMouse;
     HWND16    hWndActive;
-} CBTACTIVATESTRUCT16;
+} CBTACTIVATESTRUCT16, *LPCBTACTIVATESTRUCT16;
 
 typedef struct
 {
     BOOL32    fMouse;
     HWND32    hWndActive;
-} CBTACTIVATESTRUCT32;
+} CBTACTIVATESTRUCT32, *LPCBTACTIVATESTRUCT32;
 
 DECL_WINELIB_TYPE(CBTACTIVATESTRUCT);
+DECL_WINELIB_TYPE(LPCBTACTIVATESTRUCT);
 
   /* Shell hook values */
 #define HSHELL_WINDOWCREATED       1
@@ -977,6 +978,8 @@
 #define DEFAULT_CHARSET       1
 #define SYMBOL_CHARSET	      2
 #define SHIFTJIS_CHARSET      128
+#define HANGEUL_CHARSET       129
+#define CHINESEBIG5_CHARSET   136
 #define OEM_CHARSET	      255
 
   /* lfOutPrecision values */
@@ -4063,16 +4066,20 @@
 HRSRC32    FindResourceEx32W(HINSTANCE32,LPCWSTR,LPCWSTR,WORD);
 #define    FindResourceEx WINELIB_NAME_AW(FindResourceEx)
 BOOL32     FlushFileBuffers(HFILE);
+UINT32     GetACP(void);
 LPCSTR     GetCommandLine32A();
 LPCWSTR    GetCommandLine32W();
 #define    GetCommandLine WINELIB_NAME_AW(GetCommandLine)
 BOOL32     GetCommTimeouts(INT32,LPCOMMTIMEOUTS);
+DWORD      GetCurrentThreadId(void);
+HANDLE32   GetCurrentThread(void);
 BOOL32     GetDCOrgEx(HDC32,LPPOINT32);
 DWORD      GetFileInformationByHandle(HFILE,BY_HANDLE_FILE_INFORMATION*);
 DWORD      GetFileSize(HFILE,LPDWORD);
 DWORD      GetFileType(HFILE);
 VOID       GetLocalTime(LPSYSTEMTIME);
 DWORD      GetLogicalDrives(void);
+UINT32     GetOEMCP(void);
 HANDLE32   GetProcessHeap(void);
 DWORD      GetShortPathName32A(LPCSTR,LPSTR,DWORD);
 DWORD      GetShortPathName32W(LPCWSTR,LPWSTR,DWORD);
@@ -4228,6 +4235,9 @@
 BOOL32     BuildCommDCBAndTimeouts32A(LPCSTR,LPDCB32,LPCOMMTIMEOUTS);
 BOOL32     BuildCommDCBAndTimeouts32W(LPCWSTR,LPDCB32,LPCOMMTIMEOUTS);
 #define    BuildCommDCBAndTimeouts WINELIB_NAME_AW(BuildCommDCBAndTimeouts)
+LRESULT    CallNextHookEx16(HHOOK,INT16,WPARAM16,LPARAM);
+LRESULT    CallNextHookEx32(HHOOK,INT32,WPARAM32,LPARAM);
+#define    CallNextHookEx WINELIB_NAME(CallNextHookEx)
 LRESULT    CallWindowProc16(WNDPROC16,HWND16,UINT16,WPARAM16,LPARAM);
 LRESULT    CallWindowProc32A(WNDPROC32,HWND32,UINT32,WPARAM32,LPARAM);
 LRESULT    CallWindowProc32W(WNDPROC32,HWND32,UINT32,WPARAM32,LPARAM);
@@ -4403,6 +4413,10 @@
 LRESULT    DefFrameProc32A(HWND32,HWND32,UINT32,WPARAM32,LPARAM);
 LRESULT    DefFrameProc32W(HWND32,HWND32,UINT32,WPARAM32,LPARAM);
 #define    DefFrameProc WINELIB_NAME_AW(DefFrameProc)
+LRESULT    DefHookProc16(INT16,WPARAM16,LPARAM,HHOOK*);
+#define    DefHookProc32(code,wparam,lparam,phhook) \
+           CallNextHookEx32(*(phhook),code,wparam,lparam)
+#define    DefHookProc WINELIB_NAME(DefHookProc)
 LRESULT    DefMDIChildProc16(HWND16,UINT16,WPARAM16,LPARAM);
 LRESULT    DefMDIChildProc32A(HWND32,UINT32,WPARAM32,LPARAM);
 LRESULT    DefMDIChildProc32W(HWND32,UINT32,WPARAM32,LPARAM);
@@ -5294,6 +5308,9 @@
 BOOL32     StretchBlt32(HDC32,INT32,INT32,INT32,INT32,HDC32,INT32,INT32,
                         INT32,INT32,DWORD);
 #define    StretchBlt WINELIB_NAME(StretchBlt)
+INT16      StretchDIBits16(HDC16,INT16,INT16,INT16,INT16,INT16,INT16,INT16,INT16,const VOID*,const BITMAPINFO*,UINT16,DWORD);
+INT32      StretchDIBits32(HDC32,INT32,INT32,INT32,INT32,INT32,INT32,INT32,INT32,const VOID*,const BITMAPINFO*,UINT32,DWORD);
+#define    StretchDIBits WINELIB_NAME(StretchDIBits)
 BOOL16     SubtractRect16(LPRECT16,const RECT16*,const RECT16*);
 BOOL32     SubtractRect32(LPRECT32,const RECT32*,const RECT32*);
 #define    SubtractRect WINELIB_NAME(SubtractRect)
@@ -5468,7 +5485,6 @@
 BOOL       BringWindowToTop(HWND);
 void       CalcChildScroll(HWND,WORD);
 BOOL       CallMsgFilter(SEGPTR,INT);
-LRESULT    CallNextHookEx(HHOOK,INT,WPARAM16,LPARAM);
 BOOL       ChangeClipboardChain(HWND,HWND);
 INT        CheckMenuItem(HMENU16,UINT,UINT);
 BOOL       CloseClipboard(void);
@@ -5488,7 +5504,6 @@
 HMENU16    CreateMenu(void);
 HPALETTE16 CreatePalette(const LOGPALETTE*);
 HMENU16    CreatePopupMenu(void);
-DWORD      DefHookProc(short,WORD,DWORD,HHOOK*);
 HDWP16     DeferWindowPos(HDWP16,HWND,HWND,INT,INT,INT,INT,UINT);
 ATOM       DeleteAtom(ATOM);
 BOOL       DeleteDC(HDC16);
@@ -5716,7 +5731,6 @@
 DWORD      SizeofResource(HMODULE16,HRSRC16);
 int        StartSound(void);
 int        StopSound(void);
-int        StretchDIBits(HDC16,WORD,WORD,WORD,WORD,WORD,WORD,WORD,WORD,LPSTR,LPBITMAPINFO,WORD,DWORD);
 BOOL       SwapMouseButton(BOOL);
 void       SwapRecording(WORD);
 int        SyncAllVoices(void);
diff --git a/include/winsock.h b/include/winsock.h
index 9119c01..ca7bcaf 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -16,9 +16,7 @@
 #include <sys/socket.h>
 #include "windows.h"
 
-#ifndef WINELIB
-#pragma pack(1)                 /* tight alignment for the emulator */
-#endif
+#pragma pack(1)
 
 /* Win16 socket-related types */
 
@@ -135,9 +133,7 @@
         SEGPTR			lpVendorInfo;
 } WSADATA, *LPWSADATA;
 
-#ifndef WINELIB
 #pragma pack(4)
-#endif
 
 /* ----------------------------------- no Win16 structure defs beyond this line! */