Make use of the DEFAULT_DEBUG_CHANNEL where appropriate.

Use the default version of FIXME, ERR, WARN, TRACE for the default
channel.
This commit is contained in:
Dimitrie O. Paun 1999-12-08 03:56:23 +00:00 committed by Alexandre Julliard
parent 0106f85e5f
commit dd03cc19fd
45 changed files with 1288 additions and 1339 deletions

View File

@ -25,8 +25,8 @@
#include "tweak.h" #include "tweak.h"
#include "winversion.h" #include "winversion.h"
DEFAULT_DEBUG_CHANNEL(edit)
DECLARE_DEBUG_CHANNEL(combo) DECLARE_DEBUG_CHANNEL(combo)
DECLARE_DEBUG_CHANNEL(edit)
DECLARE_DEBUG_CHANNEL(relay) DECLARE_DEBUG_CHANNEL(relay)
#define BUFLIMIT_MULTI 65534 /* maximum buffer size (not including '\0') #define BUFLIMIT_MULTI 65534 /* maximum buffer size (not including '\0')
@ -118,7 +118,7 @@ typedef struct
#define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0) #define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0)
#define DPRINTF_EDIT_NOTIFY(hwnd, str) \ #define DPRINTF_EDIT_NOTIFY(hwnd, str) \
do {TRACE_(edit)("notification " str " sent to hwnd=%08x\n", \ do {TRACE("notification " str " sent to hwnd=%08x\n", \
(UINT)(hwnd));} while(0) (UINT)(hwnd));} while(0)
/* used for disabled or read-only edit control */ /* used for disabled or read-only edit control */
@ -134,11 +134,11 @@ typedef struct
MAKEWPARAM((wnd)->wIDmenu, wNotifyCode), \ MAKEWPARAM((wnd)->wIDmenu, wNotifyCode), \
(LPARAM)(wnd)->hwndSelf);} while(0) (LPARAM)(wnd)->hwndSelf);} while(0)
#define DPRINTF_EDIT_MSG16(str) \ #define DPRINTF_EDIT_MSG16(str) \
TRACE_(edit)(\ TRACE(\
"16 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \ "16 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \
(UINT)hwnd, (UINT)wParam, (UINT)lParam) (UINT)hwnd, (UINT)wParam, (UINT)lParam)
#define DPRINTF_EDIT_MSG32(str) \ #define DPRINTF_EDIT_MSG32(str) \
TRACE_(edit)(\ TRACE(\
"32 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \ "32 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \
(UINT)hwnd, (UINT)wParam, (UINT)lParam) (UINT)hwnd, (UINT)wParam, (UINT)lParam)
@ -1194,7 +1194,7 @@ static LPSTR EDIT_GetPasswordPointer_SL(WND *wnd, EDITSTATE *es)
static void EDIT_LockBuffer(WND *wnd, EDITSTATE *es) static void EDIT_LockBuffer(WND *wnd, EDITSTATE *es)
{ {
if (!es) { if (!es) {
ERR_(edit)("no EDITSTATE ... please report\n"); ERR("no EDITSTATE ... please report\n");
return; return;
} }
if (!(es->style & ES_MULTILINE)) if (!(es->style & ES_MULTILINE))
@ -1205,7 +1205,7 @@ static void EDIT_LockBuffer(WND *wnd, EDITSTATE *es)
else if (es->hloc16) else if (es->hloc16)
es->text = LOCAL_Lock(wnd->hInstance, es->hloc16); es->text = LOCAL_Lock(wnd->hInstance, es->hloc16);
else { else {
ERR_(edit)("no buffer ... please report\n"); ERR("no buffer ... please report\n");
return; return;
} }
} }
@ -1344,7 +1344,7 @@ static BOOL EDIT_MakeFit(WND *wnd, EDITSTATE *es, INT size)
if (size > es->buffer_limit) if (size > es->buffer_limit)
size = es->buffer_limit; size = es->buffer_limit;
TRACE_(edit)("trying to ReAlloc to %d+1\n", size); TRACE("trying to ReAlloc to %d+1\n", size);
EDIT_UnlockBuffer(wnd, es, TRUE); EDIT_UnlockBuffer(wnd, es, TRUE);
if (es->text) { if (es->text) {
@ -1354,25 +1354,25 @@ static BOOL EDIT_MakeFit(WND *wnd, EDITSTATE *es, INT size)
es->buffer_size = 0; es->buffer_size = 0;
} else if (es->hloc32) { } else if (es->hloc32) {
if ((hNew32 = LocalReAlloc(es->hloc32, size + 1, 0))) { if ((hNew32 = LocalReAlloc(es->hloc32, size + 1, 0))) {
TRACE_(edit)("Old 32 bit handle %08x, new handle %08x\n", es->hloc32, hNew32); TRACE("Old 32 bit handle %08x, new handle %08x\n", es->hloc32, hNew32);
es->hloc32 = hNew32; es->hloc32 = hNew32;
es->buffer_size = MIN(LocalSize(es->hloc32) - 1, es->buffer_limit); es->buffer_size = MIN(LocalSize(es->hloc32) - 1, es->buffer_limit);
} }
} else if (es->hloc16) { } else if (es->hloc16) {
if ((hNew16 = LOCAL_ReAlloc(wnd->hInstance, es->hloc16, size + 1, LMEM_MOVEABLE))) { if ((hNew16 = LOCAL_ReAlloc(wnd->hInstance, es->hloc16, size + 1, LMEM_MOVEABLE))) {
TRACE_(edit)("Old 16 bit handle %08x, new handle %08x\n", es->hloc16, hNew16); TRACE("Old 16 bit handle %08x, new handle %08x\n", es->hloc16, hNew16);
es->hloc16 = hNew16; es->hloc16 = hNew16;
es->buffer_size = MIN(LOCAL_Size(wnd->hInstance, es->hloc16) - 1, es->buffer_limit); es->buffer_size = MIN(LOCAL_Size(wnd->hInstance, es->hloc16) - 1, es->buffer_limit);
} }
} }
if (es->buffer_size < size) { if (es->buffer_size < size) {
EDIT_LockBuffer(wnd, es); EDIT_LockBuffer(wnd, es);
WARN_(edit)("FAILED ! We now have %d+1\n", es->buffer_size); WARN("FAILED ! We now have %d+1\n", es->buffer_size);
EDIT_NOTIFY_PARENT(wnd, EN_ERRSPACE, "EN_ERRSPACE"); EDIT_NOTIFY_PARENT(wnd, EN_ERRSPACE, "EN_ERRSPACE");
return FALSE; return FALSE;
} else { } else {
EDIT_LockBuffer(wnd, es); EDIT_LockBuffer(wnd, es);
TRACE_(edit)("We now have %d+1\n", es->buffer_size); TRACE("We now have %d+1\n", es->buffer_size);
return TRUE; return TRUE;
} }
} }
@ -1391,12 +1391,12 @@ static BOOL EDIT_MakeUndoFit(WND *wnd, EDITSTATE *es, INT size)
return TRUE; return TRUE;
size = ((size / GROWLENGTH) + 1) * GROWLENGTH; size = ((size / GROWLENGTH) + 1) * GROWLENGTH;
TRACE_(edit)("trying to ReAlloc to %d+1\n", size); TRACE("trying to ReAlloc to %d+1\n", size);
if ((es->undo_text = HeapReAlloc(es->heap, 0, es->undo_text, size + 1))) { if ((es->undo_text = HeapReAlloc(es->heap, 0, es->undo_text, size + 1))) {
es->undo_buffer_size = HeapSize(es->heap, 0, es->undo_text) - 1; es->undo_buffer_size = HeapSize(es->heap, 0, es->undo_text) - 1;
if (es->undo_buffer_size < size) { if (es->undo_buffer_size < size) {
WARN_(edit)("FAILED ! We now have %d+1\n", es->undo_buffer_size); WARN("FAILED ! We now have %d+1\n", es->undo_buffer_size);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
@ -1686,7 +1686,7 @@ static void EDIT_PaintLine(WND *wnd, EDITSTATE *es, HDC dc, INT line, BOOL rev)
} else if (line) } else if (line)
return; return;
TRACE_(edit)("line=%d\n", line); TRACE("line=%d\n", line);
pos = EDIT_EM_PosFromChar(wnd, es, EDIT_EM_LineIndex(wnd, es, line), FALSE); pos = EDIT_EM_PosFromChar(wnd, es, EDIT_EM_LineIndex(wnd, es, line), FALSE);
x = SLOWORD(pos); x = SLOWORD(pos);
@ -1815,17 +1815,17 @@ static void EDIT_SetRectNP(WND *wnd, EDITSTATE *es, LPRECT rc)
static void EDIT_UnlockBuffer(WND *wnd, EDITSTATE *es, BOOL force) static void EDIT_UnlockBuffer(WND *wnd, EDITSTATE *es, BOOL force)
{ {
if (!es) { if (!es) {
ERR_(edit)("no EDITSTATE ... please report\n"); ERR("no EDITSTATE ... please report\n");
return; return;
} }
if (!(es->style & ES_MULTILINE)) if (!(es->style & ES_MULTILINE))
return; return;
if (!es->lock_count) { if (!es->lock_count) {
ERR_(edit)("lock_count == 0 ... please report\n"); ERR("lock_count == 0 ... please report\n");
return; return;
} }
if (!es->text) { if (!es->text) {
ERR_(edit)("es->text == 0 ... please report\n"); ERR("es->text == 0 ... please report\n");
return; return;
} }
if (force || (es->lock_count == 1)) { if (force || (es->lock_count == 1)) {
@ -1856,7 +1856,7 @@ static INT EDIT_WordBreakProc(LPSTR s, INT index, INT count, INT action)
{ {
INT ret = 0; INT ret = 0;
TRACE_(edit)("s=%p, index=%u, count=%u, action=%d\n", TRACE("s=%p, index=%u, count=%u, action=%d\n",
s, index, count, action); s, index, count, action);
switch (action) { switch (action) {
@ -1900,7 +1900,7 @@ static INT EDIT_WordBreakProc(LPSTR s, INT index, INT count, INT action)
ret = (s[index] == ' '); ret = (s[index] == ' ');
break; break;
default: default:
ERR_(edit)("unknown action code, please report !\n"); ERR("unknown action code, please report !\n");
break; break;
} }
return ret; return ret;
@ -1946,7 +1946,7 @@ static BOOL EDIT_EM_FmtLines(WND *wnd, EDITSTATE *es, BOOL add_eol)
es->flags &= ~EF_USE_SOFTBRK; es->flags &= ~EF_USE_SOFTBRK;
if (add_eol) { if (add_eol) {
es->flags |= EF_USE_SOFTBRK; es->flags |= EF_USE_SOFTBRK;
FIXME_(edit)("soft break enabled, not implemented\n"); FIXME("soft break enabled, not implemented\n");
} }
return add_eol; return add_eol;
} }
@ -1983,12 +1983,12 @@ static HLOCAL EDIT_EM_GetHandle(WND *wnd, EDITSTATE *es)
return (HLOCAL)es->hloc16; return (HLOCAL)es->hloc16;
if (!(newBuf = LocalAlloc(LMEM_MOVEABLE, lstrlenA(es->text) + 1))) { if (!(newBuf = LocalAlloc(LMEM_MOVEABLE, lstrlenA(es->text) + 1))) {
ERR_(edit)("could not allocate new 32 bit buffer\n"); ERR("could not allocate new 32 bit buffer\n");
return 0; return 0;
} }
newSize = MIN(LocalSize(newBuf) - 1, es->buffer_limit); newSize = MIN(LocalSize(newBuf) - 1, es->buffer_limit);
if (!(newText = LocalLock(newBuf))) { if (!(newText = LocalLock(newBuf))) {
ERR_(edit)("could not lock new 32 bit buffer\n"); ERR("could not lock new 32 bit buffer\n");
LocalFree(newBuf); LocalFree(newBuf);
return 0; return 0;
} }
@ -2001,7 +2001,7 @@ static HLOCAL EDIT_EM_GetHandle(WND *wnd, EDITSTATE *es)
es->buffer_size = newSize; es->buffer_size = newSize;
es->text = newText; es->text = newText;
EDIT_LockBuffer(wnd, es); EDIT_LockBuffer(wnd, es);
TRACE_(edit)("switched to 32 bit local heap\n"); TRACE("switched to 32 bit local heap\n");
return es->hloc32; return es->hloc32;
} }
@ -2037,18 +2037,18 @@ static HLOCAL16 EDIT_EM_GetHandle16(WND *wnd, EDITSTATE *es)
if (!LOCAL_HeapSize(wnd->hInstance)) { if (!LOCAL_HeapSize(wnd->hInstance)) {
if (!LocalInit16(wnd->hInstance, 0, if (!LocalInit16(wnd->hInstance, 0,
GlobalSize16(wnd->hInstance))) { GlobalSize16(wnd->hInstance))) {
ERR_(edit)("could not initialize local heap\n"); ERR("could not initialize local heap\n");
return 0; return 0;
} }
TRACE_(edit)("local heap initialized\n"); TRACE("local heap initialized\n");
} }
if (!(newBuf = LOCAL_Alloc(wnd->hInstance, LMEM_MOVEABLE, lstrlenA(es->text) + 1))) { if (!(newBuf = LOCAL_Alloc(wnd->hInstance, LMEM_MOVEABLE, lstrlenA(es->text) + 1))) {
ERR_(edit)("could not allocate new 16 bit buffer\n"); ERR("could not allocate new 16 bit buffer\n");
return 0; return 0;
} }
newSize = MIN(LOCAL_Size(wnd->hInstance, newBuf) - 1, es->buffer_limit); newSize = MIN(LOCAL_Size(wnd->hInstance, newBuf) - 1, es->buffer_limit);
if (!(newText = LOCAL_Lock(wnd->hInstance, newBuf))) { if (!(newText = LOCAL_Lock(wnd->hInstance, newBuf))) {
ERR_(edit)("could not lock new 16 bit buffer\n"); ERR("could not lock new 16 bit buffer\n");
LOCAL_Free(wnd->hInstance, newBuf); LOCAL_Free(wnd->hInstance, newBuf);
return 0; return 0;
} }
@ -2065,7 +2065,7 @@ static HLOCAL16 EDIT_EM_GetHandle16(WND *wnd, EDITSTATE *es)
es->buffer_size = newSize; es->buffer_size = newSize;
es->text = newText; es->text = newText;
EDIT_LockBuffer(wnd, es); EDIT_LockBuffer(wnd, es);
TRACE_(edit)("switched to 16 bit buffer\n"); TRACE("switched to 16 bit buffer\n");
return es->hloc16; return es->hloc16;
} }
@ -2567,7 +2567,7 @@ static void EDIT_EM_SetHandle(WND *wnd, EDITSTATE *es, HLOCAL hloc)
return; return;
if (!hloc) { if (!hloc) {
WARN_(edit)("called with NULL handle\n"); WARN("called with NULL handle\n");
return; return;
} }
@ -2610,7 +2610,7 @@ static void EDIT_EM_SetHandle16(WND *wnd, EDITSTATE *es, HLOCAL16 hloc)
return; return;
if (!hloc) { if (!hloc) {
WARN_(edit)("called with NULL handle\n"); WARN("called with NULL handle\n");
return; return;
} }
@ -2689,7 +2689,7 @@ static void EDIT_EM_SetMargins(WND *wnd, EDITSTATE *es, INT action,
else else
es->right_margin = es->char_width / 3; es->right_margin = es->char_width / 3;
} }
TRACE_(edit)("left=%d, right=%d\n", es->left_margin, es->right_margin); TRACE("left=%d, right=%d\n", es->left_margin, es->right_margin);
} }
@ -2873,7 +2873,7 @@ static BOOL EDIT_EM_Undo(WND *wnd, EDITSTATE *es)
lstrcpyA(utext, es->undo_text); lstrcpyA(utext, es->undo_text);
TRACE_(edit)("before UNDO:insertion length = %d, deletion buffer = %s\n", TRACE("before UNDO:insertion length = %d, deletion buffer = %s\n",
es->undo_insert_count, utext); es->undo_insert_count, utext);
EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE); EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE);
@ -2882,7 +2882,7 @@ static BOOL EDIT_EM_Undo(WND *wnd, EDITSTATE *es)
EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE); EDIT_EM_SetSel(wnd, es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE);
HeapFree(es->heap, 0, utext); HeapFree(es->heap, 0, utext);
TRACE_(edit)("after UNDO:insertion length = %d, deletion buffer = %s\n", TRACE("after UNDO:insertion length = %d, deletion buffer = %s\n",
es->undo_insert_count, es->undo_text); es->undo_insert_count, es->undo_text);
return TRUE; return TRUE;
@ -2970,7 +2970,7 @@ static void EDIT_WM_Command(WND *wnd, EDITSTATE *es, INT code, INT id, HWND cont
EDIT_EM_ScrollCaret(wnd, es); EDIT_EM_ScrollCaret(wnd, es);
break; break;
default: default:
ERR_(edit)("unknown menu item, please report\n"); ERR("unknown menu item, please report\n");
break; break;
} }
} }
@ -3162,9 +3162,9 @@ static LRESULT EDIT_HScroll_Hack(WND *wnd, EDITSTATE *es, INT action, INT pos, H
LRESULT ret = 0; LRESULT ret = 0;
if (!(es->flags & EF_HSCROLL_HACK)) { if (!(es->flags & EF_HSCROLL_HACK)) {
ERR_(edit)("hacked WM_HSCROLL handler invoked\n"); ERR("hacked WM_HSCROLL handler invoked\n");
ERR_(edit)(" if you are _not_ running 16 bit notepad, please report\n"); ERR(" if you are _not_ running 16 bit notepad, please report\n");
ERR_(edit)(" (this message is only displayed once per edit control)\n"); ERR(" (this message is only displayed once per edit control)\n");
es->flags |= EF_HSCROLL_HACK; es->flags |= EF_HSCROLL_HACK;
} }
@ -3219,7 +3219,7 @@ static LRESULT EDIT_HScroll_Hack(WND *wnd, EDITSTATE *es, INT action, INT pos, H
break; break;
default: default:
ERR_(edit)("undocumented (hacked) WM_HSCROLL parameter, please report\n"); ERR("undocumented (hacked) WM_HSCROLL parameter, please report\n");
return 0; return 0;
} }
if (dx) if (dx)
@ -3289,7 +3289,7 @@ static LRESULT EDIT_WM_HScroll(WND *wnd, EDITSTATE *es, INT action, INT pos, HWN
break; break;
default: default:
ERR_(edit)("undocumented WM_HSCROLL parameter, please report\n"); ERR("undocumented WM_HSCROLL parameter, please report\n");
return 0; return 0;
} }
if (dx) if (dx)
@ -3872,10 +3872,10 @@ static void EDIT_WM_SetText(WND *wnd, EDITSTATE *es, LPCSTR text)
{ {
EDIT_EM_SetSel(wnd, es, 0, -1, FALSE); EDIT_EM_SetSel(wnd, es, 0, -1, FALSE);
if (text) { if (text) {
TRACE_(edit)("\t'%s'\n", text); TRACE("\t'%s'\n", text);
EDIT_EM_ReplaceSel(wnd, es, FALSE, text); EDIT_EM_ReplaceSel(wnd, es, FALSE, text);
} else { } else {
TRACE_(edit)("\t<NULL>\n"); TRACE("\t<NULL>\n");
EDIT_EM_ReplaceSel(wnd, es, FALSE, ""); EDIT_EM_ReplaceSel(wnd, es, FALSE, "");
} }
es->x_offset = 0; es->x_offset = 0;
@ -3961,9 +3961,9 @@ static LRESULT EDIT_VScroll_Hack(WND *wnd, EDITSTATE *es, INT action, INT pos, H
LRESULT ret = 0; LRESULT ret = 0;
if (!(es->flags & EF_VSCROLL_HACK)) { if (!(es->flags & EF_VSCROLL_HACK)) {
ERR_(edit)("hacked WM_VSCROLL handler invoked\n"); ERR("hacked WM_VSCROLL handler invoked\n");
ERR_(edit)(" if you are _not_ running 16 bit notepad, please report\n"); ERR(" if you are _not_ running 16 bit notepad, please report\n");
ERR_(edit)(" (this message is only displayed once per edit control)\n"); ERR(" (this message is only displayed once per edit control)\n");
es->flags |= EF_VSCROLL_HACK; es->flags |= EF_VSCROLL_HACK;
} }
@ -4006,7 +4006,7 @@ static LRESULT EDIT_VScroll_Hack(WND *wnd, EDITSTATE *es, INT action, INT pos, H
break; break;
default: default:
ERR_(edit)("undocumented (hacked) WM_VSCROLL parameter, please report\n"); ERR("undocumented (hacked) WM_VSCROLL parameter, please report\n");
return 0; return 0;
} }
if (dy) if (dy)
@ -4063,8 +4063,8 @@ static LRESULT EDIT_WM_VScroll(WND *wnd, EDITSTATE *es, INT action, INT pos, HWN
break; break;
default: default:
ERR_(edit)("undocumented WM_VSCROLL action %d, please report\n", ERR("undocumented WM_VSCROLL action %d, please report\n",
action); action);
return 0; return 0;
} }
if (dy) if (dy)

View File

@ -26,7 +26,7 @@ BOOL WINAPI
CryptAcquireContextA( HCRYPTPROV *phProv, LPCSTR pszContainer, CryptAcquireContextA( HCRYPTPROV *phProv, LPCSTR pszContainer,
LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags) LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
{ {
FIXME_(advapi)("(%p, %s, %s, %ld, %08lx): stub!\n", phProv, pszContainer, FIXME("(%p, %s, %s, %ld, %08lx): stub!\n", phProv, pszContainer,
pszProvider, dwProvType, dwFlags); pszProvider, dwProvType, dwFlags);
return FALSE; return FALSE;
} }
@ -37,8 +37,7 @@ CryptAcquireContextA( HCRYPTPROV *phProv, LPCSTR pszContainer,
BOOL WINAPI BOOL WINAPI
CryptSetKeyParam( HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD dwFlags) CryptSetKeyParam( HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD dwFlags)
{ {
FIXME_(advapi)("(%lx, %lx, %p, %lx): stub!\n", FIXME("(%lx, %lx, %p, %lx): stub!\n", hKey, dwParam, pbData, dwFlags);
hKey, dwParam, pbData, dwFlags);
return FALSE; return FALSE;
} }

View File

@ -11,7 +11,7 @@
#include "ntsecapi.h" #include "ntsecapi.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(advapi) DEFAULT_DEBUG_CHANNEL(advapi)
DECLARE_DEBUG_CHANNEL(security) DECLARE_DEBUG_CHANNEL(security)
@ -499,7 +499,7 @@ BOOL WINAPI
MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc, MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen ) PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen )
{ {
FIXME_(advapi)("(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen); FIXME("(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen);
return TRUE; return TRUE;
} }
@ -509,7 +509,7 @@ MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
BOOL WINAPI GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL WINAPI GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision) PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision)
{ FIXME_(advapi)("(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision); { FIXME("(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision);
return 1; return 1;
} }
@ -535,8 +535,8 @@ BOOL WINAPI GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescri
BOOL WINAPI BOOL WINAPI
LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid ) LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
{ {
FIXME_(advapi)("(%s,%s,%p): stub\n",debugstr_w(lpSystemName), FIXME("(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
debugstr_w(lpName), lpLuid); debugstr_w(lpName), lpLuid);
return TRUE; return TRUE;
} }
@ -567,7 +567,7 @@ GetFileSecurityA( LPCSTR lpFileName,
PSECURITY_DESCRIPTOR pSecurityDescriptor, PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded ) DWORD nLength, LPDWORD lpnLengthNeeded )
{ {
FIXME_(advapi)("(%s) : stub\n", debugstr_a(lpFileName)); FIXME("(%s) : stub\n", debugstr_a(lpFileName));
return TRUE; return TRUE;
} }
@ -591,7 +591,7 @@ GetFileSecurityW( LPCWSTR lpFileName,
PSECURITY_DESCRIPTOR pSecurityDescriptor, PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded ) DWORD nLength, LPDWORD lpnLengthNeeded )
{ {
FIXME_(advapi)("(%s) : stub\n", debugstr_w(lpFileName) ); FIXME("(%s) : stub\n", debugstr_w(lpFileName) );
return TRUE; return TRUE;
} }
@ -641,7 +641,7 @@ BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation, SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor) PSECURITY_DESCRIPTOR pSecurityDescriptor)
{ {
FIXME_(advapi)("(%s) : stub\n", debugstr_a(lpFileName)); FIXME("(%s) : stub\n", debugstr_a(lpFileName));
return TRUE; return TRUE;
} }
@ -659,7 +659,7 @@ SetFileSecurityW( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation, SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor ) PSECURITY_DESCRIPTOR pSecurityDescriptor )
{ {
FIXME_(advapi)("(%s) : stub\n", debugstr_w(lpFileName) ); FIXME("(%s) : stub\n", debugstr_w(lpFileName) );
return TRUE; return TRUE;
} }
@ -672,7 +672,7 @@ SetFileSecurityW( LPCWSTR lpFileName,
BOOL WINAPI BOOL WINAPI
QueryWindows31FilesMigration( DWORD x1 ) QueryWindows31FilesMigration( DWORD x1 )
{ {
FIXME_(advapi)("(%ld):stub\n",x1); FIXME("(%ld):stub\n",x1);
return TRUE; return TRUE;
} }
@ -689,7 +689,7 @@ BOOL WINAPI
SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3, SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
DWORD x4 ) DWORD x4 )
{ {
FIXME_(advapi)("(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4); FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
return TRUE; return TRUE;
} }
@ -708,9 +708,8 @@ LsaOpenPolicy(PLSA_UNICODE_STRING SystemName,
ACCESS_MASK DesiredAccess, ACCESS_MASK DesiredAccess,
PLSA_HANDLE PolicyHandle) PLSA_HANDLE PolicyHandle)
{ {
FIXME_(advapi)("(%p,%p,0x%08lx,%p):stub\n", FIXME("(%p,%p,0x%08lx,%p):stub\n",
SystemName, ObjectAttributes, SystemName, ObjectAttributes, DesiredAccess, PolicyHandle);
DesiredAccess, PolicyHandle);
return 0xc0000000; /* generic error */ return 0xc0000000; /* generic error */
} }
@ -723,7 +722,7 @@ LsaOpenPolicy(PLSA_UNICODE_STRING SystemName,
BOOL WINAPI BOOL WINAPI
NotifyBootConfigStatus( DWORD x1 ) NotifyBootConfigStatus( DWORD x1 )
{ {
FIXME_(advapi)("(0x%08lx):stub\n",x1); FIXME("(0x%08lx):stub\n",x1);
return 1; return 1;
} }
@ -736,7 +735,7 @@ NotifyBootConfigStatus( DWORD x1 )
BOOL WINAPI BOOL WINAPI
RevertToSelf( void ) RevertToSelf( void )
{ {
FIXME_(advapi)("(), stub\n"); FIXME("(), stub\n");
return TRUE; return TRUE;
} }
@ -746,7 +745,7 @@ RevertToSelf( void )
BOOL WINAPI BOOL WINAPI
ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel) ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
{ {
FIXME_(advapi)("(%08x), stub\n", ImpersonationLevel); FIXME("(%08x), stub\n", ImpersonationLevel);
return TRUE; return TRUE;
} }
@ -758,9 +757,9 @@ AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken,
DWORD DesiredAccess, PGENERIC_MAPPING GenericMapping, PPRIVILEGE_SET PrivilegeSet, DWORD DesiredAccess, PGENERIC_MAPPING GenericMapping, PPRIVILEGE_SET PrivilegeSet,
LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL AccessStatus) LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL AccessStatus)
{ {
FIXME_(advapi)("(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n", FIXME("(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n",
pSecurityDescriptor, ClientToken, DesiredAccess, GenericMapping, pSecurityDescriptor, ClientToken, DesiredAccess, GenericMapping,
PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus); PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus);
*AccessStatus = TRUE; *AccessStatus = TRUE;
return TRUE; return TRUE;
} }
@ -777,7 +776,7 @@ AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken,
BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token) BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token)
{ {
FIXME_(advapi)("(%p, %x): stub\n", thread, token); FIXME("(%p, %x): stub\n", thread, token);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View File

@ -14,7 +14,7 @@
#include "debugstr.h" #include "debugstr.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(avifile) DEFAULT_DEBUG_CHANNEL(avifile)
DECLARE_DEBUG_CHANNEL(msvideo) DECLARE_DEBUG_CHANNEL(msvideo)
DECLARE_DEBUG_CHANNEL(relay) DECLARE_DEBUG_CHANNEL(relay)
@ -104,7 +104,7 @@ typedef struct IAVIStreamImpl {
void WINAPI void WINAPI
AVIFileInit(void) { AVIFileInit(void) {
FIXME_(avifile)("(),stub!\n"); FIXME("(),stub!\n");
} }
typedef struct IAVIFileImpl { typedef struct IAVIFileImpl {
@ -148,14 +148,14 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile* iface) {
} }
static HRESULT WINAPI IAVIFile_fnInfo(IAVIFile*iface,AVIFILEINFOW*afi,LONG size) { static HRESULT WINAPI IAVIFile_fnInfo(IAVIFile*iface,AVIFILEINFOW*afi,LONG size) {
FIXME_(avifile)("(%p)->Info(%p,%ld)\n",iface,afi,size); FIXME("(%p)->Info(%p,%ld)\n",iface,afi,size);
/* FIXME: fill out struct? */ /* FIXME: fill out struct? */
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIFile_fnGetStream(IAVIFile*iface,PAVISTREAM*avis,DWORD fccType,LONG lParam) { static HRESULT WINAPI IAVIFile_fnGetStream(IAVIFile*iface,PAVISTREAM*avis,DWORD fccType,LONG lParam) {
FIXME_(avifile)("(%p)->GetStream(%p,0x%08lx,%ld)\n",iface,avis,fccType,lParam); FIXME("(%p)->GetStream(%p,0x%08lx,%ld)\n",iface,avis,fccType,lParam);
/* FIXME: create interface etc. */ /* FIXME: create interface etc. */
return E_FAIL; return E_FAIL;
} }
@ -165,18 +165,18 @@ static HRESULT WINAPI IAVIFile_fnCreateStream(IAVIFile*iface,PAVISTREAM*avis,AVI
char fcc[5]; char fcc[5];
IAVIStreamImpl *istream; IAVIStreamImpl *istream;
FIXME_(avifile)("(%p,%p,%p)\n",This,avis,asi); FIXME("(%p,%p,%p)\n",This,avis,asi);
istream = (IAVIStreamImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIStreamImpl)); istream = (IAVIStreamImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIStreamImpl));
istream->ref = 1; istream->ref = 1;
ICOM_VTBL(istream) = &iavist; ICOM_VTBL(istream) = &iavist;
fcc[4]='\0'; fcc[4]='\0';
memcpy(fcc,(char*)&(asi->fccType),4); memcpy(fcc,(char*)&(asi->fccType),4);
FIXME_(avifile)("\tfccType '%s'\n",fcc); FIXME("\tfccType '%s'\n",fcc);
memcpy(fcc,(char*)&(asi->fccHandler),4); memcpy(fcc,(char*)&(asi->fccHandler),4);
FIXME_(avifile)("\tfccHandler '%s'\n",fcc); FIXME("\tfccHandler '%s'\n",fcc);
FIXME_(avifile)("\tdwFlags 0x%08lx\n",asi->dwFlags); FIXME("\tdwFlags 0x%08lx\n",asi->dwFlags);
FIXME_(avifile)("\tdwCaps 0x%08lx\n",asi->dwCaps); FIXME("\tdwCaps 0x%08lx\n",asi->dwCaps);
FIXME_(avifile)("\tname '%s'\n",debugstr_w(asi->szName)); FIXME("\tname '%s'\n",debugstr_w(asi->szName));
istream->curframe = 0; istream->curframe = 0;
*avis = (PAVISTREAM)istream; *avis = (PAVISTREAM)istream;
@ -184,25 +184,25 @@ static HRESULT WINAPI IAVIFile_fnCreateStream(IAVIFile*iface,PAVISTREAM*avis,AVI
} }
static HRESULT WINAPI IAVIFile_fnWriteData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG size) { static HRESULT WINAPI IAVIFile_fnWriteData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG size) {
FIXME_(avifile)("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,ckid,lpData,size); FIXME("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,ckid,lpData,size);
/* FIXME: write data to file */ /* FIXME: write data to file */
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG *size) { static HRESULT WINAPI IAVIFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG *size) {
FIXME_(avifile)("(%p)->ReadData(0x%08lx,%p,%p)\n",iface,ckid,lpData,size); FIXME("(%p)->ReadData(0x%08lx,%p,%p)\n",iface,ckid,lpData,size);
/* FIXME: read at most size bytes from file */ /* FIXME: read at most size bytes from file */
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIFile_fnEndRecord(IAVIFile*iface) { static HRESULT WINAPI IAVIFile_fnEndRecord(IAVIFile*iface) {
FIXME_(avifile)("(%p)->EndRecord()\n",iface); FIXME("(%p)->EndRecord()\n",iface);
/* FIXME: end record? */ /* FIXME: end record? */
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam) { static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam) {
FIXME_(avifile)("(%p)->DeleteStream(0x%08lx,%ld)\n",iface,fccType,lParam); FIXME("(%p)->DeleteStream(0x%08lx,%ld)\n",iface,fccType,lParam);
/* FIXME: delete stream? */ /* FIXME: delete stream? */
return E_FAIL; return E_FAIL;
} }
@ -219,7 +219,7 @@ HRESULT WINAPI AVIFileOpenA(
else else
sprintf(buf,"<clsid-0x%04lx>",(DWORD)lpHandler); sprintf(buf,"<clsid-0x%04lx>",(DWORD)lpHandler);
FIXME_(avifile)("(%p,%s,0x%08lx,%s),stub!\n",ppfile,szFile,(DWORD)uMode,buf); FIXME("(%p,%s,0x%08lx,%s),stub!\n",ppfile,szFile,(DWORD)uMode,buf);
iavi = (IAVIFileImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIFileImpl)); iavi = (IAVIFileImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIFileImpl));
iavi->ref = 1; iavi->ref = 1;
ICOM_VTBL(iavi) = &iavift; ICOM_VTBL(iavi) = &iavift;
@ -262,22 +262,22 @@ static ULONG WINAPI IAVIStream_fnRelease(IAVIStream* iface) {
} }
static HRESULT WINAPI IAVIStream_fnCreate(IAVIStream*iface,LPARAM lParam1,LPARAM lParam2) { static HRESULT WINAPI IAVIStream_fnCreate(IAVIStream*iface,LPARAM lParam1,LPARAM lParam2) {
FIXME_(avifile)("(%p)->Create(0x%08lx,0x%08lx)\n",iface,lParam1,lParam2); FIXME("(%p)->Create(0x%08lx,0x%08lx)\n",iface,lParam1,lParam2);
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIStream_fnInfo(IAVIStream*iface,AVISTREAMINFOW *psi,LONG size) { static HRESULT WINAPI IAVIStream_fnInfo(IAVIStream*iface,AVISTREAMINFOW *psi,LONG size) {
FIXME_(avifile)("(%p)->Info(%p,%ld)\n",iface,psi,size); FIXME("(%p)->Info(%p,%ld)\n",iface,psi,size);
return E_FAIL; return E_FAIL;
} }
static LONG WINAPI IAVIStream_fnFindSample(IAVIStream*iface,LONG pos,LONG flags) { static LONG WINAPI IAVIStream_fnFindSample(IAVIStream*iface,LONG pos,LONG flags) {
FIXME_(avifile)("(%p)->FindSample(%ld,0x%08lx)\n",iface,pos,flags); FIXME("(%p)->FindSample(%ld,0x%08lx)\n",iface,pos,flags);
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIStream_fnReadFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG *formatsize) { static HRESULT WINAPI IAVIStream_fnReadFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG *formatsize) {
FIXME_(avifile)("(%p)->ReadFormat(%ld,%p,%p)\n",iface,pos,format,formatsize); FIXME("(%p)->ReadFormat(%ld,%p,%p)\n",iface,pos,format,formatsize);
return E_FAIL; return E_FAIL;
} }
@ -287,7 +287,7 @@ static HRESULT WINAPI IAVIStream_fnReadFormat(IAVIStream*iface,LONG pos,LPVOID f
static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG formatsize) { static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG formatsize) {
IAVIStreamImpl *as = (IAVIStreamImpl*)iface; IAVIStreamImpl *as = (IAVIStreamImpl*)iface;
FIXME_(avifile)("(%p)->SetFormat(%ld,%p,%ld)\n",iface,pos,format,formatsize); FIXME("(%p)->SetFormat(%ld,%p,%ld)\n",iface,pos,format,formatsize);
if (as->lpInputFormat) HeapFree(GetProcessHeap(),0,as->lpInputFormat); if (as->lpInputFormat) HeapFree(GetProcessHeap(),0,as->lpInputFormat);
as->inputformatsize = formatsize; as->inputformatsize = formatsize;
as->lpInputFormat = HeapAlloc(GetProcessHeap(),0,formatsize); as->lpInputFormat = HeapAlloc(GetProcessHeap(),0,formatsize);
@ -319,7 +319,7 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream*iface,LONG pos,LPVOID fo
} }
static HRESULT WINAPI IAVIStream_fnRead(IAVIStream*iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread) { static HRESULT WINAPI IAVIStream_fnRead(IAVIStream*iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread) {
FIXME_(avifile)("(%p)->Read(%ld,%ld,%p,%ld,%p,%p)\n",iface,start,samples,buffer,buffersize,bytesread,samplesread); FIXME("(%p)->Read(%ld,%ld,%p,%ld,%p,%p)\n",iface,start,samples,buffer,buffersize,bytesread,samplesread);
return E_FAIL; return E_FAIL;
} }
@ -327,7 +327,7 @@ static HRESULT WINAPI IAVIStream_fnWrite(IAVIStream*iface,LONG start,LONG sample
IAVIStreamImpl *as = (IAVIStreamImpl*)iface; IAVIStreamImpl *as = (IAVIStreamImpl*)iface;
DWORD ckid,xflags; DWORD ckid,xflags;
FIXME_(avifile)("(%p)->Write(%ld,%ld,%p,%ld,0x%08lx,%p,%p)\n",iface,start,samples,buffer,buffersize,flags,sampwritten,byteswritten); FIXME("(%p)->Write(%ld,%ld,%p,%ld,0x%08lx,%p,%p)\n",iface,start,samples,buffer,buffersize,flags,sampwritten,byteswritten);
ICCompress( ICCompress(
as->hic,flags, as->hic,flags,
@ -353,21 +353,21 @@ static HRESULT WINAPI IAVIStream_fnWrite(IAVIStream*iface,LONG start,LONG sample
} }
static HRESULT WINAPI IAVIStream_fnDelete(IAVIStream*iface,LONG start,LONG samples) { static HRESULT WINAPI IAVIStream_fnDelete(IAVIStream*iface,LONG start,LONG samples) {
FIXME_(avifile)("(%p)->Delete(%ld,%ld)\n",iface,start,samples); FIXME("(%p)->Delete(%ld,%ld)\n",iface,start,samples);
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG *lpread) { static HRESULT WINAPI IAVIStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG *lpread) {
FIXME_(avifile)("(%p)->ReadData(0x%08lx,%p,%p)\n",iface,fcc,lp,lpread); FIXME("(%p)->ReadData(0x%08lx,%p,%p)\n",iface,fcc,lp,lpread);
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size) { static HRESULT WINAPI IAVIStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size) {
FIXME_(avifile)("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,fcc,lp,size); FIXME("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,fcc,lp,size);
return E_FAIL; return E_FAIL;
} }
static HRESULT WINAPI IAVIStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen) { static HRESULT WINAPI IAVIStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen) {
FIXME_(avifile)("(%p)->SetInfo(%p,%ld)\n",iface,info,infolen); FIXME("(%p)->SetInfo(%p,%ld)\n",iface,info,infolen);
return E_FAIL; return E_FAIL;
} }
@ -426,13 +426,13 @@ HRESULT WINAPI AVIFileInfoW(PAVIFILE iface,LPAVIFILEINFOW afi,LONG size) {
HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *aco,CLSID *pclsidHandler) { HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *aco,CLSID *pclsidHandler) {
char fcc[5]; char fcc[5];
IAVIStreamImpl *as; IAVIStreamImpl *as;
FIXME_(avifile)("(%p,%p,%p,%p)\n",ppsCompressed,ppsSource,aco,pclsidHandler); FIXME("(%p,%p,%p,%p)\n",ppsCompressed,ppsSource,aco,pclsidHandler);
fcc[4]='\0'; fcc[4]='\0';
memcpy(fcc,&(aco->fccType),4); memcpy(fcc,&(aco->fccType),4);
FIXME_(avifile)("\tfccType: '%s'\n",fcc); FIXME("\tfccType: '%s'\n",fcc);
memcpy(fcc,&(aco->fccHandler),4); memcpy(fcc,&(aco->fccHandler),4);
FIXME_(avifile)("\tfccHandler: '%s'\n",fcc); FIXME("\tfccHandler: '%s'\n",fcc);
FIXME_(avifile)("\tdwFlags: 0x%08lx\n",aco->dwFlags); FIXME("\tdwFlags: 0x%08lx\n",aco->dwFlags);
/* we just create a duplicate for now */ /* we just create a duplicate for now */
IAVIStream_AddRef(ppsSource); IAVIStream_AddRef(ppsSource);
@ -447,7 +447,7 @@ HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed,PAVISTREAM ppsS
return AVIERR_UNSUPPORTED; return AVIERR_UNSUPPORTED;
ICGetInfo(as->hic,&(as->icinfo),sizeof(ICINFO)); ICGetInfo(as->hic,&(as->icinfo),sizeof(ICINFO));
FIXME_(avifile)("Opened compressor: '%s' '%s'\n",debugstr_w(as->icinfo.szName),debugstr_w(as->icinfo.szDescription)); FIXME("Opened compressor: '%s' '%s'\n",debugstr_w(as->icinfo.szName),debugstr_w(as->icinfo.szDescription));
as->iscompressing = TRUE; as->iscompressing = TRUE;
memcpy(&(as->aco),aco,sizeof(*aco)); memcpy(&(as->aco),aco,sizeof(*aco));
if (as->icinfo.dwFlags & VIDCF_COMPRESSFRAMES) { if (as->icinfo.dwFlags & VIDCF_COMPRESSFRAMES) {
@ -530,5 +530,5 @@ ULONG WINAPI AVIFileRelease(PAVIFILE iface) {
} }
void WINAPI AVIFileExit(void) { void WINAPI AVIFileExit(void) {
FIXME_(avifile)("(), stub.\n"); FIXME("(), stub.\n");
} }

View File

@ -2221,7 +2221,7 @@ INT WINAPI COMCTL32_StrSpnW( LPWSTR lpStr, LPWSTR lpSet) {
BOOL WINAPI comctl32_410( HWND hw, DWORD b, DWORD c, DWORD d) { BOOL WINAPI comctl32_410( HWND hw, DWORD b, DWORD c, DWORD d) {
FIXME_(commctrl)("(%x, %lx, %lx, %lx): stub!\n", hw, b, c, d); FIXME("(%x, %lx, %lx, %lx): stub!\n", hw, b, c, d);
return TRUE; return TRUE;
} }
@ -2235,7 +2235,7 @@ BOOL WINAPI comctl32_410( HWND hw, DWORD b, DWORD c, DWORD d) {
BOOL WINAPI comctl32_411( HWND hw, DWORD b, DWORD c) { BOOL WINAPI comctl32_411( HWND hw, DWORD b, DWORD c) {
FIXME_(commctrl)("(%x, %lx, %lx): stub!\n", hw, b, c); FIXME("(%x, %lx, %lx): stub!\n", hw, b, c);
return TRUE; return TRUE;
} }
@ -2249,7 +2249,7 @@ BOOL WINAPI comctl32_411( HWND hw, DWORD b, DWORD c) {
BOOL WINAPI comctl32_412( HWND hwnd, DWORD b, DWORD c) BOOL WINAPI comctl32_412( HWND hwnd, DWORD b, DWORD c)
{ {
FIXME_(commctrl)("(%x, %lx, %lx): stub!\n", hwnd, b, c); FIXME("(%x, %lx, %lx): stub!\n", hwnd, b, c);
if (IsWindow (hwnd) == FALSE) if (IsWindow (hwnd) == FALSE)
return FALSE; return FALSE;
@ -2270,7 +2270,7 @@ BOOL WINAPI comctl32_412( HWND hwnd, DWORD b, DWORD c)
BOOL WINAPI comctl32_413( HWND hw, DWORD b, DWORD c, DWORD d) { BOOL WINAPI comctl32_413( HWND hw, DWORD b, DWORD c, DWORD d) {
FIXME_(commctrl)("(%x, %lx, %lx, %lx): stub!\n", hw, b, c, d); FIXME("(%x, %lx, %lx, %lx): stub!\n", hw, b, c, d);
return TRUE; return TRUE;
} }
@ -2284,7 +2284,7 @@ BOOL WINAPI comctl32_413( HWND hw, DWORD b, DWORD c, DWORD d) {
BOOL WINAPI InitMUILanguage( LANGID uiLang) { BOOL WINAPI InitMUILanguage( LANGID uiLang) {
FIXME_(commctrl)("(%04x): stub!\n", uiLang); FIXME("(%04x): stub!\n", uiLang);
return TRUE; return TRUE;
} }

View File

@ -20,7 +20,7 @@
#include "flatsb.h" #include "flatsb.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(commctrl) DEFAULT_DEBUG_CHANNEL(commctrl)
#define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)GetWindowLongA (hwnd, 0)) #define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)GetWindowLongA (hwnd, 0))
@ -29,42 +29,42 @@ DECLARE_DEBUG_CHANNEL(commctrl)
BOOL WINAPI BOOL WINAPI
FlatSB_EnableScrollBar(HWND hwnd, INT dummy, UINT dummy2) FlatSB_EnableScrollBar(HWND hwnd, INT dummy, UINT dummy2)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_ShowScrollBar(HWND hwnd, INT code, BOOL flag) FlatSB_ShowScrollBar(HWND hwnd, INT code, BOOL flag)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_GetScrollRange(HWND hwnd, INT code, LPINT min, LPINT max) FlatSB_GetScrollRange(HWND hwnd, INT code, LPINT min, LPINT max)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_GetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info) FlatSB_GetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
INT WINAPI INT WINAPI
FlatSB_GetScrollPos(HWND hwnd, INT code) FlatSB_GetScrollPos(HWND hwnd, INT code)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop) FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
@ -72,41 +72,41 @@ FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
INT WINAPI INT WINAPI
FlatSB_SetScrollPos(HWND hwnd, INT code, INT pos, BOOL fRedraw) FlatSB_SetScrollPos(HWND hwnd, INT code, INT pos, BOOL fRedraw)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
INT WINAPI INT WINAPI
FlatSB_SetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info, BOOL fRedraw) FlatSB_SetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info, BOOL fRedraw)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
INT WINAPI INT WINAPI
FlatSB_SetScrollRange(HWND hwnd, INT code, INT min, INT max, BOOL fRedraw) FlatSB_SetScrollRange(HWND hwnd, INT code, INT min, INT max, BOOL fRedraw)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
BOOL WINAPI BOOL WINAPI
FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag) FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
BOOL WINAPI InitializeFlatSB(HWND hwnd) BOOL WINAPI InitializeFlatSB(HWND hwnd)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
HRESULT WINAPI UninitializeFlatSB(HWND hwnd) HRESULT WINAPI UninitializeFlatSB(HWND hwnd)
{ {
FIXME_(commctrl)("stub\n"); FIXME("stub\n");
return 0; return 0;
} }
@ -142,8 +142,8 @@ FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
default: default:
if (uMsg >= WM_USER) if (uMsg >= WM_USER)
ERR_(commctrl)("unknown msg %04x wp=%08x lp=%08lx\n", ERR("unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam); uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam); return DefWindowProcA (hwnd, uMsg, wParam, lParam);
} }
return 0; return 0;

View File

@ -23,7 +23,7 @@
#include "ldt.h" #include "ldt.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(ole) DEFAULT_DEBUG_CHANNEL(ole)
DECLARE_DEBUG_CHANNEL(relay) DECLARE_DEBUG_CHANNEL(relay)
struct storage_header { struct storage_header {
@ -89,12 +89,12 @@ static BOOL
STORAGE_get_big_block(HFILE hf,int n,BYTE *block) { STORAGE_get_big_block(HFILE hf,int n,BYTE *block) {
assert(n>=-1); assert(n>=-1);
if (-1==_llseek(hf,(n+1)*BIGSIZE,SEEK_SET)) { if (-1==_llseek(hf,(n+1)*BIGSIZE,SEEK_SET)) {
WARN_(ole)(" seek failed (%ld)\n",GetLastError()); WARN(" seek failed (%ld)\n",GetLastError());
return FALSE; return FALSE;
} }
assert((n+1)*BIGSIZE==_llseek(hf,0,SEEK_CUR)); assert((n+1)*BIGSIZE==_llseek(hf,0,SEEK_CUR));
if (BIGSIZE!=_lread(hf,block,BIGSIZE)) { if (BIGSIZE!=_lread(hf,block,BIGSIZE)) {
WARN_(ole)("(block size %d): read didn't read (%ld)\n",n,GetLastError()); WARN("(block size %d): read didn't read (%ld)\n",n,GetLastError());
assert(0); assert(0);
return FALSE; return FALSE;
} }
@ -108,12 +108,12 @@ static BOOL
STORAGE_put_big_block(HFILE hf,int n,BYTE *block) { STORAGE_put_big_block(HFILE hf,int n,BYTE *block) {
assert(n>=-1); assert(n>=-1);
if (-1==_llseek(hf,(n+1)*BIGSIZE,SEEK_SET)) { if (-1==_llseek(hf,(n+1)*BIGSIZE,SEEK_SET)) {
WARN_(ole)(" seek failed (%ld)\n",GetLastError()); WARN(" seek failed (%ld)\n",GetLastError());
return FALSE; return FALSE;
} }
assert((n+1)*BIGSIZE==_llseek(hf,0,SEEK_CUR)); assert((n+1)*BIGSIZE==_llseek(hf,0,SEEK_CUR));
if (BIGSIZE!=_lwrite(hf,block,BIGSIZE)) { if (BIGSIZE!=_lwrite(hf,block,BIGSIZE)) {
WARN_(ole)(" write failed (%ld)\n",GetLastError()); WARN(" write failed (%ld)\n",GetLastError());
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
@ -793,7 +793,7 @@ HRESULT WINAPI IStream16_fnRead(
int cc; int cc;
if (!STORAGE_get_small_block(This->hf,blocknr,block)) { if (!STORAGE_get_small_block(This->hf,blocknr,block)) {
WARN_(ole)("small block read failed!!!\n"); WARN("small block read failed!!!\n");
return E_FAIL; return E_FAIL;
} }
cc = cb; cc = cb;
@ -813,7 +813,7 @@ HRESULT WINAPI IStream16_fnRead(
int cc; int cc;
if (!STORAGE_get_big_block(This->hf,blocknr,block)) { if (!STORAGE_get_big_block(This->hf,blocknr,block)) {
WARN_(ole)("big block read failed!!!\n"); WARN("big block read failed!!!\n");
return E_FAIL; return E_FAIL;
} }
cc = cb; cc = cb;
@ -1267,7 +1267,7 @@ HRESULT WINAPI IStorage16_fnStat(
LPSTORAGE16 iface,STATSTG16 *pstatstg, DWORD grfStatFlag LPSTORAGE16 iface,STATSTG16 *pstatstg, DWORD grfStatFlag
) { ) {
ICOM_THIS(IStorage16Impl,iface); ICOM_THIS(IStorage16Impl,iface);
TRACE_(ole)("(%p)->(%p,0x%08lx)\n", TRACE("(%p)->(%p,0x%08lx)\n",
This,pstatstg,grfStatFlag This,pstatstg,grfStatFlag
); );
pstatstg->pwcsName=(LPOLESTR16)SEGPTR_GET(SEGPTR_STRDUP_WtoA(This->stde.pps_rawname)); pstatstg->pwcsName=(LPOLESTR16)SEGPTR_GET(SEGPTR_STRDUP_WtoA(This->stde.pps_rawname));
@ -1291,7 +1291,7 @@ HRESULT WINAPI IStorage16_fnCommit(
LPSTORAGE16 iface,DWORD commitflags LPSTORAGE16 iface,DWORD commitflags
) { ) {
ICOM_THIS(IStorage16Impl,iface); ICOM_THIS(IStorage16Impl,iface);
FIXME_(ole)("(%p)->(0x%08lx),STUB!\n", FIXME("(%p)->(0x%08lx),STUB!\n",
This,commitflags This,commitflags
); );
return S_OK; return S_OK;
@ -1308,7 +1308,7 @@ HRESULT WINAPI IStorage16_fnCopyTo(LPSTORAGE16 iface,DWORD ciidExclude,const IID
WINE_StringFromCLSID(rgiidExclude,xguid); WINE_StringFromCLSID(rgiidExclude,xguid);
else else
strcpy(xguid,"<no guid>"); strcpy(xguid,"<no guid>");
FIXME_(ole)("IStorage16(%p)->(0x%08lx,%s,%p,%p),stub!\n", FIXME("IStorage16(%p)->(0x%08lx,%s,%p,%p),stub!\n",
This,ciidExclude,xguid,SNB16Exclude,pstgDest This,ciidExclude,xguid,SNB16Exclude,pstgDest
); );
return S_OK; return S_OK;
@ -1330,11 +1330,11 @@ HRESULT WINAPI IStorage16_fnCreateStorage(
READ_HEADER; READ_HEADER;
TRACE_(ole)("(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n", TRACE("(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n",
This,pwcsName,grfMode,dwStgFormat,reserved2,ppstg This,pwcsName,grfMode,dwStgFormat,reserved2,ppstg
); );
if (grfMode & STGM_TRANSACTED) if (grfMode & STGM_TRANSACTED)
FIXME_(ole)("We do not support transacted Compound Storage. Using direct mode.\n"); FIXME("We do not support transacted Compound Storage. Using direct mode.\n");
_create_istorage16(ppstg); _create_istorage16(ppstg);
lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstg); lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstg);
lpstg->hf = This->hf; lpstg->hf = This->hf;
@ -1347,7 +1347,7 @@ HRESULT WINAPI IStorage16_fnCreateStorage(
stde.pps_dir = ppsent; stde.pps_dir = ppsent;
x = This->ppsent; x = This->ppsent;
} else { } else {
FIXME_(ole)(" use prev chain too ?\n"); FIXME(" use prev chain too ?\n");
x=stde.pps_dir; x=stde.pps_dir;
if (1!=STORAGE_get_pps_entry(lpstg->hf,x,&stde)) if (1!=STORAGE_get_pps_entry(lpstg->hf,x,&stde))
return E_FAIL; return E_FAIL;
@ -1386,11 +1386,11 @@ HRESULT WINAPI IStorage16_fnCreateStream(
int ppsent,x; int ppsent,x;
struct storage_pps_entry stde; struct storage_pps_entry stde;
TRACE_(ole)("(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n", TRACE("(%p)->(%s,0x%08lx,0x%08lx,0x%08lx,%p)\n",
This,pwcsName,grfMode,reserved1,reserved2,ppstm This,pwcsName,grfMode,reserved1,reserved2,ppstm
); );
if (grfMode & STGM_TRANSACTED) if (grfMode & STGM_TRANSACTED)
FIXME_(ole)("We do not support transacted Compound Storage. Using direct mode.\n"); FIXME("We do not support transacted Compound Storage. Using direct mode.\n");
_create_istream16(ppstm); _create_istream16(ppstm);
lpstr = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstm); lpstr = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstm);
DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(), DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(),
@ -1443,7 +1443,7 @@ HRESULT WINAPI IStorage16_fnOpenStorage(
This,pwcsName,pstgPrio,grfMode,snbExclude,reserved,ppstg This,pwcsName,pstgPrio,grfMode,snbExclude,reserved,ppstg
); );
if (grfMode & STGM_TRANSACTED) if (grfMode & STGM_TRANSACTED)
FIXME_(ole)("We do not support transacted Compound Storage. Using direct mode.\n"); FIXME("We do not support transacted Compound Storage. Using direct mode.\n");
_create_istorage16(ppstg); _create_istorage16(ppstg);
lpstg = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstg); lpstg = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstg);
DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(), DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(),
@ -1478,7 +1478,7 @@ HRESULT WINAPI IStorage16_fnOpenStream(
This,pwcsName,reserved1,grfMode,reserved2,ppstm This,pwcsName,reserved1,grfMode,reserved2,ppstm
); );
if (grfMode & STGM_TRANSACTED) if (grfMode & STGM_TRANSACTED)
FIXME_(ole)("We do not support transacted Compound Storage. Using direct mode.\n"); FIXME("We do not support transacted Compound Storage. Using direct mode.\n");
_create_istream16(ppstm); _create_istream16(ppstm);
lpstr = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstm); lpstr = (IStream16Impl*)PTR_SEG_TO_LIN(*ppstm);
DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(), DuplicateHandle( GetCurrentProcess(), This->hf, GetCurrentProcess(),
@ -1580,13 +1580,13 @@ HRESULT WINAPI StgCreateDocFile16(
IStorage16Impl* lpstg; IStorage16Impl* lpstg;
struct storage_pps_entry stde; struct storage_pps_entry stde;
TRACE_(ole)("(%s,0x%08lx,0x%08lx,%p)\n", TRACE("(%s,0x%08lx,0x%08lx,%p)\n",
pwcsName,grfMode,reserved,ppstgOpen pwcsName,grfMode,reserved,ppstgOpen
); );
_create_istorage16(ppstgOpen); _create_istorage16(ppstgOpen);
hf = CreateFileA(pwcsName,GENERIC_READ|GENERIC_WRITE,0,NULL,CREATE_NEW,0,0); hf = CreateFileA(pwcsName,GENERIC_READ|GENERIC_WRITE,0,NULL,CREATE_NEW,0,0);
if (hf==INVALID_HANDLE_VALUE) { if (hf==INVALID_HANDLE_VALUE) {
WARN_(ole)("couldn't open file for storage:%ld\n",GetLastError()); WARN("couldn't open file for storage:%ld\n",GetLastError());
return E_FAIL; return E_FAIL;
} }
lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstgOpen); lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstgOpen);
@ -1622,31 +1622,31 @@ HRESULT WINAPI StgIsStorageFile16(LPCOLESTR16 fn) {
OFSTRUCT ofs; OFSTRUCT ofs;
BYTE magic[24]; BYTE magic[24];
TRACE_(ole)("(\'%s\')\n",fn); TRACE("(\'%s\')\n",fn);
hf = OpenFile(fn,&ofs,OF_SHARE_DENY_NONE); hf = OpenFile(fn,&ofs,OF_SHARE_DENY_NONE);
if (hf==HFILE_ERROR) if (hf==HFILE_ERROR)
return STG_E_FILENOTFOUND; return STG_E_FILENOTFOUND;
if (24!=_lread(hf,magic,24)) { if (24!=_lread(hf,magic,24)) {
WARN_(ole)(" too short\n"); WARN(" too short\n");
_lclose(hf); _lclose(hf);
return S_FALSE; return S_FALSE;
} }
if (!memcmp(magic,STORAGE_magic,8)) { if (!memcmp(magic,STORAGE_magic,8)) {
WARN_(ole)(" -> YES\n"); WARN(" -> YES\n");
_lclose(hf); _lclose(hf);
return S_OK; return S_OK;
} }
if (!memcmp(magic,STORAGE_notmagic,8)) { if (!memcmp(magic,STORAGE_notmagic,8)) {
WARN_(ole)(" -> NO\n"); WARN(" -> NO\n");
_lclose(hf); _lclose(hf);
return S_FALSE; return S_FALSE;
} }
if (!memcmp(magic,STORAGE_oldmagic,8)) { if (!memcmp(magic,STORAGE_oldmagic,8)) {
WARN_(ole)(" -> old format\n"); WARN(" -> old format\n");
_lclose(hf); _lclose(hf);
return STG_E_OLDFORMAT; return STG_E_OLDFORMAT;
} }
WARN_(ole)(" -> Invalid header.\n"); WARN(" -> Invalid header.\n");
_lclose(hf); _lclose(hf);
return STG_E_INVALIDHEADER; return STG_E_INVALIDHEADER;
} }
@ -1677,13 +1677,13 @@ HRESULT WINAPI StgOpenStorage16(
IStorage16Impl* lpstg; IStorage16Impl* lpstg;
struct storage_pps_entry stde; struct storage_pps_entry stde;
TRACE_(ole)("(%s,%p,0x%08lx,%p,%ld,%p)\n", TRACE("(%s,%p,0x%08lx,%p,%ld,%p)\n",
pwcsName,pstgPriority,grfMode,snbExclude,reserved,ppstgOpen pwcsName,pstgPriority,grfMode,snbExclude,reserved,ppstgOpen
); );
_create_istorage16(ppstgOpen); _create_istorage16(ppstgOpen);
hf = CreateFileA(pwcsName,GENERIC_READ,0,NULL,0,0,0); hf = CreateFileA(pwcsName,GENERIC_READ,0,NULL,0,0,0);
if (hf==INVALID_HANDLE_VALUE) { if (hf==INVALID_HANDLE_VALUE) {
WARN_(ole)("Couldn't open file for storage\n"); WARN("Couldn't open file for storage\n");
return E_FAIL; return E_FAIL;
} }
lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstgOpen); lpstg = (IStorage16Impl*)PTR_SEG_TO_LIN(*ppstgOpen);

View File

@ -69,7 +69,7 @@ QueryPathOfRegTypeLib16(
); );
} else { } else {
sprintf(xguid,"<guid 0x%08lx>",(DWORD)guid); sprintf(xguid,"<guid 0x%08lx>",(DWORD)guid);
FIXME_(ole)("(%s,%d,%d,0x%04lx,%p),can't handle non-string guids.\n",xguid,wMaj,wMin,(DWORD)lcid,path); FIXME("(%s,%d,%d,0x%04lx,%p),can't handle non-string guids.\n",xguid,wMaj,wMin,(DWORD)lcid,path);
return E_FAIL; return E_FAIL;
} }
plen = sizeof(pathname); plen = sizeof(pathname);
@ -77,7 +77,7 @@ QueryPathOfRegTypeLib16(
/* try again without lang specific id */ /* try again without lang specific id */
if (SUBLANGID(lcid)) if (SUBLANGID(lcid))
return QueryPathOfRegTypeLib16(guid,wMaj,wMin,PRIMARYLANGID(lcid),path); return QueryPathOfRegTypeLib16(guid,wMaj,wMin,PRIMARYLANGID(lcid),path);
FIXME_(ole)("key %s not found\n",typelibkey); FIXME("key %s not found\n",typelibkey);
return E_FAIL; return E_FAIL;
} }
*path = SysAllocString16(pathname); *path = SysAllocString16(pathname);
@ -109,7 +109,7 @@ QueryPathOfRegTypeLib(
); );
} else { } else {
sprintf(xguid,"<guid 0x%08lx>",(DWORD)guid); sprintf(xguid,"<guid 0x%08lx>",(DWORD)guid);
FIXME_(ole)("(%s,%d,%d,0x%04lx,%p),stub!\n",xguid,wMaj,wMin,(DWORD)lcid,path); FIXME("(%s,%d,%d,0x%04lx,%p),stub!\n",xguid,wMaj,wMin,(DWORD)lcid,path);
return E_FAIL; return E_FAIL;
} }
plen = sizeof(pathname); plen = sizeof(pathname);
@ -117,7 +117,7 @@ QueryPathOfRegTypeLib(
/* try again without lang specific id */ /* try again without lang specific id */
if (SUBLANGID(lcid)) if (SUBLANGID(lcid))
return QueryPathOfRegTypeLib(guid,wMaj,wMin,PRIMARYLANGID(lcid),path); return QueryPathOfRegTypeLib(guid,wMaj,wMin,PRIMARYLANGID(lcid),path);
FIXME_(ole)("key %s not found\n",typelibkey); FIXME("key %s not found\n",typelibkey);
return E_FAIL; return E_FAIL;
} }
*path = HEAP_strdupAtoW(GetProcessHeap(),0,pathname); *path = HEAP_strdupAtoW(GetProcessHeap(),0,pathname);
@ -138,7 +138,7 @@ HRESULT WINAPI LoadTypeLib16(
LPOLESTR szFile, /* [in] Name of file to load from */ LPOLESTR szFile, /* [in] Name of file to load from */
void * *pptLib) /* [out] Pointer to pointer to loaded type library */ void * *pptLib) /* [out] Pointer to pointer to loaded type library */
{ {
FIXME_(ole)("('%s',%p): stub\n",debugstr_w((LPWSTR)szFile),pptLib); FIXME("('%s',%p): stub\n",debugstr_w((LPWSTR)szFile),pptLib);
if (pptLib!=0) if (pptLib!=0)
*pptLib=0; *pptLib=0;
@ -180,17 +180,17 @@ HRESULT WINAPI LoadTypeLibEx(
{ {
LPSTR p; LPSTR p;
HRESULT res; HRESULT res;
TRACE_(typelib)("('%s',%d,%p)\n",debugstr_w(szFile), regkind, pptLib); TRACE("('%s',%d,%p)\n",debugstr_w(szFile), regkind, pptLib);
p=HEAP_strdupWtoA(GetProcessHeap(),0,szFile); p=HEAP_strdupWtoA(GetProcessHeap(),0,szFile);
if(regkind != REGKIND_NONE) if(regkind != REGKIND_NONE)
FIXME_(typelib) ("registration of typelibs not supported yet!\n"); FIXME ("registration of typelibs not supported yet!\n");
res= TLB_ReadTypeLib(p, pptLib); res= TLB_ReadTypeLib(p, pptLib);
/* XXX need to free p ?? */ /* XXX need to free p ?? */
TRACE_(typelib)(" returns %ld\n",res); TRACE(" returns %ld\n",res);
return res; return res;
} }
@ -215,8 +215,8 @@ HRESULT WINAPI LoadRegTypeLib(
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)rguid,xriid); WINE_StringFromCLSID((LPCLSID)rguid,xriid);
TRACE_(typelib)("(IID: %s) load %s (%p)\n",xriid, TRACE("(IID: %s) load %s (%p)\n",xriid,
SUCCEEDED(res)? "SUCCESS":"FAILED", *ppTLib); SUCCEEDED(res)? "SUCCESS":"FAILED", *ppTLib);
} }
return res; return res;
} }
@ -239,7 +239,7 @@ HRESULT WINAPI RegisterTypeLib(
OLECHAR * szFullPath, /*[in] full Path of the library*/ OLECHAR * szFullPath, /*[in] full Path of the library*/
OLECHAR * szHelpDir) /*[in] dir to the helpfile for the library, OLECHAR * szHelpDir) /*[in] dir to the helpfile for the library,
may be NULL*/ may be NULL*/
{ FIXME_(ole)("(%p,%s,%s): stub\n",ptlib, debugstr_w(szFullPath),debugstr_w(szHelpDir)); { FIXME("(%p,%s,%s): stub\n",ptlib, debugstr_w(szFullPath),debugstr_w(szHelpDir));
return S_OK; /* FIXME: pretend everything is OK */ return S_OK; /* FIXME: pretend everything is OK */
} }
@ -262,7 +262,7 @@ HRESULT WINAPI UnRegisterTypeLib(
{ {
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)libid,xriid); WINE_StringFromCLSID((LPCLSID)libid,xriid);
TRACE_(typelib)("(IID: %s): stub\n",xriid); TRACE("(IID: %s): stub\n",xriid);
return S_OK; /* FIXME: pretend everything is OK */ return S_OK; /* FIXME: pretend everything is OK */
} }
@ -526,7 +526,7 @@ static void * TLB_Alloc(unsigned size)
void * ret; void * ret;
if((ret=HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,size))==NULL){ if((ret=HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,size))==NULL){
/* FIXME */ /* FIXME */
ERR_(ole)("cannot allocate memory\n"); ERR("cannot allocate memory\n");
} }
return ret; return ret;
} }
@ -544,7 +544,7 @@ static BSTR TLB_DupAtoBstr(PCHAR Astr)
pdw[0]=(len)*sizeof(OLECHAR); pdw[0]=(len)*sizeof(OLECHAR);
bstr=(BSTR)&( pdw[1]); bstr=(BSTR)&( pdw[1]);
lstrcpyAtoW( bstr, Astr); lstrcpyAtoW( bstr, Astr);
TRACE_(typelib)("copying %s to (%p)\n", Astr, bstr); TRACE("copying %s to (%p)\n", Astr, bstr);
return bstr; return bstr;
} }
@ -564,7 +564,7 @@ DWORD TLB_Read(void *buffer, DWORD count, TLBContext *pcx, long where )
!ReadFile(pcx->hFile, buffer, count, &bytesread, NULL) !ReadFile(pcx->hFile, buffer, count, &bytesread, NULL)
) { ) {
/* FIXME */ /* FIXME */
ERR_(typelib)("read error is 0x%lx reading %ld bytes at 0x%lx\n", ERR("read error is 0x%lx reading %ld bytes at 0x%lx\n",
GetLastError(), count, where); GetLastError(), count, where);
TLB_abort(); TLB_abort();
exit(1); exit(1);
@ -676,7 +676,7 @@ static void TLB_ReadValue( VARIANT * pVar, int offset, TLBContext *pcx )
case VT_CLSID : case VT_CLSID :
default: default:
size=0; size=0;
FIXME_(ole)("VARTYPE %d is not supported, setting pointer to NULL\n", FIXME("VARTYPE %d is not supported, setting pointer to NULL\n",
pVar->vt); pVar->vt);
} }
@ -915,7 +915,7 @@ static void TLB_DoRefType(TLBContext *pcx,
(*pprtd)->pImpTLInfo=pImpLib; (*pprtd)->pImpTLInfo=pImpLib;
TLB_ReadGuid(&(*pprtd)->guid, impinfo.oGuid, pcx); TLB_ReadGuid(&(*pprtd)->guid, impinfo.oGuid, pcx);
}else{ }else{
ERR_(typelib)("Cannot find a reference\n"); ERR("Cannot find a reference\n");
(*pprtd)->reference=-1; (*pprtd)->reference=-1;
(*pprtd)->pImpTLInfo=(void *)-1; (*pprtd)->pImpTLInfo=(void *)-1;
} }
@ -983,7 +983,7 @@ TLBTypeInfo * TLB_DoTypeInfo(TLBContext *pcx, int count, TLBLibInfo* pLibInfo)
/* name, eventually add to a hash table */ /* name, eventually add to a hash table */
ptiRet->Name=TLB_ReadName(pcx, tiBase.NameOffset); ptiRet->Name=TLB_ReadName(pcx, tiBase.NameOffset);
TRACE_(typelib)("reading %s\n", ptiRet->Name); TRACE("reading %s\n", ptiRet->Name);
/* help info */ /* help info */
ptiRet->DocString=TLB_ReadString(pcx, tiBase.docstringoffs); ptiRet->DocString=TLB_ReadString(pcx, tiBase.docstringoffs);
ptiRet->dwHelpStringContext=tiBase.helpstringcontext; ptiRet->dwHelpStringContext=tiBase.helpstringcontext;
@ -1052,9 +1052,9 @@ long TLB_FindTlb(TLBContext *pcx)
LOOK_FOR_MAGIC(TLBMAGIC1); LOOK_FOR_MAGIC(TLBMAGIC1);
if(count) if(count)
ERR_(ole)("type library format not (yet) implemented\n"); ERR("type library format not (yet) implemented\n");
else else
ERR_(ole)("not type library found in this file\n"); ERR("not type library found in this file\n");
return -1; return -1;
} }
#undef LOOK_FOR_MAGIC #undef LOOK_FOR_MAGIC
@ -1068,16 +1068,16 @@ int TLB_ReadTypeLib(PCHAR file, ITypeLib **ppTypeLib)
TLB2Header tlbHeader; TLB2Header tlbHeader;
TLBSegDir tlbSegDir; TLBSegDir tlbSegDir;
if((cx.hFile=OpenFile(file, &ofStruct, OF_READWRITE))==HFILE_ERROR) { if((cx.hFile=OpenFile(file, &ofStruct, OF_READWRITE))==HFILE_ERROR) {
ERR_(typelib)("cannot open %s error 0x%lx\n",file, GetLastError()); ERR("cannot open %s error 0x%lx\n",file, GetLastError());
return E_FAIL; return E_FAIL;
} }
/* get pointer to beginning of typelib data */ /* get pointer to beginning of typelib data */
cx.oStart=0; cx.oStart=0;
if((oStart=TLB_FindTlb(&cx))<0){ if((oStart=TLB_FindTlb(&cx))<0){
if(oStart==-1) if(oStart==-1)
ERR_(typelib)("cannot locate typelib in %s\n",file); ERR("cannot locate typelib in %s\n",file);
else else
ERR_(typelib)("unsupported typelib format in %s\n",file); ERR("unsupported typelib format in %s\n",file);
return E_FAIL; return E_FAIL;
} }
cx.oStart=oStart; cx.oStart=oStart;
@ -1104,7 +1104,7 @@ int TLB_ReadTypeLib(PCHAR file, ITypeLib **ppTypeLib)
if ( tlbSegDir.pTypeInfoTab.res0c != 0x0F || if ( tlbSegDir.pTypeInfoTab.res0c != 0x0F ||
tlbSegDir.pImpInfo.res0c != 0x0F tlbSegDir.pImpInfo.res0c != 0x0F
) { ) {
ERR_(typelib)("cannot find the table directory, ptr=0x%lx\n",lPSegDir); ERR("cannot find the table directory, ptr=0x%lx\n",lPSegDir);
CloseHandle(cx.hFile); CloseHandle(cx.hFile);
return E_FAIL; return E_FAIL;
} }
@ -1180,7 +1180,7 @@ int TLB_ReadTypeLib(PCHAR file, ITypeLib **ppTypeLib)
} }
}else{ }else{
V_UNION(&(pLibInfo->pTypeDesc[i]),lpadesc)=NULL; V_UNION(&(pLibInfo->pTypeDesc[i]),lpadesc)=NULL;
ERR_(ole)("didn't find array description data\n"); ERR("didn't find array description data\n");
} }
} }
} }
@ -1232,7 +1232,7 @@ static HRESULT WINAPI ITypeLib_fnQueryInterface( LPTYPELIB This, REFIID riid,
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)riid,xriid); WINE_StringFromCLSID((LPCLSID)riid,xriid);
TRACE_(typelib)("(%p)->(IID: %s)\n",This,xriid); TRACE("(%p)->(IID: %s)\n",This,xriid);
} }
*ppvObject=NULL; *ppvObject=NULL;
if(IsEqualIID(riid, &IID_IUnknown) || if(IsEqualIID(riid, &IID_IUnknown) ||
@ -1241,10 +1241,10 @@ static HRESULT WINAPI ITypeLib_fnQueryInterface( LPTYPELIB This, REFIID riid,
*ppvObject = This; *ppvObject = This;
if(*ppvObject){ if(*ppvObject){
ITypeLib_AddRef(This); ITypeLib_AddRef(This);
TRACE_(typelib)("-- Interface: (%p)->(%p)\n",ppvObject,*ppvObject); TRACE("-- Interface: (%p)->(%p)\n",ppvObject,*ppvObject);
return S_OK; return S_OK;
} }
TRACE_(typelib)("-- Interface: E_NOINTERFACE\n"); TRACE("-- Interface: E_NOINTERFACE\n");
return E_NOINTERFACE; return E_NOINTERFACE;
} }
@ -1253,7 +1253,7 @@ static HRESULT WINAPI ITypeLib_fnQueryInterface( LPTYPELIB This, REFIID riid,
static ULONG WINAPI ITypeLib_fnAddRef( LPTYPELIB iface) static ULONG WINAPI ITypeLib_fnAddRef( LPTYPELIB iface)
{ {
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
TRACE_(typelib)("(%p)->ref is %u\n",This, This->ref); TRACE("(%p)->ref is %u\n",This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
@ -1262,7 +1262,7 @@ static ULONG WINAPI ITypeLib_fnAddRef( LPTYPELIB iface)
static ULONG WINAPI ITypeLib_fnRelease( LPTYPELIB iface) static ULONG WINAPI ITypeLib_fnRelease( LPTYPELIB iface)
{ {
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
FIXME_(typelib)("(%p)->ref is %u: stub\n",This, This->ref); FIXME("(%p)->ref is %u: stub\n",This, This->ref);
(This->ref)--; (This->ref)--;
return S_OK; return S_OK;
} }
@ -1274,7 +1274,7 @@ static ULONG WINAPI ITypeLib_fnRelease( LPTYPELIB iface)
static UINT WINAPI ITypeLib_fnGetTypeInfoCount( LPTYPELIB iface) static UINT WINAPI ITypeLib_fnGetTypeInfoCount( LPTYPELIB iface)
{ {
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
TRACE_(typelib)("(%p)->count is %d\n",This, This->TypeInfoCount); TRACE("(%p)->count is %d\n",This, This->TypeInfoCount);
return This->TypeInfoCount; return This->TypeInfoCount;
} }
@ -1288,15 +1288,15 @@ static HRESULT WINAPI ITypeLib_fnGetTypeInfo( LPTYPELIB iface, UINT index,
int i; int i;
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
TLBTypeInfo **ppTLBTInfo=(TLBTypeInfo **)ppTInfo; TLBTypeInfo **ppTLBTInfo=(TLBTypeInfo **)ppTInfo;
TRACE_(typelib)("(%p) index %d \n",This, index); TRACE("(%p) index %d \n",This, index);
for(i=0,*ppTLBTInfo=This->pTypeInfo;*ppTLBTInfo && i != index;i++) for(i=0,*ppTLBTInfo=This->pTypeInfo;*ppTLBTInfo && i != index;i++)
*ppTLBTInfo=(*ppTLBTInfo)->next; *ppTLBTInfo=(*ppTLBTInfo)->next;
if(*ppTLBTInfo){ if(*ppTLBTInfo){
(*ppTLBTInfo)->lpvtbl->fnAddRef(*ppTInfo); (*ppTLBTInfo)->lpvtbl->fnAddRef(*ppTInfo);
TRACE_(typelib)("-- found (%p)->(%p)\n",ppTLBTInfo,*ppTLBTInfo); TRACE("-- found (%p)->(%p)\n",ppTLBTInfo,*ppTLBTInfo);
return S_OK; return S_OK;
} }
TRACE_(typelib)("-- element not found\n"); TRACE("-- element not found\n");
return TYPE_E_ELEMENTNOTFOUND; return TYPE_E_ELEMENTNOTFOUND;
} }
@ -1310,15 +1310,15 @@ static HRESULT WINAPI ITypeLib_fnGetTypeInfoType( LPTYPELIB iface, UINT index,
int i; int i;
TLBTypeInfo *pTInfo; TLBTypeInfo *pTInfo;
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
TRACE_(typelib)("(%p) index %d \n",This, index); TRACE("(%p) index %d \n",This, index);
for(i=0,pTInfo=This->pTypeInfo;pTInfo && i != index;i++) for(i=0,pTInfo=This->pTypeInfo;pTInfo && i != index;i++)
pTInfo=(pTInfo)->next; pTInfo=(pTInfo)->next;
if(pTInfo){ if(pTInfo){
*pTKind=pTInfo->TypeAttr.typekind; *pTKind=pTInfo->TypeAttr.typekind;
TRACE_(typelib)("-- found Type (%p)->%d\n",pTKind,*pTKind); TRACE("-- found Type (%p)->%d\n",pTKind,*pTKind);
return S_OK; return S_OK;
} }
TRACE_(typelib)("-- element not found\n"); TRACE("-- element not found\n");
return TYPE_E_ELEMENTNOTFOUND; return TYPE_E_ELEMENTNOTFOUND;
} }
@ -1336,17 +1336,17 @@ static HRESULT WINAPI ITypeLib_fnGetTypeInfoOfGuid( LPTYPELIB iface,
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid); WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE_(typelib)("(%p) guid %sx)\n",This,xriid); TRACE("(%p) guid %sx)\n",This,xriid);
} }
for(i=0,*ppTLBTInfo=This->pTypeInfo;*ppTLBTInfo && for(i=0,*ppTLBTInfo=This->pTypeInfo;*ppTLBTInfo &&
!IsEqualIID(guid,&(*ppTLBTInfo)->TypeAttr.guid);i++) !IsEqualIID(guid,&(*ppTLBTInfo)->TypeAttr.guid);i++)
*ppTLBTInfo=(*ppTLBTInfo)->next; *ppTLBTInfo=(*ppTLBTInfo)->next;
if(*ppTLBTInfo){ if(*ppTLBTInfo){
(*ppTLBTInfo)->lpvtbl->fnAddRef(*ppTInfo); (*ppTLBTInfo)->lpvtbl->fnAddRef(*ppTInfo);
TRACE_(typelib)("-- found (%p)->(%p)\n",ppTLBTInfo,*ppTLBTInfo); TRACE("-- found (%p)->(%p)\n",ppTLBTInfo,*ppTLBTInfo);
return S_OK; return S_OK;
} }
TRACE_(typelib)("-- element not found\n"); TRACE("-- element not found\n");
return TYPE_E_ELEMENTNOTFOUND; return TYPE_E_ELEMENTNOTFOUND;
} }
@ -1359,7 +1359,7 @@ static HRESULT WINAPI ITypeLib_fnGetLibAttr( LPTYPELIB iface,
LPTLIBATTR *ppTLibAttr) LPTLIBATTR *ppTLibAttr)
{ {
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
TRACE_(typelib)("(%p)\n",This); TRACE("(%p)\n",This);
/* FIXME: must do a copy here */ /* FIXME: must do a copy here */
*ppTLibAttr=&This->LibAttr; *ppTLibAttr=&This->LibAttr;
return S_OK; return S_OK;
@ -1375,7 +1375,7 @@ static HRESULT WINAPI ITypeLib_fnGetTypeComp( LPTYPELIB iface,
ITypeComp **ppTComp) ITypeComp **ppTComp)
{ {
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
FIXME_(typelib)("(%p): stub!\n",This); FIXME("(%p): stub!\n",This);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -1393,7 +1393,7 @@ static HRESULT WINAPI ITypeLib_fnGetDocumentation( LPTYPELIB iface, INT index,
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
HRESULT result; HRESULT result;
ITypeInfo *pTInfo; ITypeInfo *pTInfo;
TRACE_(typelib)("(%p) index %d Name(%p) DocString(%p)" TRACE("(%p) index %d Name(%p) DocString(%p)"
" HelpContext(%p) HelpFile(%p)\n", " HelpContext(%p) HelpFile(%p)\n",
This, index, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile); This, index, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
if(index<0){ /* documentation for the typelib */ if(index<0){ /* documentation for the typelib */
@ -1450,8 +1450,8 @@ static HRESULT WINAPI ITypeLib_fnIsName( LPTYPELIB iface, LPOLESTR szNameBuf,
*pfName=FALSE; *pfName=FALSE;
ITypeLib_fnIsName_exit: ITypeLib_fnIsName_exit:
TRACE_(typelib)("(%p)slow! search for %s: %s found!\n", This, TRACE("(%p)slow! search for %s: %s found!\n", This,
debugstr_a(astr), *pfName?"NOT":""); debugstr_a(astr), *pfName?"NOT":"");
HeapFree( GetProcessHeap(), 0, astr ); HeapFree( GetProcessHeap(), 0, astr );
return S_OK; return S_OK;
@ -1488,8 +1488,8 @@ ITypeLib_fnFindName_exit:
ppTInfo[j]=(LPTYPEINFO)pTInfo; ppTInfo[j]=(LPTYPEINFO)pTInfo;
j++; j++;
} }
TRACE_(typelib)("(%p)slow! search for %d with %s: found %d TypeInfo's!\n", TRACE("(%p)slow! search for %d with %s: found %d TypeInfo's!\n",
This, *pcFound, debugstr_a(astr), j); This, *pcFound, debugstr_a(astr), j);
*pcFound=j; *pcFound=j;
@ -1505,7 +1505,7 @@ ITypeLib_fnFindName_exit:
static VOID WINAPI ITypeLib_fnReleaseTLibAttr( LPTYPELIB iface, TLIBATTR *pTLibAttr) static VOID WINAPI ITypeLib_fnReleaseTLibAttr( LPTYPELIB iface, TLIBATTR *pTLibAttr)
{ {
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
TRACE_(typelib)("freeing (%p)\n",This); TRACE("freeing (%p)\n",This);
/* nothing to do */ /* nothing to do */
} }
@ -1523,8 +1523,7 @@ static HRESULT WINAPI ITypeLib2_fnGetCustData( ITypeLib * iface, REFGUID guid,
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid); WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE_(typelib)("(%p) guid %s %s found!x)\n",This,xriid, TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
pCData? "" : "NOT");
} }
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
@ -1544,7 +1543,7 @@ static HRESULT WINAPI ITypeLib2_fnGetLibStatistics( ITypeLib * iface,
UINT *pcUniqueNames, UINT *pcchUniqueNames) UINT *pcUniqueNames, UINT *pcchUniqueNames)
{ {
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
FIXME_(typelib)("(%p): stub!\n", This); FIXME("(%p): stub!\n", This);
if(pcUniqueNames) *pcUniqueNames=1; if(pcUniqueNames) *pcUniqueNames=1;
if(pcchUniqueNames) *pcchUniqueNames=1; if(pcchUniqueNames) *pcchUniqueNames=1;
return S_OK; return S_OK;
@ -1564,7 +1563,7 @@ static HRESULT WINAPI ITypeLib2_fnGetDocumentation2( ITypeLib * iface,
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
HRESULT result; HRESULT result;
ITypeInfo *pTInfo; ITypeInfo *pTInfo;
FIXME_(typelib)("(%p) index %d lcid %ld half implemented stub!\n", This, FIXME("(%p) index %d lcid %ld half implemented stub!\n", This,
index, lcid); index, lcid);
/* the help string should be obtained from the helpstringdll, /* the help string should be obtained from the helpstringdll,
* using the _DLLGetDocumentation function, based on the supplied * using the _DLLGetDocumentation function, based on the supplied
@ -1601,7 +1600,7 @@ static HRESULT WINAPI ITypeLib2_fnGetAllCustData( ITypeLib * iface,
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
TLBCustData *pCData; TLBCustData *pCData;
int i; int i;
TRACE_(typelib)("(%p) returning %d items\n", This, This->ctCustData); TRACE("(%p) returning %d items\n", This, This->ctCustData);
pCustData->prgCustData = TLB_Alloc(This->ctCustData * sizeof(CUSTDATAITEM)); pCustData->prgCustData = TLB_Alloc(This->ctCustData * sizeof(CUSTDATAITEM));
if(pCustData->prgCustData ){ if(pCustData->prgCustData ){
pCustData->cCustData=This->ctCustData; pCustData->cCustData=This->ctCustData;
@ -1610,7 +1609,7 @@ static HRESULT WINAPI ITypeLib2_fnGetAllCustData( ITypeLib * iface,
VariantCopy(& pCustData->prgCustData[i].varValue, & pCData->data); VariantCopy(& pCustData->prgCustData[i].varValue, & pCData->data);
} }
}else{ }else{
ERR_(typelib)(" OUT OF MEMORY! \n"); ERR(" OUT OF MEMORY! \n");
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
return S_OK; return S_OK;
@ -1628,7 +1627,7 @@ static HRESULT WINAPI ITypeInfo_fnQueryInterface( LPTYPEINFO iface, REFIID riid,
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)riid,xriid); WINE_StringFromCLSID((LPCLSID)riid,xriid);
TRACE_(typelib)("(%p)->(IID: %s)\n",This,xriid); TRACE("(%p)->(IID: %s)\n",This,xriid);
} }
*ppvObject=NULL; *ppvObject=NULL;
if(IsEqualIID(riid, &IID_IUnknown) || if(IsEqualIID(riid, &IID_IUnknown) ||
@ -1637,10 +1636,10 @@ static HRESULT WINAPI ITypeInfo_fnQueryInterface( LPTYPEINFO iface, REFIID riid,
*ppvObject = This; *ppvObject = This;
if(*ppvObject){ if(*ppvObject){
ITypeInfo_AddRef(iface); ITypeInfo_AddRef(iface);
TRACE_(typelib)("-- Interface: (%p)->(%p)\n",ppvObject,*ppvObject); TRACE("-- Interface: (%p)->(%p)\n",ppvObject,*ppvObject);
return S_OK; return S_OK;
} }
TRACE_(typelib)("-- Interface: E_NOINTERFACE\n"); TRACE("-- Interface: E_NOINTERFACE\n");
return E_NOINTERFACE; return E_NOINTERFACE;
} }
@ -1649,7 +1648,7 @@ static HRESULT WINAPI ITypeInfo_fnQueryInterface( LPTYPEINFO iface, REFIID riid,
static ULONG WINAPI ITypeInfo_fnAddRef( LPTYPEINFO iface) static ULONG WINAPI ITypeInfo_fnAddRef( LPTYPEINFO iface)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
TRACE_(typelib)("(%p)->ref is %u\n",This, This->ref); TRACE("(%p)->ref is %u\n",This, This->ref);
(This->pTypeLib->ref)++; (This->pTypeLib->ref)++;
return ++(This->ref); return ++(This->ref);
} }
@ -1659,7 +1658,7 @@ static ULONG WINAPI ITypeInfo_fnAddRef( LPTYPEINFO iface)
static ULONG WINAPI ITypeInfo_fnRelease( LPTYPEINFO iface) static ULONG WINAPI ITypeInfo_fnRelease( LPTYPEINFO iface)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
FIXME_(typelib)("(%p)->ref is %u: stub\n",This, This->ref); FIXME("(%p)->ref is %u: stub\n",This, This->ref);
(This->ref)--; (This->ref)--;
(This->pTypeLib->ref)--; (This->pTypeLib->ref)--;
return S_OK; return S_OK;
@ -1675,7 +1674,7 @@ static HRESULT WINAPI ITypeInfo_fnGetTypeAttr( LPTYPEINFO iface,
LPTYPEATTR *ppTypeAttr) LPTYPEATTR *ppTypeAttr)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
TRACE_(typelib)("(%p)\n",This); TRACE("(%p)\n",This);
/* FIXME: must do a copy here */ /* FIXME: must do a copy here */
*ppTypeAttr=&This->TypeAttr; *ppTypeAttr=&This->TypeAttr;
return S_OK; return S_OK;
@ -1691,7 +1690,7 @@ static HRESULT WINAPI ITypeInfo_fnGetTypeComp( LPTYPEINFO iface,
ITypeComp * *ppTComp) ITypeComp * *ppTComp)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
FIXME_(typelib)("(%p) stub!\n", This); FIXME("(%p) stub!\n", This);
return S_OK; return S_OK;
} }
@ -1707,7 +1706,7 @@ static HRESULT WINAPI ITypeInfo_fnGetFuncDesc( LPTYPEINFO iface, UINT index,
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
int i; int i;
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
TRACE_(typelib)("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++, pFDesc=pFDesc->next) for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++, pFDesc=pFDesc->next)
; ;
if(pFDesc){ if(pFDesc){
@ -1729,7 +1728,7 @@ static HRESULT WINAPI ITypeInfo_fnGetVarDesc( LPTYPEINFO iface, UINT index,
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
int i; int i;
TLBVarDesc * pVDesc; TLBVarDesc * pVDesc;
TRACE_(typelib)("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++, pVDesc=pVDesc->next) for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++, pVDesc=pVDesc->next)
; ;
if(pVDesc){ if(pVDesc){
@ -1753,7 +1752,7 @@ static HRESULT WINAPI ITypeInfo_fnGetNames( LPTYPEINFO iface, MEMBERID memid,
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
TLBVarDesc * pVDesc; TLBVarDesc * pVDesc;
int i; int i;
TRACE_(typelib)("(%p) memid=0x%08lx Maxname=%d\n", This, memid, TRACE("(%p) memid=0x%08lx Maxname=%d\n", This, memid,
cMaxNames); cMaxNames);
for(pFDesc=This->funclist; pFDesc->funcdesc.memid != memid && pFDesc; for(pFDesc=This->funclist; pFDesc->funcdesc.memid != memid && pFDesc;
pFDesc=pFDesc->next) pFDesc=pFDesc->next)
@ -1788,9 +1787,9 @@ static HRESULT WINAPI ITypeInfo_fnGetNames( LPTYPEINFO iface, MEMBERID memid,
ITypeInfo_Release(pTInfo); ITypeInfo_Release(pTInfo);
return result; return result;
} }
WARN_(typelib)("Could not search inherited interface!\n"); WARN("Could not search inherited interface!\n");
} else } else
WARN_(typelib)("no names found\n"); WARN("no names found\n");
*pcNames=0; *pcNames=0;
return TYPE_E_ELEMENTNOTFOUND; return TYPE_E_ELEMENTNOTFOUND;
} }
@ -1813,7 +1812,7 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeOfImplType( LPTYPEINFO iface,
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
int(i); int(i);
TLBRefType *pIref; TLBRefType *pIref;
TRACE_(typelib)("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pIref=This->impltypelist; i<index && pIref; for(i=0, pIref=This->impltypelist; i<index && pIref;
i++, pIref=pIref->next) i++, pIref=pIref->next)
; ;
@ -1835,7 +1834,7 @@ static HRESULT WINAPI ITypeInfo_fnGetImplTypeFlags( LPTYPEINFO iface,
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
int(i); int(i);
TLBRefType *pIref; TLBRefType *pIref;
TRACE_(typelib)("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pIref=This->impltypelist; i<index && pIref; i++, pIref=pIref->next) for(i=0, pIref=This->impltypelist; i<index && pIref; i++, pIref=pIref->next)
; ;
if(i==index && pIref){ if(i==index && pIref){
@ -1858,7 +1857,7 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( LPTYPEINFO iface,
TLBVarDesc * pVDesc; TLBVarDesc * pVDesc;
HRESULT ret=S_OK; HRESULT ret=S_OK;
PCHAR aszName= HEAP_strdupWtoA( GetProcessHeap(), 0, *rgszNames); PCHAR aszName= HEAP_strdupWtoA( GetProcessHeap(), 0, *rgszNames);
TRACE_(typelib)("(%p) Name %s cNames %d\n", This, debugstr_a(aszName), TRACE("(%p) Name %s cNames %d\n", This, debugstr_a(aszName),
cNames); cNames);
for(pFDesc=This->funclist; pFDesc; pFDesc=pFDesc->next) { for(pFDesc=This->funclist; pFDesc; pFDesc=pFDesc->next) {
int i, j; int i, j;
@ -1899,9 +1898,9 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( LPTYPEINFO iface,
ITypeInfo_Release(pTInfo); ITypeInfo_Release(pTInfo);
return ret; return ret;
} }
WARN_(typelib)("Could not search inherited interface!\n"); WARN("Could not search inherited interface!\n");
} else } else
WARN_(typelib)("no names found\n"); WARN("no names found\n");
return DISP_E_UNKNOWNNAME; return DISP_E_UNKNOWNNAME;
} }
@ -1915,7 +1914,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( LPTYPEINFO iface, VOID *pIUnk,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *pArgErr) VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *pArgErr)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
FIXME_(typelib)("(%p) stub!", This); FIXME("(%p) stub!", This);
return S_OK; return S_OK;
} }
@ -1931,8 +1930,8 @@ static HRESULT WINAPI ITypeInfo_fnGetDocumentation( LPTYPEINFO iface,
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
TLBVarDesc * pVDesc; TLBVarDesc * pVDesc;
TRACE_(typelib)("(%p) memid %ld Name(%p) DocString(%p)" TRACE("(%p) memid %ld Name(%p) DocString(%p)"
" HelpContext(%p) HelpFile(%p)\n", " HelpContext(%p) HelpFile(%p)\n",
This, memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile); This, memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
if(memid==MEMBERID_NIL){ /* documentation for the typeinfo */ if(memid==MEMBERID_NIL){ /* documentation for the typeinfo */
if(pBstrName) if(pBstrName)
@ -1967,7 +1966,7 @@ static HRESULT WINAPI ITypeInfo_fnGetDllEntry( LPTYPEINFO iface, MEMBERID memid,
WORD *pwOrdinal) WORD *pwOrdinal)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
FIXME_(typelib)("(%p) stub!\n", This); FIXME("(%p) stub!\n", This);
return E_FAIL; return E_FAIL;
} }
@ -2021,8 +2020,8 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo( LPTYPEINFO iface,
} }
} }
} }
TRACE_(typelib)("(%p) hreftype 0x%04lx loaded %s (%p)\n", This, hRefType, TRACE("(%p) hreftype 0x%04lx loaded %s (%p)\n", This, hRefType,
SUCCEEDED(result)? "SUCCESS":"FAILURE", *ppTInfo); SUCCEEDED(result)? "SUCCESS":"FAILURE", *ppTInfo);
return result; return result;
} }
@ -2035,7 +2034,7 @@ static HRESULT WINAPI ITypeInfo_fnAddressOfMember( LPTYPEINFO iface,
MEMBERID memid, INVOKEKIND invKind, PVOID *ppv) MEMBERID memid, INVOKEKIND invKind, PVOID *ppv)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
FIXME_(typelib)("(%p) stub!\n", This); FIXME("(%p) stub!\n", This);
return S_OK; return S_OK;
} }
@ -2048,7 +2047,7 @@ static HRESULT WINAPI ITypeInfo_fnCreateInstance( LPTYPEINFO iface,
IUnknown *pUnk, REFIID riid, VOID **ppvObj) IUnknown *pUnk, REFIID riid, VOID **ppvObj)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
FIXME_(typelib)("(%p) stub!\n", This); FIXME("(%p) stub!\n", This);
return S_OK; return S_OK;
} }
@ -2060,7 +2059,7 @@ static HRESULT WINAPI ITypeInfo_fnGetMops( LPTYPEINFO iface, MEMBERID memid,
BSTR *pBstrMops) BSTR *pBstrMops)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
FIXME_(typelib)("(%p) stub!\n", This); FIXME("(%p) stub!\n", This);
return S_OK; return S_OK;
} }
@ -2076,7 +2075,7 @@ static HRESULT WINAPI ITypeInfo_fnGetContainingTypeLib( LPTYPEINFO iface,
*ppTLib=(LPTYPELIB )(This->pTypeLib); *ppTLib=(LPTYPELIB )(This->pTypeLib);
*pIndex=This->index; *pIndex=This->index;
ITypeLib_AddRef(*ppTLib); ITypeLib_AddRef(*ppTLib);
TRACE_(typelib)("(%p) returns (%p) index %d!\n", This, *ppTLib, *pIndex); TRACE("(%p) returns (%p) index %d!\n", This, *ppTLib, *pIndex);
return S_OK; return S_OK;
} }
@ -2089,7 +2088,7 @@ static HRESULT WINAPI ITypeInfo_fnReleaseTypeAttr( LPTYPEINFO iface,
TYPEATTR* pTypeAttr) TYPEATTR* pTypeAttr)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
TRACE_(typelib)("(%p)->(%p)\n", This, pTypeAttr); TRACE("(%p)->(%p)\n", This, pTypeAttr);
return S_OK; return S_OK;
} }
@ -2101,7 +2100,7 @@ static HRESULT WINAPI ITypeInfo_fnReleaseFuncDesc( LPTYPEINFO iface,
FUNCDESC *pFuncDesc) FUNCDESC *pFuncDesc)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
TRACE_(typelib)("(%p)->(%p)\n", This, pFuncDesc); TRACE("(%p)->(%p)\n", This, pFuncDesc);
return S_OK; return S_OK;
} }
@ -2113,7 +2112,7 @@ static HRESULT WINAPI ITypeInfo_fnReleaseVarDesc( LPTYPEINFO iface,
VARDESC *pVarDesc) VARDESC *pVarDesc)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
TRACE_(typelib)("(%p)->(%p)\n", This, pVarDesc); TRACE("(%p)->(%p)\n", This, pVarDesc);
return S_OK; return S_OK;
} }
@ -2127,7 +2126,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetTypeKind( ITypeInfo * iface,
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
*pTypeKind=This->TypeAttr.typekind; *pTypeKind=This->TypeAttr.typekind;
TRACE_(typelib)("(%p) type 0x%0x\n", This,*pTypeKind); TRACE("(%p) type 0x%0x\n", This,*pTypeKind);
return S_OK; return S_OK;
} }
@ -2143,7 +2142,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetTypeFlags( ITypeInfo * iface,
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
*pTypeFlags=This->TypeAttr.wTypeFlags; *pTypeFlags=This->TypeAttr.wTypeFlags;
TRACE_(typelib)("(%p) flags 0x%04x\n", This,*pTypeFlags); TRACE("(%p) flags 0x%04x\n", This,*pTypeFlags);
return S_OK; return S_OK;
} }
@ -2169,8 +2168,8 @@ static HRESULT WINAPI ITypeInfo2_fnGetFuncIndexOfMemId( ITypeInfo * iface,
*pFuncIndex=0; *pFuncIndex=0;
result=E_INVALIDARG; result=E_INVALIDARG;
} }
TRACE_(typelib)("(%p) memid 0x%08lx invKind 0x%04x -> %s\n", This, TRACE("(%p) memid 0x%08lx invKind 0x%04x -> %s\n", This,
memid, invKind, SUCCEEDED(result)? "SUCCES":"FAILED"); memid, invKind, SUCCEEDED(result)? "SUCCES":"FAILED");
return result; return result;
} }
@ -2197,8 +2196,8 @@ static HRESULT WINAPI ITypeInfo2_fnGetVarIndexOfMemId( ITypeInfo * iface,
*pVarIndex=0; *pVarIndex=0;
result=E_INVALIDARG; result=E_INVALIDARG;
} }
TRACE_(typelib)("(%p) memid 0x%08lx -> %s\n", This, TRACE("(%p) memid 0x%08lx -> %s\n", This,
memid, SUCCEEDED(result)? "SUCCES":"FAILED"); memid, SUCCEEDED(result)? "SUCCES":"FAILED");
return result; return result;
} }
@ -2216,8 +2215,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetCustData( ITypeInfo * iface,
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid); WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE_(typelib)("(%p) guid %s %s found!x)\n", This, xriid, TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
pCData? "" : "NOT");
} }
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
@ -2247,8 +2245,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetFuncCustData( ITypeInfo * iface,
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid); WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE_(typelib)("(%p) guid %s %s found!x)\n",This,xriid, TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
pCData? "" : "NOT");
} }
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
@ -2279,8 +2276,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetParamCustData( ITypeInfo * iface,
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid); WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE_(typelib)("(%p) guid %s %s found!x)\n",This,xriid, TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
pCData? "" : "NOT");
} }
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
@ -2310,8 +2306,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetVarCustData( ITypeInfo * iface,
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid); WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE_(typelib)("(%p) guid %s %s found!x)\n",This,xriid, TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
pCData? "" : "NOT");
} }
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
@ -2341,8 +2336,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetImplTypeCustData( ITypeInfo * iface,
if(TRACE_ON(typelib)){ if(TRACE_ON(typelib)){
char xriid[50]; char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid); WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE_(typelib)("(%p) guid %s %s found!x)\n",This,xriid, TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
pCData? "" : "NOT");
} }
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
@ -2366,10 +2360,10 @@ static HRESULT WINAPI ITypeInfo2_fnGetDocumentation2( ITypeInfo * iface,
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
TLBVarDesc * pVDesc; TLBVarDesc * pVDesc;
TRACE_(typelib)("(%p) memid %ld lcid(0x%lx) HelpString(%p) " TRACE("(%p) memid %ld lcid(0x%lx) HelpString(%p) "
"HelpStringContext(%p) HelpStringDll(%p)\n", "HelpStringContext(%p) HelpStringDll(%p)\n",
This, memid, lcid, pbstrHelpString, pdwHelpStringContext, This, memid, lcid, pbstrHelpString, pdwHelpStringContext,
pbstrHelpStringDll ); pbstrHelpStringDll );
/* the help string should be obtained from the helpstringdll, /* the help string should be obtained from the helpstringdll,
* using the _DLLGetDocumentation function, based on the supplied * using the _DLLGetDocumentation function, based on the supplied
* lcid. Nice to do sometime... * lcid. Nice to do sometime...
@ -2421,7 +2415,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllCustData( ITypeInfo * iface,
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
TLBCustData *pCData; TLBCustData *pCData;
int i; int i;
TRACE_(typelib)("(%p) returning %d items\n", This, This->ctCustData); TRACE("(%p) returning %d items\n", This, This->ctCustData);
pCustData->prgCustData = TLB_Alloc(This->ctCustData * sizeof(CUSTDATAITEM)); pCustData->prgCustData = TLB_Alloc(This->ctCustData * sizeof(CUSTDATAITEM));
if(pCustData->prgCustData ){ if(pCustData->prgCustData ){
pCustData->cCustData=This->ctCustData; pCustData->cCustData=This->ctCustData;
@ -2430,7 +2424,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllCustData( ITypeInfo * iface,
VariantCopy(& pCustData->prgCustData[i].varValue, & pCData->data); VariantCopy(& pCustData->prgCustData[i].varValue, & pCData->data);
} }
}else{ }else{
ERR_(typelib)(" OUT OF MEMORY! \n"); ERR(" OUT OF MEMORY! \n");
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
return S_OK; return S_OK;
@ -2448,7 +2442,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllFuncCustData( ITypeInfo * iface,
TLBCustData *pCData; TLBCustData *pCData;
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
int i; int i;
TRACE_(typelib)("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++, for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++,
pFDesc=pFDesc->next) pFDesc=pFDesc->next)
; ;
@ -2464,7 +2458,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllFuncCustData( ITypeInfo * iface,
& pCData->data); & pCData->data);
} }
}else{ }else{
ERR_(typelib)(" OUT OF MEMORY! \n"); ERR(" OUT OF MEMORY! \n");
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
return S_OK; return S_OK;
@ -2484,7 +2478,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllParamCustData( ITypeInfo * iface,
TLBCustData *pCData=NULL; TLBCustData *pCData=NULL;
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
int i; int i;
TRACE_(typelib)("(%p) index %d\n", This, indexFunc); TRACE("(%p) index %d\n", This, indexFunc);
for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++, for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++,
pFDesc=pFDesc->next) pFDesc=pFDesc->next)
; ;
@ -2501,7 +2495,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllParamCustData( ITypeInfo * iface,
& pCData->data); & pCData->data);
} }
}else{ }else{
ERR_(typelib)(" OUT OF MEMORY! \n"); ERR(" OUT OF MEMORY! \n");
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
return S_OK; return S_OK;
@ -2521,7 +2515,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllVarCustData( ITypeInfo * iface,
TLBCustData *pCData; TLBCustData *pCData;
TLBVarDesc * pVDesc; TLBVarDesc * pVDesc;
int i; int i;
TRACE_(typelib)("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++, for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++,
pVDesc=pVDesc->next) pVDesc=pVDesc->next)
; ;
@ -2537,7 +2531,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllVarCustData( ITypeInfo * iface,
& pCData->data); & pCData->data);
} }
}else{ }else{
ERR_(typelib)(" OUT OF MEMORY! \n"); ERR(" OUT OF MEMORY! \n");
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
return S_OK; return S_OK;
@ -2557,7 +2551,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllImplTypeCustData( ITypeInfo * iface,
TLBCustData *pCData; TLBCustData *pCData;
TLBRefType * pRDesc; TLBRefType * pRDesc;
int i; int i;
TRACE_(typelib)("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pRDesc=This->impltypelist; i!=index && pRDesc; i++, for(i=0, pRDesc=This->impltypelist; i!=index && pRDesc; i++,
pRDesc=pRDesc->next) pRDesc=pRDesc->next)
; ;
@ -2573,7 +2567,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllImplTypeCustData( ITypeInfo * iface,
& pCData->data); & pCData->data);
} }
}else{ }else{
ERR_(typelib)(" OUT OF MEMORY! \n"); ERR(" OUT OF MEMORY! \n");
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
return S_OK; return S_OK;

View File

@ -25,7 +25,7 @@
#include "pidl.h" #include "pidl.h"
#include "wine/undocshell.h" #include "wine/undocshell.h"
DECLARE_DEBUG_CHANNEL(pidl) DEFAULT_DEBUG_CHANNEL(pidl)
DECLARE_DEBUG_CHANNEL(shell) DECLARE_DEBUG_CHANNEL(shell)
void pdump (LPCITEMIDLIST pidl) void pdump (LPCITEMIDLIST pidl)
@ -125,7 +125,7 @@ BOOL pcheck (LPCITEMIDLIST pidl)
szTemp[i+BYTES_PRINTED*3] = (c>=0x20 && c <=0x80) ? c : '.'; szTemp[i+BYTES_PRINTED*3] = (c>=0x20 && c <=0x80) ? c : '.';
} }
szTemp[BYTES_PRINTED*4] = 0x00; szTemp[BYTES_PRINTED*4] = 0x00;
ERR_(pidl)("unknown IDLIST type size=%u type=%lx\n%s\n",pidltemp->mkid.cb,type, szTemp); ERR("unknown IDLIST type size=%u type=%lx\n%s\n",pidltemp->mkid.cb,type, szTemp);
ret = FALSE; ret = FALSE;
} }
} }
@ -153,7 +153,7 @@ BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl,LPSTR path)
LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl) LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl)
{ LPITEMIDLIST pidlLast = pidl; { LPITEMIDLIST pidlLast = pidl;
TRACE_(pidl)("(pidl=%p)\n",pidl); TRACE("(pidl=%p)\n",pidl);
while (pidl->mkid.cb) while (pidl->mkid.cb)
{ {
@ -196,7 +196,7 @@ LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl)
if (newpidl) if (newpidl)
memcpy(newpidl,pidl,len); memcpy(newpidl,pidl,len);
TRACE_(pidl)("pidl=%p newpidl=%p\n",pidl, newpidl); TRACE("pidl=%p newpidl=%p\n",pidl, newpidl);
pdump(pidl); pdump(pidl);
return newpidl; return newpidl;
@ -211,7 +211,7 @@ LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
{ DWORD len; { DWORD len;
LPITEMIDLIST pidlNew = NULL; LPITEMIDLIST pidlNew = NULL;
TRACE_(pidl)("pidl=%p \n",pidl); TRACE("pidl=%p \n",pidl);
pdump(pidl); pdump(pidl);
if (pidl) if (pidl)
@ -226,7 +226,7 @@ LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
ILGetNext(pidlNew)->mkid.cb = 0x00; ILGetNext(pidlNew)->mkid.cb = 0x00;
} }
} }
TRACE_(pidl)("-- newpidl=%p\n",pidlNew); TRACE("-- newpidl=%p\n",pidlNew);
return pidlNew; return pidlNew;
} }
@ -355,7 +355,7 @@ LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl)
if (newpidl) if (newpidl)
memcpy(newpidl,pidl,len); memcpy(newpidl,pidl,len);
TRACE_(pidl)("pidl=%p newpidl=%p\n",pidl, newpidl); TRACE("pidl=%p newpidl=%p\n",pidl, newpidl);
pdump(pidl); pdump(pidl);
return newpidl; return newpidl;
@ -373,7 +373,7 @@ BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
LPITEMIDLIST pidltemp1 = pidl1; LPITEMIDLIST pidltemp1 = pidl1;
LPITEMIDLIST pidltemp2 = pidl2; LPITEMIDLIST pidltemp2 = pidl2;
TRACE_(pidl)("pidl1=%p pidl2=%p\n",pidl1, pidl2); TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2);
/* explorer reads from registry directly (StreamMRU), /* explorer reads from registry directly (StreamMRU),
so we can only check here */ so we can only check here */
@ -418,7 +418,7 @@ BOOL WINAPI ILIsParent( LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL
LPITEMIDLIST pParent = pidlParent; LPITEMIDLIST pParent = pidlParent;
LPITEMIDLIST pChild = pidlChild; LPITEMIDLIST pChild = pidlChild;
TRACE_(pidl)("%p %p %x\n", pidlParent, pidlChild, bImmediate); TRACE("%p %p %x\n", pidlParent, pidlChild, bImmediate);
while (pParent->mkid.cb && pChild->mkid.cb) while (pParent->mkid.cb && pChild->mkid.cb)
{ {
@ -462,7 +462,7 @@ LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
LPITEMIDLIST pidltemp2 = pidl2; LPITEMIDLIST pidltemp2 = pidl2;
LPITEMIDLIST ret=NULL; LPITEMIDLIST ret=NULL;
TRACE_(pidl)("pidl1=%p pidl2=%p\n",pidl1, pidl2); TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2);
/* explorer reads from registry directly (StreamMRU), /* explorer reads from registry directly (StreamMRU),
so we can only check here */ so we can only check here */
@ -513,7 +513,7 @@ LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
DWORD len1,len2; DWORD len1,len2;
LPITEMIDLIST pidlNew; LPITEMIDLIST pidlNew;
TRACE_(pidl)("pidl=%p pidl=%p\n",pidl1,pidl2); TRACE("pidl=%p pidl=%p\n",pidl1,pidl2);
if(!pidl1 && !pidl2) return NULL; if(!pidl1 && !pidl2) return NULL;
@ -552,7 +552,7 @@ LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
*/ */
LPITEMIDLIST WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, DWORD z) LPITEMIDLIST WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, DWORD z)
{ {
FIXME_(pidl)("sf=%p pidl=%p 0x%04lx\n",lpsf,pidl,z); FIXME("sf=%p pidl=%p 0x%04lx\n",lpsf,pidl,z);
pdump (pidl); pdump (pidl);
return 0; return 0;
@ -567,7 +567,7 @@ LPITEMIDLIST WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, DWORD z)
*/ */
LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl) LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl)
{ {
FIXME_(pidl)("(pidl=%p)\n",pidl); FIXME("(pidl=%p)\n",pidl);
pdump(pidl); pdump(pidl);
@ -599,7 +599,7 @@ DWORD WINAPI ILGetSize(LPITEMIDLIST pidl)
} }
len += 2; len += 2;
} }
TRACE_(pidl)("pidl=%p size=%lu\n",pidl, len); TRACE("pidl=%p size=%lu\n",pidl, len);
return len; return len;
} }
@ -617,7 +617,7 @@ LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl)
{ {
WORD len; WORD len;
TRACE_(pidl)("(pidl=%p)\n",pidl); TRACE("(pidl=%p)\n",pidl);
if(pidl) if(pidl)
{ {
@ -643,7 +643,7 @@ LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL bEnd)
{ {
LPITEMIDLIST idlRet; LPITEMIDLIST idlRet;
WARN_(pidl)("(pidl=%p,pidl=%p,%08u)semi-stub\n",pidl,item,bEnd); WARN("(pidl=%p,pidl=%p,%08u)semi-stub\n",pidl,item,bEnd);
pdump (pidl); pdump (pidl);
pdump (item); pdump (item);
@ -677,7 +677,7 @@ LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL bEnd)
* exported by ordinal * exported by ordinal
*/ */
DWORD WINAPI ILFree(LPITEMIDLIST pidl) DWORD WINAPI ILFree(LPITEMIDLIST pidl)
{ TRACE_(pidl)("(pidl=0x%08lx)\n",(DWORD)pidl); { TRACE("(pidl=0x%08lx)\n",(DWORD)pidl);
if (!pidl) if (!pidl)
return FALSE; return FALSE;
@ -690,7 +690,7 @@ DWORD WINAPI ILFree(LPITEMIDLIST pidl)
*/ */
DWORD WINAPI ILGlobalFree( LPITEMIDLIST pidl) DWORD WINAPI ILGlobalFree( LPITEMIDLIST pidl)
{ {
TRACE_(pidl)("%p\n",pidl); TRACE("%p\n",pidl);
if (!pidl) if (!pidl)
return FALSE; return FALSE;
@ -738,7 +738,7 @@ LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPSTR lpszPath)
HANDLE hFile; HANDLE hFile;
WIN32_FIND_DATAA stffile; WIN32_FIND_DATAA stffile;
TRACE_(pidl)("path=%s\n", lpszPath); TRACE("path=%s\n", lpszPath);
if (!lpszPath) return NULL; if (!lpszPath) return NULL;
@ -761,7 +761,7 @@ LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPSTR lpszPath)
LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPWSTR lpszPath) LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPWSTR lpszPath)
{ {
char lpszTemp[MAX_PATH]; char lpszTemp[MAX_PATH];
TRACE_(pidl)("path=L%s\n",debugstr_w(lpszPath)); TRACE("path=L%s\n",debugstr_w(lpszPath));
WideCharToLocal(lpszTemp, lpszPath, MAX_PATH); WideCharToLocal(lpszTemp, lpszPath, MAX_PATH);
@ -1059,37 +1059,37 @@ BOOL WINAPI SHGetPathFromIDListAW(LPCITEMIDLIST pidl,LPVOID pszPath)
* _ILCreateValue() * _ILCreateValue()
*/ */
LPITEMIDLIST _ILCreateDesktop() LPITEMIDLIST _ILCreateDesktop()
{ TRACE_(pidl)("()\n"); { TRACE("()\n");
return _ILCreate(PT_DESKTOP, NULL, 0); return _ILCreate(PT_DESKTOP, NULL, 0);
} }
LPITEMIDLIST _ILCreateMyComputer() LPITEMIDLIST _ILCreateMyComputer()
{ TRACE_(pidl)("()\n"); { TRACE("()\n");
return _ILCreate(PT_MYCOMP, &CLSID_MyComputer, sizeof(GUID)); return _ILCreate(PT_MYCOMP, &CLSID_MyComputer, sizeof(GUID));
} }
LPITEMIDLIST _ILCreateIExplore() LPITEMIDLIST _ILCreateIExplore()
{ TRACE_(pidl)("()\n"); { TRACE("()\n");
return _ILCreate(PT_MYCOMP, &CLSID_Internet, sizeof(GUID)); return _ILCreate(PT_MYCOMP, &CLSID_Internet, sizeof(GUID));
} }
LPITEMIDLIST _ILCreateControl() LPITEMIDLIST _ILCreateControl()
{ TRACE_(pidl)("()\n"); { TRACE("()\n");
return _ILCreate(PT_SPECIAL, &CLSID_ControlPanel, sizeof(GUID)); return _ILCreate(PT_SPECIAL, &CLSID_ControlPanel, sizeof(GUID));
} }
LPITEMIDLIST _ILCreatePrinter() LPITEMIDLIST _ILCreatePrinter()
{ TRACE_(pidl)("()\n"); { TRACE("()\n");
return _ILCreate(PT_SPECIAL, &CLSID_Printers, sizeof(GUID)); return _ILCreate(PT_SPECIAL, &CLSID_Printers, sizeof(GUID));
} }
LPITEMIDLIST _ILCreateNetwork() LPITEMIDLIST _ILCreateNetwork()
{ TRACE_(pidl)("()\n"); { TRACE("()\n");
return _ILCreate(PT_MYCOMP, &CLSID_NetworkPlaces, sizeof(GUID)); return _ILCreate(PT_MYCOMP, &CLSID_NetworkPlaces, sizeof(GUID));
} }
LPITEMIDLIST _ILCreateBitBucket() LPITEMIDLIST _ILCreateBitBucket()
{ TRACE_(pidl)("()\n"); { TRACE("()\n");
return _ILCreate(PT_MYCOMP, &CLSID_RecycleBin, sizeof(GUID)); return _ILCreate(PT_MYCOMP, &CLSID_RecycleBin, sizeof(GUID));
} }
@ -1098,7 +1098,7 @@ LPITEMIDLIST _ILCreateDrive( LPCSTR lpszNew)
lstrcpynA (sTemp,lpszNew,4); lstrcpynA (sTemp,lpszNew,4);
sTemp[2]='\\'; sTemp[2]='\\';
sTemp[3]=0x00; sTemp[3]=0x00;
TRACE_(pidl)("(%s)\n",sTemp); TRACE("(%s)\n",sTemp);
return _ILCreate(PT_DRIVE,(LPVOID)&sTemp[0],4); return _ILCreate(PT_DRIVE,(LPVOID)&sTemp[0],4);
} }
@ -1109,7 +1109,7 @@ LPITEMIDLIST _ILCreateFolder( WIN32_FIND_DATAA * stffile )
ULONG len, len1; ULONG len, len1;
LPITEMIDLIST pidl; LPITEMIDLIST pidl;
TRACE_(pidl)("(%s, %s)\n",stffile->cAlternateFileName, stffile->cFileName); TRACE("(%s, %s)\n",stffile->cAlternateFileName, stffile->cFileName);
/* prepare buffer with both names */ /* prepare buffer with both names */
len = strlen (stffile->cFileName) + 1; len = strlen (stffile->cFileName) + 1;
@ -1149,7 +1149,7 @@ LPITEMIDLIST _ILCreateValue(WIN32_FIND_DATAA * stffile)
ULONG len, len1; ULONG len, len1;
LPITEMIDLIST pidl; LPITEMIDLIST pidl;
TRACE_(pidl)("(%s, %s)\n",stffile->cAlternateFileName, stffile->cFileName); TRACE("(%s, %s)\n",stffile->cAlternateFileName, stffile->cFileName);
/* prepare buffer with both names */ /* prepare buffer with both names */
len = strlen (stffile->cFileName) + 1; len = strlen (stffile->cFileName) + 1;
@ -1203,14 +1203,14 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
UINT16 uSize = 0; UINT16 uSize = 0;
LPSTR pszDest; LPSTR pszDest;
TRACE_(pidl)("(0x%02x %p %i)\n",type,pIn,uInSize); TRACE("(0x%02x %p %i)\n",type,pIn,uInSize);
switch (type) switch (type)
{ case PT_DESKTOP: { case PT_DESKTOP:
uSize = 0; uSize = 0;
pidlOut = SHAlloc(uSize + 2); pidlOut = SHAlloc(uSize + 2);
pidlOut->mkid.cb = uSize; pidlOut->mkid.cb = uSize;
TRACE_(pidl)("- create Desktop\n"); TRACE("- create Desktop\n");
break; break;
case PT_MYCOMP: case PT_MYCOMP:
@ -1221,7 +1221,7 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
pData =_ILGetDataPointer(pidlOut); pData =_ILGetDataPointer(pidlOut);
pData->type = type; pData->type = type;
memcpy(&(pData->u.mycomp.guid), pIn, uInSize); memcpy(&(pData->u.mycomp.guid), pIn, uInSize);
TRACE_(pidl)("- create GUID-pidl\n"); TRACE("- create GUID-pidl\n");
break; break;
case PT_DRIVE: case PT_DRIVE:
@ -1233,7 +1233,7 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
pData->type = type; pData->type = type;
pszDest = _ILGetTextPointer(pidlOut); pszDest = _ILGetTextPointer(pidlOut);
memcpy(pszDest, pIn, uInSize); memcpy(pszDest, pIn, uInSize);
TRACE_(pidl)("- create Drive: %s\n",debugstr_a(pszDest)); TRACE("- create Drive: %s\n",debugstr_a(pszDest));
break; break;
case PT_FOLDER: case PT_FOLDER:
@ -1246,7 +1246,7 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
pData->type = type; pData->type = type;
pszDest = _ILGetTextPointer(pidlOut); pszDest = _ILGetTextPointer(pidlOut);
memcpy(pszDest, pIn, uInSize); memcpy(pszDest, pIn, uInSize);
TRACE_(pidl)("- create Value: %s\n",debugstr_a(pszDest)); TRACE("- create Value: %s\n",debugstr_a(pszDest));
break; break;
} }
@ -1254,7 +1254,7 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
if (pidlTemp) if (pidlTemp)
pidlTemp->mkid.cb = 0x00; pidlTemp->mkid.cb = 0x00;
TRACE_(pidl)("-- (pidl=%p, size=%u)\n", pidlOut, uSize); TRACE("-- (pidl=%p, size=%u)\n", pidlOut, uSize);
return pidlOut; return pidlOut;
} }
@ -1267,7 +1267,7 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT16 uInSize)
* strlen (lpszText) * strlen (lpszText)
*/ */
DWORD _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT16 uSize) DWORD _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT16 uSize)
{ TRACE_(pidl)("(%p,%p,%u)\n",pidl,pOut,uSize); { TRACE("(%p,%p,%u)\n",pidl,pOut,uSize);
if(_ILIsMyComputer(pidl)) if(_ILIsMyComputer(pidl))
pidl = ILGetNext(pidl); pidl = ILGetNext(pidl);
@ -1292,7 +1292,7 @@ DWORD _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT16 uSize)
* _ILIsPidlSimple() * _ILIsPidlSimple()
*/ */
BOOL _ILIsDesktop(LPCITEMIDLIST pidl) BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
{ TRACE_(pidl)("(%p)\n",pidl); { TRACE("(%p)\n",pidl);
return ( !pidl || (pidl && pidl->mkid.cb == 0x00) ); return ( !pidl || (pidl && pidl->mkid.cb == 0x00) );
} }
@ -1300,7 +1300,7 @@ BOOL _ILIsMyComputer(LPCITEMIDLIST pidl)
{ {
REFIID iid = _ILGetGUIDPointer(pidl); REFIID iid = _ILGetGUIDPointer(pidl);
TRACE_(pidl)("(%p)\n",pidl); TRACE("(%p)\n",pidl);
if (iid) if (iid)
return IsEqualIID(iid, &CLSID_MyComputer); return IsEqualIID(iid, &CLSID_MyComputer);
@ -1310,7 +1310,7 @@ BOOL _ILIsMyComputer(LPCITEMIDLIST pidl)
BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl) BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl)
{ {
LPPIDLDATA lpPData = _ILGetDataPointer(pidl); LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE_(pidl)("(%p)\n",pidl); TRACE("(%p)\n",pidl);
return (pidl && ( (lpPData && (PT_MYCOMP== lpPData->type || PT_SPECIAL== lpPData->type)) || return (pidl && ( (lpPData && (PT_MYCOMP== lpPData->type || PT_SPECIAL== lpPData->type)) ||
(pidl && pidl->mkid.cb == 0x00) (pidl && pidl->mkid.cb == 0x00)
)); ));
@ -1318,7 +1318,7 @@ BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl)
BOOL _ILIsDrive(LPCITEMIDLIST pidl) BOOL _ILIsDrive(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); { LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE_(pidl)("(%p)\n",pidl); TRACE("(%p)\n",pidl);
return (pidl && lpPData && (PT_DRIVE == lpPData->type || return (pidl && lpPData && (PT_DRIVE == lpPData->type ||
PT_DRIVE1 == lpPData->type || PT_DRIVE1 == lpPData->type ||
PT_DRIVE2 == lpPData->type || PT_DRIVE2 == lpPData->type ||
@ -1327,13 +1327,13 @@ BOOL _ILIsDrive(LPCITEMIDLIST pidl)
BOOL _ILIsFolder(LPCITEMIDLIST pidl) BOOL _ILIsFolder(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); { LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE_(pidl)("(%p)\n",pidl); TRACE("(%p)\n",pidl);
return (pidl && lpPData && (PT_FOLDER == lpPData->type || PT_FOLDER1 == lpPData->type)); return (pidl && lpPData && (PT_FOLDER == lpPData->type || PT_FOLDER1 == lpPData->type));
} }
BOOL _ILIsValue(LPCITEMIDLIST pidl) BOOL _ILIsValue(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); { LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE_(pidl)("(%p)\n",pidl); TRACE("(%p)\n",pidl);
return (pidl && lpPData && PT_VALUE == lpPData->type); return (pidl && lpPData && PT_VALUE == lpPData->type);
} }
@ -1352,7 +1352,7 @@ BOOL _ILIsPidlSimple ( LPCITEMIDLIST pidl)
ret = FALSE; ret = FALSE;
} }
TRACE_(pidl)("%s\n", ret ? "Yes" : "No"); TRACE("%s\n", ret ? "Yes" : "No");
return ret; return ret;
} }
@ -1375,7 +1375,7 @@ DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
GUID const * riid; GUID const * riid;
char szTemp[MAX_PATH]; char szTemp[MAX_PATH];
TRACE_(pidl)("(%p %p %x)\n",pidl,szOut,uOutSize); TRACE("(%p %p %x)\n",pidl,szOut,uOutSize);
if (!pidl) return 0; if (!pidl) return 0;
@ -1414,10 +1414,10 @@ DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
} }
else else
{ {
ERR_(pidl)("-- no text\n"); ERR("-- no text\n");
} }
TRACE_(pidl)("-- (%p=%s 0x%08lx)\n",szOut,(char*)szOut,dwReturn); TRACE("-- (%p=%s 0x%08lx)\n",szOut,(char*)szOut,dwReturn);
return dwReturn; return dwReturn;
} }
@ -1603,7 +1603,7 @@ BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
const char * pPoint; const char * pPoint;
LPITEMIDLIST pidlTemp=pidl; LPITEMIDLIST pidlTemp=pidl;
TRACE_(pidl)("pidl=%p\n",pidl); TRACE("pidl=%p\n",pidl);
if (!pidl) return FALSE; if (!pidl) return FALSE;
@ -1618,7 +1618,7 @@ BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
pPoint++; pPoint++;
lstrcpynA(pOut, pPoint, uOutSize); lstrcpynA(pOut, pPoint, uOutSize);
TRACE_(pidl)("%s\n",pOut); TRACE("%s\n",pOut);
return TRUE; return TRUE;
} }

View File

@ -26,8 +26,8 @@
#include "syslevel.h" #include "syslevel.h"
#include "imagelist.h" #include "imagelist.h"
DEFAULT_DEBUG_CHANNEL(shell)
DECLARE_DEBUG_CHANNEL(exec) DECLARE_DEBUG_CHANNEL(exec)
DECLARE_DEBUG_CHANNEL(shell)
/* .ICO file ICONDIR definitions */ /* .ICO file ICONDIR definitions */
@ -79,8 +79,8 @@ static int SHELL_Attach = 0;
BOOL WINAPI SHELL_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, BOOL WINAPI SHELL_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst,
WORD ds, WORD HeapSize, DWORD res1, WORD res2) WORD ds, WORD HeapSize, DWORD res1, WORD res2)
{ {
TRACE_(shell)("(%08lx, %04x, %04x, %04x, %08lx, %04x)\n", TRACE("(%08lx, %04x, %04x, %04x, %08lx, %04x)\n",
Reason, hInst, ds, HeapSize, res1, res2); Reason, hInst, ds, HeapSize, res1, res2);
switch(Reason) switch(Reason)
{ {
@ -88,7 +88,7 @@ BOOL WINAPI SHELL_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst,
SHELL_Attach++; SHELL_Attach++;
if (SHELL_hInstance) if (SHELL_hInstance)
{ {
ERR_(shell)("shell.dll instantiated twice!\n"); ERR("shell.dll instantiated twice!\n");
/* /*
* We should return FALSE here, but that will break * We should return FALSE here, but that will break
* most apps that use CreateProcess because we do * most apps that use CreateProcess because we do
@ -102,7 +102,7 @@ BOOL WINAPI SHELL_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst,
{ {
if(!(SHELL_hInstance32 = LoadLibraryA("shell32.dll"))) if(!(SHELL_hInstance32 = LoadLibraryA("shell32.dll")))
{ {
ERR_(shell)("Could not load sibling shell32.dll\n"); ERR("Could not load sibling shell32.dll\n");
return FALSE; return FALSE;
} }
} }
@ -199,7 +199,7 @@ UINT WINAPI DragQueryFileA(HDROP hDrop, UINT lFile, LPSTR lpszFile,
LPSTR lpCurrent; LPSTR lpCurrent;
UINT i; UINT i;
TRACE_(shell)("(%08x, %x, %p, %u)\n", hDrop,lFile,lpszFile,lLength); TRACE("(%08x, %x, %p, %u)\n", hDrop,lFile,lpszFile,lLength);
lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop);
if(!lpDropFileStruct) if(!lpDropFileStruct)
@ -221,7 +221,7 @@ UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile,
LPWSTR lpwCurrent; LPWSTR lpwCurrent;
UINT i; UINT i;
TRACE_(shell)("(%08x, %x, %p, %u)\n", hDrop,lFile,lpszwFile,lLength); TRACE("(%08x, %x, %p, %u)\n", hDrop,lFile,lpszwFile,lLength);
lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop);
if(!lpDropFileStruct) if(!lpDropFileStruct)
@ -245,7 +245,7 @@ UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile,
LPSTR lpCurrent; LPSTR lpCurrent;
WORD i; WORD i;
TRACE_(shell)("(%04x, %x, %p, %u)\n", hDrop,wFile,lpszFile,wLength); TRACE("(%04x, %x, %p, %u)\n", hDrop,wFile,lpszFile,wLength);
lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop);
if(!lpDropFileStruct) if(!lpDropFileStruct)
@ -265,7 +265,8 @@ UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile,
* DragFinish32 [SHELL32.80] * DragFinish32 [SHELL32.80]
*/ */
void WINAPI DragFinish(HDROP h) void WINAPI DragFinish(HDROP h)
{ TRACE_(shell)("\n"); {
TRACE("\n");
GlobalFree((HGLOBAL)h); GlobalFree((HGLOBAL)h);
} }
@ -273,7 +274,8 @@ void WINAPI DragFinish(HDROP h)
* DragFinish16 [SHELL.12] * DragFinish16 [SHELL.12]
*/ */
void WINAPI DragFinish16(HDROP16 h) void WINAPI DragFinish16(HDROP16 h)
{ TRACE_(shell)("\n"); {
TRACE("\n");
GlobalFree16((HGLOBAL16)h); GlobalFree16((HGLOBAL16)h);
} }
@ -285,7 +287,7 @@ BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p)
{ {
LPDROPFILESTRUCT lpDropFileStruct; LPDROPFILESTRUCT lpDropFileStruct;
BOOL bRet; BOOL bRet;
TRACE_(shell)("\n"); TRACE("\n");
lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop);
memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT)); memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT));
@ -302,7 +304,7 @@ BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p)
{ {
LPDROPFILESTRUCT16 lpDropFileStruct; LPDROPFILESTRUCT16 lpDropFileStruct;
BOOL16 bRet; BOOL16 bRet;
TRACE_(shell)("\n"); TRACE("\n");
lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop);
memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16)); memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16));
@ -332,7 +334,7 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
int i; /* random counter */ int i; /* random counter */
char xlpFile[256]; /* result of SearchPath */ char xlpFile[256]; /* result of SearchPath */
TRACE_(shell)("%s\n", (lpFile != NULL?lpFile:"-") ); TRACE("%s\n", (lpFile != NULL?lpFile:"-") );
lpResult[0]='\0'; /* Start off with an empty return string */ lpResult[0]='\0'; /* Start off with an empty return string */
@ -344,7 +346,7 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
} }
if (SearchPathA( NULL, lpFile,".exe",sizeof(xlpFile),xlpFile,NULL)) if (SearchPathA( NULL, lpFile,".exe",sizeof(xlpFile),xlpFile,NULL))
{ TRACE_(shell)("SearchPath32A returned non-zero\n"); { TRACE("SearchPath32A returned non-zero\n");
lpFile = xlpFile; lpFile = xlpFile;
} }
@ -352,17 +354,17 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
extension = strrchr( xlpFile, '.' ); /* Assume last "." is the one; */ extension = strrchr( xlpFile, '.' ); /* Assume last "." is the one; */
/* File->Run in progman uses */ /* File->Run in progman uses */
/* .\FILE.EXE :( */ /* .\FILE.EXE :( */
TRACE_(shell)("xlpFile=%s,extension=%s\n", xlpFile, extension); TRACE("xlpFile=%s,extension=%s\n", xlpFile, extension);
if ((extension == NULL) || (extension == &xlpFile[strlen(xlpFile)])) if ((extension == NULL) || (extension == &xlpFile[strlen(xlpFile)]))
{ WARN_(shell)("Returning 31 - No association\n"); { WARN("Returning 31 - No association\n");
return 31; /* no association */ return 31; /* no association */
} }
/* Make local copy & lowercase it for reg & 'programs=' lookup */ /* Make local copy & lowercase it for reg & 'programs=' lookup */
lstrcpynA( tmpext, extension, 5 ); lstrcpynA( tmpext, extension, 5 );
CharLowerA( tmpext ); CharLowerA( tmpext );
TRACE_(shell)("%s file\n", tmpext); TRACE("%s file\n", tmpext);
/* Three places to check: */ /* Three places to check: */
/* 1. win.ini, [windows], programs (NB no leading '.') */ /* 1. win.ini, [windows], programs (NB no leading '.') */
@ -387,8 +389,8 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
strcpy(lpResult, xlpFile); strcpy(lpResult, xlpFile);
/* Need to perhaps check that the file has a path /* Need to perhaps check that the file has a path
* attached */ * attached */
TRACE_(shell)("found %s\n", lpResult); TRACE("found %s\n", lpResult);
return 33; return 33;
/* Greater than 32 to indicate success FIXME According to the /* Greater than 32 to indicate success FIXME According to the
* docs, I should be returning a handle for the * docs, I should be returning a handle for the
@ -404,7 +406,7 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
&filetypelen ) == ERROR_SUCCESS ) &filetypelen ) == ERROR_SUCCESS )
{ {
filetype[filetypelen]='\0'; filetype[filetypelen]='\0';
TRACE_(shell)("File type: %s\n", filetype); TRACE("File type: %s\n", filetype);
/* Looking for ...buffer\shell\lpOperation\command */ /* Looking for ...buffer\shell\lpOperation\command */
strcat( filetype, "\\shell\\" ); strcat( filetype, "\\shell\\" );
@ -457,7 +459,7 @@ HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
} }
} }
TRACE_(shell)("returning %s\n", lpResult); TRACE("returning %s\n", lpResult);
return retval; return retval;
} }
@ -471,7 +473,7 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
char old_dir[1024]; char old_dir[1024];
char cmd[256]; char cmd[256];
TRACE_(shell)("(%04x,'%s','%s','%s','%s',%x)\n", TRACE("(%04x,'%s','%s','%s','%s',%x)\n",
hWnd, lpOperation ? lpOperation:"<null>", lpFile ? lpFile:"<null>", hWnd, lpOperation ? lpOperation:"<null>", lpFile ? lpFile:"<null>",
lpParameters ? lpParameters : "<null>", lpParameters ? lpParameters : "<null>",
lpDirectory ? lpDirectory : "<null>", iShowCmd); lpDirectory ? lpDirectory : "<null>", iShowCmd);
@ -495,7 +497,7 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
strcat(cmd,lpParameters); strcat(cmd,lpParameters);
} }
TRACE_(shell)("starting %s\n",cmd); TRACE("starting %s\n",cmd);
SYSLEVEL_ReleaseWin16Lock(); SYSLEVEL_ReleaseWin16Lock();
retval = WinExec( cmd, iShowCmd ); retval = WinExec( cmd, iShowCmd );
SYSLEVEL_RestoreWin16Lock(); SYSLEVEL_RestoreWin16Lock();
@ -539,7 +541,7 @@ static DWORD SHELL_GetResourceTable(HFILE hFile,LPBYTE *retptr)
char magic[4]; char magic[4];
int size; int size;
TRACE_(shell)("\n"); TRACE("\n");
*retptr = NULL; *retptr = NULL;
_llseek( hFile, 0, SEEK_SET ); _llseek( hFile, 0, SEEK_SET );
@ -598,7 +600,7 @@ static HGLOBAL16 SHELL_LoadResource(HINSTANCE16 hInst, HFILE hFile, NE_NAMEINFO*
{ BYTE* ptr; { BYTE* ptr;
HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, (DWORD)pNInfo->length << sizeShift); HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, (DWORD)pNInfo->length << sizeShift);
TRACE_(shell)("\n"); TRACE("\n");
if( (ptr = (BYTE*)GlobalLock16( handle )) ) if( (ptr = (BYTE*)GlobalLock16( handle )) )
{ _llseek( hFile, (DWORD)pNInfo->offset << sizeShift, SEEK_SET); { _llseek( hFile, (DWORD)pNInfo->offset << sizeShift, SEEK_SET);
@ -614,7 +616,7 @@ static HGLOBAL16 SHELL_LoadResource(HINSTANCE16 hInst, HFILE hFile, NE_NAMEINFO*
static HGLOBAL16 ICO_LoadIcon(HINSTANCE16 hInst, HFILE hFile, LPicoICONDIRENTRY lpiIDE) static HGLOBAL16 ICO_LoadIcon(HINSTANCE16 hInst, HFILE hFile, LPicoICONDIRENTRY lpiIDE)
{ BYTE* ptr; { BYTE* ptr;
HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, lpiIDE->dwBytesInRes); HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, lpiIDE->dwBytesInRes);
TRACE_(shell)("\n"); TRACE("\n");
if( (ptr = (BYTE*)GlobalLock16( handle )) ) if( (ptr = (BYTE*)GlobalLock16( handle )) )
{ _llseek( hFile, lpiIDE->dwImageOffset, SEEK_SET); { _llseek( hFile, lpiIDE->dwImageOffset, SEEK_SET);
_lread( hFile, (char*)ptr, lpiIDE->dwBytesInRes); _lread( hFile, (char*)ptr, lpiIDE->dwBytesInRes);
@ -633,7 +635,7 @@ static HGLOBAL16 ICO_GetIconDirectory(HINSTANCE16 hInst, HFILE hFile, LPicoICOND
LPicoICONDIR lpiID; LPicoICONDIR lpiID;
int i; int i;
TRACE_(shell)("\n"); TRACE("\n");
_llseek( hFile, 0, SEEK_SET ); _llseek( hFile, 0, SEEK_SET );
if( _lread(hFile,(char*)id,sizeof(id)) != sizeof(id) ) return 0; if( _lread(hFile,(char*)id,sizeof(id)) != sizeof(id) ) return 0;
@ -688,7 +690,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
LPBYTE peimage; LPBYTE peimage;
HANDLE fmapping; HANDLE fmapping;
TRACE_(shell)("(%04x,file %s,start %d,extract %d\n", TRACE("(%04x,file %s,start %d,extract %d\n",
hInstance, lpszExeFileName, nIconIndex, n); hInstance, lpszExeFileName, nIconIndex, n);
if( hFile == HFILE_ERROR || !n ) if( hFile == HFILE_ERROR || !n )
@ -718,12 +720,12 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
{ if( pTInfo->type_id == NE_RSCTYPE_GROUP_ICON ) /* find icon directory and icon repository */ { if( pTInfo->type_id == NE_RSCTYPE_GROUP_ICON ) /* find icon directory and icon repository */
{ iconDirCount = pTInfo->count; { iconDirCount = pTInfo->count;
pIconDir = ((NE_NAMEINFO*)(pTInfo + 1)); pIconDir = ((NE_NAMEINFO*)(pTInfo + 1));
TRACE_(shell)("\tfound directory - %i icon families\n", iconDirCount); TRACE("\tfound directory - %i icon families\n", iconDirCount);
} }
if( pTInfo->type_id == NE_RSCTYPE_ICON ) if( pTInfo->type_id == NE_RSCTYPE_ICON )
{ iconCount = pTInfo->count; { iconCount = pTInfo->count;
pIconStorage = ((NE_NAMEINFO*)(pTInfo + 1)); pIconStorage = ((NE_NAMEINFO*)(pTInfo + 1));
TRACE_(shell)("\ttotal icons - %i\n", iconCount); TRACE("\ttotal icons - %i\n", iconCount);
} }
pTInfo = (NE_TYPEINFO *)((char*)(pTInfo+1)+pTInfo->count*sizeof(NE_NAMEINFO)); pTInfo = (NE_TYPEINFO *)((char*)(pTInfo+1)+pTInfo->count*sizeof(NE_NAMEINFO));
} }
@ -790,13 +792,13 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
fmapping = CreateFileMappingA(hFile,NULL,PAGE_READONLY|SEC_COMMIT,0,0,NULL); fmapping = CreateFileMappingA(hFile,NULL,PAGE_READONLY|SEC_COMMIT,0,0,NULL);
if (fmapping == 0) if (fmapping == 0)
{ /* FIXME, INVALID_HANDLE_VALUE? */ { /* FIXME, INVALID_HANDLE_VALUE? */
WARN_(shell)("failed to create filemap.\n"); WARN("failed to create filemap.\n");
hRet = 0; hRet = 0;
goto end_2; /* failure */ goto end_2; /* failure */
} }
peimage = MapViewOfFile(fmapping,FILE_MAP_READ,0,0,0); peimage = MapViewOfFile(fmapping,FILE_MAP_READ,0,0,0);
if (!peimage) if (!peimage)
{ WARN_(shell)("failed to mmap filemap.\n"); { WARN("failed to mmap filemap.\n");
hRet = 0; hRet = 0;
goto end_2; /* failure */ goto end_2; /* failure */
} }
@ -822,14 +824,14 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
} }
if (!rootresdir) if (!rootresdir)
{ WARN_(shell)("haven't found section for resource directory.\n"); { WARN("haven't found section for resource directory.\n");
goto end_4; /* failure */ goto end_4; /* failure */
} }
icongroupresdir = GetResDirEntryW(rootresdir,RT_GROUP_ICONW, (DWORD)rootresdir,FALSE); icongroupresdir = GetResDirEntryW(rootresdir,RT_GROUP_ICONW, (DWORD)rootresdir,FALSE);
if (!icongroupresdir) if (!icongroupresdir)
{ WARN_(shell)("No Icongroupresourcedirectory!\n"); { WARN("No Icongroupresourcedirectory!\n");
goto end_4; /* failure */ goto end_4; /* failure */
} }
@ -841,7 +843,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
} }
if (nIconIndex >= iconDirCount) if (nIconIndex >= iconDirCount)
{ WARN_(shell)("nIconIndex %d is larger than iconDirCount %d\n",nIconIndex,iconDirCount); { WARN("nIconIndex %d is larger than iconDirCount %d\n",nIconIndex,iconDirCount);
GlobalFree16(hRet); GlobalFree16(hRet);
goto end_4; /* failure */ goto end_4; /* failure */
} }
@ -882,7 +884,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
} }
if (!igdata) if (!igdata)
{ WARN_(shell)("no matching real address for icongroup!\n"); { WARN("no matching real address for icongroup!\n");
goto end_4; /* failure */ goto end_4; /* failure */
} }
/* found */ /* found */
@ -894,7 +896,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
iconresdir=GetResDirEntryW(rootresdir,RT_ICONW,(DWORD)rootresdir,FALSE); iconresdir=GetResDirEntryW(rootresdir,RT_ICONW,(DWORD)rootresdir,FALSE);
if (!iconresdir) if (!iconresdir)
{ WARN_(shell)("No Iconresourcedirectory!\n"); { WARN("No Iconresourcedirectory!\n");
goto end_4; /* failure */ goto end_4; /* failure */
} }
@ -914,7 +916,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
idata = peimage+(idataent->OffsetToData-pe_sections[j].VirtualAddress+pe_sections[j].PointerToRawData); idata = peimage+(idataent->OffsetToData-pe_sections[j].VirtualAddress+pe_sections[j].PointerToRawData);
} }
if (!idata) if (!idata)
{ WARN_(shell)("no matching real address found for icondata!\n"); { WARN("no matching real address found for icondata!\n");
RetPtr[i]=0; RetPtr[i]=0;
continue; continue;
} }
@ -937,7 +939,7 @@ end_1: _lclose( hFile);
*/ */
HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName, HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName,
UINT16 nIconIndex ) UINT16 nIconIndex )
{ TRACE_(shell)("\n"); { TRACE("\n");
return ExtractIconA( hInstance, lpszExeFileName, nIconIndex ); return ExtractIconA( hInstance, lpszExeFileName, nIconIndex );
} }
@ -981,14 +983,14 @@ HICON16 WINAPI ExtractIconEx16(
* executable) and patch parameters if needed. * executable) and patch parameters if needed.
*/ */
HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon) HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon)
{ TRACE_(shell)("\n"); { TRACE("\n");
return ExtractAssociatedIcon16(hInst,lpIconPath,lpiIcon); return ExtractAssociatedIcon16(hInst,lpIconPath,lpiIcon);
} }
HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16 hInst, LPSTR lpIconPath, LPWORD lpiIcon) HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16 hInst, LPSTR lpIconPath, LPWORD lpiIcon)
{ HICON16 hIcon; { HICON16 hIcon;
TRACE_(shell)("\n"); TRACE("\n");
hIcon = ExtractIcon16(hInst, lpIconPath, *lpiIcon); hIcon = ExtractIcon16(hInst, lpIconPath, *lpiIcon);
@ -1025,7 +1027,7 @@ HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16 hInst, LPSTR lpIconPath, LPWO
LPSTR SHELL_FindString(LPSTR lpEnv, LPCSTR entry) LPSTR SHELL_FindString(LPSTR lpEnv, LPCSTR entry)
{ UINT16 l; { UINT16 l;
TRACE_(shell)("\n"); TRACE("\n");
l = strlen(entry); l = strlen(entry);
for( ; *lpEnv ; lpEnv+=strlen(lpEnv)+1 ) for( ; *lpEnv ; lpEnv+=strlen(lpEnv)+1 )
@ -1042,7 +1044,7 @@ LPSTR SHELL_FindString(LPSTR lpEnv, LPCSTR entry)
SEGPTR WINAPI FindEnvironmentString16(LPSTR str) SEGPTR WINAPI FindEnvironmentString16(LPSTR str)
{ SEGPTR spEnv; { SEGPTR spEnv;
LPSTR lpEnv,lpString; LPSTR lpEnv,lpString;
TRACE_(shell)("\n"); TRACE("\n");
spEnv = GetDOSEnvironment16(); spEnv = GetDOSEnvironment16();
@ -1069,7 +1071,7 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length)
CharToOemA(str,str); CharToOemA(str,str);
TRACE_(shell)("accept %s\n", str); TRACE("accept %s\n", str);
while( *lpstr && lpbstr - lpBuffer < length ) while( *lpstr && lpbstr - lpBuffer < length )
{ {
@ -1089,7 +1091,7 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length)
if( l > length - (lpbstr - lpBuffer) - 1 ) if( l > length - (lpbstr - lpBuffer) - 1 )
{ {
WARN_(shell)("-- Env subst aborted - string too short\n"); WARN("-- Env subst aborted - string too short\n");
*lpend = '%'; *lpend = '%';
break; break;
} }
@ -1117,7 +1119,7 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length)
else else
length = 0; length = 0;
TRACE_(shell)("-- return %s\n", str); TRACE("-- return %s\n", str);
OemToCharA(str,str); OemToCharA(str,str);
HeapFree( GetProcessHeap(), 0, lpBuffer); HeapFree( GetProcessHeap(), 0, lpBuffer);
@ -1134,7 +1136,7 @@ DWORD WINAPI DoEnvironmentSubst16(LPSTR str,WORD length)
*/ */
LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam) LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam)
{ {
TRACE_(shell)("%i, %04x, %08x\n", code, wParam, TRACE("%i, %04x, %08x\n", code, wParam,
(unsigned)lParam ); (unsigned)lParam );
if( SHELL_hHook && SHELL_hWnd ) if( SHELL_hHook && SHELL_hWnd )
{ {
@ -1155,7 +1157,7 @@ LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam)
*/ */
BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction) BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
{ {
TRACE_(shell)("%04x [%u]\n", hWnd, uAction ); TRACE("%04x [%u]\n", hWnd, uAction );
switch( uAction ) switch( uAction )
{ {
@ -1172,7 +1174,7 @@ BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
uMsgShellActivate = RegisterWindowMessageA( lpstrMsgShellActivate ); uMsgShellActivate = RegisterWindowMessageA( lpstrMsgShellActivate );
} }
else else
WARN_(shell)("-- unable to install ShellHookProc()!\n"); WARN("-- unable to install ShellHookProc()!\n");
} }
if ( SHELL_hHook ) if ( SHELL_hHook )
@ -1180,7 +1182,7 @@ BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
break; break;
default: default:
WARN_(shell)("-- unknown code %i\n", uAction ); WARN("-- unknown code %i\n", uAction );
SHELL_hWnd = 0; /* just in case */ SHELL_hWnd = 0; /* just in case */
} }
return FALSE; return FALSE;

View File

@ -28,8 +28,8 @@
#include "wine/undocshell.h" #include "wine/undocshell.h"
#include "shpolicy.h" #include "shpolicy.h"
DEFAULT_DEBUG_CHANNEL(shell)
DECLARE_DEBUG_CHANNEL(exec) DECLARE_DEBUG_CHANNEL(exec)
DECLARE_DEBUG_CHANNEL(shell)
#define MORE_DEBUG 1 #define MORE_DEBUG 1
/************************************************************************* /*************************************************************************
@ -38,7 +38,7 @@ DECLARE_DEBUG_CHANNEL(shell)
LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs) LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
{ LPWSTR *argv,s,t; { LPWSTR *argv,s,t;
int i; int i;
TRACE_(shell)("\n"); TRACE("\n");
/* to get writeable copy */ /* to get writeable copy */
cmdline = HEAP_strdupW( GetProcessHeap(), 0, cmdline); cmdline = HEAP_strdupW( GetProcessHeap(), 0, cmdline);
@ -91,7 +91,7 @@ LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
void WINAPI Control_RunDLL( HWND hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4 ) void WINAPI Control_RunDLL( HWND hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4 )
{ {
FIXME_(shell)("(0x%08x, %p, %s, 0x%08lx): stub\n", hwnd, code, FIXME("(0x%08x, %p, %s, 0x%08lx): stub\n", hwnd, code,
debugstr_a(cmd), arg4); debugstr_a(cmd), arg4);
} }
@ -111,7 +111,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
LPITEMIDLIST pidlLast, pidl = NULL; LPITEMIDLIST pidlLast, pidl = NULL;
HRESULT hr = S_OK; HRESULT hr = S_OK;
TRACE_(shell)("(%s,0x%lx,%p,0x%x,0x%x)\n", TRACE("(%s,0x%lx,%p,0x%x,0x%x)\n",
(flags & SHGFI_PIDL)? "pidl" : path, dwFileAttributes, psfi, sizeofpsfi, flags); (flags & SHGFI_PIDL)? "pidl" : path, dwFileAttributes, psfi, sizeofpsfi, flags);
#ifdef MORE_DEBUG #ifdef MORE_DEBUG
@ -127,7 +127,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
pidl = (LPCITEMIDLIST) path; pidl = (LPCITEMIDLIST) path;
if (!pidl ) if (!pidl )
{ {
ERR_(shell)("pidl is null!\n"); ERR("pidl is null!\n");
return FALSE; return FALSE;
} }
} }
@ -176,16 +176,16 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
/* ### icons ###*/ /* ### icons ###*/
if (flags & SHGFI_LINKOVERLAY) if (flags & SHGFI_LINKOVERLAY)
FIXME_(shell)("set icon to link, stub\n"); FIXME("set icon to link, stub\n");
if (flags & SHGFI_OPENICON) if (flags & SHGFI_OPENICON)
FIXME_(shell)("set to open icon, stub\n"); FIXME("set to open icon, stub\n");
if (flags & SHGFI_SELECTED) if (flags & SHGFI_SELECTED)
FIXME_(shell)("set icon to selected, stub\n"); FIXME("set icon to selected, stub\n");
if (flags & SHGFI_SHELLICONSIZE) if (flags & SHGFI_SHELLICONSIZE)
FIXME_(shell)("set icon to shell size, stub\n"); FIXME("set icon to shell size, stub\n");
/* get the iconlocation */ /* get the iconlocation */
if (SUCCEEDED(hr) && (flags & SHGFI_ICONLOCATION )) if (SUCCEEDED(hr) && (flags & SHGFI_ICONLOCATION ))
@ -254,10 +254,10 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
if (flags & SHGFI_EXETYPE) if (flags & SHGFI_EXETYPE)
FIXME_(shell)("type of executable, stub\n"); FIXME("type of executable, stub\n");
if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3)) if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3))
FIXME_(shell)("unknown attribute!\n"); FIXME("unknown attribute!\n");
if (psfParent) if (psfParent)
IShellFolder_Release(psfParent); IShellFolder_Release(psfParent);
@ -266,7 +266,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
ret = FALSE; ret = FALSE;
#ifdef MORE_DEBUG #ifdef MORE_DEBUG
TRACE_(shell) ("icon=0x%08x index=0x%08x attr=0x%08lx name=%s type=%s\n", TRACE ("icon=0x%08x index=0x%08x attr=0x%08lx name=%s type=%s\n",
psfi->hIcon, psfi->iIcon, psfi->dwAttributes, psfi->szDisplayName, psfi->szTypeName); psfi->hIcon, psfi->iIcon, psfi->dwAttributes, psfi->szDisplayName, psfi->szTypeName);
#endif #endif
return ret; return ret;
@ -279,7 +279,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
SHFILEINFOW *psfi, UINT sizeofpsfi, SHFILEINFOW *psfi, UINT sizeofpsfi,
UINT flags ) UINT flags )
{ FIXME_(shell)("(%s,0x%lx,%p,0x%x,0x%x)\n", { FIXME("(%s,0x%lx,%p,0x%x,0x%x)\n",
debugstr_w(path),dwFileAttributes,psfi,sizeofpsfi,flags); debugstr_w(path),dwFileAttributes,psfi,sizeofpsfi,flags);
return 0; return 0;
} }
@ -290,7 +290,7 @@ DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
HICON WINAPI ExtractIconA( HINSTANCE hInstance, LPCSTR lpszExeFileName, HICON WINAPI ExtractIconA( HINSTANCE hInstance, LPCSTR lpszExeFileName,
UINT nIconIndex ) UINT nIconIndex )
{ HGLOBAL16 handle = InternalExtractIcon16(hInstance,lpszExeFileName,nIconIndex, 1); { HGLOBAL16 handle = InternalExtractIcon16(hInstance,lpszExeFileName,nIconIndex, 1);
TRACE_(shell)("\n"); TRACE("\n");
if( handle ) if( handle )
{ {
HICON16* ptr = (HICON16*)GlobalLock16(handle); HICON16* ptr = (HICON16*)GlobalLock16(handle);
@ -309,7 +309,7 @@ HICON WINAPI ExtractIconW( HINSTANCE hInstance, LPCWSTR lpszExeFileName,
UINT nIconIndex ) UINT nIconIndex )
{ LPSTR exefn; { LPSTR exefn;
HICON ret; HICON ret;
TRACE_(shell)("\n"); TRACE("\n");
exefn = HEAP_strdupWtoA(GetProcessHeap(),0,lpszExeFileName); exefn = HEAP_strdupWtoA(GetProcessHeap(),0,lpszExeFileName);
ret = ExtractIconA(hInstance,exefn,nIconIndex); ret = ExtractIconA(hInstance,exefn,nIconIndex);
@ -326,7 +326,7 @@ HINSTANCE WINAPI FindExecutableA( LPCSTR lpFile, LPCSTR lpDirectory,
{ HINSTANCE retval=31; /* default - 'No association was found' */ { HINSTANCE retval=31; /* default - 'No association was found' */
char old_dir[1024]; char old_dir[1024];
TRACE_(shell)("File %s, Dir %s\n", TRACE("File %s, Dir %s\n",
(lpFile != NULL?lpFile:"-"), (lpFile != NULL?lpFile:"-"),
(lpDirectory != NULL?lpDirectory:"-")); (lpDirectory != NULL?lpDirectory:"-"));
@ -345,7 +345,7 @@ HINSTANCE WINAPI FindExecutableA( LPCSTR lpFile, LPCSTR lpDirectory,
retval = SHELL_FindExecutable( lpFile, "open", lpResult ); retval = SHELL_FindExecutable( lpFile, "open", lpResult );
TRACE_(shell)("returning %s\n", lpResult); TRACE("returning %s\n", lpResult);
if (lpDirectory) if (lpDirectory)
SetCurrentDirectoryA( old_dir ); SetCurrentDirectoryA( old_dir );
return retval; return retval;
@ -357,7 +357,7 @@ HINSTANCE WINAPI FindExecutableA( LPCSTR lpFile, LPCSTR lpDirectory,
HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory,
LPWSTR lpResult) LPWSTR lpResult)
{ {
FIXME_(shell)("(%p,%p,%p): stub\n", lpFile, lpDirectory, lpResult); FIXME("(%p,%p,%p): stub\n", lpFile, lpDirectory, lpResult);
return 31; /* default - 'No association was found' */ return 31; /* default - 'No association was found' */
} }
@ -392,7 +392,7 @@ static BOOL __get_dropline( HWND hWnd, LPRECT lprect )
*/ */
UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
{ {
FIXME_(shell)("(0x%08lx,%p hwnd=0x%08x): stub\n", msg, data, data->hWnd); FIXME("(0x%08lx,%p hwnd=0x%08x): stub\n", msg, data, data->hWnd);
switch (msg) switch (msg)
{ case ABM_GETSTATE: { case ABM_GETSTATE:
@ -435,7 +435,7 @@ DWORD WINAPI SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, D
*/ */
DWORD WINAPI SHLoadInProc (DWORD dwArg1) DWORD WINAPI SHLoadInProc (DWORD dwArg1)
{ FIXME_(shell)("(%lx) empty stub!\n", dwArg1); { FIXME("(%lx) empty stub!\n", dwArg1);
return 0; return 0;
} }
@ -445,7 +445,7 @@ DWORD WINAPI SHLoadInProc (DWORD dwArg1)
HINSTANCE WINAPI ShellExecuteA( HWND hWnd, LPCSTR lpOperation, HINSTANCE WINAPI ShellExecuteA( HWND hWnd, LPCSTR lpOperation,
LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpFile, LPCSTR lpParameters,
LPCSTR lpDirectory, INT iShowCmd ) LPCSTR lpDirectory, INT iShowCmd )
{ TRACE_(shell)("\n"); { TRACE("\n");
return ShellExecute16( hWnd, lpOperation, lpFile, lpParameters, return ShellExecute16( hWnd, lpOperation, lpFile, lpParameters,
lpDirectory, iShowCmd ); lpDirectory, iShowCmd );
} }
@ -465,7 +465,7 @@ ShellExecuteW(
LPCWSTR lpDirectory, LPCWSTR lpDirectory,
INT nShowCmd) { INT nShowCmd) {
FIXME_(shell)(": stub\n"); FIXME(": stub\n");
return 0; return 0;
} }
@ -477,7 +477,7 @@ BOOL WINAPI AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
{ HWND hWndCtl; { HWND hWndCtl;
char Template[512], AppTitle[512]; char Template[512], AppTitle[512];
TRACE_(shell)("\n"); TRACE("\n");
switch(msg) switch(msg)
{ case WM_INITDIALOG: { case WM_INITDIALOG:
@ -612,7 +612,7 @@ BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
{ ABOUT_INFO info; { ABOUT_INFO info;
HRSRC hRes; HRSRC hRes;
LPVOID template; LPVOID template;
TRACE_(shell)("\n"); TRACE("\n");
if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA))) if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA)))
return FALSE; return FALSE;
@ -638,7 +638,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
HRSRC hRes; HRSRC hRes;
LPVOID template; LPVOID template;
TRACE_(shell)("\n"); TRACE("\n");
if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA))) if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA)))
return FALSE; return FALSE;
@ -663,7 +663,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
* Any ideas on how this is to be implimented? * Any ideas on how this is to be implimented?
*/ */
BOOL WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATAA pnid ) BOOL WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATAA pnid )
{ FIXME_(shell)("Taskbar Notification Area functionality not implemented !\n"); { FIXME("Taskbar Notification Area functionality not implemented !\n");
return TRUE; /* pretend success */ return TRUE; /* pretend success */
} }
@ -674,7 +674,7 @@ BOOL WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATAA pnid )
* Any ideas on how this is to be implimented? * Any ideas on how this is to be implimented?
*/ */
BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid ) BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid )
{ FIXME_(shell)("Taskbar Notification Area functionality not implemented !\n"); { FIXME("Taskbar Notification Area functionality not implemented !\n");
return TRUE; /* pretend success */ return TRUE; /* pretend success */
} }
@ -682,7 +682,7 @@ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid )
* FreeIconList * FreeIconList
*/ */
void WINAPI FreeIconList( DWORD dw ) void WINAPI FreeIconList( DWORD dw )
{ FIXME_(shell)("(%lx): stub\n",dw); { FIXME("(%lx): stub\n",dw);
} }
/*********************************************************************** /***********************************************************************
@ -704,7 +704,7 @@ void WINAPI FreeIconList( DWORD dw )
HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi) HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi)
{ {
if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
{ WARN_(shell)("wrong DLLVERSIONINFO size from app"); { WARN("wrong DLLVERSIONINFO size from app");
return E_INVALIDARG; return E_INVALIDARG;
} }
@ -713,7 +713,7 @@ HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi)
pdvi->dwBuildNumber = 3110; pdvi->dwBuildNumber = 3110;
pdvi->dwPlatformID = 1; pdvi->dwPlatformID = 1;
TRACE_(shell)("%lu.%lu.%lu.%lu\n", TRACE("%lu.%lu.%lu.%lu\n",
pdvi->dwMajorVersion, pdvi->dwMinorVersion, pdvi->dwMajorVersion, pdvi->dwMinorVersion,
pdvi->dwBuildNumber, pdvi->dwPlatformID); pdvi->dwBuildNumber, pdvi->dwPlatformID);
@ -775,7 +775,7 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{ {
HMODULE hUser32; HMODULE hUser32;
TRACE_(shell)("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
switch (fdwReason) switch (fdwReason)
{ {
@ -783,7 +783,7 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
shell32_RefCount++; shell32_RefCount++;
if (shell32_hInstance) if (shell32_hInstance)
{ {
ERR_(shell)("shell32.dll instantiated twice in one address space!\n"); ERR("shell32.dll instantiated twice in one address space!\n");
} }
else else
{ {
@ -799,7 +799,7 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
if (!hComctl32 || !hUser32 || !hOle32) if (!hComctl32 || !hUser32 || !hOle32)
{ {
ERR_(shell)("P A N I C SHELL32 loading failed\n"); ERR("P A N I C SHELL32 loading failed\n");
return FALSE; return FALSE;
} }
@ -867,14 +867,14 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
/* this one is here to check if AddRef/Release is balanced */ /* this one is here to check if AddRef/Release is balanced */
if (shell32_ObjCount) if (shell32_ObjCount)
{ {
WARN_(shell)("leaving with %u objects left (memory leak)\n", shell32_ObjCount); WARN("leaving with %u objects left (memory leak)\n", shell32_ObjCount);
} }
} }
FreeLibrary(hOle32); FreeLibrary(hOle32);
FreeLibrary(hComctl32); FreeLibrary(hComctl32);
TRACE_(shell)("refcount=%u objcount=%u \n", shell32_RefCount, shell32_ObjCount); TRACE("refcount=%u objcount=%u \n", shell32_RefCount, shell32_ObjCount);
break; break;
} }
return TRUE; return TRUE;
@ -891,7 +891,7 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline) HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
{ {
FIXME_(shell)("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline)); FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline));
return S_OK; /* indicate success */ return S_OK; /* indicate success */
} }

View File

@ -170,7 +170,7 @@ DWORD WINAPI SHGetDesktopFolder(IShellFolder **psf)
{ {
HRESULT hres = S_OK; HRESULT hres = S_OK;
LPCLASSFACTORY lpclf; LPCLASSFACTORY lpclf;
TRACE_(shell)("%p->(%p)\n",psf,*psf); TRACE("%p->(%p)\n",psf,*psf);
*psf=NULL; *psf=NULL;
@ -191,7 +191,7 @@ DWORD WINAPI SHGetDesktopFolder(IShellFolder **psf)
*psf = pdesktopfolder; *psf = pdesktopfolder;
} }
TRACE_(shell)("-- %p->(%p)\n",psf, *psf); TRACE("-- %p->(%p)\n",psf, *psf);
return hres; return hres;
} }

View File

@ -12,253 +12,253 @@
#include "tapi.h" #include "tapi.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(tapi)
DECLARE_DEBUG_CHANNEL(comm) DECLARE_DEBUG_CHANNEL(comm)
DECLARE_DEBUG_CHANNEL(tapi)
DWORD WINAPI lineAccept(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize) DWORD WINAPI lineAccept(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{ {
FIXME_(tapi)("(%04x, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize); FIXME("(%04x, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineAddProvider(LPCSTR lpszProviderName, HWND hwndOwner, LPDWORD lpdwPermanentProviderID) DWORD WINAPI lineAddProvider(LPCSTR lpszProviderName, HWND hwndOwner, LPDWORD lpdwPermanentProviderID)
{ {
FIXME_(tapi)("(%s, %04x, %p): stub.\n", lpszProviderName, hwndOwner, lpdwPermanentProviderID); FIXME("(%s, %04x, %p): stub.\n", lpszProviderName, hwndOwner, lpdwPermanentProviderID);
return 1; return 1;
} }
DWORD WINAPI lineAddToConference(HCALL hConfCall, HCALL hConsultCall) DWORD WINAPI lineAddToConference(HCALL hConfCall, HCALL hConsultCall)
{ {
FIXME_(tapi)("(%04x, %04x): stub.\n", hConfCall, hConsultCall); FIXME("(%04x, %04x): stub.\n", hConfCall, hConsultCall);
return 1; return 1;
} }
DWORD WINAPI lineAnswer(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize) DWORD WINAPI lineAnswer(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{ {
FIXME_(tapi)("(%04x, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize); FIXME("(%04x, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineBlindTransfer(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode) DWORD WINAPI lineBlindTransfer(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
{ {
FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode); FIXME("(%04x, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode);
return 1; return 1;
} }
DWORD WINAPI lineClose(HLINE hLine) DWORD WINAPI lineClose(HLINE hLine)
{ {
FIXME_(tapi)("(%04x): stub.\n", hLine); FIXME("(%04x): stub.\n", hLine);
return 0; return 0;
} }
DWORD WINAPI lineCompleteCall(HCALL hCall, LPDWORD lpdwCompletionID, DWORD dwCompletionMode, DWORD dwMessageID) DWORD WINAPI lineCompleteCall(HCALL hCall, LPDWORD lpdwCompletionID, DWORD dwCompletionMode, DWORD dwMessageID)
{ {
FIXME_(tapi)("(%04x, %p, %08lx, %08lx): stub.\n", hCall, lpdwCompletionID, dwCompletionMode, dwMessageID); FIXME("(%04x, %p, %08lx, %08lx): stub.\n", hCall, lpdwCompletionID, dwCompletionMode, dwMessageID);
return 1; return 1;
} }
DWORD WINAPI lineCompleteTransfer(HCALL hCall, HCALL hConsultCall, LPHCALL lphConfCall, DWORD dwTransferMode) DWORD WINAPI lineCompleteTransfer(HCALL hCall, HCALL hConsultCall, LPHCALL lphConfCall, DWORD dwTransferMode)
{ {
FIXME_(tapi)("(%04x, %04x, %p, %08lx): stub.\n", hCall, hConsultCall, lphConfCall, dwTransferMode); FIXME("(%04x, %04x, %p, %08lx): stub.\n", hCall, hConsultCall, lphConfCall, dwTransferMode);
return 1; return 1;
} }
DWORD WINAPI lineConfigDialog(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass) DWORD WINAPI lineConfigDialog(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass)
{ {
FIXME_(tapi)("(%08lx, %04x, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass); FIXME("(%08lx, %04x, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass);
return 0; return 0;
} }
DWORD WINAPI lineConfigDialogEdit(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass, LPVOID const lpDeviceConfigIn, DWORD dwSize, LPVARSTRING lpDeviceConfigOut) DWORD WINAPI lineConfigDialogEdit(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass, LPVOID const lpDeviceConfigIn, DWORD dwSize, LPVARSTRING lpDeviceConfigOut)
{ {
FIXME_(tapi)("stub.\n"); FIXME("stub.\n");
return 0; return 0;
} }
DWORD WINAPI lineConfigProvider(HWND hwndOwner, DWORD dwPermanentProviderID) DWORD WINAPI lineConfigProvider(HWND hwndOwner, DWORD dwPermanentProviderID)
{ {
FIXME_(tapi)("(%04x, %08lx): stub.\n", hwndOwner, dwPermanentProviderID); FIXME("(%04x, %08lx): stub.\n", hwndOwner, dwPermanentProviderID);
return 0; return 0;
} }
DWORD WINAPI lineDeallocateCall(HCALL hCall) DWORD WINAPI lineDeallocateCall(HCALL hCall)
{ {
FIXME_(tapi)("(%04x): stub.\n", hCall); FIXME("(%04x): stub.\n", hCall);
return 0; return 0;
} }
DWORD WINAPI lineDevSpecific(HLINE hLine, DWORD dwAddressId, HCALL hCall, LPVOID lpParams, DWORD dwSize) DWORD WINAPI lineDevSpecific(HLINE hLine, DWORD dwAddressId, HCALL hCall, LPVOID lpParams, DWORD dwSize)
{ {
FIXME_(tapi)("(%04x, %08lx, %04x, %p, %ld): stub.\n", hLine, dwAddressId, hCall, lpParams, dwSize); FIXME("(%04x, %08lx, %04x, %p, %ld): stub.\n", hLine, dwAddressId, hCall, lpParams, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineDevSpecificFeature(HLINE hLine, DWORD dwFeature, LPVOID lpParams, DWORD dwSize) DWORD WINAPI lineDevSpecificFeature(HLINE hLine, DWORD dwFeature, LPVOID lpParams, DWORD dwSize)
{ {
FIXME_(tapi)("(%04x, %08lx, %p, %ld): stub.\n", hLine, dwFeature, lpParams, dwSize); FIXME("(%04x, %08lx, %p, %ld): stub.\n", hLine, dwFeature, lpParams, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineDial(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode) DWORD WINAPI lineDial(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
{ {
FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode); FIXME("(%04x, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode);
return 1; return 1;
} }
DWORD WINAPI lineDrop(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize) DWORD WINAPI lineDrop(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{ {
FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize); FIXME("(%04x, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineForward(HLINE hLine, DWORD bAllAddress, DWORD dwAdressID, LPLINEFORWARDLIST lpForwardList, DWORD dwNumRingsNoAnswer, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineForward(HLINE hLine, DWORD bAllAddress, DWORD dwAdressID, LPLINEFORWARDLIST lpForwardList, DWORD dwNumRingsNoAnswer, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
{ {
FIXME_(tapi)("stub.\n"); FIXME("stub.\n");
return 1; return 1;
} }
DWORD WINAPI lineGatherDigits(HCALL hCall, DWORD dwDigitModes, LPSTR lpsDigits, DWORD dwNumDigits, LPCSTR lpszTerminationDigits, DWORD dwFirstDigitTimeout, DWORD dwInterDigitTimeout) DWORD WINAPI lineGatherDigits(HCALL hCall, DWORD dwDigitModes, LPSTR lpsDigits, DWORD dwNumDigits, LPCSTR lpszTerminationDigits, DWORD dwFirstDigitTimeout, DWORD dwInterDigitTimeout)
{ {
FIXME_(tapi)("stub.\n"); FIXME("stub.\n");
return 0; return 0;
} }
DWORD WINAPI lineGenerateDigits(HCALL hCall, DWORD dwDigitModes, LPCSTR lpszDigits, DWORD dwDuration) DWORD WINAPI lineGenerateDigits(HCALL hCall, DWORD dwDigitModes, LPCSTR lpszDigits, DWORD dwDuration)
{ {
FIXME_(tapi)("(%04x, %08lx, %s, %ld): stub.\n", hCall, dwDigitModes, lpszDigits, dwDuration); FIXME("(%04x, %08lx, %s, %ld): stub.\n", hCall, dwDigitModes, lpszDigits, dwDuration);
return 0; return 0;
} }
DWORD WINAPI lineGenerateTone(HCALL hCall, DWORD dwToneMode, DWORD dwDuration, DWORD dwNumTones, LPLINEGENERATETONE lpTones) DWORD WINAPI lineGenerateTone(HCALL hCall, DWORD dwToneMode, DWORD dwDuration, DWORD dwNumTones, LPLINEGENERATETONE lpTones)
{ {
FIXME_(tapi)("(%04x, %08lx, %ld, %ld, %p): stub.\n", hCall, dwToneMode, dwDuration, dwNumTones, lpTones); FIXME("(%04x, %08lx, %ld, %ld, %p): stub.\n", hCall, dwToneMode, dwDuration, dwNumTones, lpTones);
return 0; return 0;
} }
DWORD WINAPI lineGetAddressCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAddressID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEADDRESSCAPS lpAddressCaps) DWORD WINAPI lineGetAddressCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAddressID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEADDRESSCAPS lpAddressCaps)
{ {
FIXME_(tapi)("(%04x, %08lx, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAddressID, dwAPIVersion, dwExtVersion, lpAddressCaps); FIXME("(%04x, %08lx, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAddressID, dwAPIVersion, dwExtVersion, lpAddressCaps);
return 0; return 0;
} }
DWORD WINAPI lineGetAddressID(HLINE hLine, LPDWORD lpdwAddressID, DWORD dwAddressMode, LPCSTR lpsAddress, DWORD dwSize) DWORD WINAPI lineGetAddressID(HLINE hLine, LPDWORD lpdwAddressID, DWORD dwAddressMode, LPCSTR lpsAddress, DWORD dwSize)
{ {
FIXME_(tapi)("%04x, %p, %08lx, %s, %ld): stub.\n", hLine, lpdwAddressID, dwAddressMode, lpsAddress, dwSize); FIXME("%04x, %p, %08lx, %s, %ld): stub.\n", hLine, lpdwAddressID, dwAddressMode, lpsAddress, dwSize);
return 0; return 0;
} }
DWORD WINAPI lineGetAddressStatus(HLINE hLine, DWORD dwAddressID, LPLINEADDRESSSTATUS lpAddressStatus) DWORD WINAPI lineGetAddressStatus(HLINE hLine, DWORD dwAddressID, LPLINEADDRESSSTATUS lpAddressStatus)
{ {
FIXME_(tapi)("(%04x, %08lx, %p): stub.\n", hLine, dwAddressID, lpAddressStatus); FIXME("(%04x, %08lx, %p): stub.\n", hLine, dwAddressID, lpAddressStatus);
return 0; return 0;
} }
DWORD WINAPI lineGetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPVARSTRING lpExtensionName, LPDWORD lpdwPriority) DWORD WINAPI lineGetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPVARSTRING lpExtensionName, LPDWORD lpdwPriority)
{ {
FIXME_(tapi)("(%s, %08lx, %p, %08lx, %p, %p): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpExtensionName, lpdwPriority); FIXME("(%s, %08lx, %p, %08lx, %p, %p): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpExtensionName, lpdwPriority);
return 0; return 0;
} }
DWORD WINAPI lineGetCallInfo(HCALL hCall, LPLINECALLINFO lpCallInfo) DWORD WINAPI lineGetCallInfo(HCALL hCall, LPLINECALLINFO lpCallInfo)
{ {
FIXME_(tapi)("(%04x, %p): stub.\n", hCall, lpCallInfo); FIXME("(%04x, %p): stub.\n", hCall, lpCallInfo);
return 0; return 0;
} }
DWORD WINAPI lineGetCallStatus(HCALL hCall, LPLINECALLSTATUS lpCallStatus) DWORD WINAPI lineGetCallStatus(HCALL hCall, LPLINECALLSTATUS lpCallStatus)
{ {
FIXME_(tapi)("(%04x, %p): stub.\n", hCall, lpCallStatus); FIXME("(%04x, %p): stub.\n", hCall, lpCallStatus);
return 0; return 0;
} }
DWORD WINAPI lineGetConfRelatedCalls(HCALL hCall, LPLINECALLLIST lpCallList) DWORD WINAPI lineGetConfRelatedCalls(HCALL hCall, LPLINECALLLIST lpCallList)
{ {
FIXME_(tapi)("(%04x, %p): stub.\n", hCall, lpCallList); FIXME("(%04x, %p): stub.\n", hCall, lpCallList);
return 0; return 0;
} }
DWORD WINAPI lineGetCountry(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTRYLIST lpLineCountryList) DWORD WINAPI lineGetCountry(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTRYLIST lpLineCountryList)
{ {
FIXME_(tapi)("(%08lx, %08lx, %p): stub.\n", dwCountryID, dwAPIVersion, lpLineCountryList); FIXME("(%08lx, %08lx, %p): stub.\n", dwCountryID, dwAPIVersion, lpLineCountryList);
return 0; return 0;
} }
DWORD WINAPI lineGetDevCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEDEVCAPS lpLineDevCaps) DWORD WINAPI lineGetDevCaps(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEDEVCAPS lpLineDevCaps)
{ {
FIXME_(tapi)("(%04x, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, dwExtVersion, lpLineDevCaps); FIXME("(%04x, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, dwExtVersion, lpLineDevCaps);
return 0; return 0;
} }
DWORD WINAPI lineGetDevConfig(DWORD dwDeviceID, LPVARSTRING lpDeviceConfig, LPCSTR lpszDeviceClass) DWORD WINAPI lineGetDevConfig(DWORD dwDeviceID, LPVARSTRING lpDeviceConfig, LPCSTR lpszDeviceClass)
{ {
FIXME_(tapi)("(%08lx, %p, %s): stub.\n", dwDeviceID, lpDeviceConfig, lpszDeviceClass); FIXME("(%08lx, %p, %s): stub.\n", dwDeviceID, lpDeviceConfig, lpszDeviceClass);
return 0; return 0;
} }
DWORD WINAPI lineGetID(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, LPVARSTRING lpDeviceID, LPCSTR lpszDeviceClass) DWORD WINAPI lineGetID(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, LPVARSTRING lpDeviceID, LPCSTR lpszDeviceClass)
{ {
FIXME_(tapi)("(%04x, %08lx, %04x, %08lx, %p, %s): stub.\n", hLine, dwAddressID, hCall, dwSelect, lpDeviceID, lpszDeviceClass); FIXME("(%04x, %08lx, %04x, %08lx, %p, %s): stub.\n", hLine, dwAddressID, hCall, dwSelect, lpDeviceID, lpszDeviceClass);
return 0; return 0;
} }
DWORD WINAPI lineGetIcon(DWORD dwDeviceID, LPCSTR lpszDeviceClass, HICON *lphIcon) DWORD WINAPI lineGetIcon(DWORD dwDeviceID, LPCSTR lpszDeviceClass, HICON *lphIcon)
{ {
FIXME_(tapi)("(%08lx, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon); FIXME("(%08lx, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon);
return 0; return 0;
} }
DWORD WINAPI lineGetLineDevStatus(HLINE hLine, LPLINEDEVSTATUS lpLineDevStatus) DWORD WINAPI lineGetLineDevStatus(HLINE hLine, LPLINEDEVSTATUS lpLineDevStatus)
{ {
FIXME_(tapi)("(%04x, %p): stub.\n", hLine, lpLineDevStatus); FIXME("(%04x, %p): stub.\n", hLine, lpLineDevStatus);
return 0; return 0;
} }
DWORD WINAPI lineGetNewCalls(HLINE hLine, DWORD dwAddressID, DWORD dwSelect, LPLINECALLLIST lpCallList) DWORD WINAPI lineGetNewCalls(HLINE hLine, DWORD dwAddressID, DWORD dwSelect, LPLINECALLLIST lpCallList)
{ {
FIXME_(tapi)("(%04x, %08lx, %08lx, %p): stub.\n", hLine, dwAddressID, dwSelect, lpCallList); FIXME("(%04x, %08lx, %08lx, %p): stub.\n", hLine, dwAddressID, dwSelect, lpCallList);
return 0; return 0;
} }
DWORD WINAPI lineGetNumRings(HLINE hLine, DWORD dwAddressID, LPDWORD lpdwNumRings) DWORD WINAPI lineGetNumRings(HLINE hLine, DWORD dwAddressID, LPDWORD lpdwNumRings)
{ {
FIXME_(tapi)("(%04x, %08lx, %p): stub.\n", hLine, dwAddressID, lpdwNumRings); FIXME("(%04x, %08lx, %p): stub.\n", hLine, dwAddressID, lpdwNumRings);
return 0; return 0;
} }
DWORD WINAPI lineGetProviderList(DWORD dwAPIVersion, LPLINEPROVIDERLIST lpProviderList) DWORD WINAPI lineGetProviderList(DWORD dwAPIVersion, LPLINEPROVIDERLIST lpProviderList)
{ {
FIXME_(tapi)("(%08lx, %p): stub.\n", dwAPIVersion, lpProviderList); FIXME("(%08lx, %p): stub.\n", dwAPIVersion, lpProviderList);
return 0; return 0;
} }
DWORD WINAPI lineGetRequest(HLINEAPP hLineApp, DWORD dwRequestMode, LPVOID lpRequestBuffer) DWORD WINAPI lineGetRequest(HLINEAPP hLineApp, DWORD dwRequestMode, LPVOID lpRequestBuffer)
{ {
FIXME_(tapi)("%04x, %08lx, %p): stub.\n", hLineApp, dwRequestMode, lpRequestBuffer); FIXME("%04x, %08lx, %p): stub.\n", hLineApp, dwRequestMode, lpRequestBuffer);
return 0; return 0;
} }
DWORD WINAPI lineGetStatusMessages(HLINE hLine, LPDWORD lpdwLineStatus, LPDWORD lpdwAddressStates) DWORD WINAPI lineGetStatusMessages(HLINE hLine, LPDWORD lpdwLineStatus, LPDWORD lpdwAddressStates)
{ {
FIXME_(tapi)("(%04x, %p, %p): stub.\n", hLine, lpdwLineStatus, lpdwAddressStates); FIXME("(%04x, %p, %p): stub.\n", hLine, lpdwLineStatus, lpdwAddressStates);
return 0; return 0;
} }
DWORD WINAPI lineGetTranslateCaps(HLINEAPP hLineApp, DWORD dwAPIVersion, LPLINETRANSLATECAPS lpTranslateCaps) DWORD WINAPI lineGetTranslateCaps(HLINEAPP hLineApp, DWORD dwAPIVersion, LPLINETRANSLATECAPS lpTranslateCaps)
{ {
FIXME_(tapi)("(%04x, %08lx, %p): stub.\n", hLineApp, dwAPIVersion, lpTranslateCaps); FIXME("(%04x, %08lx, %p): stub.\n", hLineApp, dwAPIVersion, lpTranslateCaps);
return 0; return 0;
} }
DWORD WINAPI lineHandoff(HCALL hCall, LPCSTR lpszFileName, DWORD dwMediaMode) DWORD WINAPI lineHandoff(HCALL hCall, LPCSTR lpszFileName, DWORD dwMediaMode)
{ {
FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpszFileName, dwMediaMode); FIXME("(%04x, %s, %08lx): stub.\n", hCall, lpszFileName, dwMediaMode);
return 0; return 0;
} }
DWORD WINAPI lineHold(HCALL hCall) DWORD WINAPI lineHold(HCALL hCall)
{ {
FIXME_(tapi)("(%04x): stub.\n", hCall); FIXME("(%04x): stub.\n", hCall);
return 1; return 1;
} }
@ -275,25 +275,25 @@ DWORD WINAPI lineInitialize(
DWORD WINAPI lineMakeCall(HLINE hLine, LPHCALL lphCall, LPCSTR lpszDestAddress, DWORD dwCountryCode, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineMakeCall(HLINE hLine, LPHCALL lphCall, LPCSTR lpszDestAddress, DWORD dwCountryCode, LPLINECALLPARAMS lpCallParams)
{ {
FIXME_(tapi)("(%04x, %p, %s, %08lx, %p): stub.\n", hLine, lphCall, lpszDestAddress, dwCountryCode, lpCallParams); FIXME("(%04x, %p, %s, %08lx, %p): stub.\n", hLine, lphCall, lpszDestAddress, dwCountryCode, lpCallParams);
return 1; return 1;
} }
DWORD WINAPI lineMonitorDigits(HCALL hCall, DWORD dwDigitModes) DWORD WINAPI lineMonitorDigits(HCALL hCall, DWORD dwDigitModes)
{ {
FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwDigitModes); FIXME("(%04x, %08lx): stub.\n", hCall, dwDigitModes);
return 0; return 0;
} }
DWORD WINAPI lineMonitorMedia(HCALL hCall, DWORD dwMediaModes) DWORD WINAPI lineMonitorMedia(HCALL hCall, DWORD dwMediaModes)
{ {
FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwMediaModes); FIXME("(%04x, %08lx): stub.\n", hCall, dwMediaModes);
return 0; return 0;
} }
DWORD WINAPI lineMonitorTones(HCALL hCall, LPLINEMONITORTONE lpToneList, DWORD dwNumEntries) DWORD WINAPI lineMonitorTones(HCALL hCall, LPLINEMONITORTONE lpToneList, DWORD dwNumEntries)
{ {
FIXME_(tapi)("(%04x, %p, %08lx): stub.\n", hCall, lpToneList, dwNumEntries); FIXME("(%04x, %p, %08lx): stub.\n", hCall, lpToneList, dwNumEntries);
return 0; return 0;
} }
@ -313,31 +313,31 @@ DWORD WINAPI lineNegotiateAPIVersion(
DWORD WINAPI lineNegotiateExtVersion(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtLowVersion, DWORD dwExtHighVersion, LPDWORD lpdwExtVersion) DWORD WINAPI lineNegotiateExtVersion(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtLowVersion, DWORD dwExtHighVersion, LPDWORD lpdwExtVersion)
{ {
FIXME_(tapi)("stub.\n"); FIXME("stub.\n");
return 0; return 0;
} }
DWORD WINAPI lineOpen(HLINEAPP hLineApp, DWORD dwDeviceID, LPHLINE lphLine, DWORD dwAPIVersion, DWORD dwExtVersion, DWORD dwCallbackInstance, DWORD dwPrivileges, DWORD dwMediaModes, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineOpen(HLINEAPP hLineApp, DWORD dwDeviceID, LPHLINE lphLine, DWORD dwAPIVersion, DWORD dwExtVersion, DWORD dwCallbackInstance, DWORD dwPrivileges, DWORD dwMediaModes, LPLINECALLPARAMS lpCallParams)
{ {
FIXME_(tapi)("stub.\n"); FIXME("stub.\n");
return 0; return 0;
} }
DWORD WINAPI linePark(HCALL hCall, DWORD dwParkMode, LPCSTR lpszDirAddress, LPVARSTRING lpNonDirAddress) DWORD WINAPI linePark(HCALL hCall, DWORD dwParkMode, LPCSTR lpszDirAddress, LPVARSTRING lpNonDirAddress)
{ {
FIXME_(tapi)("(%04x, %08lx, %s, %p): stub.\n", hCall, dwParkMode, lpszDirAddress, lpNonDirAddress); FIXME("(%04x, %08lx, %s, %p): stub.\n", hCall, dwParkMode, lpszDirAddress, lpNonDirAddress);
return 1; return 1;
} }
DWORD WINAPI linePickup(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress, LPCSTR lpszGroupID) DWORD WINAPI linePickup(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress, LPCSTR lpszGroupID)
{ {
FIXME_(tapi)("(%04x, %08lx, %p, %s, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress, lpszGroupID); FIXME("(%04x, %08lx, %p, %s, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress, lpszGroupID);
return 1; return 1;
} }
DWORD WINAPI linePrepareAddToConference(HCALL hConfCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams) DWORD WINAPI linePrepareAddToConference(HCALL hConfCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
{ {
FIXME_(tapi)("(%04x, %p, %p): stub.\n", hConfCall, lphConsultCall, lpCallParams); FIXME("(%04x, %p, %p): stub.\n", hConfCall, lphConsultCall, lpCallParams);
return 1; return 1;
} }
@ -356,73 +356,73 @@ DWORD WINAPI lineRedirect(
DWORD WINAPI lineRegisterRequestRecipient(HLINEAPP hLineApp, DWORD dwRegistrationInstance, DWORD dwRequestMode, DWORD dwEnable) DWORD WINAPI lineRegisterRequestRecipient(HLINEAPP hLineApp, DWORD dwRegistrationInstance, DWORD dwRequestMode, DWORD dwEnable)
{ {
FIXME_(tapi)("(%04x, %08lx, %08lx, %08lx): stub.\n", hLineApp, dwRegistrationInstance, dwRequestMode, dwEnable); FIXME("(%04x, %08lx, %08lx, %08lx): stub.\n", hLineApp, dwRegistrationInstance, dwRequestMode, dwEnable);
return 1; return 1;
} }
DWORD WINAPI lineReleaseUserUserInfo(HCALL hCall) DWORD WINAPI lineReleaseUserUserInfo(HCALL hCall)
{ {
FIXME_(tapi)("(%04x): stub.\n", hCall); FIXME("(%04x): stub.\n", hCall);
return 1; return 1;
} }
DWORD WINAPI lineRemoveFromConference(HCALL hCall) DWORD WINAPI lineRemoveFromConference(HCALL hCall)
{ {
FIXME_(tapi)("(%04x): stub.\n", hCall); FIXME("(%04x): stub.\n", hCall);
return 1; return 1;
} }
DWORD WINAPI lineRemoveProvider(DWORD dwPermanentProviderID, HWND hwndOwner) DWORD WINAPI lineRemoveProvider(DWORD dwPermanentProviderID, HWND hwndOwner)
{ {
FIXME_(tapi)("(%08lx, %04x): stub.\n", dwPermanentProviderID, hwndOwner); FIXME("(%08lx, %04x): stub.\n", dwPermanentProviderID, hwndOwner);
return 1; return 1;
} }
DWORD WINAPI lineSecureCall(HCALL hCall) DWORD WINAPI lineSecureCall(HCALL hCall)
{ {
FIXME_(tapi)("(%04x): stub.\n", hCall); FIXME("(%04x): stub.\n", hCall);
return 1; return 1;
} }
DWORD WINAPI lineSendUserUserInfo(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize) DWORD WINAPI lineSendUserUserInfo(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
{ {
FIXME_(tapi)("(%04x, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize); FIXME("(%04x, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize);
return 1; return 1;
} }
DWORD WINAPI lineSetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPCSTR lpszExtensionName, DWORD dwPriority) DWORD WINAPI lineSetAppPriority(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPCSTR lpszExtensionName, DWORD dwPriority)
{ {
FIXME_(tapi)("(%s, %08lx, %p, %08lx, %s, %08lx): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpszExtensionName, dwPriority); FIXME("(%s, %08lx, %p, %08lx, %s, %08lx): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpszExtensionName, dwPriority);
return 0; return 0;
} }
DWORD WINAPI lineSetAppSpecific(HCALL hCall, DWORD dwAppSpecific) DWORD WINAPI lineSetAppSpecific(HCALL hCall, DWORD dwAppSpecific)
{ {
FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwAppSpecific); FIXME("(%04x, %08lx): stub.\n", hCall, dwAppSpecific);
return 0; return 0;
} }
DWORD WINAPI lineSetCallParams(HCALL hCall, DWORD dwBearerMode, DWORD dwMinRate, DWORD dwMaxRate, LPLINEDIALPARAMS lpDialParams) DWORD WINAPI lineSetCallParams(HCALL hCall, DWORD dwBearerMode, DWORD dwMinRate, DWORD dwMaxRate, LPLINEDIALPARAMS lpDialParams)
{ {
FIXME_(tapi)("(%04x, %08lx, %08lx, %08lx, %p): stub.\n", hCall, dwBearerMode, dwMinRate, dwMaxRate, lpDialParams); FIXME("(%04x, %08lx, %08lx, %08lx, %p): stub.\n", hCall, dwBearerMode, dwMinRate, dwMaxRate, lpDialParams);
return 1; return 1;
} }
DWORD WINAPI lineSetCallPrivilege(HCALL hCall, DWORD dwCallPrivilege) DWORD WINAPI lineSetCallPrivilege(HCALL hCall, DWORD dwCallPrivilege)
{ {
FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwCallPrivilege); FIXME("(%04x, %08lx): stub.\n", hCall, dwCallPrivilege);
return 0; return 0;
} }
DWORD WINAPI lineSetCurrentLocation(HLINEAPP hLineApp, DWORD dwLocation) DWORD WINAPI lineSetCurrentLocation(HLINEAPP hLineApp, DWORD dwLocation)
{ {
FIXME_(tapi)("(%04x, %08lx): stub.\n", hLineApp, dwLocation); FIXME("(%04x, %08lx): stub.\n", hLineApp, dwLocation);
return 0; return 0;
} }
DWORD WINAPI lineSetDevConfig(DWORD dwDeviceID, LPVOID lpDeviceConfig, DWORD dwSize, LPCSTR lpszDeviceClass) DWORD WINAPI lineSetDevConfig(DWORD dwDeviceID, LPVOID lpDeviceConfig, DWORD dwSize, LPCSTR lpszDeviceClass)
{ {
FIXME_(tapi)("(%0lx, %p, %08lx, %s): stub.\n", dwDeviceID, lpDeviceConfig, dwSize, lpszDeviceClass); FIXME("(%0lx, %p, %08lx, %s): stub.\n", dwDeviceID, lpDeviceConfig, dwSize, lpszDeviceClass);
return 0; return 0;
} }
@ -440,90 +440,90 @@ DWORD dwToneNumEntries,
LPLINEMEDIACONTROLCALLSTATE const lpCallStateList, LPLINEMEDIACONTROLCALLSTATE const lpCallStateList,
DWORD dwCallStateNumEntries) DWORD dwCallStateNumEntries)
{ {
FIXME_(tapi)(": stub.\n"); FIXME(": stub.\n");
return 0; return 0;
} }
DWORD WINAPI lineSetMediaMode(HCALL hCall, DWORD dwMediaModes) DWORD WINAPI lineSetMediaMode(HCALL hCall, DWORD dwMediaModes)
{ {
FIXME_(tapi)("(%04x, %08lx): stub.\n", hCall, dwMediaModes); FIXME("(%04x, %08lx): stub.\n", hCall, dwMediaModes);
return 0; return 0;
} }
DWORD WINAPI lineSetNumRings(HLINE hLine, DWORD dwAddressID, DWORD dwNumRings) DWORD WINAPI lineSetNumRings(HLINE hLine, DWORD dwAddressID, DWORD dwNumRings)
{ {
FIXME_(tapi)("(%04x, %08lx, %08lx): stub.\n", hLine, dwAddressID, dwNumRings); FIXME("(%04x, %08lx, %08lx): stub.\n", hLine, dwAddressID, dwNumRings);
return 0; return 0;
} }
DWORD WINAPI lineSetStatusMessages(HLINE hLine, DWORD dwLineStates, DWORD dwAddressStates) DWORD WINAPI lineSetStatusMessages(HLINE hLine, DWORD dwLineStates, DWORD dwAddressStates)
{ {
FIXME_(tapi)("(%04x, %08lx, %08lx): stub.\n", hLine, dwLineStates, dwAddressStates); FIXME("(%04x, %08lx, %08lx): stub.\n", hLine, dwLineStates, dwAddressStates);
return 0; return 0;
} }
DWORD WINAPI lineSetTerminal(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, DWORD dwTerminalModes, DWORD dwTerminalID, DWORD bEnable) DWORD WINAPI lineSetTerminal(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, DWORD dwTerminalModes, DWORD dwTerminalID, DWORD bEnable)
{ {
FIXME_(tapi)("(%04x, %08lx, %04x, %08lx, %08lx, %08lx, %08lx): stub.\n", hLine, dwAddressID, hCall, dwSelect, dwTerminalModes, dwTerminalID, bEnable); FIXME("(%04x, %08lx, %04x, %08lx, %08lx, %08lx, %08lx): stub.\n", hLine, dwAddressID, hCall, dwSelect, dwTerminalModes, dwTerminalID, bEnable);
return 1; return 1;
} }
DWORD WINAPI lineSetTollList(HLINEAPP hLineApp, DWORD dwDeviceID, LPCSTR lpszAddressIn, DWORD dwTollListOption) DWORD WINAPI lineSetTollList(HLINEAPP hLineApp, DWORD dwDeviceID, LPCSTR lpszAddressIn, DWORD dwTollListOption)
{ {
FIXME_(tapi)("(%04x, %08lx, %s, %08lx): stub.\n", hLineApp, dwDeviceID, lpszAddressIn, dwTollListOption); FIXME("(%04x, %08lx, %s, %08lx): stub.\n", hLineApp, dwDeviceID, lpszAddressIn, dwTollListOption);
return 0; return 0;
} }
DWORD WINAPI lineSetupConference(HCALL hCall, HLINE hLine, LPHCALL lphConfCall, LPHCALL lphConsultCall, DWORD dwNumParties, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineSetupConference(HCALL hCall, HLINE hLine, LPHCALL lphConfCall, LPHCALL lphConsultCall, DWORD dwNumParties, LPLINECALLPARAMS lpCallParams)
{ {
FIXME_(tapi)("(%04x, %04x, %p, %p, %08lx, %p): stub.\n", hCall, hLine, lphConfCall, lphConsultCall, dwNumParties, lpCallParams); FIXME("(%04x, %04x, %p, %p, %08lx, %p): stub.\n", hCall, hLine, lphConfCall, lphConsultCall, dwNumParties, lpCallParams);
return 1; return 1;
} }
DWORD WINAPI lineSetupTransfer(HCALL hCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams) DWORD WINAPI lineSetupTransfer(HCALL hCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
{ {
FIXME_(tapi)("(%04x, %p, %p): stub.\n", hCall, lphConsultCall, lpCallParams); FIXME("(%04x, %p, %p): stub.\n", hCall, lphConsultCall, lpCallParams);
return 1; return 1;
} }
DWORD WINAPI lineShutdown(HLINEAPP hLineApp) DWORD WINAPI lineShutdown(HLINEAPP hLineApp)
{ {
FIXME_(tapi)("(%04x): stub.\n", hLineApp); FIXME("(%04x): stub.\n", hLineApp);
return 0; return 0;
} }
DWORD WINAPI lineSwapHold(HCALL hActiveCall, HCALL hHeldCall) DWORD WINAPI lineSwapHold(HCALL hActiveCall, HCALL hHeldCall)
{ {
FIXME_(tapi)("(active: %04x, held: %04x): stub.\n", hActiveCall, hHeldCall); FIXME("(active: %04x, held: %04x): stub.\n", hActiveCall, hHeldCall);
return 1; return 1;
} }
DWORD WINAPI lineTranslateAddress(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, LPCSTR lpszAddressIn, DWORD dwCard, DWORD dwTranslateOptions, LPLINETRANSLATEOUTPUT lpTranslateOutput) DWORD WINAPI lineTranslateAddress(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, LPCSTR lpszAddressIn, DWORD dwCard, DWORD dwTranslateOptions, LPLINETRANSLATEOUTPUT lpTranslateOutput)
{ {
FIXME_(tapi)("(%04x, %08lx, %08lx, %s, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, lpszAddressIn, dwCard, dwTranslateOptions, lpTranslateOutput); FIXME("(%04x, %08lx, %08lx, %s, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, lpszAddressIn, dwCard, dwTranslateOptions, lpTranslateOutput);
return 0; return 0;
} }
DWORD WINAPI lineTranslateDialog(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, HWND hwndOwner, LPCSTR lpszAddressIn) DWORD WINAPI lineTranslateDialog(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, HWND hwndOwner, LPCSTR lpszAddressIn)
{ {
FIXME_(tapi)("(%04x, %08lx, %08lx, %04x, %s): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, hwndOwner, lpszAddressIn); FIXME("(%04x, %08lx, %08lx, %04x, %s): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, hwndOwner, lpszAddressIn);
return 0; return 0;
} }
DWORD WINAPI lineUncompleteCall(HLINE hLine, DWORD dwCompletionID) DWORD WINAPI lineUncompleteCall(HLINE hLine, DWORD dwCompletionID)
{ {
FIXME_(tapi)("(%04x, %08lx): stub.\n", hLine, dwCompletionID); FIXME("(%04x, %08lx): stub.\n", hLine, dwCompletionID);
return 1; return 1;
} }
DWORD WINAPI lineUnHold(HCALL hCall) DWORD WINAPI lineUnHold(HCALL hCall)
{ {
FIXME_(tapi)("(%04x): stub.\n", hCall); FIXME("(%04x): stub.\n", hCall);
return 1; return 1;
} }
DWORD WINAPI lineUnpark(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress) DWORD WINAPI lineUnpark(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress)
{ {
FIXME_(tapi)("(%04x, %08lx, %p, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress); FIXME("(%04x, %08lx, %p, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress);
return 1; return 1;
} }

View File

@ -30,7 +30,7 @@
#include "options.h" #include "options.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(dosfs) DEFAULT_DEBUG_CHANNEL(dosfs)
DECLARE_DEBUG_CHANNEL(file) DECLARE_DEBUG_CHANNEL(file)
static DOS_FULL_NAME DIR_Windows; static DOS_FULL_NAME DIR_Windows;
@ -125,14 +125,14 @@ int DIR_Init(void)
SetEnvironmentVariableA( "windir", DIR_Windows.short_name ); SetEnvironmentVariableA( "windir", DIR_Windows.short_name );
SetEnvironmentVariableA( "winsysdir", DIR_System.short_name ); SetEnvironmentVariableA( "winsysdir", DIR_System.short_name );
TRACE_(dosfs)("WindowsDir = %s (%s)\n", TRACE("WindowsDir = %s (%s)\n",
DIR_Windows.short_name, DIR_Windows.long_name ); DIR_Windows.short_name, DIR_Windows.long_name );
TRACE_(dosfs)("SystemDir = %s (%s)\n", TRACE("SystemDir = %s (%s)\n",
DIR_System.short_name, DIR_System.long_name ); DIR_System.short_name, DIR_System.long_name );
TRACE_(dosfs)("TempDir = %s (%s)\n", TRACE("TempDir = %s (%s)\n",
tmp_dir.short_name, tmp_dir.long_name ); tmp_dir.short_name, tmp_dir.long_name );
TRACE_(dosfs)("Path = %s\n", path ); TRACE("Path = %s\n", path );
TRACE_(dosfs)("Cwd = %c:\\%s\n", TRACE("Cwd = %c:\\%s\n",
'A' + drive, DRIVE_GetDosCwd( drive ) ); 'A' + drive, DRIVE_GetDosCwd( drive ) );
return 1; return 1;
@ -650,7 +650,7 @@ DWORD WINAPI SearchPathA( LPCSTR path, LPCSTR name, LPCSTR ext, DWORD buflen,
for (p = buffer; *p; p++) if (*p == '/') *p = '\\'; for (p = buffer; *p; p++) if (*p == '/') *p = '\\';
if (lastpart) *lastpart = strrchr( buffer, '\\' ) + 1; if (lastpart) *lastpart = strrchr( buffer, '\\' ) + 1;
} }
TRACE_(dosfs)("Returning %d\n", strlen(res) + 3 ); TRACE("Returning %d\n", strlen(res) + 3 );
return strlen(res) + 3; return strlen(res) + 3;
} }

View File

@ -35,7 +35,7 @@
#include "options.h" #include "options.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(dosfs) DEFAULT_DEBUG_CHANNEL(dosfs)
DECLARE_DEBUG_CHANNEL(file) DECLARE_DEBUG_CHANNEL(file)
/* Define the VFAT ioctl to get both short and long file names */ /* Define the VFAT ioctl to get both short and long file names */
@ -528,13 +528,13 @@ BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
while (len > 1 && name[len-1] == '.') len--; while (len > 1 && name[len-1] == '.') len--;
if (long_len < len + 1) return FALSE; if (long_len < len + 1) return FALSE;
TRACE_(dosfs)("%s,%s\n", path, name ); TRACE("%s,%s\n", path, name );
if (!DOSFS_ToDosFCBFormat( name, dos_name )) dos_name[0] = '\0'; if (!DOSFS_ToDosFCBFormat( name, dos_name )) dos_name[0] = '\0';
if (!(dir = DOSFS_OpenDir( path ))) if (!(dir = DOSFS_OpenDir( path )))
{ {
WARN_(dosfs)("(%s,%s): can't open dir: %s\n", WARN("(%s,%s): can't open dir: %s\n",
path, name, strerror(errno) ); path, name, strerror(errno) );
return FALSE; return FALSE;
} }
@ -574,11 +574,11 @@ BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
else else
DOSFS_Hash( long_name, short_buf, FALSE, ignore_case ); DOSFS_Hash( long_name, short_buf, FALSE, ignore_case );
} }
TRACE_(dosfs)("(%s,%s) -> %s (%s)\n", TRACE("(%s,%s) -> %s (%s)\n",
path, name, long_name, short_buf ? short_buf : "***"); path, name, long_name, short_buf ? short_buf : "***");
} }
else else
WARN_(dosfs)("'%s' not found in '%s'\n", name, path); WARN("'%s' not found in '%s'\n", name, path);
DOSFS_CloseDir( dir ); DOSFS_CloseDir( dir );
return ret; return ret;
} }
@ -666,7 +666,7 @@ HFILE DOSFS_OpenDevice( const char *name, DWORD access )
to_dup = GetStdHandle( STD_OUTPUT_HANDLE ); to_dup = GetStdHandle( STD_OUTPUT_HANDLE );
break; break;
default: default:
FIXME_(dosfs)("can't open CON read/write\n"); FIXME("can't open CON read/write\n");
return HFILE_ERROR; return HFILE_ERROR;
break; break;
} }
@ -688,7 +688,7 @@ HFILE DOSFS_OpenDevice( const char *name, DWORD access )
if(devname[0]) if(devname[0])
{ {
TRACE_(file)("DOSFS_OpenDevice %s is %s\n", TRACE_(file)("DOSFS_OpenDevice %s is %s\n",
DOSFS_Devices[i].name,devname); DOSFS_Devices[i].name,devname);
r = FILE_CreateFile( devname, access, r = FILE_CreateFile( devname, access,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, -1 ); OPEN_EXISTING, 0, -1 );
@ -697,7 +697,7 @@ HFILE DOSFS_OpenDevice( const char *name, DWORD access )
} }
} }
FIXME_(dosfs)("device open %s not supported (yet)\n",DOSFS_Devices[i].name); FIXME("device open %s not supported (yet)\n",DOSFS_Devices[i].name);
return HFILE_ERROR; return HFILE_ERROR;
} }
} }
@ -757,8 +757,7 @@ BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last, DOS_FULL_NAME *full )
UINT flags; UINT flags;
char *p_l, *p_s, *root; char *p_l, *p_s, *root;
TRACE_(dosfs)("%s (last=%d)\n", TRACE("%s (last=%d)\n", name, check_last );
name, check_last );
if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE; if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE;
flags = DRIVE_GetFlags( full->drive ); flags = DRIVE_GetFlags( full->drive );
@ -870,8 +869,7 @@ BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last, DOS_FULL_NAME *full )
} }
if (!full->long_name[0]) strcpy( full->long_name, "/" ); if (!full->long_name[0]) strcpy( full->long_name, "/" );
if (!full->short_name[2]) strcpy( full->short_name + 2, "\\" ); if (!full->short_name[2]) strcpy( full->short_name + 2, "\\" );
TRACE_(dosfs)("returning %s = %s\n", TRACE("returning %s = %s\n", full->long_name, full->short_name );
full->long_name, full->short_name );
return TRUE; return TRUE;
} }
@ -1070,7 +1068,7 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
char *endchar = buffer + sizeof(buffer) - 2; char *endchar = buffer + sizeof(buffer) - 2;
*endchar = '\0'; *endchar = '\0';
TRACE_(dosfs)("converting '%s'\n", name ); TRACE("converting '%s'\n", name );
if (!name || ((drive = DOSFS_GetPathDrive( &name )) == -1) ) if (!name || ((drive = DOSFS_GetPathDrive( &name )) == -1) )
{ SetLastError( ERROR_INVALID_PARAMETER ); { SetLastError( ERROR_INVALID_PARAMETER );
@ -1144,7 +1142,7 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
lstrcpynA( result, buffer, len ); lstrcpynA( result, buffer, len );
} }
TRACE_(dosfs)("returning '%s'\n", buffer ); TRACE("returning '%s'\n", buffer );
/* If the lpBuffer buffer is too small, the return value is the /* If the lpBuffer buffer is too small, the return value is the
size of the buffer, in characters, required to hold the path. */ size of the buffer, in characters, required to hold the path. */
@ -1278,7 +1276,7 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAA *entry )
lstrcpynA( p, long_name, sizeof(buffer) - (int)(p - buffer) ); lstrcpynA( p, long_name, sizeof(buffer) - (int)(p - buffer) );
if (!FILE_Stat( buffer, &fileinfo )) if (!FILE_Stat( buffer, &fileinfo ))
{ {
WARN_(dosfs)("can't stat %s\n", buffer); WARN("can't stat %s\n", buffer);
continue; continue;
} }
if (fileinfo.dwFileAttributes & ~attr) continue; if (fileinfo.dwFileAttributes & ~attr) continue;
@ -1300,9 +1298,9 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAA *entry )
lstrcpynA( entry->cFileName, long_name, sizeof(entry->cFileName) ); lstrcpynA( entry->cFileName, long_name, sizeof(entry->cFileName) );
if (!(flags & DRIVE_CASE_PRESERVING)) CharLowerA( entry->cFileName ); if (!(flags & DRIVE_CASE_PRESERVING)) CharLowerA( entry->cFileName );
TRACE_(dosfs)("returning %s (%s) %02lx %ld\n", TRACE("returning %s (%s) %02lx %ld\n",
entry->cFileName, entry->cAlternateFileName, entry->cFileName, entry->cAlternateFileName,
entry->dwFileAttributes, entry->nFileSizeLow ); entry->dwFileAttributes, entry->nFileSizeLow );
return 1; return 1;
} }
return 0; /* End of directory */ return 0; /* End of directory */
@ -1865,7 +1863,7 @@ DWORD WINAPI QueryDosDeviceA(LPCSTR devname,LPSTR target,DWORD bufsize)
LPSTR s; LPSTR s;
char buffer[200]; char buffer[200];
TRACE_(dosfs)("(%s,...)\n",devname?devname:"<null>"); TRACE("(%s,...)\n", devname ? devname : "<null>");
if (!devname) { if (!devname) {
/* return known MSDOS devices */ /* return known MSDOS devices */
strcpy(buffer,"CON COM1 COM2 LPT1 NUL "); strcpy(buffer,"CON COM1 COM2 LPT1 NUL ");
@ -1941,7 +1939,7 @@ BOOL WINAPI SystemTimeToFileTime( const SYSTEMTIME *syst, LPFILETIME ft )
* DefineDosDeviceA (KERNEL32.182) * DefineDosDeviceA (KERNEL32.182)
*/ */
BOOL WINAPI DefineDosDeviceA(DWORD flags,LPCSTR devname,LPCSTR targetpath) { BOOL WINAPI DefineDosDeviceA(DWORD flags,LPCSTR devname,LPCSTR targetpath) {
FIXME_(dosfs)("(0x%08lx,%s,%s),stub!\n",flags,devname,targetpath); FIXME("(0x%08lx,%s,%s),stub!\n",flags,devname,targetpath);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }

View File

@ -45,7 +45,7 @@
#include "task.h" #include "task.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(dosfs) DEFAULT_DEBUG_CHANNEL(dosfs)
DECLARE_DEBUG_CHANNEL(file) DECLARE_DEBUG_CHANNEL(file)
typedef struct typedef struct
@ -204,12 +204,13 @@ int DRIVE_Init(void)
DRIVE_CurDrive = i; DRIVE_CurDrive = i;
count++; count++;
TRACE_(dosfs)("%s: path=%s type=%s label='%s' serial=%08lx flags=%08x dev=%x ino=%x\n", TRACE("%s: path=%s type=%s label='%s' serial=%08lx "
name, path, DRIVE_Types[drive->type], "flags=%08x dev=%x ino=%x\n",
drive->label, drive->serial, drive->flags, name, path, DRIVE_Types[drive->type],
(int)drive->dev, (int)drive->ino ); drive->label, drive->serial, drive->flags,
(int)drive->dev, (int)drive->ino );
} }
else WARN_(dosfs)("%s: not defined\n", name ); else WARN("%s: not defined\n", name );
} }
if (!count) if (!count)
@ -276,7 +277,7 @@ int DRIVE_SetCurrentDrive( int drive )
SetLastError( ERROR_INVALID_DRIVE ); SetLastError( ERROR_INVALID_DRIVE );
return 0; return 0;
} }
TRACE_(dosfs)("%c:\n", 'A' + drive ); TRACE("%c:\n", 'A' + drive );
DRIVE_CurDrive = drive; DRIVE_CurDrive = drive;
if (pTask) pTask->curdrive = drive | 0x80; if (pTask) pTask->curdrive = drive | 0x80;
return 1; return 1;
@ -336,9 +337,8 @@ int DRIVE_FindDriveRoot( const char **path )
*next = 0; *next = 0;
if (rootdrive != -1) if (rootdrive != -1)
TRACE_(dosfs)("%s -> drive %c:, root='%s', name='%s'\n", TRACE("%s -> drive %c:, root='%s', name='%s'\n",
buffer, 'A' + rootdrive, buffer, 'A' + rootdrive, DOSDrives[rootdrive].root, *path );
DOSDrives[rootdrive].root, *path );
return rootdrive; return rootdrive;
} }
@ -459,7 +459,7 @@ int DRIVE_Chdir( int drive, const char *path )
strcpy( buffer, "A:" ); strcpy( buffer, "A:" );
buffer[0] += drive; buffer[0] += drive;
TRACE_(dosfs)("(%c:,%s)\n", buffer[0], path ); TRACE("(%c:,%s)\n", buffer[0], path );
lstrcpynA( buffer + 2, path, sizeof(buffer) - 2 ); lstrcpynA( buffer + 2, path, sizeof(buffer) - 2 );
if (!DOSFS_GetFullName( buffer, TRUE, &full_name )) return 0; if (!DOSFS_GetFullName( buffer, TRUE, &full_name )) return 0;
@ -472,7 +472,7 @@ int DRIVE_Chdir( int drive, const char *path )
unix_cwd = full_name.long_name + strlen( DOSDrives[drive].root ); unix_cwd = full_name.long_name + strlen( DOSDrives[drive].root );
while (*unix_cwd == '/') unix_cwd++; while (*unix_cwd == '/') unix_cwd++;
TRACE_(dosfs)("(%c:): unix_cwd=%s dos_cwd=%s\n", TRACE("(%c:): unix_cwd=%s dos_cwd=%s\n",
'A' + drive, unix_cwd, full_name.short_name + 3 ); 'A' + drive, unix_cwd, full_name.short_name + 3 );
HeapFree( SystemHeap, 0, DOSDrives[drive].dos_cwd ); HeapFree( SystemHeap, 0, DOSDrives[drive].dos_cwd );
@ -545,10 +545,8 @@ int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive )
if ( new->root ) if ( new->root )
{ {
TRACE_(dosfs)("Can\'t map drive %c to drive %c - " TRACE("Can\'t map drive %c to drive %c - drive %c already exists\n",
"drive %c already exists\n", 'A' + existing_drive, 'A' + new_drive, 'A' + new_drive );
'A' + existing_drive, 'A' + new_drive,
'A' + new_drive );
/* it is already mapped there, so return success */ /* it is already mapped there, so return success */
if (!strcmp(old->root,new->root)) if (!strcmp(old->root,new->root))
return 1; return 1;
@ -565,8 +563,8 @@ int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive )
new->dev = old->dev; new->dev = old->dev;
new->ino = old->ino; new->ino = old->ino;
TRACE_(dosfs)("Drive %c is now equal to drive %c\n", TRACE("Drive %c is now equal to drive %c\n",
'A' + new_drive, 'A' + existing_drive ); 'A' + new_drive, 'A' + existing_drive );
return 1; return 1;
} }
@ -662,7 +660,7 @@ static int DRIVE_GetFreeSpace( int drive, PULARGE_INTEGER size,
#endif #endif
{ {
FILE_SetDosError(); FILE_SetDosError();
WARN_(dosfs)("cannot do statfs(%s)\n", DOSDrives[drive].root); WARN("cannot do statfs(%s)\n", DOSDrives[drive].root);
return 0; return 0;
} }
@ -855,10 +853,10 @@ BOOL WINAPI GetDiskFreeSpaceExA( LPCSTR root,
{ {
if ((root[1]) && ((root[1] != ':') || (root[2] != '\\'))) if ((root[1]) && ((root[1] != ':') || (root[2] != '\\')))
{ {
FIXME_(dosfs)("there are valid root names which are not supported yet\n"); FIXME("there are valid root names which are not supported yet\n");
/* ..like UNC names, for instance. */ /* ..like UNC names, for instance. */
WARN_(dosfs)("invalid root '%s'\n", root ); WARN("invalid root '%s'\n", root );
return FALSE; return FALSE;
} }
drive = toupper(root[0]) - 'A'; drive = toupper(root[0]) - 'A';
@ -893,7 +891,7 @@ BOOL WINAPI GetDiskFreeSpaceExA( LPCSTR root,
if (GetVersionExA(&ovi)) if (GetVersionExA(&ovi))
{ {
if (ovi.dwPlatformId == VER_PLATFORM_WIN32_NT && ovi.dwMajorVersion > 4) if (ovi.dwPlatformId == VER_PLATFORM_WIN32_NT && ovi.dwMajorVersion > 4)
FIXME_(dosfs)("no per-user quota support yet\n"); FIXME("no per-user quota support yet\n");
} }
} }
@ -936,7 +934,7 @@ BOOL WINAPI GetDiskFreeSpaceExW( LPCWSTR root, PULARGE_INTEGER avail,
UINT16 WINAPI GetDriveType16( UINT16 WINAPI GetDriveType16(
UINT16 drive /* [in] number (NOT letter) of drive */ UINT16 drive /* [in] number (NOT letter) of drive */
) { ) {
TRACE_(dosfs)("(%c:)\n", 'A' + drive ); TRACE("(%c:)\n", 'A' + drive );
switch(DRIVE_GetType(drive)) switch(DRIVE_GetType(drive))
{ {
case TYPE_FLOPPY: return DRIVE_REMOVABLE; case TYPE_FLOPPY: return DRIVE_REMOVABLE;
@ -981,14 +979,14 @@ UINT16 WINAPI GetDriveType16(
UINT WINAPI GetDriveTypeA(LPCSTR root /* String describing drive */) UINT WINAPI GetDriveTypeA(LPCSTR root /* String describing drive */)
{ {
int drive; int drive;
TRACE_(dosfs)("(%s)\n", debugstr_a(root)); TRACE("(%s)\n", debugstr_a(root));
if (NULL == root) drive = DRIVE_GetCurrentDrive(); if (NULL == root) drive = DRIVE_GetCurrentDrive();
else else
{ {
if ((root[1]) && (root[1] != ':')) if ((root[1]) && (root[1] != ':'))
{ {
WARN_(dosfs)("invalid root '%s'\n", debugstr_a(root)); WARN("invalid root '%s'\n", debugstr_a(root));
return DRIVE_DOESNOTEXIST; return DRIVE_DOESNOTEXIST;
} }
drive = toupper(root[0]) - 'A'; drive = toupper(root[0]) - 'A';
@ -1198,7 +1196,7 @@ BOOL WINAPI GetVolumeInformationA( LPCSTR root, LPSTR label,
{ {
if ((root[1]) && (root[1] != ':')) if ((root[1]) && (root[1] != ':'))
{ {
WARN_(dosfs)("invalid root '%s'\n",root); WARN("invalid root '%s'\n",root);
return FALSE; return FALSE;
} }
drive = toupper(root[0]) - 'A'; drive = toupper(root[0]) - 'A';
@ -1271,7 +1269,7 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label,
*/ */
BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname) BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname)
{ {
FIXME_(dosfs)("(%s,%s),stub!\n",rootpath,volname); FIXME("(%s,%s),stub!\n",rootpath,volname);
return TRUE; return TRUE;
} }

View File

@ -7,7 +7,7 @@
#include "dc.h" #include "dc.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(bitblt) DEFAULT_DEBUG_CHANNEL(bitblt)
DECLARE_DEBUG_CHANNEL(bitmap) DECLARE_DEBUG_CHANNEL(bitmap)
DECLARE_DEBUG_CHANNEL(gdi) DECLARE_DEBUG_CHANNEL(gdi)
@ -21,8 +21,7 @@ BOOL16 WINAPI PatBlt16( HDC16 hdc, INT16 left, INT16 top,
DC * dc = DC_GetDCPtr( hdc ); DC * dc = DC_GetDCPtr( hdc );
if (!dc || !dc->funcs->pPatBlt) return FALSE; if (!dc || !dc->funcs->pPatBlt) return FALSE;
TRACE_(bitblt)("%04x %d,%d %dx%d %06lx\n", TRACE("%04x %d,%d %dx%d %06lx\n", hdc, left, top, width, height, rop );
hdc, left, top, width, height, rop );
return dc->funcs->pPatBlt( dc, left, top, width, height, rop ); return dc->funcs->pPatBlt( dc, left, top, width, height, rop );
} }
@ -36,8 +35,7 @@ BOOL WINAPI PatBlt( HDC hdc, INT left, INT top,
DC * dc = DC_GetDCPtr( hdc ); DC * dc = DC_GetDCPtr( hdc );
if (!dc || !dc->funcs->pPatBlt) return FALSE; if (!dc || !dc->funcs->pPatBlt) return FALSE;
TRACE_(bitblt)("%04x %d,%d %dx%d %06lx\n", TRACE("%04x %d,%d %dx%d %06lx\n", hdc, left, top, width, height, rop );
hdc, left, top, width, height, rop );
return dc->funcs->pPatBlt( dc, left, top, width, height, rop ); return dc->funcs->pPatBlt( dc, left, top, width, height, rop );
} }
@ -55,9 +53,9 @@ BOOL16 WINAPI BitBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst, INT16 width,
if (!dcDst->funcs->pBitBlt) return FALSE; if (!dcDst->funcs->pBitBlt) return FALSE;
dcSrc = DC_GetDCPtr( hdcSrc ); dcSrc = DC_GetDCPtr( hdcSrc );
TRACE_(bitblt)("hdcSrc=%04x %d,%d %d bpp -> hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n", TRACE("hdcSrc=%04x %d,%d %d bpp->hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n",
hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0,
hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop); hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop);
return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height, return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height,
dcSrc, xSrc, ySrc, rop ); dcSrc, xSrc, ySrc, rop );
} }
@ -76,9 +74,9 @@ BOOL WINAPI BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width,
if (!dcDst->funcs->pBitBlt) return FALSE; if (!dcDst->funcs->pBitBlt) return FALSE;
dcSrc = DC_GetDCPtr( hdcSrc ); dcSrc = DC_GetDCPtr( hdcSrc );
TRACE_(bitblt)("hdcSrc=%04x %d,%d %d bpp -> hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n", TRACE("hdcSrc=%04x %d,%d %d bpp->hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n",
hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0,
hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop); hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop);
return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height, return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height,
dcSrc, xSrc, ySrc, rop ); dcSrc, xSrc, ySrc, rop );
} }
@ -98,10 +96,10 @@ BOOL16 WINAPI StretchBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst,
if (!dcDst->funcs->pStretchBlt) return FALSE; if (!dcDst->funcs->pStretchBlt) return FALSE;
dcSrc = DC_GetDCPtr( hdcSrc ); dcSrc = DC_GetDCPtr( hdcSrc );
TRACE_(bitblt)("%04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n", TRACE("%04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n",
hdcSrc, xSrc, ySrc, widthSrc, heightSrc, hdcSrc, xSrc, ySrc, widthSrc, heightSrc,
dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst, dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst,
widthDst, heightDst, dcDst->w.bitsPerPixel, rop ); widthDst, heightDst, dcDst->w.bitsPerPixel, rop );
return dcDst->funcs->pStretchBlt( dcDst, xDst, yDst, widthDst, heightDst, return dcDst->funcs->pStretchBlt( dcDst, xDst, yDst, widthDst, heightDst,
dcSrc, xSrc, ySrc, widthSrc, heightSrc, dcSrc, xSrc, ySrc, widthSrc, heightSrc,
rop ); rop );
@ -122,10 +120,10 @@ BOOL WINAPI StretchBlt( HDC hdcDst, INT xDst, INT yDst,
if (!dcDst->funcs->pStretchBlt) return FALSE; if (!dcDst->funcs->pStretchBlt) return FALSE;
dcSrc = DC_GetDCPtr( hdcSrc ); dcSrc = DC_GetDCPtr( hdcSrc );
TRACE_(bitblt)("%04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n", TRACE("%04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n",
hdcSrc, xSrc, ySrc, widthSrc, heightSrc, hdcSrc, xSrc, ySrc, widthSrc, heightSrc,
dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst, dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst,
widthDst, heightDst, dcDst->w.bitsPerPixel, rop ); widthDst, heightDst, dcDst->w.bitsPerPixel, rop );
return dcDst->funcs->pStretchBlt( dcDst, xDst, yDst, widthDst, heightDst, return dcDst->funcs->pStretchBlt( dcDst, xDst, yDst, widthDst, heightDst,
dcSrc, xSrc, ySrc, widthSrc, heightSrc, dcSrc, xSrc, ySrc, widthSrc, heightSrc,
rop ); rop );

View File

@ -16,8 +16,8 @@
#include "debugtools.h" #include "debugtools.h"
#include "heap.h" #include "heap.h"
DEFAULT_DEBUG_CHANNEL(metafile)
DECLARE_DEBUG_CHANNEL(gdi) DECLARE_DEBUG_CHANNEL(gdi)
DECLARE_DEBUG_CHANNEL(metafile)
/*********************************************************************** /***********************************************************************
* MFDRV_BITMAP_SelectObject * MFDRV_BITMAP_SelectObject
@ -67,7 +67,7 @@ INT16 MFDRV_CreateBrushIndirect(DC *dc, HBRUSH hBrush )
GetObjectA(brushObj->logbrush.lbHatch, sizeof(bm), &bm); GetObjectA(brushObj->logbrush.lbHatch, sizeof(bm), &bm);
if(bm.bmBitsPixel != 1 || bm.bmPlanes != 1) { if(bm.bmBitsPixel != 1 || bm.bmPlanes != 1) {
FIXME_(metafile)("Trying to store a colour pattern brush\n"); FIXME("Trying to store a colour pattern brush\n");
return FALSE; return FALSE;
} }
@ -123,8 +123,7 @@ INT16 MFDRV_CreateBrushIndirect(DC *dc, HBRUSH hBrush )
break; break;
} }
default: default:
FIXME_(metafile)("Unkonwn brush style %x\n", FIXME("Unkonwn brush style %x\n", brushObj->logbrush.lbStyle);
brushObj->logbrush.lbStyle);
return -1; return -1;
} }
index = MFDRV_AddHandleDC( dc ); index = MFDRV_AddHandleDC( dc );

View File

@ -32,7 +32,7 @@
#include "global.h" #include "global.h"
#include "xmalloc.h" /* for XCREATEIMAGE macro */ #include "xmalloc.h" /* for XCREATEIMAGE macro */
DECLARE_DEBUG_CHANNEL(bitmap) DEFAULT_DEBUG_CHANNEL(bitmap)
DECLARE_DEBUG_CHANNEL(x11drv) DECLARE_DEBUG_CHANNEL(x11drv)
static int bitmapDepthTable[] = { 8, 1, 32, 16, 24, 15, 4, 0 }; static int bitmapDepthTable[] = { 8, 1, 32, 16, 24, 15, 4, 0 };
@ -76,7 +76,7 @@ int X11DRV_DIB_GetXImageWidthBytes( int width, int depth )
if( bitmapDepthTable[i] == depth ) if( bitmapDepthTable[i] == depth )
return (4 * ((width * ximageDepthTable[i] + 31)/32)); return (4 * ((width * ximageDepthTable[i] + 31)/32));
WARN_(bitmap)("(%d): Unsupported depth\n", depth ); WARN("(%d): Unsupported depth\n", depth );
return (4 * width); return (4 * width);
} }
@ -108,7 +108,7 @@ int *X11DRV_DIB_BuildColorMap( DC *dc, WORD coloruse, WORD depth,
if (colors > 256) if (colors > 256)
{ {
ERR_(bitmap)("called with >256 colors!\n"); ERR("called with >256 colors!\n");
return NULL; return NULL;
} }
@ -169,7 +169,7 @@ int X11DRV_DIB_MapColor( int *physMap, int nPhysMap, int phys )
if (physMap[color] == phys) if (physMap[color] == phys)
return color; return color;
WARN_(bitmap)("Strange color %08x\n", phys); WARN("Strange color %08x\n", phys);
return 0; return 0;
} }
@ -494,9 +494,9 @@ static void X11DRV_DIB_GetImageBits_1( int lines, BYTE *dstbits,
{ {
unsigned long white = (1 << bmpImage->bits_per_pixel) - 1; unsigned long white = (1 << bmpImage->bits_per_pixel) - 1;
FIXME_(bitmap)("from %d bit bitmap with mask R,G,B %x,%x,%x to 1 bit DIB\n", FIXME("from %d bit bitmap with mask R,G,B %x,%x,%x to 1 bit DIB\n",
bmpImage->bits_per_pixel, (int)bmpImage->red_mask, bmpImage->bits_per_pixel, (int)bmpImage->red_mask,
(int)bmpImage->green_mask, (int)bmpImage->blue_mask ); (int)bmpImage->green_mask, (int)bmpImage->blue_mask );
for( h = lines - 1; h >= 0; h-- ) { for( h = lines - 1; h >= 0; h-- ) {
for( x = 0; x < dstwidth; x++ ) { for( x = 0; x < dstwidth; x++ ) {
@ -775,9 +775,9 @@ static void X11DRV_DIB_GetImageBits_4( int lines, BYTE *dstbits,
default: /* ? bit bmp -> 4 bit DIB */ default: /* ? bit bmp -> 4 bit DIB */
notsupported: notsupported:
FIXME_(bitmap)("from %d bit bitmap with mask R,G,B %x,%x,%x to 4 bit DIB\n", FIXME("from %d bit bitmap with mask R,G,B %x,%x,%x to 4 bit DIB\n",
bmpImage->bits_per_pixel, (int)bmpImage->red_mask, bmpImage->bits_per_pixel, (int)bmpImage->red_mask,
(int)bmpImage->green_mask, (int)bmpImage->blue_mask ); (int)bmpImage->green_mask, (int)bmpImage->blue_mask );
for (h = lines-1; h >= 0; h--) { for (h = lines-1; h >= 0; h--) {
for (x = 0; x < dstwidth/2; x++) { for (x = 0; x < dstwidth/2; x++) {
*bits++ = (X11DRV_DIB_MapColor((int *)colors, 16, *bits++ = (X11DRV_DIB_MapColor((int *)colors, 16,
@ -1126,9 +1126,9 @@ static void X11DRV_DIB_GetImageBits_8( int lines, BYTE *dstbits,
default: /* ? bit bmp -> 8 bit DIB */ default: /* ? bit bmp -> 8 bit DIB */
notsupported: notsupported:
FIXME_(bitmap)("from %d bit bitmap with mask R,G,B %x,%x,%x to 8 bit DIB\n", FIXME("from %d bit bitmap with mask R,G,B %x,%x,%x to 8 bit DIB\n",
bmpImage->depth, (int)bmpImage->red_mask, bmpImage->depth, (int)bmpImage->red_mask,
(int)bmpImage->green_mask, (int)bmpImage->blue_mask ); (int)bmpImage->green_mask, (int)bmpImage->blue_mask );
updatesection: updatesection:
for (h = lines - 1; h >= 0; h--) { for (h = lines - 1; h >= 0; h--) {
for (x = 0; x < dstwidth; x++, bits++) { for (x = 0; x < dstwidth; x++, bits++) {
@ -1266,8 +1266,8 @@ static void X11DRV_DIB_SetImageBits_RLE8( int lines, const BYTE *bits,
line -= (*pIn++); line -= (*pIn++);
if (line == 0) if (line == 0)
{ {
TRACE_(bitmap)("Delta to last line of bitmap " TRACE("Delta to last line of bitmap "
"(wrongly?) causes loop exit\n"); "(wrongly?) causes loop exit\n");
} }
break; break;
} }
@ -1311,11 +1311,8 @@ static void X11DRV_DIB_SetImageBits_RLE8( int lines, const BYTE *bits,
*/ */
if ( (*(pIn-2) != 0/*escape*/) || (*(pIn-1)!= RleEnd) ) if ( (*(pIn-2) != 0/*escape*/) || (*(pIn-1)!= RleEnd) )
{ {
TRACE_(bitmap)("End-of-bitmap " TRACE("End-of-bitmap without (strictly) proper escape code. Last two "
"without (strictly) proper escape code. Last two " "bytes were: %02X %02X.\n", (int)*(pIn-2),(int)*(pIn-1));
"bytes were: %02X %02X.\n",
(int)*(pIn-2),
(int)*(pIn-1));
} }
} }
@ -1462,8 +1459,7 @@ static void X11DRV_DIB_SetImageBits_16( int lines, const BYTE *srcbits,
break; break;
default: default:
FIXME_(bitmap)("16 bit DIB %d bit bitmap\n", FIXME("16 bit DIB %d bit bitmap\n", bmpImage->bits_per_pixel);
bmpImage->bits_per_pixel);
break; break;
} }
@ -1655,9 +1651,9 @@ static void X11DRV_DIB_GetImageBits_16( int lines, BYTE *dstbits,
BYTE r,g, b; BYTE r,g, b;
LPWORD ptr = (LPWORD)dstbits; LPWORD ptr = (LPWORD)dstbits;
FIXME_(bitmap)("from %d bit bitmap with mask R,G,B %x,%x,%x to 16 bit DIB\n", FIXME("from %d bit bitmap with mask R,G,B %x,%x,%x to 16 bit DIB\n",
bmpImage->depth, (int)bmpImage->red_mask, bmpImage->depth, (int)bmpImage->red_mask,
(int)bmpImage->green_mask, (int)bmpImage->blue_mask ); (int)bmpImage->green_mask, (int)bmpImage->blue_mask );
for (h = lines - 1; h >= 0; h--) for (h = lines - 1; h >= 0; h--)
{ {
for (x = 0; x < dstwidth; x++, ptr++) for (x = 0; x < dstwidth; x++, ptr++)
@ -1886,9 +1882,9 @@ static void X11DRV_DIB_SetImageBits_24( int lines, const BYTE *srcbits,
default: default:
notsupported: notsupported:
FIXME_(bitmap)("from 24 bit DIB to %d bit bitmap with mask R,G,B %x,%x,%x\n", FIXME("from 24 bit DIB to %d bit bitmap with mask R,G,B %x,%x,%x\n",
bmpImage->bits_per_pixel, (int)bmpImage->red_mask, bmpImage->bits_per_pixel, (int)bmpImage->red_mask,
(int)bmpImage->green_mask, (int)bmpImage->blue_mask ); (int)bmpImage->green_mask, (int)bmpImage->blue_mask );
break; break;
} }
} }
@ -2112,9 +2108,9 @@ static void X11DRV_DIB_GetImageBits_24( int lines, BYTE *dstbits,
{ {
LPBYTE bits = dstbits; LPBYTE bits = dstbits;
FIXME_(bitmap)("from %d bit bitmap with mask R,G,B %x,%x,%x to 24 bit DIB\n", FIXME("from %d bit bitmap with mask R,G,B %x,%x,%x to 24 bit DIB\n",
bmpImage->depth, (int)bmpImage->red_mask, bmpImage->depth, (int)bmpImage->red_mask,
(int)bmpImage->green_mask, (int)bmpImage->blue_mask ); (int)bmpImage->green_mask, (int)bmpImage->blue_mask );
for (h = lines - 1; h >= 0; h--) for (h = lines - 1; h >= 0; h--)
{ {
for (x = 0; x < dstwidth; x++, bits += 3) for (x = 0; x < dstwidth; x++, bits += 3)
@ -2262,8 +2258,7 @@ static void X11DRV_DIB_SetImageBits_32( int lines, const BYTE *srcbits,
default: default:
notsupported: notsupported:
FIXME_(bitmap)("32 bit DIB %d bit bitmap\n", FIXME("32 bit DIB %d bit bitmap\n", bmpImage->bits_per_pixel);
bmpImage->bits_per_pixel);
break; break;
} }
@ -2442,9 +2437,9 @@ static void X11DRV_DIB_GetImageBits_32( int lines, BYTE *dstbits,
default: default:
notsupported: notsupported:
FIXME_(bitmap)("from %d bit bitmap with mask R,G,B %x,%x,%x to 32 bit DIB\n", FIXME("from %d bit bitmap with mask R,G,B %x,%x,%x to 32 bit DIB\n",
bmpImage->depth, (int)bmpImage->red_mask, bmpImage->depth, (int)bmpImage->red_mask,
(int)bmpImage->green_mask, (int)bmpImage->blue_mask ); (int)bmpImage->green_mask, (int)bmpImage->blue_mask );
for (h = lines - 1; h >= 0; h--) for (h = lines - 1; h >= 0; h--)
{ {
for (x = 0; x < dstwidth; x++, bits += 4) for (x = 0; x < dstwidth; x++, bits += 4)
@ -2544,7 +2539,7 @@ int X11DRV_DIB_SetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr )
bmpImage); bmpImage);
break; break;
default: default:
WARN_(bitmap)("(%d): Invalid depth\n", descr->infoBpp ); WARN("(%d): Invalid depth\n", descr->infoBpp );
break; break;
} }
@ -2601,7 +2596,7 @@ int X11DRV_DIB_GetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr )
case 4: case 4:
if (descr->compression) if (descr->compression)
FIXME_(bitmap)("Compression not yet supported!\n"); FIXME("Compression not yet supported!\n");
else else
X11DRV_DIB_GetImageBits_4( descr->lines,(LPVOID)descr->bits, X11DRV_DIB_GetImageBits_4( descr->lines,(LPVOID)descr->bits,
descr->infoWidth, descr->width, descr->infoWidth, descr->width,
@ -2611,7 +2606,7 @@ int X11DRV_DIB_GetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr )
case 8: case 8:
if (descr->compression) if (descr->compression)
FIXME_(bitmap)("Compression not yet supported!\n"); FIXME("Compression not yet supported!\n");
else else
X11DRV_DIB_GetImageBits_8( descr->lines, (LPVOID)descr->bits, X11DRV_DIB_GetImageBits_8( descr->lines, (LPVOID)descr->bits,
descr->infoWidth, descr->width, descr->infoWidth, descr->width,
@ -2638,7 +2633,7 @@ int X11DRV_DIB_GetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr )
break; break;
default: default:
WARN_(bitmap)("(%d): Invalid depth\n", descr->infoBpp ); WARN("(%d): Invalid depth\n", descr->infoBpp );
break; break;
} }
@ -2843,10 +2838,10 @@ INT X11DRV_DIB_GetDIBits(
X11DRV_PHYSBITMAP *pbitmap; X11DRV_PHYSBITMAP *pbitmap;
PALETTEOBJ * palette; PALETTEOBJ * palette;
TRACE_(bitmap)("%u scanlines of (%i,%i) -> (%i,%i) starting from %u\n", TRACE("%u scanlines of (%i,%i) -> (%i,%i) starting from %u\n",
lines, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, lines, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight,
(int)info->bmiHeader.biWidth, (int)info->bmiHeader.biHeight, (int)info->bmiHeader.biWidth, (int)info->bmiHeader.biHeight,
startscan ); startscan );
if (!(palette = (PALETTEOBJ*)GDI_GetObjPtr( dc->w.hPalette, PALETTE_MAGIC ))) if (!(palette = (PALETTEOBJ*)GDI_GetObjPtr( dc->w.hPalette, PALETTE_MAGIC )))
return 0; return 0;
@ -2939,8 +2934,7 @@ static void X11DRV_DIB_DoProtectDIBSection( BITMAPOBJ *bmp, DWORD new_prot )
DWORD old_prot; DWORD old_prot;
VirtualProtect(dib->dsBm.bmBits, totalSize, new_prot, &old_prot); VirtualProtect(dib->dsBm.bmBits, totalSize, new_prot, &old_prot);
TRACE_(bitmap)("Changed protection from %ld to %ld\n", TRACE("Changed protection from %ld to %ld\n", old_prot, new_prot);
old_prot, new_prot);
} }
/*********************************************************************** /***********************************************************************
@ -2998,14 +2992,14 @@ static void X11DRV_DIB_DoUpdateDIBSection(BITMAPOBJ *bmp, BOOL toDIB)
if (toDIB) if (toDIB)
{ {
TRACE_(bitmap)("Copying from Pixmap to DIB bits\n"); TRACE("Copying from Pixmap to DIB bits\n");
EnterCriticalSection( &X11DRV_CritSection ); EnterCriticalSection( &X11DRV_CritSection );
CALL_LARGE_STACK( X11DRV_DIB_GetImageBits, &descr ); CALL_LARGE_STACK( X11DRV_DIB_GetImageBits, &descr );
LeaveCriticalSection( &X11DRV_CritSection ); LeaveCriticalSection( &X11DRV_CritSection );
} }
else else
{ {
TRACE_(bitmap)("Copying from DIB bits to Pixmap\n"); TRACE("Copying from DIB bits to Pixmap\n");
EnterCriticalSection( &X11DRV_CritSection ); EnterCriticalSection( &X11DRV_CritSection );
CALL_LARGE_STACK( X11DRV_DIB_SetImageBits, &descr ); CALL_LARGE_STACK( X11DRV_DIB_SetImageBits, &descr );
LeaveCriticalSection( &X11DRV_CritSection ); LeaveCriticalSection( &X11DRV_CritSection );
@ -3027,7 +3021,7 @@ static BOOL X11DRV_DIB_FaultHandler( LPVOID res, LPCVOID addr )
switch (((X11DRV_DIBSECTION *) bmp->dib)->status) switch (((X11DRV_DIBSECTION *) bmp->dib)->status)
{ {
case X11DRV_DIB_GdiMod: case X11DRV_DIB_GdiMod:
TRACE_(bitmap)("called in status DIB_GdiMod\n" ); TRACE("called in status DIB_GdiMod\n" );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
X11DRV_DIB_DoUpdateDIBSection( bmp, TRUE ); X11DRV_DIB_DoUpdateDIBSection( bmp, TRUE );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
@ -3036,20 +3030,18 @@ static BOOL X11DRV_DIB_FaultHandler( LPVOID res, LPCVOID addr )
break; break;
case X11DRV_DIB_InSync: case X11DRV_DIB_InSync:
TRACE_(bitmap)("called in status X11DRV_DIB_InSync\n" ); TRACE("called in status X11DRV_DIB_InSync\n" );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_AppMod; ((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_AppMod;
handled = TRUE; handled = TRUE;
break; break;
case X11DRV_DIB_AppMod: case X11DRV_DIB_AppMod:
FIXME_(bitmap)("called in status X11DRV_DIB_AppMod: " FIXME("called in status X11DRV_DIB_AppMod: this can't happen!\n" );
"this can't happen!\n" );
break; break;
case X11DRV_DIB_NoHandler: case X11DRV_DIB_NoHandler:
FIXME_(bitmap)("called in status DIB_NoHandler: " FIXME("called in status DIB_NoHandler: this can't happen!\n" );
"this can't happen!\n" );
break; break;
} }
@ -3090,17 +3082,17 @@ void X11DRV_DIB_UpdateDIBSection(DC *dc, BOOL toDIB)
break; break;
case X11DRV_DIB_GdiMod: case X11DRV_DIB_GdiMod:
TRACE_(bitmap)("fromDIB called in status X11DRV_DIB_GdiMod\n" ); TRACE("fromDIB called in status X11DRV_DIB_GdiMod\n" );
/* nothing to do */ /* nothing to do */
break; break;
case X11DRV_DIB_InSync: case X11DRV_DIB_InSync:
TRACE_(bitmap)("fromDIB called in status X11DRV_DIB_InSync\n" ); TRACE("fromDIB called in status X11DRV_DIB_InSync\n" );
/* nothing to do */ /* nothing to do */
break; break;
case X11DRV_DIB_AppMod: case X11DRV_DIB_AppMod:
TRACE_(bitmap)("fromDIB called in status X11DRV_DIB_AppMod\n" ); TRACE("fromDIB called in status X11DRV_DIB_AppMod\n" );
X11DRV_DIB_DoUpdateDIBSection( bmp, FALSE ); X11DRV_DIB_DoUpdateDIBSection( bmp, FALSE );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_InSync; ((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_InSync;
@ -3119,19 +3111,19 @@ void X11DRV_DIB_UpdateDIBSection(DC *dc, BOOL toDIB)
break; break;
case X11DRV_DIB_GdiMod: case X11DRV_DIB_GdiMod:
TRACE_(bitmap)(" toDIB called in status X11DRV_DIB_GdiMod\n" ); TRACE(" toDIB called in status X11DRV_DIB_GdiMod\n" );
/* nothing to do */ /* nothing to do */
break; break;
case X11DRV_DIB_InSync: case X11DRV_DIB_InSync:
TRACE_(bitmap)(" toDIB called in status X11DRV_DIB_InSync\n" ); TRACE(" toDIB called in status X11DRV_DIB_InSync\n" );
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_NOACCESS ); X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_NOACCESS );
((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_GdiMod; ((X11DRV_DIBSECTION *) bmp->dib)->status = X11DRV_DIB_GdiMod;
break; break;
case X11DRV_DIB_AppMod: case X11DRV_DIB_AppMod:
FIXME_(bitmap)(" toDIB called in status X11DRV_DIB_AppMod: " FIXME(" toDIB called in status X11DRV_DIB_AppMod: "
"this can't happen!\n" ); "this can't happen!\n" );
break; break;
} }
} }
@ -3165,7 +3157,7 @@ HBITMAP16 X11DRV_DIB_CreateDIBSection16(
SELECTOR_AllocBlock( dib->dsBm.bmBits, size, SELECTOR_AllocBlock( dib->dsBm.bmBits, size,
SEGMENT_DATA, FALSE, FALSE ); SEGMENT_DATA, FALSE, FALSE );
} }
TRACE_(bitmap)("ptr = %p, size =%d, selector = %04x, segptr = %ld\n", TRACE("ptr = %p, size =%d, selector = %04x, segptr = %ld\n",
dib->dsBm.bmBits, size, ((X11DRV_DIBSECTION *) bmp->dib)->selector, dib->dsBm.bmBits, size, ((X11DRV_DIBSECTION *) bmp->dib)->selector,
PTR_SEG_OFF_TO_SEGPTR(((X11DRV_DIBSECTION *) bmp->dib)->selector, 0)); PTR_SEG_OFF_TO_SEGPTR(((X11DRV_DIBSECTION *) bmp->dib)->selector, 0));
} }
@ -3262,7 +3254,7 @@ HBITMAP X11DRV_DIB_CreateDIBSection(
INT effHeight, totalSize; INT effHeight, totalSize;
BITMAP bm; BITMAP bm;
TRACE_(bitmap)("format (%ld,%ld), planes %d, bpp %d, size %ld, colors %ld (%s)\n", TRACE("format (%ld,%ld), planes %d, bpp %d, size %ld, colors %ld (%s)\n",
bi->biWidth, bi->biHeight, bi->biPlanes, bi->biBitCount, bi->biWidth, bi->biHeight, bi->biPlanes, bi->biBitCount,
bi->biSizeImage, bi->biClrUsed, usage == DIB_PAL_COLORS? "PAL" : "RGB"); bi->biSizeImage, bi->biClrUsed, usage == DIB_PAL_COLORS? "PAL" : "RGB");
@ -3367,7 +3359,7 @@ HBITMAP X11DRV_DIB_CreateDIBSection(
/* Clean up in case of errors */ /* Clean up in case of errors */
if (!res || !bmp || !dib || !bm.bmBits || (bm.bmBitsPixel <= 8 && !colorMap)) if (!res || !bmp || !dib || !bm.bmBits || (bm.bmBitsPixel <= 8 && !colorMap))
{ {
TRACE_(bitmap)("got an error res=%08x, bmp=%p, dib=%p, bm.bmBits=%p\n", TRACE("got an error res=%08x, bmp=%p, dib=%p, bm.bmBits=%p\n",
res, bmp, dib, bm.bmBits); res, bmp, dib, bm.bmBits);
if (bm.bmBits) if (bm.bmBits)
{ {
@ -3447,7 +3439,7 @@ HGLOBAL X11DRV_DIB_CreateDIBFromPixmap(Pixmap pixmap, HDC hdc, BOOL bDeletePixma
hBmp = X11DRV_BITMAP_CreateBitmapHeaderFromPixmap(pixmap); hBmp = X11DRV_BITMAP_CreateBitmapHeaderFromPixmap(pixmap);
if (!hBmp) if (!hBmp)
{ {
TRACE_(bitmap)("\tCould not create bitmap header for Pixmap\n"); TRACE("\tCould not create bitmap header for Pixmap\n");
goto END; goto END;
} }
@ -3476,7 +3468,7 @@ HGLOBAL X11DRV_DIB_CreateDIBFromPixmap(Pixmap pixmap, HDC hdc, BOOL bDeletePixma
DeleteObject(hBmp); DeleteObject(hBmp);
END: END:
TRACE_(bitmap)("\tReturning packed DIB %x\n", hPackedDIB); TRACE("\tReturning packed DIB %x\n", hPackedDIB);
return hPackedDIB; return hPackedDIB;
} }
@ -3514,7 +3506,7 @@ Pixmap X11DRV_DIB_CreatePixmapFromDIB( HGLOBAL hPackedDIB, HDC hdc )
GlobalUnlock(hPackedDIB); GlobalUnlock(hPackedDIB);
TRACE_(bitmap)("CreateDIBitmap returned %x\n", hBmp); TRACE("CreateDIBitmap returned %x\n", hBmp);
/* Retrieve the internal Pixmap from the DDB */ /* Retrieve the internal Pixmap from the DDB */
@ -3524,7 +3516,7 @@ Pixmap X11DRV_DIB_CreatePixmapFromDIB( HGLOBAL hPackedDIB, HDC hdc )
{ {
pixmap = ((X11DRV_PHYSBITMAP *)(pBmp->DDBitmap->physBitmap))->pixmap; pixmap = ((X11DRV_PHYSBITMAP *)(pBmp->DDBitmap->physBitmap))->pixmap;
if (!pixmap) if (!pixmap)
TRACE_(bitmap)("NULL Pixmap in DDBitmap->physBitmap!\n"); TRACE("NULL Pixmap in DDBitmap->physBitmap!\n");
/* Manually free the BITMAPOBJ internals so that we can steal its pixmap */ /* Manually free the BITMAPOBJ internals so that we can steal its pixmap */
HeapFree( GetProcessHeap(), 0, pBmp->DDBitmap->physBitmap ); HeapFree( GetProcessHeap(), 0, pBmp->DDBitmap->physBitmap );
@ -3535,7 +3527,7 @@ Pixmap X11DRV_DIB_CreatePixmapFromDIB( HGLOBAL hPackedDIB, HDC hdc )
/* Delete the DDB we created earlier now that we have stolen its pixmap */ /* Delete the DDB we created earlier now that we have stolen its pixmap */
DeleteObject(hBmp); DeleteObject(hBmp);
TRACE_(bitmap)("\tReturning Pixmap %ld\n", pixmap); TRACE("\tReturning Pixmap %ld\n", pixmap);
return pixmap; return pixmap;
} }

View File

@ -22,7 +22,7 @@
#include "keyboard.h" #include "keyboard.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(thunk) DEFAULT_DEBUG_CHANNEL(thunk)
/* List of the 16-bit callback functions. This list is used */ /* List of the 16-bit callback functions. This list is used */
@ -150,8 +150,8 @@ FARPROC THUNK_Alloc( FARPROC16 func, RELAY relay )
{ {
FARPROC proc = (FARPROC)((ENTRYPOINT16 *)PTR_SEG_TO_LIN( func ))->target; FARPROC proc = (FARPROC)((ENTRYPOINT16 *)PTR_SEG_TO_LIN( func ))->target;
TRACE_(thunk)( "(%04x:%04x, %p) -> built-in API %p\n", TRACE( "(%04x:%04x, %p) -> built-in API %p\n",
SELECTOROF( func ), OFFSETOF( func ), relay, proc ); SELECTOROF( func ), OFFSETOF( func ), relay, proc );
return proc; return proc;
} }
@ -170,8 +170,8 @@ FARPROC THUNK_Alloc( FARPROC16 func, RELAY relay )
firstThunk = thunk; firstThunk = thunk;
} }
TRACE_(thunk)( "(%04x:%04x, %p) -> allocated thunk %p\n", TRACE( "(%04x:%04x, %p) -> allocated thunk %p\n",
SELECTOROF( func ), OFFSETOF( func ), relay, thunk ); SELECTOROF( func ), OFFSETOF( func ), relay, thunk );
return (FARPROC)thunk; return (FARPROC)thunk;
} }
@ -196,7 +196,7 @@ void THUNK_Free( FARPROC thunk )
return; return;
} }
} }
ERR_(thunk)("invalid thunk addr %p\n", thunk ); ERR("invalid thunk addr %p\n", thunk );
return; return;
} }
@ -428,20 +428,20 @@ UINT WINAPI ThunkConnect16(
{ {
directionSL = TRUE; directionSL = TRUE;
TRACE_(thunk)("SL01 thunk %s (%lx) -> %s (%s), Reason: %ld\n", TRACE("SL01 thunk %s (%lx) -> %s (%s), Reason: %ld\n",
module16, (DWORD)TD, module32, thunkfun32, dwReason); module16, (DWORD)TD, module32, thunkfun32, dwReason);
} }
else if (!strncmp(TD->magic, "LS01", 4)) else if (!strncmp(TD->magic, "LS01", 4))
{ {
directionSL = FALSE; directionSL = FALSE;
TRACE_(thunk)("LS01 thunk %s (%lx) <- %s (%s), Reason: %ld\n", TRACE("LS01 thunk %s (%lx) <- %s (%s), Reason: %ld\n",
module16, (DWORD)TD, module32, thunkfun32, dwReason); module16, (DWORD)TD, module32, thunkfun32, dwReason);
} }
else else
{ {
ERR_(thunk)("Invalid magic %c%c%c%c\n", ERR("Invalid magic %c%c%c%c\n",
TD->magic[0], TD->magic[1], TD->magic[2], TD->magic[3]); TD->magic[0], TD->magic[1], TD->magic[2], TD->magic[3]);
return 0; return 0;
} }
@ -477,7 +477,7 @@ UINT WINAPI ThunkConnect16(
if (SL->flags2 & 0x80000000) if (SL->flags2 & 0x80000000)
{ {
TRACE_(thunk)("Preloading 32-bit library\n"); TRACE("Preloading 32-bit library\n");
LoadLibraryA(module32); LoadLibraryA(module32);
} }
} }
@ -561,11 +561,11 @@ void WINAPI C16ThkSL01(CONTEXT86 *context)
if (!td) if (!td)
{ {
ERR_(thunk)("ThunkConnect16 was not called!\n"); ERR("ThunkConnect16 was not called!\n");
return; return;
} }
TRACE_(thunk)("Creating stub for ThunkDataSL %08lx\n", (DWORD)td); TRACE("Creating stub for ThunkDataSL %08lx\n", (DWORD)td);
/* We produce the following code: /* We produce the following code:
@ -605,8 +605,8 @@ void WINAPI C16ThkSL01(CONTEXT86 *context)
DWORD targetNr = CX_reg(context) / 4; DWORD targetNr = CX_reg(context) / 4;
struct SLTargetDB *tdb; struct SLTargetDB *tdb;
TRACE_(thunk)("Process %08lx calling target %ld of ThunkDataSL %08lx\n", TRACE("Process %08lx calling target %ld of ThunkDataSL %08lx\n",
(DWORD)PROCESS_Current(), targetNr, (DWORD)td); (DWORD)PROCESS_Current(), targetNr, (DWORD)td);
for (tdb = td->targetDB; tdb; tdb = tdb->next) for (tdb = td->targetDB; tdb; tdb = tdb->next)
if (tdb->process == PROCESS_Current()) if (tdb->process == PROCESS_Current())
@ -614,7 +614,7 @@ void WINAPI C16ThkSL01(CONTEXT86 *context)
if (!tdb) if (!tdb)
{ {
TRACE_(thunk)("Loading 32-bit library %s\n", td->pszDll32); TRACE("Loading 32-bit library %s\n", td->pszDll32);
LoadLibraryA(td->pszDll32); LoadLibraryA(td->pszDll32);
for (tdb = td->targetDB; tdb; tdb = tdb->next) for (tdb = td->targetDB; tdb; tdb = tdb->next)
@ -626,7 +626,7 @@ void WINAPI C16ThkSL01(CONTEXT86 *context)
{ {
EDX_reg(context) = tdb->targetTable[targetNr]; EDX_reg(context) = tdb->targetTable[targetNr];
TRACE_(thunk)("Call target is %08lx\n", EDX_reg(context)); TRACE("Call target is %08lx\n", EDX_reg(context));
} }
else else
{ {
@ -637,8 +637,8 @@ void WINAPI C16ThkSL01(CONTEXT86 *context)
CS_reg(context) = stack[3]; CS_reg(context) = stack[3];
ESP_reg(context) += td->apiDB[targetNr].nrArgBytes + 4; ESP_reg(context) += td->apiDB[targetNr].nrArgBytes + 4;
ERR_(thunk)("Process %08lx did not ThunkConnect32 %s to %s\n", ERR("Process %08lx did not ThunkConnect32 %s to %s\n",
(DWORD)PROCESS_Current(), td->pszDll32, td->pszDll16); (DWORD)PROCESS_Current(), td->pszDll32, td->pszDll16);
} }
} }
} }

View File

@ -20,7 +20,7 @@
#include "debugtools.h" #include "debugtools.h"
#include "winerror.h" #include "winerror.h"
DECLARE_DEBUG_CHANNEL(elfdll) DEFAULT_DEBUG_CHANNEL(elfdll)
#if defined(HAVE_DL_API) #if defined(HAVE_DL_API)
#include <dlfcn.h> #include <dlfcn.h>
@ -84,7 +84,7 @@ void *ELFDLL_dlopen(const char *libname, int flags)
if(len + namelen + 1 >= sizeof(buffer)) if(len + namelen + 1 >= sizeof(buffer))
{ {
ERR_(elfdll)("Buffer overflow! Check EXTRA_LD_LIBRARY_PATH or increase buffer size.\n"); ERR("Buffer overflow! Check EXTRA_LD_LIBRARY_PATH or increase buffer size.\n");
return NULL; return NULL;
} }
@ -97,7 +97,7 @@ void *ELFDLL_dlopen(const char *libname, int flags)
else else
strcpy(buffer + len, libname); strcpy(buffer + len, libname);
TRACE_(elfdll)("Trying dlopen('%s', %d)\n", buffer, flags); TRACE("Trying dlopen('%s', %d)\n", buffer, flags);
handle = dlopen(buffer, flags); handle = dlopen(buffer, flags);
if(handle) if(handle)
@ -216,7 +216,7 @@ static WINE_MODREF *ELFDLL_CreateModref(HMODULE hModule, LPCSTR path)
{ {
if ( PROCESS_Current()->exe_modref ) if ( PROCESS_Current()->exe_modref )
FIXME_(elfdll)( "Trying to load second .EXE file: %s\n", path ); FIXME( "Trying to load second .EXE file: %s\n", path );
else else
PROCESS_Current()->exe_modref = wm; PROCESS_Current()->exe_modref = wm;
} }
@ -301,7 +301,7 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err)
dlhandle = ELFDLL_dlopen(soname, RTLD_LAZY); dlhandle = ELFDLL_dlopen(soname, RTLD_LAZY);
if(!dlhandle) if(!dlhandle)
{ {
WARN_(elfdll)("Could not load %s (%s)\n", soname, dlerror()); WARN("Could not load %s (%s)\n", soname, dlerror());
*err = ERROR_FILE_NOT_FOUND; *err = ERROR_FILE_NOT_FOUND;
return NULL; return NULL;
} }
@ -312,7 +312,7 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err)
image = (struct elfdll_image *)dlsym(dlhandle, soname); image = (struct elfdll_image *)dlsym(dlhandle, soname);
if(!image) if(!image)
{ {
ERR_(elfdll)("Could not get elfdll image descriptor %s (%s)\n", soname, dlerror()); ERR("Could not get elfdll image descriptor %s (%s)\n", soname, dlerror());
dlclose(dlhandle); dlclose(dlhandle);
*err = ERROR_BAD_FORMAT; *err = ERROR_BAD_FORMAT;
return NULL; return NULL;
@ -322,7 +322,7 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err)
hmod16 = ELFDLL_CreateNEModule(image->ne_module_start, image->ne_module_size); hmod16 = ELFDLL_CreateNEModule(image->ne_module_start, image->ne_module_size);
if(!hmod16) if(!hmod16)
{ {
ERR_(elfdll)("Could not create win16 dummy module for %s\n", path); ERR("Could not create win16 dummy module for %s\n", path);
dlclose(dlhandle); dlclose(dlhandle);
*err = ERROR_OUTOFMEMORY; *err = ERROR_OUTOFMEMORY;
return NULL; return NULL;
@ -333,7 +333,7 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags, DWORD *err)
wm = ELFDLL_CreateModref(image->pe_module_start, path); wm = ELFDLL_CreateModref(image->pe_module_start, path);
if(!wm) if(!wm)
{ {
ERR_(elfdll)("Could not create WINE_MODREF for %s\n", path); ERR("Could not create WINE_MODREF for %s\n", path);
GLOBAL_FreeBlock((HGLOBAL16)hmod16); GLOBAL_FreeBlock((HGLOBAL16)hmod16);
dlclose(dlhandle); dlclose(dlhandle);
*err = ERROR_OUTOFMEMORY; *err = ERROR_OUTOFMEMORY;

View File

@ -32,7 +32,7 @@
#include "loadorder.h" #include "loadorder.h"
#include "elfdll.h" #include "elfdll.h"
DECLARE_DEBUG_CHANNEL(module) DEFAULT_DEBUG_CHANNEL(module)
DECLARE_DEBUG_CHANNEL(win32) DECLARE_DEBUG_CHANNEL(win32)
/************************************************************************* /*************************************************************************
@ -77,7 +77,7 @@ WINE_MODREF *MODULE32_LookupHMODULE( HMODULE hmod )
return PROCESS_Current()->exe_modref; return PROCESS_Current()->exe_modref;
if (!HIWORD(hmod)) { if (!HIWORD(hmod)) {
ERR_(module)("tried to lookup 0x%04x in win32 module handler!\n",hmod); ERR("tried to lookup 0x%04x in win32 module handler!\n",hmod);
return NULL; return NULL;
} }
for ( wm = PROCESS_Current()->modref_list; wm; wm=wm->next ) for ( wm = PROCESS_Current()->modref_list; wm; wm=wm->next )
@ -105,8 +105,8 @@ static BOOL MODULE_InitDll( WINE_MODREF *wm, DWORD type, LPVOID lpReserved )
return TRUE; return TRUE;
TRACE_(module)("(%s,%s,%p) - CALL\n", TRACE("(%s,%s,%p) - CALL\n",
wm->modname, typeName[type], lpReserved ); wm->modname, typeName[type], lpReserved );
/* Call the initialization routine */ /* Call the initialization routine */
switch ( wm->type ) switch ( wm->type )
@ -120,13 +120,13 @@ static BOOL MODULE_InitDll( WINE_MODREF *wm, DWORD type, LPVOID lpReserved )
break; break;
default: default:
ERR_(module)("wine_modref type %d not handled.\n", wm->type ); ERR("wine_modref type %d not handled.\n", wm->type );
retv = FALSE; retv = FALSE;
break; break;
} }
TRACE_(module)("(%s,%s,%p) - RETURN %d\n", TRACE("(%s,%s,%p) - RETURN %d\n",
wm->modname, typeName[type], lpReserved, retv ); wm->modname, typeName[type], lpReserved, retv );
return retv; return retv;
} }
@ -174,8 +174,7 @@ BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved )
|| ( wm->flags & WINE_MODREF_PROCESS_ATTACHED ) ) || ( wm->flags & WINE_MODREF_PROCESS_ATTACHED ) )
return retv; return retv;
TRACE_(module)("(%s,%p) - START\n", TRACE("(%s,%p) - START\n", wm->modname, lpReserved );
wm->modname, lpReserved );
/* Tag current MODREF to prevent recursive loop */ /* Tag current MODREF to prevent recursive loop */
wm->flags |= WINE_MODREF_MARKER; wm->flags |= WINE_MODREF_MARKER;
@ -207,8 +206,7 @@ BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved )
/* Remove recursion flag */ /* Remove recursion flag */
wm->flags &= ~WINE_MODREF_MARKER; wm->flags &= ~WINE_MODREF_MARKER;
TRACE_(module)("(%s,%p) - END\n", TRACE("(%s,%p) - END\n", wm->modname, lpReserved );
wm->modname, lpReserved );
return retv; return retv;
} }
@ -832,7 +830,7 @@ HINSTANCE WINAPI LoadModule( LPCSTR name, LPVOID paramBlock )
hInstance = GetLastError(); hInstance = GetLastError();
if ( hInstance < 32 ) return hInstance; if ( hInstance < 32 ) return hInstance;
FIXME_(module)("Strange error set by CreateProcess: %d\n", hInstance ); FIXME("Strange error set by CreateProcess: %d\n", hInstance );
return 11; return 11;
} }
@ -911,8 +909,7 @@ static int get_makename_token(LPCSTR *from, LPSTR *to )
**to = 0; /* terminate output string */ **to = 0; /* terminate output string */
TRACE_(module)("returning token len=%d, string=%s\n", TRACE("returning token len=%d, string=%s\n", len, to_old);
len, to_old);
return len; return len;
} }
@ -951,7 +948,7 @@ static BOOL make_lpCommandLine_name( LPCSTR line, LPSTR name, int namelen,
found = FALSE; found = FALSE;
break; break;
} }
TRACE_(module)("checking if file exists '%s'\n", name); TRACE("checking if file exists '%s'\n", name);
retlen = SearchPathA( NULL, name, ".exe", sizeof(buffer), buffer, &lastpart); retlen = SearchPathA( NULL, name, ".exe", sizeof(buffer), buffer, &lastpart);
if ( retlen && (retlen < sizeof(buffer)) ) break; if ( retlen && (retlen < sizeof(buffer)) ) break;
} while (1); } while (1);
@ -962,15 +959,15 @@ static BOOL make_lpCommandLine_name( LPCSTR line, LPSTR name, int namelen,
strcpy( name, buffer ); strcpy( name, buffer );
} else { } else {
/* not enough space to return full path string */ /* not enough space to return full path string */
FIXME_(module)("internal string not long enough, need %d\n", FIXME("internal string not long enough, need %d\n",
strlen(buffer) ); strlen(buffer) );
} }
} }
/* all done, indicate end of module name and then trace and exit */ /* all done, indicate end of module name and then trace and exit */
if (after) *after = from; if (after) *after = from;
TRACE_(module)("%i, selected file name '%s'\n and cmdline as %s\n", TRACE("%i, selected file name '%s'\n and cmdline as %s\n",
found, name, debugstr_a(from)); found, name, debugstr_a(from));
return found; return found;
} }
@ -1027,11 +1024,11 @@ static BOOL make_lpApplicationName_name( LPCSTR line, LPSTR name, int namelen)
} while (1); } while (1);
if (!SearchPathA( NULL, buffer, ".exe", namelen, name, NULL )) { if (!SearchPathA( NULL, buffer, ".exe", namelen, name, NULL )) {
TRACE_(module)("file not found '%s'\n", buffer ); TRACE("file not found '%s'\n", buffer );
return FALSE; return FALSE;
} }
TRACE_(module)("selected as file name '%s'\n", name ); TRACE("selected as file name '%s'\n", name );
return TRUE; return TRUE;
} }
@ -1095,58 +1092,58 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
/* Warn if unsupported features are used */ /* Warn if unsupported features are used */
if (dwCreationFlags & DETACHED_PROCESS) if (dwCreationFlags & DETACHED_PROCESS)
FIXME_(module)("(%s,...): DETACHED_PROCESS ignored\n", name); FIXME("(%s,...): DETACHED_PROCESS ignored\n", name);
if (dwCreationFlags & CREATE_NEW_CONSOLE) if (dwCreationFlags & CREATE_NEW_CONSOLE)
FIXME_(module)("(%s,...): CREATE_NEW_CONSOLE ignored\n", name); FIXME("(%s,...): CREATE_NEW_CONSOLE ignored\n", name);
if (dwCreationFlags & NORMAL_PRIORITY_CLASS) if (dwCreationFlags & NORMAL_PRIORITY_CLASS)
FIXME_(module)("(%s,...): NORMAL_PRIORITY_CLASS ignored\n", name); FIXME("(%s,...): NORMAL_PRIORITY_CLASS ignored\n", name);
if (dwCreationFlags & IDLE_PRIORITY_CLASS) if (dwCreationFlags & IDLE_PRIORITY_CLASS)
FIXME_(module)("(%s,...): IDLE_PRIORITY_CLASS ignored\n", name); FIXME("(%s,...): IDLE_PRIORITY_CLASS ignored\n", name);
if (dwCreationFlags & HIGH_PRIORITY_CLASS) if (dwCreationFlags & HIGH_PRIORITY_CLASS)
FIXME_(module)("(%s,...): HIGH_PRIORITY_CLASS ignored\n", name); FIXME("(%s,...): HIGH_PRIORITY_CLASS ignored\n", name);
if (dwCreationFlags & REALTIME_PRIORITY_CLASS) if (dwCreationFlags & REALTIME_PRIORITY_CLASS)
FIXME_(module)("(%s,...): REALTIME_PRIORITY_CLASS ignored\n", name); FIXME("(%s,...): REALTIME_PRIORITY_CLASS ignored\n", name);
if (dwCreationFlags & CREATE_NEW_PROCESS_GROUP) if (dwCreationFlags & CREATE_NEW_PROCESS_GROUP)
FIXME_(module)("(%s,...): CREATE_NEW_PROCESS_GROUP ignored\n", name); FIXME("(%s,...): CREATE_NEW_PROCESS_GROUP ignored\n", name);
if (dwCreationFlags & CREATE_UNICODE_ENVIRONMENT) if (dwCreationFlags & CREATE_UNICODE_ENVIRONMENT)
FIXME_(module)("(%s,...): CREATE_UNICODE_ENVIRONMENT ignored\n", name); FIXME("(%s,...): CREATE_UNICODE_ENVIRONMENT ignored\n", name);
if (dwCreationFlags & CREATE_SEPARATE_WOW_VDM) if (dwCreationFlags & CREATE_SEPARATE_WOW_VDM)
FIXME_(module)("(%s,...): CREATE_SEPARATE_WOW_VDM ignored\n", name); FIXME("(%s,...): CREATE_SEPARATE_WOW_VDM ignored\n", name);
if (dwCreationFlags & CREATE_SHARED_WOW_VDM) if (dwCreationFlags & CREATE_SHARED_WOW_VDM)
FIXME_(module)("(%s,...): CREATE_SHARED_WOW_VDM ignored\n", name); FIXME("(%s,...): CREATE_SHARED_WOW_VDM ignored\n", name);
if (dwCreationFlags & CREATE_DEFAULT_ERROR_MODE) if (dwCreationFlags & CREATE_DEFAULT_ERROR_MODE)
FIXME_(module)("(%s,...): CREATE_DEFAULT_ERROR_MODE ignored\n", name); FIXME("(%s,...): CREATE_DEFAULT_ERROR_MODE ignored\n", name);
if (dwCreationFlags & CREATE_NO_WINDOW) if (dwCreationFlags & CREATE_NO_WINDOW)
FIXME_(module)("(%s,...): CREATE_NO_WINDOW ignored\n", name); FIXME("(%s,...): CREATE_NO_WINDOW ignored\n", name);
if (dwCreationFlags & PROFILE_USER) if (dwCreationFlags & PROFILE_USER)
FIXME_(module)("(%s,...): PROFILE_USER ignored\n", name); FIXME("(%s,...): PROFILE_USER ignored\n", name);
if (dwCreationFlags & PROFILE_KERNEL) if (dwCreationFlags & PROFILE_KERNEL)
FIXME_(module)("(%s,...): PROFILE_KERNEL ignored\n", name); FIXME("(%s,...): PROFILE_KERNEL ignored\n", name);
if (dwCreationFlags & PROFILE_SERVER) if (dwCreationFlags & PROFILE_SERVER)
FIXME_(module)("(%s,...): PROFILE_SERVER ignored\n", name); FIXME("(%s,...): PROFILE_SERVER ignored\n", name);
if (lpCurrentDirectory) if (lpCurrentDirectory)
FIXME_(module)("(%s,...): lpCurrentDirectory %s ignored\n", FIXME("(%s,...): lpCurrentDirectory %s ignored\n",
name, lpCurrentDirectory); name, lpCurrentDirectory);
if (lpStartupInfo->lpDesktop) if (lpStartupInfo->lpDesktop)
FIXME_(module)("(%s,...): lpStartupInfo->lpDesktop %s ignored\n", FIXME("(%s,...): lpStartupInfo->lpDesktop %s ignored\n",
name, lpStartupInfo->lpDesktop); name, lpStartupInfo->lpDesktop);
if (lpStartupInfo->lpTitle) if (lpStartupInfo->lpTitle)
FIXME_(module)("(%s,...): lpStartupInfo->lpTitle %s ignored\n", FIXME("(%s,...): lpStartupInfo->lpTitle %s ignored\n",
name, lpStartupInfo->lpTitle); name, lpStartupInfo->lpTitle);
if (lpStartupInfo->dwFlags & STARTF_USECOUNTCHARS) if (lpStartupInfo->dwFlags & STARTF_USECOUNTCHARS)
FIXME_(module)("(%s,...): STARTF_USECOUNTCHARS (%ld,%ld) ignored\n", FIXME("(%s,...): STARTF_USECOUNTCHARS (%ld,%ld) ignored\n",
name, lpStartupInfo->dwXCountChars, lpStartupInfo->dwYCountChars); name, lpStartupInfo->dwXCountChars, lpStartupInfo->dwYCountChars);
if (lpStartupInfo->dwFlags & STARTF_USEFILLATTRIBUTE) if (lpStartupInfo->dwFlags & STARTF_USEFILLATTRIBUTE)
FIXME_(module)("(%s,...): STARTF_USEFILLATTRIBUTE %lx ignored\n", FIXME("(%s,...): STARTF_USEFILLATTRIBUTE %lx ignored\n",
name, lpStartupInfo->dwFillAttribute); name, lpStartupInfo->dwFillAttribute);
if (lpStartupInfo->dwFlags & STARTF_RUNFULLSCREEN) if (lpStartupInfo->dwFlags & STARTF_RUNFULLSCREEN)
FIXME_(module)("(%s,...): STARTF_RUNFULLSCREEN ignored\n", name); FIXME("(%s,...): STARTF_RUNFULLSCREEN ignored\n", name);
if (lpStartupInfo->dwFlags & STARTF_FORCEONFEEDBACK) if (lpStartupInfo->dwFlags & STARTF_FORCEONFEEDBACK)
FIXME_(module)("(%s,...): STARTF_FORCEONFEEDBACK ignored\n", name); FIXME("(%s,...): STARTF_FORCEONFEEDBACK ignored\n", name);
if (lpStartupInfo->dwFlags & STARTF_FORCEOFFFEEDBACK) if (lpStartupInfo->dwFlags & STARTF_FORCEOFFFEEDBACK)
FIXME_(module)("(%s,...): STARTF_FORCEOFFFEEDBACK ignored\n", name); FIXME("(%s,...): STARTF_FORCEOFFFEEDBACK ignored\n", name);
if (lpStartupInfo->dwFlags & STARTF_USEHOTKEY) if (lpStartupInfo->dwFlags & STARTF_USEHOTKEY)
FIXME_(module)("(%s,...): STARTF_USEHOTKEY ignored\n", name); FIXME("(%s,...): STARTF_USEHOTKEY ignored\n", name);
/* Load file and create process */ /* Load file and create process */
@ -1209,7 +1206,7 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
case SCS_PIF_BINARY: case SCS_PIF_BINARY:
case SCS_POSIX_BINARY: case SCS_POSIX_BINARY:
case SCS_OS216_BINARY: case SCS_OS216_BINARY:
FIXME_(module)("Unsupported executable type: %ld\n", type ); FIXME("Unsupported executable type: %ld\n", type );
/* fall through */ /* fall through */
default: default:
@ -1309,7 +1306,7 @@ DWORD WINAPI GetModuleFileNameA(
else else
lstrcpynA( lpFileName, wm->short_filename, size ); lstrcpynA( lpFileName, wm->short_filename, size );
TRACE_(module)("%s\n", lpFileName ); TRACE("%s\n", lpFileName );
return strlen(lpFileName); return strlen(lpFileName);
} }
@ -1388,7 +1385,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
{ {
if(!(pwm->flags & WINE_MODREF_MARKER)) if(!(pwm->flags & WINE_MODREF_MARKER))
pwm->refCount++; pwm->refCount++;
TRACE_(module)("Already loaded module '%s' at 0x%08x, count=%d, \n", libname, pwm->module, pwm->refCount); TRACE("Already loaded module '%s' at 0x%08x, count=%d, \n", libname, pwm->module, pwm->refCount);
LeaveCriticalSection(&PROCESS_Current()->crit_section); LeaveCriticalSection(&PROCESS_Current()->crit_section);
return pwm; return pwm;
} }
@ -1400,27 +1397,27 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
switch(plo->loadorder[i]) switch(plo->loadorder[i])
{ {
case MODULE_LOADORDER_DLL: case MODULE_LOADORDER_DLL:
TRACE_(module)("Trying native dll '%s'\n", libname); TRACE("Trying native dll '%s'\n", libname);
pwm = PE_LoadLibraryExA(libname, flags, &err); pwm = PE_LoadLibraryExA(libname, flags, &err);
break; break;
case MODULE_LOADORDER_ELFDLL: case MODULE_LOADORDER_ELFDLL:
TRACE_(module)("Trying elfdll '%s'\n", libname); TRACE("Trying elfdll '%s'\n", libname);
pwm = ELFDLL_LoadLibraryExA(libname, flags, &err); pwm = ELFDLL_LoadLibraryExA(libname, flags, &err);
break; break;
case MODULE_LOADORDER_SO: case MODULE_LOADORDER_SO:
TRACE_(module)("Trying so-library '%s'\n", libname); TRACE("Trying so-library '%s'\n", libname);
pwm = ELF_LoadLibraryExA(libname, flags, &err); pwm = ELF_LoadLibraryExA(libname, flags, &err);
break; break;
case MODULE_LOADORDER_BI: case MODULE_LOADORDER_BI:
TRACE_(module)("Trying built-in '%s'\n", libname); TRACE("Trying built-in '%s'\n", libname);
pwm = BUILTIN32_LoadLibraryExA(libname, flags, &err); pwm = BUILTIN32_LoadLibraryExA(libname, flags, &err);
break; break;
default: default:
ERR_(module)("Got invalid loadorder type %d (%s index %d)\n", plo->loadorder[i], plo->modulename, i); ERR("Got invalid loadorder type %d (%s index %d)\n", plo->loadorder[i], plo->modulename, i);
/* Fall through */ /* Fall through */
case MODULE_LOADORDER_INVALID: /* We ignore this as it is an empty entry */ case MODULE_LOADORDER_INVALID: /* We ignore this as it is an empty entry */
@ -1431,7 +1428,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
if(pwm) if(pwm)
{ {
/* Initialize DLL just loaded */ /* Initialize DLL just loaded */
TRACE_(module)("Loaded module '%s' at 0x%08x, \n", libname, pwm->module); TRACE("Loaded module '%s' at 0x%08x, \n", libname, pwm->module);
/* Set the refCount here so that an attach failure will */ /* Set the refCount here so that an attach failure will */
/* decrement the dependencies through the MODULE_FreeLibrary call. */ /* decrement the dependencies through the MODULE_FreeLibrary call. */
@ -1446,7 +1443,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
break; break;
} }
WARN_(module)("Failed to load module '%s'; error=0x%08lx, \n", libname, err); WARN("Failed to load module '%s'; error=0x%08lx, \n", libname, err);
SetLastError(err); SetLastError(err);
LeaveCriticalSection(&PROCESS_Current()->crit_section); LeaveCriticalSection(&PROCESS_Current()->crit_section);
return NULL; return NULL;
@ -1532,7 +1529,7 @@ static void MODULE_FlushModrefs(void)
case MODULE32_BI: BUILTIN32_UnloadLibrary(wm); break; case MODULE32_BI: BUILTIN32_UnloadLibrary(wm); break;
default: default:
ERR_(module)("Invalid or unhandled MODREF type %d encountered (wm=%p)\n", wm->type, wm); ERR("Invalid or unhandled MODREF type %d encountered (wm=%p)\n", wm->type, wm);
} }
} }
} }
@ -1576,7 +1573,7 @@ static void MODULE_DecRefCount( WINE_MODREF *wm )
return; return;
--wm->refCount; --wm->refCount;
TRACE_(module)("(%s) refCount: %d\n", wm->modname, wm->refCount ); TRACE("(%s) refCount: %d\n", wm->modname, wm->refCount );
if ( wm->refCount == 0 ) if ( wm->refCount == 0 )
{ {
@ -1597,7 +1594,7 @@ static void MODULE_DecRefCount( WINE_MODREF *wm )
*/ */
BOOL MODULE_FreeLibrary( WINE_MODREF *wm ) BOOL MODULE_FreeLibrary( WINE_MODREF *wm )
{ {
TRACE_(module)("(%s) - START\n", wm->modname ); TRACE("(%s) - START\n", wm->modname );
/* Recursively decrement reference counts */ /* Recursively decrement reference counts */
MODULE_DecRefCount( wm ); MODULE_DecRefCount( wm );
@ -1612,7 +1609,7 @@ BOOL MODULE_FreeLibrary( WINE_MODREF *wm )
MODULE_FlushModrefs(); MODULE_FlushModrefs();
TRACE_(module)("(%s) - END\n", wm->modname ); TRACE("(%s) - END\n", wm->modname );
return TRUE; return TRUE;
} }
@ -1660,27 +1657,25 @@ FARPROC16 WINAPI WIN32_GetProcAddress16( HMODULE hModule, LPCSTR name )
FARPROC16 ret; FARPROC16 ret;
if (!hModule) { if (!hModule) {
WARN_(module)("hModule may not be 0!\n"); WARN("hModule may not be 0!\n");
return (FARPROC16)0; return (FARPROC16)0;
} }
if (HIWORD(hModule)) if (HIWORD(hModule))
{ {
WARN_(module)("hModule is Win32 handle (%08x)\n", hModule ); WARN("hModule is Win32 handle (%08x)\n", hModule );
return (FARPROC16)0; return (FARPROC16)0;
} }
hModule = GetExePtr( hModule ); hModule = GetExePtr( hModule );
if (HIWORD(name)) { if (HIWORD(name)) {
ordinal = NE_GetOrdinal( hModule, name ); ordinal = NE_GetOrdinal( hModule, name );
TRACE_(module)("%04x '%s'\n", TRACE("%04x '%s'\n", hModule, name );
hModule, name );
} else { } else {
ordinal = LOWORD(name); ordinal = LOWORD(name);
TRACE_(module)("%04x %04x\n", TRACE("%04x %04x\n", hModule, ordinal );
hModule, ordinal );
} }
if (!ordinal) return (FARPROC16)0; if (!ordinal) return (FARPROC16)0;
ret = NE_GetEntryPoint( hModule, ordinal ); ret = NE_GetEntryPoint( hModule, ordinal );
TRACE_(module)("returning %08x\n",(UINT)ret); TRACE("returning %08x\n",(UINT)ret);
return ret; return ret;
} }
@ -1698,20 +1693,18 @@ FARPROC16 WINAPI GetProcAddress16( HMODULE16 hModule, SEGPTR name )
if (HIWORD(name) != 0) if (HIWORD(name) != 0)
{ {
ordinal = NE_GetOrdinal( hModule, (LPSTR)PTR_SEG_TO_LIN(name) ); ordinal = NE_GetOrdinal( hModule, (LPSTR)PTR_SEG_TO_LIN(name) );
TRACE_(module)("%04x '%s'\n", TRACE("%04x '%s'\n", hModule, (LPSTR)PTR_SEG_TO_LIN(name) );
hModule, (LPSTR)PTR_SEG_TO_LIN(name) );
} }
else else
{ {
ordinal = LOWORD(name); ordinal = LOWORD(name);
TRACE_(module)("%04x %04x\n", TRACE("%04x %04x\n", hModule, ordinal );
hModule, ordinal );
} }
if (!ordinal) return (FARPROC16)0; if (!ordinal) return (FARPROC16)0;
ret = NE_GetEntryPoint( hModule, ordinal ); ret = NE_GetEntryPoint( hModule, ordinal );
TRACE_(module)("returning %08x\n", (UINT)ret ); TRACE("returning %08x\n", (UINT)ret );
return ret; return ret;
} }
@ -1762,7 +1755,7 @@ FARPROC MODULE_GetProcAddress(
if (!retproc) SetLastError(ERROR_PROC_NOT_FOUND); if (!retproc) SetLastError(ERROR_PROC_NOT_FOUND);
return retproc; return retproc;
default: default:
ERR_(module)("wine_modref type %d not handled.\n",wm->type); ERR("wine_modref type %d not handled.\n",wm->type);
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return (FARPROC)0; return (FARPROC)0;
} }

View File

@ -62,12 +62,12 @@
#include "snoop.h" #include "snoop.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win32)
DECLARE_DEBUG_CHANNEL(delayhlp) DECLARE_DEBUG_CHANNEL(delayhlp)
DECLARE_DEBUG_CHANNEL(fixup) DECLARE_DEBUG_CHANNEL(fixup)
DECLARE_DEBUG_CHANNEL(module) DECLARE_DEBUG_CHANNEL(module)
DECLARE_DEBUG_CHANNEL(relay) DECLARE_DEBUG_CHANNEL(relay)
DECLARE_DEBUG_CHANNEL(segment) DECLARE_DEBUG_CHANNEL(segment)
DECLARE_DEBUG_CHANNEL(win32)
/* convert PE image VirtualAddress to Real Address */ /* convert PE image VirtualAddress to Real Address */
@ -91,15 +91,15 @@ void dump_exports( HMODULE hModule )
IMAGE_EXPORT_DIRECTORY *pe_exports = (IMAGE_EXPORT_DIRECTORY*)RVA(rva_start); IMAGE_EXPORT_DIRECTORY *pe_exports = (IMAGE_EXPORT_DIRECTORY*)RVA(rva_start);
Module = (char*)RVA(pe_exports->Name); Module = (char*)RVA(pe_exports->Name);
TRACE_(win32)("*******EXPORT DATA*******\n"); TRACE("*******EXPORT DATA*******\n");
TRACE_(win32)("Module name is %s, %ld functions, %ld names\n", TRACE("Module name is %s, %ld functions, %ld names\n",
Module, pe_exports->NumberOfFunctions, pe_exports->NumberOfNames); Module, pe_exports->NumberOfFunctions, pe_exports->NumberOfNames);
ordinal=(u_short*) RVA(pe_exports->AddressOfNameOrdinals); ordinal=(u_short*) RVA(pe_exports->AddressOfNameOrdinals);
functions=function=(u_long*) RVA(pe_exports->AddressOfFunctions); functions=function=(u_long*) RVA(pe_exports->AddressOfFunctions);
name=(u_char**) RVA(pe_exports->AddressOfNames); name=(u_char**) RVA(pe_exports->AddressOfNames);
TRACE_(win32)(" Ord RVA Addr Name\n" ); TRACE(" Ord RVA Addr Name\n" );
for (i=0;i<pe_exports->NumberOfFunctions;i++, function++) for (i=0;i<pe_exports->NumberOfFunctions;i++, function++)
{ {
if (!*function) continue; /* No such function */ if (!*function) continue; /* No such function */
@ -144,15 +144,15 @@ FARPROC PE_FindExportedFunction(
char * forward; char * forward;
if (HIWORD(funcName)) if (HIWORD(funcName))
TRACE_(win32)("(%s)\n",funcName); TRACE("(%s)\n",funcName);
else else
TRACE_(win32)("(%d)\n",(int)funcName); TRACE("(%d)\n",(int)funcName);
if (!exports) { if (!exports) {
/* Not a fatal problem, some apps do /* Not a fatal problem, some apps do
* GetProcAddress(0,"RegisterPenApp") which triggers this * GetProcAddress(0,"RegisterPenApp") which triggers this
* case. * case.
*/ */
WARN_(win32)("Module %08x(%s)/MODREF %p doesn't have a exports table.\n",wm->module,wm->modname,pem); WARN("Module %08x(%s)/MODREF %p doesn't have a exports table.\n",wm->module,wm->modname,pem);
return NULL; return NULL;
} }
ordinal = (u_short*) RVA(exports->AddressOfNameOrdinals); ordinal = (u_short*) RVA(exports->AddressOfNameOrdinals);
@ -183,8 +183,7 @@ FARPROC PE_FindExportedFunction(
} else { } else {
int i; int i;
if (LOWORD(funcName)-exports->Base > exports->NumberOfFunctions) { if (LOWORD(funcName)-exports->Base > exports->NumberOfFunctions) {
TRACE_(win32)(" ordinal %d out of range!\n", TRACE(" ordinal %d out of range!\n", LOWORD(funcName));
LOWORD(funcName));
return NULL; return NULL;
} }
addr = function[(int)funcName-exports->Base]; addr = function[(int)funcName-exports->Base];
@ -218,7 +217,7 @@ FARPROC PE_FindExportedFunction(
module[end-forward] = 0; module[end-forward] = 0;
if (!(wm = MODULE_FindModule( module ))) if (!(wm = MODULE_FindModule( module )))
{ {
ERR_(win32)("module not found for forward '%s'\n", forward ); ERR("module not found for forward '%s'\n", forward );
return NULL; return NULL;
} }
return MODULE_GetProcAddress( wm->module, end + 1, snoop ); return MODULE_GetProcAddress( wm->module, end + 1, snoop );
@ -242,7 +241,7 @@ DWORD fixup_imports( WINE_MODREF *wm )
modname = "<unknown>"; modname = "<unknown>";
/* OK, now dump the import list */ /* OK, now dump the import list */
TRACE_(win32)("Dumping imports list\n"); TRACE("Dumping imports list\n");
/* first, count the number of imported non-internal modules */ /* first, count the number of imported non-internal modules */
pe_imp = pem->pe_import; pe_imp = pem->pe_import;
@ -288,7 +287,7 @@ DWORD fixup_imports( WINE_MODREF *wm )
/* FIXME: forwarder entries ... */ /* FIXME: forwarder entries ... */
if (pe_imp->u.OriginalFirstThunk != 0) { /* original MS style */ if (pe_imp->u.OriginalFirstThunk != 0) { /* original MS style */
TRACE_(win32)("Microsoft style imports used\n"); TRACE("Microsoft style imports used\n");
import_list =(PIMAGE_THUNK_DATA) RVA(pe_imp->u.OriginalFirstThunk); import_list =(PIMAGE_THUNK_DATA) RVA(pe_imp->u.OriginalFirstThunk);
thunk_list = (PIMAGE_THUNK_DATA) RVA(pe_imp->FirstThunk); thunk_list = (PIMAGE_THUNK_DATA) RVA(pe_imp->FirstThunk);
@ -296,23 +295,23 @@ DWORD fixup_imports( WINE_MODREF *wm )
if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal)) { if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal)) {
int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal); int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal);
TRACE_(win32)("--- Ordinal %s,%d\n", name, ordinal); TRACE("--- Ordinal %s,%d\n", name, ordinal);
thunk_list->u1.Function=MODULE_GetProcAddress( thunk_list->u1.Function=MODULE_GetProcAddress(
wmImp->module, (LPCSTR)ordinal, TRUE wmImp->module, (LPCSTR)ordinal, TRUE
); );
if (!thunk_list->u1.Function) { if (!thunk_list->u1.Function) {
ERR_(win32)("No implementation for %s.%d, setting to 0xdeadbeef\n", ERR("No implementation for %s.%d, setting to 0xdeadbeef\n",
name, ordinal); name, ordinal);
thunk_list->u1.Function = (FARPROC)0xdeadbeef; thunk_list->u1.Function = (FARPROC)0xdeadbeef;
} }
} else { /* import by name */ } else { /* import by name */
pe_name = (PIMAGE_IMPORT_BY_NAME)RVA(import_list->u1.AddressOfData); pe_name = (PIMAGE_IMPORT_BY_NAME)RVA(import_list->u1.AddressOfData);
TRACE_(win32)("--- %s %s.%d\n", pe_name->Name, name, pe_name->Hint); TRACE("--- %s %s.%d\n", pe_name->Name, name, pe_name->Hint);
thunk_list->u1.Function=MODULE_GetProcAddress( thunk_list->u1.Function=MODULE_GetProcAddress(
wmImp->module, pe_name->Name, TRUE wmImp->module, pe_name->Name, TRUE
); );
if (!thunk_list->u1.Function) { if (!thunk_list->u1.Function) {
ERR_(win32)("No implementation for %s.%d(%s), setting to 0xdeadbeef\n", ERR("No implementation for %s.%d(%s), setting to 0xdeadbeef\n",
name,pe_name->Hint,pe_name->Name); name,pe_name->Hint,pe_name->Name);
thunk_list->u1.Function = (FARPROC)0xdeadbeef; thunk_list->u1.Function = (FARPROC)0xdeadbeef;
} }
@ -321,31 +320,31 @@ DWORD fixup_imports( WINE_MODREF *wm )
thunk_list++; thunk_list++;
} }
} else { /* Borland style */ } else { /* Borland style */
TRACE_(win32)("Borland style imports used\n"); TRACE("Borland style imports used\n");
thunk_list = (PIMAGE_THUNK_DATA) RVA(pe_imp->FirstThunk); thunk_list = (PIMAGE_THUNK_DATA) RVA(pe_imp->FirstThunk);
while (thunk_list->u1.Ordinal) { while (thunk_list->u1.Ordinal) {
if (IMAGE_SNAP_BY_ORDINAL(thunk_list->u1.Ordinal)) { if (IMAGE_SNAP_BY_ORDINAL(thunk_list->u1.Ordinal)) {
/* not sure about this branch, but it seems to work */ /* not sure about this branch, but it seems to work */
int ordinal = IMAGE_ORDINAL(thunk_list->u1.Ordinal); int ordinal = IMAGE_ORDINAL(thunk_list->u1.Ordinal);
TRACE_(win32)("--- Ordinal %s.%d\n",name,ordinal); TRACE("--- Ordinal %s.%d\n",name,ordinal);
thunk_list->u1.Function=MODULE_GetProcAddress( thunk_list->u1.Function=MODULE_GetProcAddress(
wmImp->module, (LPCSTR) ordinal, TRUE wmImp->module, (LPCSTR) ordinal, TRUE
); );
if (!thunk_list->u1.Function) { if (!thunk_list->u1.Function) {
ERR_(win32)("No implementation for %s.%d, setting to 0xdeadbeef\n", ERR("No implementation for %s.%d, setting to 0xdeadbeef\n",
name,ordinal); name,ordinal);
thunk_list->u1.Function = (FARPROC)0xdeadbeef; thunk_list->u1.Function = (FARPROC)0xdeadbeef;
} }
} else { } else {
pe_name=(PIMAGE_IMPORT_BY_NAME) RVA(thunk_list->u1.AddressOfData); pe_name=(PIMAGE_IMPORT_BY_NAME) RVA(thunk_list->u1.AddressOfData);
TRACE_(win32)("--- %s %s.%d\n", TRACE("--- %s %s.%d\n",
pe_name->Name,name,pe_name->Hint); pe_name->Name,name,pe_name->Hint);
thunk_list->u1.Function=MODULE_GetProcAddress( thunk_list->u1.Function=MODULE_GetProcAddress(
wmImp->module, pe_name->Name, TRUE wmImp->module, pe_name->Name, TRUE
); );
if (!thunk_list->u1.Function) { if (!thunk_list->u1.Function) {
ERR_(win32)("No implementation for %s.%d, setting to 0xdeadbeef\n", ERR("No implementation for %s.%d, setting to 0xdeadbeef\n",
name, pe_name->Hint); name, pe_name->Hint);
thunk_list->u1.Function = (FARPROC)0xdeadbeef; thunk_list->u1.Function = (FARPROC)0xdeadbeef;
} }
@ -362,11 +361,11 @@ static int calc_vma_size( HMODULE hModule )
int i,vma_size = 0; int i,vma_size = 0;
IMAGE_SECTION_HEADER *pe_seg = PE_SECTIONS(hModule); IMAGE_SECTION_HEADER *pe_seg = PE_SECTIONS(hModule);
TRACE_(win32)("Dump of segment table\n"); TRACE("Dump of segment table\n");
TRACE_(win32)(" Name VSz Vaddr SzRaw Fileadr *Reloc *Lineum #Reloc #Linum Char\n"); TRACE(" Name VSz Vaddr SzRaw Fileadr *Reloc *Lineum #Reloc #Linum Char\n");
for (i = 0; i< PE_HEADER(hModule)->FileHeader.NumberOfSections; i++) for (i = 0; i< PE_HEADER(hModule)->FileHeader.NumberOfSections; i++)
{ {
TRACE_(win32)("%8s: %4.4lx %8.8lx %8.8lx %8.8lx %8.8lx %8.8lx %4.4x %4.4x %8.8lx\n", TRACE("%8s: %4.4lx %8.8lx %8.8lx %8.8lx %8.8lx %8.8lx %4.4x %4.4x %8.8lx\n",
pe_seg->Name, pe_seg->Name,
pe_seg->Misc.VirtualSize, pe_seg->Misc.VirtualSize,
pe_seg->VirtualAddress, pe_seg->VirtualAddress,
@ -420,13 +419,13 @@ static void do_relocations( unsigned int load_addr, IMAGE_BASE_RELOCATION *r )
/* FIXME: if this is an exported address, fire up enhanced logic */ /* FIXME: if this is an exported address, fire up enhanced logic */
break; break;
case IMAGE_REL_BASED_HIGHADJ: case IMAGE_REL_BASED_HIGHADJ:
FIXME_(win32)("Don't know what to do with IMAGE_REL_BASED_HIGHADJ\n"); FIXME("Don't know what to do with IMAGE_REL_BASED_HIGHADJ\n");
break; break;
case IMAGE_REL_BASED_MIPS_JMPADDR: case IMAGE_REL_BASED_MIPS_JMPADDR:
FIXME_(win32)("Is this a MIPS machine ???\n"); FIXME("Is this a MIPS machine ???\n");
break; break;
default: default:
FIXME_(win32)("Unknown fixup type\n"); FIXME("Unknown fixup type\n");
break; break;
} }
} }
@ -469,14 +468,14 @@ HMODULE PE_LoadImage( HANDLE hFile, LPCSTR filename, WORD *version )
0, 0, NULL ); 0, 0, NULL );
if (!mapping) if (!mapping)
{ {
WARN_(win32)("CreateFileMapping error %ld\n", GetLastError() ); WARN("CreateFileMapping error %ld\n", GetLastError() );
return 0; return 0;
} }
hModule = (HMODULE)MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); hModule = (HMODULE)MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 );
CloseHandle( mapping ); CloseHandle( mapping );
if (!hModule) if (!hModule)
{ {
WARN_(win32)("MapViewOfFile error %ld\n", GetLastError() ); WARN("MapViewOfFile error %ld\n", GetLastError() );
return 0; return 0;
} }
nt = PE_HEADER( hModule ); nt = PE_HEADER( hModule );
@ -484,7 +483,7 @@ HMODULE PE_LoadImage( HANDLE hFile, LPCSTR filename, WORD *version )
/* Check signature */ /* Check signature */
if ( nt->Signature != IMAGE_NT_SIGNATURE ) if ( nt->Signature != IMAGE_NT_SIGNATURE )
{ {
WARN_(win32)("image doesn't have PE signature, but 0x%08lx\n", WARN("image doesn't have PE signature, but 0x%08lx\n",
nt->Signature ); nt->Signature );
goto error; goto error;
} }
@ -526,7 +525,7 @@ HMODULE PE_LoadImage( HANDLE hFile, LPCSTR filename, WORD *version )
/* Check file size */ /* Check file size */
if ( file_size && file_size < rawsize ) if ( file_size && file_size < rawsize )
{ {
ERR_(win32)("PE module is too small (header: %d, filesize: %d), " ERR("PE module is too small (header: %d, filesize: %d), "
"probably truncated download?\n", "probably truncated download?\n",
rawsize, file_size ); rawsize, file_size );
goto error; goto error;
@ -535,7 +534,7 @@ HMODULE PE_LoadImage( HANDLE hFile, LPCSTR filename, WORD *version )
/* Check entrypoint address */ /* Check entrypoint address */
aoep = nt->OptionalHeader.AddressOfEntryPoint; aoep = nt->OptionalHeader.AddressOfEntryPoint;
if (aoep && (aoep < lowest_va)) if (aoep && (aoep < lowest_va))
FIXME_(win32)("WARNING: '%s' has an invalid entrypoint (0x%08lx) " FIXME("WARNING: '%s' has an invalid entrypoint (0x%08lx) "
"below the first virtual address (0x%08x) " "below the first virtual address (0x%08x) "
"(possible Virus Infection or broken binary)!\n", "(possible Virus Infection or broken binary)!\n",
filename, aoep, lowest_va ); filename, aoep, lowest_va );
@ -585,7 +584,7 @@ HMODULE PE_LoadImage( HANDLE hFile, LPCSTR filename, WORD *version )
reloc = dir->VirtualAddress; reloc = dir->VirtualAddress;
else else
{ {
FIXME_(win32)( FIXME(
"FATAL: Need to relocate %s, but no relocation records present (%s). Try to run that file directly !\n", "FATAL: Need to relocate %s, but no relocation records present (%s). Try to run that file directly !\n",
filename, filename,
(nt->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)? (nt->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)?
@ -598,7 +597,7 @@ HMODULE PE_LoadImage( HANDLE hFile, LPCSTR filename, WORD *version )
* Some DLLs really check the MSB of the module handle :-/ * Some DLLs really check the MSB of the module handle :-/
*/ */
if ( nt->OptionalHeader.ImageBase & 0x80000000 ) if ( nt->OptionalHeader.ImageBase & 0x80000000 )
ERR_(win32)( "Forced to relocate system DLL (base > 2GB). This is not good.\n" ); ERR( "Forced to relocate system DLL (base > 2GB). This is not good.\n" );
load_addr = (DWORD)VirtualAlloc( NULL, vma_size, load_addr = (DWORD)VirtualAlloc( NULL, vma_size,
MEM_RESERVE | MEM_COMMIT, MEM_RESERVE | MEM_COMMIT,
@ -610,8 +609,8 @@ HMODULE PE_LoadImage( HANDLE hFile, LPCSTR filename, WORD *version )
} }
} }
TRACE_(win32)("Load addr is %lx (base %lx), range %x\n", TRACE("Load addr is %lx (base %lx), range %x\n",
load_addr, nt->OptionalHeader.ImageBase, vma_size ); load_addr, nt->OptionalHeader.ImageBase, vma_size );
TRACE_(segment)("Loading %s at %lx, range %x\n", TRACE_(segment)("Loading %s at %lx, range %x\n",
filename, load_addr, vma_size ); filename, load_addr, vma_size );
@ -706,38 +705,38 @@ WINE_MODREF *PE_CreateModule( HMODULE hModule,
pe_resource = (PIMAGE_RESOURCE_DIRECTORY)RVA(dir->VirtualAddress); pe_resource = (PIMAGE_RESOURCE_DIRECTORY)RVA(dir->VirtualAddress);
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_EXCEPTION; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_EXCEPTION;
if (dir->Size) FIXME_(win32)("Exception directory ignored\n" ); if (dir->Size) FIXME("Exception directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_SECURITY; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_SECURITY;
if (dir->Size) FIXME_(win32)("Security directory ignored\n" ); if (dir->Size) FIXME("Security directory ignored\n" );
/* IMAGE_DIRECTORY_ENTRY_BASERELOC handled in PE_LoadImage */ /* IMAGE_DIRECTORY_ENTRY_BASERELOC handled in PE_LoadImage */
/* IMAGE_DIRECTORY_ENTRY_DEBUG handled by debugger */ /* IMAGE_DIRECTORY_ENTRY_DEBUG handled by debugger */
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_DEBUG; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_DEBUG;
if (dir->Size) TRACE_(win32)("Debug directory ignored\n" ); if (dir->Size) TRACE("Debug directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_COPYRIGHT; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_COPYRIGHT;
if (dir->Size) FIXME_(win32)("Copyright string ignored\n" ); if (dir->Size) FIXME("Copyright string ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_GLOBALPTR; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_GLOBALPTR;
if (dir->Size) FIXME_(win32)("Global Pointer (MIPS) ignored\n" ); if (dir->Size) FIXME("Global Pointer (MIPS) ignored\n" );
/* IMAGE_DIRECTORY_ENTRY_TLS handled in PE_TlsInit */ /* IMAGE_DIRECTORY_ENTRY_TLS handled in PE_TlsInit */
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG;
if (dir->Size) FIXME_(win32)("Load Configuration directory ignored\n" ); if (dir->Size) FIXME("Load Configuration directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT;
if (dir->Size) TRACE_(win32)("Bound Import directory ignored\n" ); if (dir->Size) TRACE("Bound Import directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_IAT; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_IAT;
if (dir->Size) TRACE_(win32)("Import Address Table directory ignored\n" ); if (dir->Size) TRACE("Import Address Table directory ignored\n" );
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT;
if (dir->Size) if (dir->Size)
{ {
TRACE_(win32)("Delayed import, stub calls LoadLibrary\n" ); TRACE("Delayed import, stub calls LoadLibrary\n" );
/* /*
* Nothing to do here. * Nothing to do here.
*/ */
@ -762,10 +761,10 @@ WINE_MODREF *PE_CreateModule( HMODULE hModule,
} }
dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR;
if (dir->Size) FIXME_(win32)("Unknown directory 14 ignored\n" ); if (dir->Size) FIXME("Unknown directory 14 ignored\n" );
dir = nt->OptionalHeader.DataDirectory+15; dir = nt->OptionalHeader.DataDirectory+15;
if (dir->Size) FIXME_(win32)("Unknown directory 15 ignored\n" ); if (dir->Size) FIXME("Unknown directory 15 ignored\n" );
/* Allocate and fill WINE_MODREF */ /* Allocate and fill WINE_MODREF */
@ -812,7 +811,7 @@ WINE_MODREF *PE_CreateModule( HMODULE hModule,
{ {
if ( PROCESS_Current()->exe_modref ) if ( PROCESS_Current()->exe_modref )
FIXME_(win32)( "Trying to load second .EXE file: %s\n", filename ); FIXME( "Trying to load second .EXE file: %s\n", filename );
else else
PROCESS_Current()->exe_modref = wm; PROCESS_Current()->exe_modref = wm;
} }
@ -910,7 +909,7 @@ WINE_MODREF *PE_LoadLibraryExA (LPCSTR name, DWORD flags, DWORD *err)
/* Create 32-bit MODREF */ /* Create 32-bit MODREF */
if ( !(wm = PE_CreateModule( hModule32, filename, flags, FALSE )) ) if ( !(wm = PE_CreateModule( hModule32, filename, flags, FALSE )) )
{ {
ERR_(win32)( "can't load %s\n", filename ); ERR( "can't load %s\n", filename );
FreeLibrary16( hModule16 ); FreeLibrary16( hModule16 );
*err = ERROR_OUTOFMEMORY; *err = ERROR_OUTOFMEMORY;
return NULL; return NULL;
@ -989,7 +988,7 @@ BOOL PE_CreateProcess( HANDLE hFile, LPCSTR filename, LPCSTR cmd_line, LPCSTR en
*/ */
int PE_UnloadImage( HMODULE hModule ) int PE_UnloadImage( HMODULE hModule )
{ {
FIXME_(win32)("stub.\n"); FIXME("stub.\n");
/* free resources, image, unmap */ /* free resources, image, unmap */
return 1; return 1;
} }
@ -1075,7 +1074,7 @@ void PE_InitTls( void )
cbs = _fixup_address(&(peh->OptionalHeader),delta,pdir->AddressOfCallBacks); cbs = _fixup_address(&(peh->OptionalHeader),delta,pdir->AddressOfCallBacks);
if (*cbs) if (*cbs)
FIXME_(win32)("TLS Callbacks aren't going to be called\n"); FIXME("TLS Callbacks aren't going to be called\n");
} }
TlsSetValue( pem->tlsindex, mem ); TlsSetValue( pem->tlsindex, mem );

View File

@ -33,8 +33,8 @@
#include "debugstr.h" #include "debugstr.h"
#include "winnls.h" #include "winnls.h"
DEFAULT_DEBUG_CHANNEL(resource)
DECLARE_DEBUG_CHANNEL(accel) DECLARE_DEBUG_CHANNEL(accel)
DECLARE_DEBUG_CHANNEL(resource)
extern WORD WINE_LanguageId; extern WORD WINE_LanguageId;
@ -68,7 +68,7 @@ static HRSRC16 MapHRsrc32To16( NE_MODULE *pModule, HANDLE hRsrc32, WORD type )
if ( !(map = (HRSRC_MAP *)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, if ( !(map = (HRSRC_MAP *)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(HRSRC_MAP) ) ) ) sizeof(HRSRC_MAP) ) ) )
{ {
ERR_(resource)("Cannot allocate HRSRC map\n" ); ERR("Cannot allocate HRSRC map\n" );
return 0; return 0;
} }
pModule->hRsrcMap = (LPVOID)map; pModule->hRsrcMap = (LPVOID)map;
@ -87,7 +87,7 @@ static HRSRC16 MapHRsrc32To16( NE_MODULE *pModule, HANDLE hRsrc32, WORD type )
(map->nAlloc + HRSRC_MAP_BLOCKSIZE) (map->nAlloc + HRSRC_MAP_BLOCKSIZE)
* sizeof(HRSRC_ELEM) ) )) * sizeof(HRSRC_ELEM) ) ))
{ {
ERR_(resource)("Cannot grow HRSRC map\n" ); ERR("Cannot grow HRSRC map\n" );
return 0; return 0;
} }
map->elem = newElem; map->elem = newElem;
@ -139,13 +139,14 @@ static HRSRC RES_FindResource( HMODULE hModule, LPCSTR type,
WINE_MODREF *wm = pModule && pModule->module32? WINE_MODREF *wm = pModule && pModule->module32?
MODULE32_LookupHMODULE( pModule->module32 ) : NULL; MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
TRACE_(resource)("(%08x %s, %08x%s, %08x%s, %04x, %s, %s)\n", TRACE("(%08x %s, %08x%s, %08x%s, %04x, %s, %s)\n",
hModule, pModule ? (char *)NE_MODULE_NAME(pModule) : "NULL dereference", hModule,
(UINT)type, HIWORD(type)? (bUnicode? debugstr_w((LPWSTR)type) : debugstr_a(type)) : "", pModule ? (char *)NE_MODULE_NAME(pModule) : "NULL dereference",
(UINT)name, HIWORD(name)? (bUnicode? debugstr_w((LPWSTR)name) : debugstr_a(name)) : "", (UINT)type, HIWORD(type)? (bUnicode? debugstr_w((LPWSTR)type) : debugstr_a(type)) : "",
lang, (UINT)name, HIWORD(name)? (bUnicode? debugstr_w((LPWSTR)name) : debugstr_a(name)) : "",
bUnicode? "W" : "A", lang,
bRet16? "NE" : "PE" ); bUnicode? "W" : "A",
bRet16? "NE" : "PE" );
if ( !pModule ) return 0; if ( !pModule ) return 0;
@ -174,7 +175,7 @@ static HRSRC RES_FindResource( HMODULE hModule, LPCSTR type,
break; break;
default: default:
ERR_(resource)("unknown module type %d\n", wm->type ); ERR("unknown module type %d\n", wm->type );
break; break;
} }
@ -230,8 +231,8 @@ static DWORD RES_SizeofResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
WINE_MODREF *wm = pModule && pModule->module32? WINE_MODREF *wm = pModule && pModule->module32?
MODULE32_LookupHMODULE( pModule->module32 ) : NULL; MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
TRACE_(resource)("(%08x %s, %08x, %s)\n", TRACE("(%08x %s, %08x, %s)\n",
hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" ); hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" );
if ( !pModule || !hRsrc ) return 0; if ( !pModule || !hRsrc ) return 0;
@ -253,7 +254,7 @@ static DWORD RES_SizeofResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
break; break;
default: default:
ERR_(resource)("unknown module type %d\n", wm->type ); ERR("unknown module type %d\n", wm->type );
break; break;
} }
} }
@ -281,8 +282,8 @@ static HFILE RES_AccessResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
WINE_MODREF *wm = pModule && pModule->module32? WINE_MODREF *wm = pModule && pModule->module32?
MODULE32_LookupHMODULE( pModule->module32 ) : NULL; MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
TRACE_(resource)("(%08x %s, %08x, %s)\n", TRACE("(%08x %s, %08x, %s)\n",
hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" ); hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" );
if ( !pModule || !hRsrc ) return HFILE_ERROR; if ( !pModule || !hRsrc ) return HFILE_ERROR;
@ -294,7 +295,7 @@ static HFILE RES_AccessResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
HRSRC hRsrc32 = HIWORD(hRsrc)? hRsrc : MapHRsrc16To32( pModule, hRsrc ); HRSRC hRsrc32 = HIWORD(hRsrc)? hRsrc : MapHRsrc16To32( pModule, hRsrc );
#endif #endif
FIXME_(resource)("32-bit modules not yet supported.\n" ); FIXME("32-bit modules not yet supported.\n" );
hFile = HFILE_ERROR; hFile = HFILE_ERROR;
/* If we need to return a 16-bit file handle, convert it */ /* If we need to return a 16-bit file handle, convert it */
@ -329,8 +330,8 @@ static HGLOBAL RES_LoadResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
WINE_MODREF *wm = pModule && pModule->module32? WINE_MODREF *wm = pModule && pModule->module32?
MODULE32_LookupHMODULE( pModule->module32 ) : NULL; MODULE32_LookupHMODULE( pModule->module32 ) : NULL;
TRACE_(resource)("(%08x %s, %08x, %s)\n", TRACE("(%08x %s, %08x, %s)\n",
hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" ); hModule, NE_MODULE_NAME(pModule), hRsrc, bRet16? "NE" : "PE" );
if ( !pModule || !hRsrc ) return 0; if ( !pModule || !hRsrc ) return 0;
@ -352,7 +353,7 @@ static HGLOBAL RES_LoadResource( HMODULE hModule, HRSRC hRsrc, BOOL bRet16 )
break; break;
default: default:
ERR_(resource)("unknown module type %d\n", wm->type ); ERR("unknown module type %d\n", wm->type );
break; break;
} }
@ -388,14 +389,14 @@ static LPVOID RES_LockResource( HGLOBAL handle, BOOL bRet16 )
{ {
LPVOID bits = NULL; LPVOID bits = NULL;
TRACE_(resource)("(%08x, %s)\n", handle, bRet16? "NE" : "PE" ); TRACE("(%08x, %s)\n", handle, bRet16? "NE" : "PE" );
if ( HIWORD( handle ) ) if ( HIWORD( handle ) )
{ {
/* 32-bit memory handle */ /* 32-bit memory handle */
if ( bRet16 ) if ( bRet16 )
FIXME_(resource)("can't return SEGPTR to 32-bit resource %08x.\n", handle ); FIXME("can't return SEGPTR to 32-bit resource %08x.\n", handle );
else else
bits = (LPVOID)handle; bits = (LPVOID)handle;
} }
@ -422,7 +423,7 @@ static BOOL RES_FreeResource( HGLOBAL handle )
{ {
HGLOBAL retv = handle; HGLOBAL retv = handle;
TRACE_(resource)("(%08x)\n", handle ); TRACE("(%08x)\n", handle );
if ( HIWORD( handle ) ) if ( HIWORD( handle ) )
{ {
@ -862,8 +863,8 @@ INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id,
int string_num; int string_num;
int i; int i;
TRACE_(resource)("inst=%04x id=%04x buff=%08x len=%d\n", TRACE("inst=%04x id=%04x buff=%08x len=%d\n",
instance, resource_id, (int) buffer, buflen); instance, resource_id, (int) buffer, buflen);
hrsrc = FindResource16( instance, (SEGPTR)((resource_id>>4)+1), RT_STRING16 ); hrsrc = FindResource16( instance, (SEGPTR)((resource_id>>4)+1), RT_STRING16 );
if (!hrsrc) return 0; if (!hrsrc) return 0;
@ -875,7 +876,7 @@ INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id,
for (i = 0; i < string_num; i++) for (i = 0; i < string_num; i++)
p += *p + 1; p += *p + 1;
TRACE_(resource)("strlen = %d\n", (int)*p ); TRACE("strlen = %d\n", (int)*p );
if (buffer == NULL) return *p; if (buffer == NULL) return *p;
i = MIN(buflen - 1, *p); i = MIN(buflen - 1, *p);
@ -887,11 +888,11 @@ INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id,
buffer[0] = '\0'; buffer[0] = '\0';
return 0; return 0;
} }
WARN_(resource)("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1); WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
} }
FreeResource16( hmem ); FreeResource16( hmem );
TRACE_(resource)("'%s' loaded !\n", buffer); TRACE("'%s' loaded !\n", buffer);
return i; return i;
} }
@ -909,8 +910,8 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */ if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
resource_id = (UINT)(-((INT)resource_id)); resource_id = (UINT)(-((INT)resource_id));
TRACE_(resource)("instance = %04x, id = %04x, buffer = %08x, " TRACE("instance = %04x, id = %04x, buffer = %08x, "
"length = %d\n", instance, (int)resource_id, (int) buffer, buflen); "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
/* Use bits 4 - 19 (incremented by 1) as resourceid, mask out /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
* 20 - 31. */ * 20 - 31. */
@ -925,7 +926,7 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
for (i = 0; i < string_num; i++) for (i = 0; i < string_num; i++)
p += *p + 1; p += *p + 1;
TRACE_(resource)("strlen = %d\n", (int)*p ); TRACE("strlen = %d\n", (int)*p );
if (buffer == NULL) return *p; if (buffer == NULL) return *p;
i = MIN(buflen - 1, *p); i = MIN(buflen - 1, *p);
@ -938,11 +939,11 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
return 0; return 0;
} }
#if 0 #if 0
WARN_(resource)("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1); WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
#endif #endif
} }
TRACE_(resource)("%s loaded !\n", debugstr_w(buffer)); TRACE("%s loaded !\n", debugstr_w(buffer));
return i; return i;
} }
@ -1006,7 +1007,7 @@ INT WINAPI LoadMessageA( HMODULE instance, UINT id, WORD lang,
PMESSAGE_RESOURCE_ENTRY mre; PMESSAGE_RESOURCE_ENTRY mre;
int i,slen; int i,slen;
TRACE_(resource)("instance = %08lx, id = %08lx, buffer = %p, length = %ld\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen); TRACE("instance = %08lx, id = %08lx, buffer = %p, length = %ld\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen);
/*FIXME: I am not sure about the '1' ... But I've only seen those entries*/ /*FIXME: I am not sure about the '1' ... But I've only seen those entries*/
hrsrc = FindResourceExW(instance,RT_MESSAGELISTW,(LPWSTR)1,lang); hrsrc = FindResourceExW(instance,RT_MESSAGELISTW,(LPWSTR)1,lang);
@ -1033,7 +1034,7 @@ INT WINAPI LoadMessageA( HMODULE instance, UINT id, WORD lang,
mre = (PMESSAGE_RESOURCE_ENTRY)(((char*)mre)+(mre->Length)); mre = (PMESSAGE_RESOURCE_ENTRY)(((char*)mre)+(mre->Length));
} }
slen=mre->Length; slen=mre->Length;
TRACE_(resource)(" - strlen=%d\n",slen); TRACE(" - strlen=%d\n",slen);
i = MIN(buflen - 1, slen); i = MIN(buflen - 1, slen);
if (buffer == NULL) if (buffer == NULL)
return slen; return slen;
@ -1047,7 +1048,7 @@ INT WINAPI LoadMessageA( HMODULE instance, UINT id, WORD lang,
} }
} }
if (buffer) if (buffer)
TRACE_(resource)("'%s' copied !\n", buffer); TRACE("'%s' copied !\n", buffer);
return i; return i;
} }

View File

@ -37,8 +37,8 @@
#include "services.h" #include "services.h"
#include "server.h" #include "server.h"
DEFAULT_DEBUG_CHANNEL(task)
DECLARE_DEBUG_CHANNEL(relay) DECLARE_DEBUG_CHANNEL(relay)
DECLARE_DEBUG_CHANNEL(task)
DECLARE_DEBUG_CHANNEL(toolhelp) DECLARE_DEBUG_CHANNEL(toolhelp)
/* Min. number of thunks allocated when creating a new segment */ /* Min. number of thunks allocated when creating a new segment */
@ -254,10 +254,10 @@ void TASK_CallToStart(void)
EDI_reg(&context) = pTask->hInstance; EDI_reg(&context) = pTask->hInstance;
ESI_reg(&context) = pTask->hPrevInstance; ESI_reg(&context) = pTask->hPrevInstance;
TRACE_(task)("Starting main program: cs:ip=%04lx:%04lx ds=%04lx ss:sp=%04x:%04x\n", TRACE("Starting main program: cs:ip=%04lx:%04lx ds=%04lx ss:sp=%04x:%04x\n",
CS_reg(&context), EIP_reg(&context), DS_reg(&context), CS_reg(&context), EIP_reg(&context), DS_reg(&context),
SELECTOROF(pTask->teb->cur_stack), SELECTOROF(pTask->teb->cur_stack),
OFFSETOF(pTask->teb->cur_stack) ); OFFSETOF(pTask->teb->cur_stack) );
Callbacks->CallRegisterShortProc( &context, 0 ); Callbacks->CallRegisterShortProc( &context, 0 );
} }
@ -382,7 +382,7 @@ BOOL TASK_Create( NE_MODULE *pModule, UINT16 cmdShow)
/* Enter task handle into thread and process */ /* Enter task handle into thread and process */
pTask->teb->htask16 = pTask->teb->process->task = hTask; pTask->teb->htask16 = pTask->teb->process->task = hTask;
TRACE_(task)("module='%s' cmdline='%s' task=%04x\n", name, cmd_line, hTask ); TRACE("module='%s' cmdline='%s' task=%04x\n", name, cmd_line, hTask );
/* Add the task to the linked list */ /* Add the task to the linked list */
@ -448,7 +448,7 @@ void TASK_KillTask( HTASK16 hTask )
return; return;
} }
TRACE_(task)("Killing task %04x\n", hTask ); TRACE("Killing task %04x\n", hTask );
#ifdef MZ_SUPPORTED #ifdef MZ_SUPPORTED
{ {
@ -468,7 +468,7 @@ void TASK_KillTask( HTASK16 hTask )
if (nTaskCount <= 1) if (nTaskCount <= 1)
{ {
TRACE_(task)("this is the last task, exiting\n" ); TRACE("this is the last task, exiting\n" );
ExitKernel16(); ExitKernel16();
} }
@ -572,8 +572,8 @@ void TASK_Reschedule(void)
/* Check what we need to do */ /* Check what we need to do */
hOldTask = GetCurrentTask(); hOldTask = GetCurrentTask();
pOldTask = (TDB *)GlobalLock16( hOldTask ); pOldTask = (TDB *)GlobalLock16( hOldTask );
TRACE_(task)( "entered with hCurrentTask %04x by hTask %04x (pid %ld)\n", TRACE( "entered with hCurrentTask %04x by hTask %04x (pid %ld)\n",
hCurrentTask, hOldTask, (long) getpid() ); hCurrentTask, hOldTask, (long) getpid() );
if ( pOldTask && THREAD_IsWin16( NtCurrentTeb() ) ) if ( pOldTask && THREAD_IsWin16( NtCurrentTeb() ) )
{ {
@ -624,8 +624,7 @@ void TASK_Reschedule(void)
{ {
pNewTask = (TDB *)GlobalLock16( hNewTask ); pNewTask = (TDB *)GlobalLock16( hNewTask );
TRACE_(task)( "\ttask = %04x, events = %i\n", TRACE( "\ttask = %04x, events = %i\n", hNewTask, pNewTask->nEvents );
hNewTask, pNewTask->nEvents );
if (pNewTask->nEvents) break; if (pNewTask->nEvents) break;
hNewTask = pNewTask->hNext; hNewTask = pNewTask->hNext;
@ -636,7 +635,7 @@ void TASK_Reschedule(void)
/* If we are still the task with highest priority, just return ... */ /* If we are still the task with highest priority, just return ... */
if ( mode == MODE_YIELD && hNewTask == hCurrentTask ) if ( mode == MODE_YIELD && hNewTask == hCurrentTask )
{ {
TRACE_(task)("returning to the current task (%04x)\n", hCurrentTask ); TRACE("returning to the current task (%04x)\n", hCurrentTask );
SYSLEVEL_LeaveWin16Lock(); SYSLEVEL_LeaveWin16Lock();
/* Allow Win32 threads to thunk down even while a Win16 task is /* Allow Win32 threads to thunk down even while a Win16 task is
@ -649,14 +648,14 @@ void TASK_Reschedule(void)
/* If no task to yield to found, suspend 16-bit scheduler ... */ /* If no task to yield to found, suspend 16-bit scheduler ... */
if ( mode == MODE_YIELD && !hNewTask ) if ( mode == MODE_YIELD && !hNewTask )
{ {
TRACE_(task)("No currently active task\n"); TRACE("No currently active task\n");
hCurrentTask = 0; hCurrentTask = 0;
} }
/* If we found a task to wake up, do it ... */ /* If we found a task to wake up, do it ... */
if ( (mode == MODE_YIELD || mode == MODE_WAKEUP) && hNewTask ) if ( (mode == MODE_YIELD || mode == MODE_WAKEUP) && hNewTask )
{ {
TRACE_(task)("Switching to task %04x (%.8s)\n", TRACE("Switching to task %04x (%.8s)\n",
hNewTask, pNewTask->module_name ); hNewTask, pNewTask->module_name );
pNewTask->priority++; pNewTask->priority++;
@ -761,7 +760,7 @@ BOOL16 WINAPI WaitEvent16( HTASK16 hTask )
if ( !THREAD_IsWin16( NtCurrentTeb() ) ) if ( !THREAD_IsWin16( NtCurrentTeb() ) )
{ {
FIXME_(task)("called for Win32 thread (%04x)!\n", NtCurrentTeb()->teb_sel); FIXME("called for Win32 thread (%04x)!\n", NtCurrentTeb()->teb_sel);
return TRUE; return TRUE;
} }
@ -791,7 +790,7 @@ void WINAPI PostEvent16( HTASK16 hTask )
if ( !THREAD_IsWin16( pTask->teb ) ) if ( !THREAD_IsWin16( pTask->teb ) )
{ {
FIXME_(task)("called for Win32 thread (%04x)!\n", pTask->teb->teb_sel ); FIXME("called for Win32 thread (%04x)!\n", pTask->teb->teb_sel );
return; return;
} }
@ -853,7 +852,7 @@ void WINAPI OldYield16(void)
if ( !THREAD_IsWin16( NtCurrentTeb() ) ) if ( !THREAD_IsWin16( NtCurrentTeb() ) )
{ {
FIXME_(task)("called for Win32 thread (%04x)!\n", NtCurrentTeb()->teb_sel); FIXME("called for Win32 thread (%04x)!\n", NtCurrentTeb()->teb_sel);
return; return;
} }
@ -882,16 +881,16 @@ void WINAPI DirectedYield16( HTASK16 hTask )
if ( !THREAD_IsWin16( NtCurrentTeb() ) ) if ( !THREAD_IsWin16( NtCurrentTeb() ) )
{ {
FIXME_(task)("called for Win32 thread (%04x)!\n", NtCurrentTeb()->teb_sel); FIXME("called for Win32 thread (%04x)!\n", NtCurrentTeb()->teb_sel);
return; return;
} }
TRACE_(task)("%04x: DirectedYield(%04x)\n", pCurTask->hSelf, hTask ); TRACE("%04x: DirectedYield(%04x)\n", pCurTask->hSelf, hTask );
pCurTask->hYieldTo = hTask; pCurTask->hYieldTo = hTask;
OldYield16(); OldYield16();
TRACE_(task)("%04x: back from DirectedYield(%04x)\n", pCurTask->hSelf, hTask ); TRACE("%04x: back from DirectedYield(%04x)\n", pCurTask->hSelf, hTask );
} }
/*********************************************************************** /***********************************************************************
@ -913,7 +912,7 @@ HTASK16 WINAPI KERNEL_490( HTASK16 someTask )
{ {
if ( !someTask ) return 0; if ( !someTask ) return 0;
FIXME_(task)("(%04x): stub\n", someTask ); FIXME("(%04x): stub\n", someTask );
return 0; return 0;
} }
@ -926,12 +925,12 @@ FARPROC16 WINAPI MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance )
SEGPTR thunkaddr; SEGPTR thunkaddr;
if (!func) { if (!func) {
ERR_(task)("Ouch ! MakeProcInstance called with func == NULL !\n"); ERR("Ouch ! MakeProcInstance called with func == NULL !\n");
return (FARPROC16)0; /* Windows seems to do the same */ return (FARPROC16)0; /* Windows seems to do the same */
} }
if ( GetTaskDS16() !=hInstance ) if ( GetTaskDS16() !=hInstance )
{ {
ERR_(task)("Problem with hInstance? Got %04x, using %04x instead\n", ERR("Problem with hInstance? Got %04x, using %04x instead\n",
hInstance,GetTaskDS16()); hInstance,GetTaskDS16());
hInstance = GetTaskDS16(); hInstance = GetTaskDS16();
} }
@ -941,12 +940,12 @@ FARPROC16 WINAPI MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance )
thunk = PTR_SEG_TO_LIN( thunkaddr ); thunk = PTR_SEG_TO_LIN( thunkaddr );
lfunc = PTR_SEG_TO_LIN( func ); lfunc = PTR_SEG_TO_LIN( func );
TRACE_(task)("(%08lx,%04x): got thunk %08lx\n", TRACE("(%08lx,%04x): got thunk %08lx\n",
(DWORD)func, hInstance, (DWORD)thunkaddr ); (DWORD)func, hInstance, (DWORD)thunkaddr );
if (((lfunc[0]==0x8c) && (lfunc[1]==0xd8)) || if (((lfunc[0]==0x8c) && (lfunc[1]==0xd8)) ||
((lfunc[0]==0x1e) && (lfunc[1]==0x58)) ((lfunc[0]==0x1e) && (lfunc[1]==0x58))
) { ) {
FIXME_(task)("thunk would be useless for %p, overwriting with nop;nop;\n", func ); FIXME("thunk would be useless for %p, overwriting with nop;nop;\n", func );
lfunc[0]=0x90; /* nop */ lfunc[0]=0x90; /* nop */
lfunc[1]=0x90; /* nop */ lfunc[1]=0x90; /* nop */
} }
@ -965,7 +964,7 @@ FARPROC16 WINAPI MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance )
*/ */
void WINAPI FreeProcInstance16( FARPROC16 func ) void WINAPI FreeProcInstance16( FARPROC16 func )
{ {
TRACE_(task)("(%08lx)\n", (DWORD)func ); TRACE("(%08lx)\n", (DWORD)func );
TASK_FreeThunk( GetCurrentTask(), (SEGPTR)func ); TASK_FreeThunk( GetCurrentTask(), (SEGPTR)func );
} }
@ -1185,7 +1184,7 @@ HANDLE WINAPI GetFastQueue16( void )
Callout.InitThreadInput16( 0, THREAD_IsWin16(teb)? 4 : 5 ); Callout.InitThreadInput16( 0, THREAD_IsWin16(teb)? 4 : 5 );
if (!teb->queue) if (!teb->queue)
FIXME_(task)("(): should initialize thread-local queue, expect failure!\n" ); FIXME("(): should initialize thread-local queue, expect failure!\n" );
return (HANDLE)teb->queue; return (HANDLE)teb->queue;
} }
@ -1202,9 +1201,9 @@ void WINAPI SwitchStackTo16( WORD seg, WORD ptr, WORD top )
if (!(pTask = (TDB *)GlobalLock16( GetCurrentTask() ))) return; if (!(pTask = (TDB *)GlobalLock16( GetCurrentTask() ))) return;
if (!(pData = (INSTANCEDATA *)GlobalLock16( seg ))) return; if (!(pData = (INSTANCEDATA *)GlobalLock16( seg ))) return;
TRACE_(task)("old=%04x:%04x new=%04x:%04x\n", TRACE("old=%04x:%04x new=%04x:%04x\n",
SELECTOROF( pTask->teb->cur_stack ), SELECTOROF( pTask->teb->cur_stack ),
OFFSETOF( pTask->teb->cur_stack ), seg, ptr ); OFFSETOF( pTask->teb->cur_stack ), seg, ptr );
/* Save the old stack */ /* Save the old stack */
@ -1247,11 +1246,11 @@ void WINAPI SwitchStackBack16( CONTEXT86 *context )
return; return;
if (!pData->old_ss_sp) if (!pData->old_ss_sp)
{ {
WARN_(task)("No previous SwitchStackTo\n" ); WARN("No previous SwitchStackTo\n" );
return; return;
} }
TRACE_(task)("restoring stack %04x:%04x\n", TRACE("restoring stack %04x:%04x\n",
SELECTOROF(pData->old_ss_sp), OFFSETOF(pData->old_ss_sp) ); SELECTOROF(pData->old_ss_sp), OFFSETOF(pData->old_ss_sp) );
oldFrame = CURRENT_STACK16; oldFrame = CURRENT_STACK16;
@ -1480,7 +1479,7 @@ void TASK_CallTaskSignalProc( UINT16 uCode, HANDLE16 hTaskOrModule )
WORD WINAPI SetSigHandler16( FARPROC16 newhandler, FARPROC16* oldhandler, WORD WINAPI SetSigHandler16( FARPROC16 newhandler, FARPROC16* oldhandler,
UINT16 *oldmode, UINT16 newmode, UINT16 flag ) UINT16 *oldmode, UINT16 newmode, UINT16 flag )
{ {
FIXME_(task)("(%p,%p,%p,%d,%d), unimplemented.\n", FIXME("(%p,%p,%p,%d,%d), unimplemented.\n",
newhandler,oldhandler,oldmode,newmode,flag ); newhandler,oldhandler,oldmode,newmode,flag );
if (flag != 1) return 0; if (flag != 1) return 0;

View File

@ -13,7 +13,7 @@
#include "selectors.h" #include "selectors.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(int) DEFAULT_DEBUG_CHANNEL(int)
DECLARE_DEBUG_CHANNEL(io) DECLARE_DEBUG_CHANNEL(io)
#ifdef __i386__ #ifdef __i386__
@ -75,7 +75,7 @@ static BOOL INSTR_ReplaceSelector( CONTEXT86 *context, WORD *sel )
return TRUE; return TRUE;
} }
if (!IS_SELECTOR_SYSTEM(*sel) && !IS_SELECTOR_FREE(*sel)) if (!IS_SELECTOR_SYSTEM(*sel) && !IS_SELECTOR_FREE(*sel))
ERR_(int)("Got protection fault on valid selector, maybe your kernel is too old?\n" ); ERR("Got protection fault on valid selector, maybe your kernel is too old?\n" );
return FALSE; /* Can't replace selector, crashdump */ return FALSE; /* Can't replace selector, crashdump */
} }
@ -672,7 +672,7 @@ BOOL INSTR_EmulateInstruction( CONTEXT86 *context )
case 0xcd: /* int <XX> */ case 0xcd: /* int <XX> */
if (long_op) if (long_op)
{ {
ERR_(int)("int xx from 32-bit code is not supported.\n"); ERR("int xx from 32-bit code is not supported.\n");
break; /* Unable to emulate it */ break; /* Unable to emulate it */
} }
else else

View File

@ -27,8 +27,8 @@
#include "debugtools.h" #include "debugtools.h"
#include "callback.h" #include "callback.h"
DECLARE_DEBUG_CHANNEL(heap)
DEFAULT_DEBUG_CHANNEL(local) DEFAULT_DEBUG_CHANNEL(local)
DECLARE_DEBUG_CHANNEL(heap)
typedef struct typedef struct
{ {

View File

@ -112,7 +112,7 @@ static void REGISTRY_Init(void) {
HKEY hkey; HKEY hkey;
char buf[200]; char buf[200];
TRACE_(reg)("(void)\n"); TRACE("(void)\n");
RegCreateKeyA(HKEY_DYN_DATA,"PerfStats\\StatData",&hkey); RegCreateKeyA(HKEY_DYN_DATA,"PerfStats\\StatData",&hkey);
RegCloseKey(hkey); RegCloseKey(hkey);
@ -231,7 +231,7 @@ static void SHELL_SaveRegistryBranch(HKEY hkey)
/* FIXME: does this check apply to all keys written below ? */ /* FIXME: does this check apply to all keys written below ? */
if (!(home = getenv( "HOME" ))) if (!(home = getenv( "HOME" )))
ERR_(reg)("Failed to get homedirectory of UID %ld.\n",(long) getuid()); ERR("Failed to get homedirectory of UID %ld.\n",(long) getuid());
/* HKEY_LOCAL_MACHINE contains the HKEY_CLASSES_ROOT branch */ /* HKEY_LOCAL_MACHINE contains the HKEY_CLASSES_ROOT branch */
if (hkey == HKEY_CLASSES_ROOT) hkey = HKEY_LOCAL_MACHINE; if (hkey == HKEY_CLASSES_ROOT) hkey = HKEY_LOCAL_MACHINE;
@ -295,7 +295,7 @@ static void SHELL_SaveRegistryBranch(HKEY hkey)
} }
break; break;
default: default:
ERR_(reg)("unknown/invalid key handle !\n"); ERR("unknown/invalid key handle !\n");
break; break;
} }
} }
@ -311,7 +311,7 @@ void SHELL_SaveRegistry( void )
HKEY hkey; HKEY hkey;
int all; int all;
TRACE_(reg)("(void)\n"); TRACE("(void)\n");
all=0; all=0;
if (RegOpenKeyA(HKEY_CURRENT_USER,KEY_REGISTRY,&hkey)!=ERROR_SUCCESS) if (RegOpenKeyA(HKEY_CURRENT_USER,KEY_REGISTRY,&hkey)!=ERROR_SUCCESS)
@ -458,7 +458,7 @@ static char* _wine_read_USTRING( char *buf, LPWSTR *str )
continue; continue;
} }
if (*s!='u') { if (*s!='u') {
WARN_(reg)("Non unicode escape sequence \\%c found in |%s|\n",*s,buf); WARN("Non unicode escape sequence \\%c found in |%s|\n",*s,buf);
*ws++='\\'; *ws++='\\';
*ws++=*s++; *ws++=*s++;
} else { } else {
@ -468,7 +468,7 @@ static char* _wine_read_USTRING( char *buf, LPWSTR *str )
s++; s++;
memcpy(xbuf,s,4);xbuf[4]='\0'; memcpy(xbuf,s,4);xbuf[4]='\0';
if (!sscanf(xbuf,"%x",&wc)) if (!sscanf(xbuf,"%x",&wc))
WARN_(reg)("Strange escape sequence %s found in |%s|\n",xbuf,buf); WARN("Strange escape sequence %s found in |%s|\n",xbuf,buf);
s+=4; s+=4;
*ws++ =(unsigned short)wc; *ws++ =(unsigned short)wc;
} }
@ -496,7 +496,7 @@ static int _wine_loadsubkey( FILE *F, HKEY hkey, int level, char **buf, int *buf
char *s; char *s;
LPWSTR name; LPWSTR name;
TRACE_(reg)("(%p,%x,%d,%s,%d)\n", F, hkey, level, debugstr_a(*buf), *buflen); TRACE("(%p,%x,%d,%s,%d)\n", F, hkey, level, debugstr_a(*buf), *buflen);
/* Good. We already got a line here ... so parse it */ /* Good. We already got a line here ... so parse it */
subkey = 0; subkey = 0;
@ -508,7 +508,7 @@ static int _wine_loadsubkey( FILE *F, HKEY hkey, int level, char **buf, int *buf
} }
if (i>level) { if (i>level) {
if (!subkey) { if (!subkey) {
WARN_(reg)("Got a subhierarchy without resp. key?\n"); WARN("Got a subhierarchy without resp. key?\n");
return 0; return 0;
} }
if (!_wine_loadsubkey(F,subkey,level+1,buf,buflen)) if (!_wine_loadsubkey(F,subkey,level+1,buf,buflen))
@ -535,19 +535,19 @@ static int _wine_loadsubkey( FILE *F, HKEY hkey, int level, char **buf, int *buf
int len,lastmodified,type; int len,lastmodified,type;
if (*s!='=') { if (*s!='=') {
WARN_(reg)("Unexpected character: %c\n",*s); WARN("Unexpected character: %c\n",*s);
break; break;
} }
s++; s++;
if (2!=sscanf(s,"%d,%d,",&type,&lastmodified)) { if (2!=sscanf(s,"%d,%d,",&type,&lastmodified)) {
WARN_(reg)("Haven't understood possible value in |%s|, skipping.\n",*buf); WARN("Haven't understood possible value in |%s|, skipping.\n",*buf);
break; break;
} }
/* skip the 2 , */ /* skip the 2 , */
s=strchr(s,',');s++; s=strchr(s,',');s++;
s=strchr(s,','); s=strchr(s,',');
if (!s++) { if (!s++) {
WARN_(reg)("Haven't understood possible value in |%s|, skipping.\n",*buf); WARN("Haven't understood possible value in |%s|, skipping.\n",*buf);
break; break;
} }
if (type == REG_SZ || type == REG_EXPAND_SZ) { if (type == REG_SZ || type == REG_EXPAND_SZ) {
@ -624,7 +624,7 @@ static int _wine_loadsubreg( FILE *F, HKEY hkey, const char *fn )
} }
else else
{ {
TRACE_(reg)("Old format (%d) registry found, ignoring it. (buf was %s).\n",ver,buf); TRACE("Old format (%d) registry found, ignoring it. (buf was %s).\n",ver,buf);
free(buf); free(buf);
return 0; return 0;
} }
@ -649,11 +649,11 @@ static void _wine_loadreg( HKEY hkey, char *fn )
{ {
FILE *F; FILE *F;
TRACE_(reg)("(%x,%s)\n",hkey,debugstr_a(fn)); TRACE("(%x,%s)\n",hkey,debugstr_a(fn));
F = fopen(fn,"rb"); F = fopen(fn,"rb");
if (F==NULL) { if (F==NULL) {
WARN_(reg)("Couldn't open %s for reading: %s\n",fn,strerror(errno) ); WARN("Couldn't open %s for reading: %s\n",fn,strerror(errno) );
return; return;
} }
_wine_loadsubreg(F,hkey,fn); _wine_loadsubreg(F,hkey,fn);
@ -709,7 +709,7 @@ static void _copy_registry( HKEY from, HKEY to )
name_len = sizeof(name); name_len = sizeof(name);
if (RegEnumValueW( from, index++, name, &name_len, if (RegEnumValueW( from, index++, name, &name_len,
NULL, &type, data, &len ) != ERROR_SUCCESS) break; NULL, &type, data, &len ) != ERROR_SUCCESS) break;
RegSetValueExW( to, name, 0, type, (LPCWSTR)data, len ); RegSetValueExW( to, name, 0, type, data, len );
} }
/* copy subkeys */ /* copy subkeys */
@ -1017,7 +1017,7 @@ static void _w95_loadreg( char* fn, HKEY hkey )
OFSTRUCT ofs; OFSTRUCT ofs;
BY_HANDLE_FILE_INFORMATION hfdinfo; BY_HANDLE_FILE_INFORMATION hfdinfo;
TRACE_(reg)("Loading Win95 registry database '%s'\n",fn); TRACE("Loading Win95 registry database '%s'\n",fn);
hfd=OpenFile(fn,&ofs,OF_READ); hfd=OpenFile(fn,&ofs,OF_READ);
if (hfd==HFILE_ERROR) if (hfd==HFILE_ERROR)
return; return;
@ -1025,7 +1025,7 @@ static void _w95_loadreg( char* fn, HKEY hkey )
if (4!=_lread(hfd,magic,4)) if (4!=_lread(hfd,magic,4))
return; return;
if (strcmp(magic,"CREG")) { if (strcmp(magic,"CREG")) {
WARN_(reg)("%s is not a w95 registry.\n",fn); WARN("%s is not a w95 registry.\n",fn);
return; return;
} }
if (4!=_lread(hfd,&version,4)) if (4!=_lread(hfd,&version,4))
@ -1037,7 +1037,7 @@ static void _w95_loadreg( char* fn, HKEY hkey )
if (4!=_lread(hfd,magic,4)) if (4!=_lread(hfd,magic,4))
return; return;
if (strcmp(magic,"RGKN")) { if (strcmp(magic,"RGKN")) {
WARN_(reg)("second IFF header not RGKN, but %s\n", magic); WARN("second IFF header not RGKN, but %s\n", magic);
return; return;
} }
@ -1199,7 +1199,7 @@ __w31_dumptree( unsigned short idx,
} }
} }
} else { } else {
TRACE_(reg)("strange: no directory key name, idx=%04x\n", idx); TRACE("strange: no directory key name, idx=%04x\n", idx);
} }
__w31_dumptree(dir->child_idx,txt,tab,head,subkey,lastmodified,level+1); __w31_dumptree(dir->child_idx,txt,tab,head,subkey,lastmodified,level+1);
idx=dir->sibling_idx; idx=dir->sibling_idx;
@ -1221,7 +1221,7 @@ void _w31_loadreg(void) {
BY_HANDLE_FILE_INFORMATION hfinfo; BY_HANDLE_FILE_INFORMATION hfinfo;
time_t lastmodified; time_t lastmodified;
TRACE_(reg)("(void)\n"); TRACE("(void)\n");
hf = OpenFile("reg.dat",&ofs,OF_READ); hf = OpenFile("reg.dat",&ofs,OF_READ);
if (hf==HFILE_ERROR) if (hf==HFILE_ERROR)
@ -1229,12 +1229,12 @@ void _w31_loadreg(void) {
/* read & dump header */ /* read & dump header */
if (sizeof(head)!=_lread(hf,&head,sizeof(head))) { if (sizeof(head)!=_lread(hf,&head,sizeof(head))) {
ERR_(reg)("reg.dat is too short.\n"); ERR("reg.dat is too short.\n");
_lclose(hf); _lclose(hf);
return; return;
} }
if (memcmp(head.cookie, "SHCC3.10", sizeof(head.cookie))!=0) { if (memcmp(head.cookie, "SHCC3.10", sizeof(head.cookie))!=0) {
ERR_(reg)("reg.dat has bad signature.\n"); ERR("reg.dat has bad signature.\n");
_lclose(hf); _lclose(hf);
return; return;
} }
@ -1243,7 +1243,7 @@ void _w31_loadreg(void) {
/* read and dump index table */ /* read and dump index table */
tab = xmalloc(len); tab = xmalloc(len);
if (len!=_lread(hf,tab,len)) { if (len!=_lread(hf,tab,len)) {
ERR_(reg)("couldn't read %d bytes.\n",len); ERR("couldn't read %d bytes.\n",len);
free(tab); free(tab);
_lclose(hf); _lclose(hf);
return; return;
@ -1252,14 +1252,14 @@ void _w31_loadreg(void) {
/* read text */ /* read text */
txt = xmalloc(head.textsize); txt = xmalloc(head.textsize);
if (-1==_llseek(hf,head.textoff,SEEK_SET)) { if (-1==_llseek(hf,head.textoff,SEEK_SET)) {
ERR_(reg)("couldn't seek to textblock.\n"); ERR("couldn't seek to textblock.\n");
free(tab); free(tab);
free(txt); free(txt);
_lclose(hf); _lclose(hf);
return; return;
} }
if (head.textsize!=_lread(hf,txt,head.textsize)) { if (head.textsize!=_lread(hf,txt,head.textsize)) {
ERR_(reg)("textblock too short (%d instead of %ld).\n",len,head.textsize); ERR("textblock too short (%d instead of %ld).\n",len,head.textsize);
free(tab); free(tab);
free(txt); free(txt);
_lclose(hf); _lclose(hf);
@ -1267,7 +1267,7 @@ void _w31_loadreg(void) {
} }
if (!GetFileInformationByHandle(hf,&hfinfo)) { if (!GetFileInformationByHandle(hf,&hfinfo)) {
ERR_(reg)("GetFileInformationByHandle failed?.\n"); ERR("GetFileInformationByHandle failed?.\n");
free(tab); free(tab);
free(txt); free(txt);
_lclose(hf); _lclose(hf);
@ -1292,7 +1292,7 @@ void SHELL_LoadRegistry( void )
char *fn, *home; char *fn, *home;
HKEY hkey; HKEY hkey;
TRACE_(reg)("(void)\n"); TRACE("(void)\n");
REGISTRY_Init(); REGISTRY_Init();
@ -1335,7 +1335,7 @@ void SHELL_LoadRegistry( void )
* Load the user saved registries * Load the user saved registries
*/ */
if (!(home = getenv( "HOME" ))) if (!(home = getenv( "HOME" )))
WARN_(reg)("Failed to get homedirectory of UID %ld.\n",(long) getuid()); WARN("Failed to get homedirectory of UID %ld.\n",(long) getuid());
else if (PROFILE_GetWineIniBool("registry", "LoadHomeRegistryFiles", 1)) else if (PROFILE_GetWineIniBool("registry", "LoadHomeRegistryFiles", 1))
{ {
/* /*
@ -1407,7 +1407,7 @@ void SHELL_LoadRegistry( void )
* in order to copy HKU\.Default\* onto HKEY_CURRENT_USER * in order to copy HKU\.Default\* onto HKEY_CURRENT_USER
*/ */
if (RegCreateKeyA(HKEY_USERS,".Default",&hkey) != ERROR_SUCCESS) if (RegCreateKeyA(HKEY_USERS,".Default",&hkey) != ERROR_SUCCESS)
WARN_(reg)("Could not create global user default key\n"); WARN("Could not create global user default key\n");
else else
_copy_registry( hkey, HKEY_CURRENT_USER ); _copy_registry( hkey, HKEY_CURRENT_USER );
RegCloseKey(hkey); RegCloseKey(hkey);
@ -1502,14 +1502,14 @@ DWORD WINAPI RegFlushKey( HKEY hkey )
LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey, LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
LPHKEY phkResult ) LPHKEY phkResult )
{ {
TRACE_(reg)("(%s,%x,%p): stub\n",debugstr_w(lpMachineName),hKey,phkResult); TRACE("(%s,%x,%p): stub\n",debugstr_w(lpMachineName),hKey,phkResult);
if (!lpMachineName || !*lpMachineName) { if (!lpMachineName || !*lpMachineName) {
/* Use the local machine name */ /* Use the local machine name */
return RegOpenKey16( hKey, "", phkResult ); return RegOpenKey16( hKey, "", phkResult );
} }
FIXME_(reg)("Cannot connect to %s\n",debugstr_w(lpMachineName)); FIXME("Cannot connect to %s\n",debugstr_w(lpMachineName));
return ERROR_BAD_NETPATH; return ERROR_BAD_NETPATH;
} }
@ -1546,7 +1546,7 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey,
PSECURITY_DESCRIPTOR pSecurityDescriptor, PSECURITY_DESCRIPTOR pSecurityDescriptor,
LPDWORD lpcbSecurityDescriptor ) LPDWORD lpcbSecurityDescriptor )
{ {
TRACE_(reg)("(%x,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor, TRACE("(%x,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor,
lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
/* FIXME: Check for valid SecurityInformation values */ /* FIXME: Check for valid SecurityInformation values */
@ -1554,7 +1554,7 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey,
if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR)) if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR))
return ERROR_INSUFFICIENT_BUFFER; return ERROR_INSUFFICIENT_BUFFER;
FIXME_(reg)("(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation, FIXME("(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation,
pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
return ERROR_SUCCESS; return ERROR_SUCCESS;
@ -1575,7 +1575,7 @@ LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
DWORD fdwNotifyFilter, HANDLE hEvent, DWORD fdwNotifyFilter, HANDLE hEvent,
BOOL fAsync ) BOOL fAsync )
{ {
FIXME_(reg)("(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter, FIXME("(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter,
hEvent,fAsync); hEvent,fAsync);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -1590,7 +1590,7 @@ LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
*/ */
LONG WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey ) LONG WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey )
{ {
FIXME_(reg)("(%x,%s): stub\n",hkey, debugstr_w(lpSubKey)); FIXME("(%x,%s): stub\n",hkey, debugstr_w(lpSubKey));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -1619,7 +1619,7 @@ LONG WINAPI RegUnLoadKeyA( HKEY hkey, LPCSTR lpSubKey )
LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo, LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
PSECURITY_DESCRIPTOR pSecurityDesc ) PSECURITY_DESCRIPTOR pSecurityDesc )
{ {
TRACE_(reg)("(%x,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc); TRACE("(%x,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc);
/* It seems to perform this check before the hkey check */ /* It seems to perform this check before the hkey check */
if ((SecurityInfo & OWNER_SECURITY_INFORMATION) || if ((SecurityInfo & OWNER_SECURITY_INFORMATION) ||
@ -1633,7 +1633,7 @@ LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
if (!pSecurityDesc) if (!pSecurityDesc)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
FIXME_(reg)(":(%x,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc); FIXME(":(%x,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -1649,13 +1649,13 @@ LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
*/ */
LONG WINAPI RegRestoreKeyW( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags ) LONG WINAPI RegRestoreKeyW( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
{ {
TRACE_(reg)("(%x,%s,%ld)\n",hkey,debugstr_w(lpFile),dwFlags); TRACE("(%x,%s,%ld)\n",hkey,debugstr_w(lpFile),dwFlags);
/* It seems to do this check before the hkey check */ /* It seems to do this check before the hkey check */
if (!lpFile || !*lpFile) if (!lpFile || !*lpFile)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
FIXME_(reg)("(%x,%s,%ld): stub\n",hkey,debugstr_w(lpFile),dwFlags); FIXME("(%x,%s,%ld): stub\n",hkey,debugstr_w(lpFile),dwFlags);
/* Check for file existence */ /* Check for file existence */
@ -1688,7 +1688,7 @@ LONG WINAPI RegRestoreKeyA( HKEY hkey, LPCSTR lpFile, DWORD dwFlags )
LONG WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile, LONG WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile,
LPCWSTR lpOldFile ) LPCWSTR lpOldFile )
{ {
FIXME_(reg)("(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey), FIXME("(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey),
debugstr_w(lpNewFile),debugstr_w(lpOldFile)); debugstr_w(lpNewFile),debugstr_w(lpOldFile));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }

View File

@ -18,7 +18,7 @@
#include "task.h" #include "task.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(dosmem) DEFAULT_DEBUG_CHANNEL(dosmem)
DECLARE_DEBUG_CHANNEL(selector) DECLARE_DEBUG_CHANNEL(selector)
HANDLE16 DOSMEM_BiosDataSeg; /* BIOS data segment at 0x40:0 */ HANDLE16 DOSMEM_BiosDataSeg; /* BIOS data segment at 0x40:0 */
@ -422,7 +422,7 @@ BOOL DOSMEM_Init(HMODULE16 hModule)
PAGE_EXECUTE_READWRITE ); PAGE_EXECUTE_READWRITE );
if (!DOSMEM_dosmem) if (!DOSMEM_dosmem)
{ {
WARN_(dosmem)("Could not allocate DOS memory.\n" ); WARN("Could not allocate DOS memory.\n" );
return FALSE; return FALSE;
} }
DOSMEM_BiosDataSeg = GLOBAL_CreateBlock(GMEM_FIXED,DOSMEM_dosmem+0x400, DOSMEM_BiosDataSeg = GLOBAL_CreateBlock(GMEM_FIXED,DOSMEM_dosmem+0x400,
@ -489,7 +489,7 @@ LPVOID DOSMEM_GetBlock(HMODULE16 hModule, UINT size, UINT16* pseg)
#ifdef __DOSMEM_DEBUG__ #ifdef __DOSMEM_DEBUG__
if( (dm->size & DM_BLOCK_DEBUG) != DM_BLOCK_DEBUG ) if( (dm->size & DM_BLOCK_DEBUG) != DM_BLOCK_DEBUG )
{ {
WARN_(dosmem)("MCB overrun! [prev = 0x%08x]\n", 4 + (UINT)prev); WARN("MCB overrun! [prev = 0x%08x]\n", 4 + (UINT)prev);
return NULL; return NULL;
} }
prev = dm; prev = dm;
@ -671,7 +671,7 @@ UINT DOSMEM_Available(HMODULE16 hModule)
#ifdef __DOSMEM_DEBUG__ #ifdef __DOSMEM_DEBUG__
if( (dm->size & DM_BLOCK_DEBUG) != DM_BLOCK_DEBUG ) if( (dm->size & DM_BLOCK_DEBUG) != DM_BLOCK_DEBUG )
{ {
WARN_(dosmem)("MCB overrun! [prev = 0x%08x]\n", 4 + (UINT)prev); WARN("MCB overrun! [prev = 0x%08x]\n", 4 + (UINT)prev);
return NULL; return NULL;
} }
prev = dm; prev = dm;
@ -733,8 +733,7 @@ LPVOID DOSMEM_MapRealToLinear(DWORD x)
LPVOID lin; LPVOID lin;
lin=DOSMEM_MemoryBase(0)+(x&0xffff)+(((x&0xffff0000)>>16)*16); lin=DOSMEM_MemoryBase(0)+(x&0xffff)+(((x&0xffff0000)>>16)*16);
TRACE_(selector)("(0x%08lx) returns 0x%p.\n", TRACE_(selector)("(0x%08lx) returns 0x%p.\n", x, lin );
x,lin );
return lin; return lin;
} }
@ -752,9 +751,7 @@ WORD DOSMEM_AllocSelector(WORD realsel)
GMEM_FIXED,DOSMEM_dosmem+realsel*16,0x10000, GMEM_FIXED,DOSMEM_dosmem+realsel*16,0x10000,
hModule,FALSE,FALSE,FALSE,NULL hModule,FALSE,FALSE,FALSE,NULL
); );
TRACE_(selector)("(0x%04x) returns 0x%04x.\n", TRACE_(selector)("(0x%04x) returns 0x%04x.\n", realsel,sel);
realsel,sel
);
return sel; return sel;
} }

View File

@ -19,7 +19,7 @@
#include "monitor.h" #include "monitor.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
DECLARE_DEBUG_CHANNEL(bitmap) DEFAULT_DEBUG_CHANNEL(bitmap)
DECLARE_DEBUG_CHANNEL(resource) DECLARE_DEBUG_CHANNEL(resource)
BITMAP_DRIVER *BITMAP_Driver = NULL; BITMAP_DRIVER *BITMAP_Driver = NULL;
@ -54,7 +54,7 @@ INT BITMAP_GetWidthBytes( INT bmWidth, INT bpp )
return 2 * ((bmWidth+3) >> 2); return 2 * ((bmWidth+3) >> 2);
default: default:
WARN_(bitmap)("Unknown depth %d, please report.\n", bpp ); WARN("Unknown depth %d, please report.\n", bpp );
} }
return -1; return -1;
} }
@ -115,7 +115,7 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
/* Check parameters */ /* Check parameters */
if (!height || !width) return 0; if (!height || !width) return 0;
if (planes != 1) { if (planes != 1) {
FIXME_(bitmap)("planes = %d\n", planes); FIXME("planes = %d\n", planes);
return 0; return 0;
} }
if (height < 0) height = -height; if (height < 0) height = -height;
@ -125,7 +125,7 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
hbitmap = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC ); hbitmap = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC );
if (!hbitmap) return 0; if (!hbitmap) return 0;
TRACE_(bitmap)("%dx%d, %d colors returning %08x\n", width, height, TRACE("%dx%d, %d colors returning %08x\n", width, height,
1 << (planes*bpp), hbitmap); 1 << (planes*bpp), hbitmap);
bmp = (BITMAPOBJ *) GDI_HEAP_LOCK( hbitmap ); bmp = (BITMAPOBJ *) GDI_HEAP_LOCK( hbitmap );
@ -177,10 +177,10 @@ HBITMAP WINAPI CreateCompatibleBitmap( HDC hdc, INT width, INT height)
HBITMAP hbmpRet = 0; HBITMAP hbmpRet = 0;
DC *dc; DC *dc;
TRACE_(bitmap)("(%04x,%d,%d) = \n", hdc, width, height ); TRACE("(%04x,%d,%d) = \n", hdc, width, height );
if (!(dc = DC_GetDCPtr( hdc ))) return 0; if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if ((width >= 0x10000) || (height >= 0x10000)) { if ((width >= 0x10000) || (height >= 0x10000)) {
FIXME_(bitmap)("got bad width %d or height %d, please look for reason\n", FIXME("got bad width %d or height %d, please look for reason\n",
width, height ); width, height );
} else { } else {
/* MS doc says if width or height is 0, return 1-by-1 pixel, monochrome bitmap */ /* MS doc says if width or height is 0, return 1-by-1 pixel, monochrome bitmap */
@ -191,7 +191,7 @@ HBITMAP WINAPI CreateCompatibleBitmap( HDC hdc, INT width, INT height)
if(dc->funcs->pCreateBitmap) if(dc->funcs->pCreateBitmap)
dc->funcs->pCreateBitmap( hbmpRet ); dc->funcs->pCreateBitmap( hbmpRet );
} }
TRACE_(bitmap)("\t\t%04x\n", hbmpRet); TRACE("\t\t%04x\n", hbmpRet);
GDI_HEAP_UNLOCK(hdc); GDI_HEAP_UNLOCK(hdc);
return hbmpRet; return hbmpRet;
} }
@ -253,7 +253,7 @@ LONG WINAPI GetBitmapBits(
return bmp->bitmap.bmWidthBytes * bmp->bitmap.bmHeight; return bmp->bitmap.bmWidthBytes * bmp->bitmap.bmHeight;
if (count < 0) { if (count < 0) {
WARN_(bitmap)("(%ld): Negative number of bytes passed???\n", count ); WARN("(%ld): Negative number of bytes passed???\n", count );
count = -count; count = -count;
} }
@ -263,31 +263,31 @@ LONG WINAPI GetBitmapBits(
count = height * bmp->bitmap.bmWidthBytes; count = height * bmp->bitmap.bmWidthBytes;
if (count == 0) if (count == 0)
{ {
WARN_(bitmap)("Less then one entire line requested\n"); WARN("Less then one entire line requested\n");
GDI_HEAP_UNLOCK( hbitmap ); GDI_HEAP_UNLOCK( hbitmap );
return 0; return 0;
} }
TRACE_(bitmap)("(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n", TRACE("(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n",
hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight,
1 << bmp->bitmap.bmBitsPixel, height ); 1 << bmp->bitmap.bmBitsPixel, height );
if(bmp->DDBitmap) { if(bmp->DDBitmap) {
TRACE_(bitmap)("Calling device specific BitmapBits\n"); TRACE("Calling device specific BitmapBits\n");
if(bmp->DDBitmap->funcs->pBitmapBits) if(bmp->DDBitmap->funcs->pBitmapBits)
ret = bmp->DDBitmap->funcs->pBitmapBits(hbitmap, bits, count, ret = bmp->DDBitmap->funcs->pBitmapBits(hbitmap, bits, count,
DDB_GET); DDB_GET);
else { else {
ERR_(bitmap)("BitmapBits == NULL??\n"); ERR("BitmapBits == NULL??\n");
ret = 0; ret = 0;
} }
} else { } else {
if(!bmp->bitmap.bmBits) { if(!bmp->bitmap.bmBits) {
WARN_(bitmap)("Bitmap is empty\n"); WARN("Bitmap is empty\n");
ret = 0; ret = 0;
} else { } else {
memcpy(bits, bmp->bitmap.bmBits, count); memcpy(bits, bmp->bitmap.bmBits, count);
@ -329,7 +329,7 @@ LONG WINAPI SetBitmapBits(
return 0; return 0;
if (count < 0) { if (count < 0) {
WARN_(bitmap)("(%ld): Negative number of bytes passed???\n", count ); WARN("(%ld): Negative number of bytes passed???\n", count );
count = -count; count = -count;
} }
@ -338,18 +338,18 @@ LONG WINAPI SetBitmapBits(
if (height > bmp->bitmap.bmHeight) height = bmp->bitmap.bmHeight; if (height > bmp->bitmap.bmHeight) height = bmp->bitmap.bmHeight;
count = height * bmp->bitmap.bmWidthBytes; count = height * bmp->bitmap.bmWidthBytes;
TRACE_(bitmap)("(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n", TRACE("(%08x, %ld, %p) %dx%d %d colors fetched height: %ld\n",
hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight,
1 << bmp->bitmap.bmBitsPixel, height ); 1 << bmp->bitmap.bmBitsPixel, height );
if(bmp->DDBitmap) { if(bmp->DDBitmap) {
TRACE_(bitmap)("Calling device specific BitmapBits\n"); TRACE("Calling device specific BitmapBits\n");
if(bmp->DDBitmap->funcs->pBitmapBits) if(bmp->DDBitmap->funcs->pBitmapBits)
ret = bmp->DDBitmap->funcs->pBitmapBits(hbitmap, (void *) bits, ret = bmp->DDBitmap->funcs->pBitmapBits(hbitmap, (void *) bits,
count, DDB_SET); count, DDB_SET);
else { else {
ERR_(bitmap)("BitmapBits == NULL??\n"); ERR("BitmapBits == NULL??\n");
ret = 0; ret = 0;
} }
@ -358,7 +358,7 @@ LONG WINAPI SetBitmapBits(
if(!bmp->bitmap.bmBits) /* Alloc enough for entire bitmap */ if(!bmp->bitmap.bmBits) /* Alloc enough for entire bitmap */
bmp->bitmap.bmBits = HeapAlloc( GetProcessHeap(), 0, count ); bmp->bitmap.bmBits = HeapAlloc( GetProcessHeap(), 0, count );
if(!bmp->bitmap.bmBits) { if(!bmp->bitmap.bmBits) {
WARN_(bitmap)("Unable to allocate bit buffer\n"); WARN("Unable to allocate bit buffer\n");
ret = 0; ret = 0;
} else { } else {
memcpy(bmp->bitmap.bmBits, bits, count); memcpy(bmp->bitmap.bmBits, bits, count);
@ -684,7 +684,7 @@ INT16 BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer )
} }
else else
{ {
FIXME_(bitmap)("not implemented for DIBs: count %d\n", count); FIXME("not implemented for DIBs: count %d\n", count);
return 0; return 0;
} }
} }

View File

@ -10,7 +10,7 @@
#include "debugtools.h" #include "debugtools.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
DECLARE_DEBUG_CHANNEL(clipping) DEFAULT_DEBUG_CHANNEL(clipping)
DECLARE_DEBUG_CHANNEL(region) DECLARE_DEBUG_CHANNEL(region)
#define UPDATE_DIRTY_DC(dc) \ #define UPDATE_DIRTY_DC(dc) \
@ -84,7 +84,7 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode )
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE_(clipping)("%04x %04x %d\n", hdc, hrgn, fnMode ); TRACE("%04x %04x %d\n", hdc, hrgn, fnMode );
if (!hrgn) if (!hrgn)
{ {
@ -96,7 +96,7 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode )
} }
else else
{ {
FIXME_(clipping)("Unimplemented: hrgn NULL in mode: %d\n", fnMode); FIXME("Unimplemented: hrgn NULL in mode: %d\n", fnMode);
return ERROR; return ERROR;
} }
} }
@ -132,7 +132,7 @@ INT16 WINAPI SelectVisRgn16( HDC16 hdc, HRGN16 hrgn )
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc || !hrgn) return ERROR; if (!dc || !hrgn) return ERROR;
TRACE_(clipping)("%04x %04x\n", hdc, hrgn ); TRACE("%04x %04x\n", hdc, hrgn );
dc->w.flags &= ~DC_DIRTY; dc->w.flags &= ~DC_DIRTY;
@ -161,7 +161,7 @@ INT WINAPI OffsetClipRgn( HDC hdc, INT x, INT y )
DC *dc = DC_GetDCPtr( hdc ); DC *dc = DC_GetDCPtr( hdc );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE_(clipping)("%04x %d,%d\n", hdc, x, y ); TRACE("%04x %d,%d\n", hdc, x, y );
if(dc->funcs->pOffsetClipRgn) if(dc->funcs->pOffsetClipRgn)
ret = dc->funcs->pOffsetClipRgn( dc, x, y ); ret = dc->funcs->pOffsetClipRgn( dc, x, y );
@ -182,7 +182,7 @@ INT16 WINAPI OffsetVisRgn16( HDC16 hdc, INT16 x, INT16 y )
INT16 retval; INT16 retval;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE_(clipping)("%04x %d,%d\n", hdc, x, y ); TRACE("%04x %d,%d\n", hdc, x, y );
retval = OffsetRgn( dc->w.hVisRgn, x, y ); retval = OffsetRgn( dc->w.hVisRgn, x, y );
CLIPPING_UpdateGCRegion( dc ); CLIPPING_UpdateGCRegion( dc );
GDI_HEAP_UNLOCK( hdc ); GDI_HEAP_UNLOCK( hdc );
@ -222,7 +222,7 @@ INT CLIPPING_IntersectClipRect( DC * dc, INT left, INT top,
dc->w.hClipRgn = CreateRectRgn( 0, 0, 0, 0 ); dc->w.hClipRgn = CreateRectRgn( 0, 0, 0, 0 );
CombineRgn( dc->w.hClipRgn, dc->w.hVisRgn, 0, RGN_COPY ); CombineRgn( dc->w.hClipRgn, dc->w.hVisRgn, 0, RGN_COPY );
} }
else WARN_(clipping)("No hClipRgn and flags are %x\n",flags); else WARN("No hClipRgn and flags are %x\n",flags);
} }
ret = CombineRgn( newRgn, dc->w.hClipRgn, newRgn, ret = CombineRgn( newRgn, dc->w.hClipRgn, newRgn,
@ -258,8 +258,7 @@ INT WINAPI ExcludeClipRect( HDC hdc, INT left, INT top,
DC *dc = DC_GetDCPtr( hdc ); DC *dc = DC_GetDCPtr( hdc );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE_(clipping)("%04x %dx%d,%dx%d\n", TRACE("%04x %dx%d,%dx%d\n", hdc, left, top, right, bottom );
hdc, left, top, right, bottom );
if(dc->funcs->pExcludeClipRect) if(dc->funcs->pExcludeClipRect)
ret = dc->funcs->pExcludeClipRect( dc, left, top, right, bottom ); ret = dc->funcs->pExcludeClipRect( dc, left, top, right, bottom );
@ -296,8 +295,7 @@ INT WINAPI IntersectClipRect( HDC hdc, INT left, INT top,
DC *dc = DC_GetDCPtr( hdc ); DC *dc = DC_GetDCPtr( hdc );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE_(clipping)("%04x %dx%d,%dx%d\n", TRACE("%04x %dx%d,%dx%d\n", hdc, left, top, right, bottom );
hdc, left, top, right, bottom );
if(dc->funcs->pIntersectClipRect) if(dc->funcs->pIntersectClipRect)
ret = dc->funcs->pIntersectClipRect( dc, left, top, right, bottom ); ret = dc->funcs->pIntersectClipRect( dc, left, top, right, bottom );
@ -372,8 +370,7 @@ INT16 WINAPI ExcludeVisRect16( HDC16 hdc, INT16 left, INT16 top,
top = YLPTODP( dc, top ); top = YLPTODP( dc, top );
bottom = YLPTODP( dc, bottom ); bottom = YLPTODP( dc, bottom );
TRACE_(clipping)("%04x %dx%d,%dx%d\n", TRACE("%04x %dx%d,%dx%d\n", hdc, left, top, right, bottom );
hdc, left, top, right, bottom );
return CLIPPING_IntersectVisRect( dc, left, top, right, bottom, TRUE ); return CLIPPING_IntersectVisRect( dc, left, top, right, bottom, TRUE );
} }
@ -393,8 +390,7 @@ INT16 WINAPI IntersectVisRect16( HDC16 hdc, INT16 left, INT16 top,
top = YLPTODP( dc, top ); top = YLPTODP( dc, top );
bottom = YLPTODP( dc, bottom ); bottom = YLPTODP( dc, bottom );
TRACE_(clipping)("%04x %dx%d,%dx%d\n", TRACE("%04x %dx%d,%dx%d\n", hdc, left, top, right, bottom );
hdc, left, top, right, bottom );
return CLIPPING_IntersectVisRect( dc, left, top, right, bottom, FALSE ); return CLIPPING_IntersectVisRect( dc, left, top, right, bottom, FALSE );
} }
@ -417,7 +413,7 @@ BOOL WINAPI PtVisible( HDC hdc, INT x, INT y )
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR; if (!dc) return ERROR;
TRACE_(clipping)("%04x %d,%d\n", hdc, x, y ); TRACE("%04x %d,%d\n", hdc, x, y );
if (!dc->w.hGCClipRgn) return FALSE; if (!dc->w.hGCClipRgn) return FALSE;
if( dc->w.flags & DC_DIRTY ) UPDATE_DIRTY_DC(dc); if( dc->w.flags & DC_DIRTY ) UPDATE_DIRTY_DC(dc);
@ -436,8 +432,8 @@ BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect )
RECT16 tmpRect; RECT16 tmpRect;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return FALSE; if (!dc) return FALSE;
TRACE_(clipping)("%04x %d,%dx%d,%d\n", TRACE("%04x %d,%dx%d,%d\n",
hdc, rect->left, rect->top, rect->right, rect->bottom ); hdc, rect->left, rect->top, rect->right, rect->bottom );
if (!dc->w.hGCClipRgn) return FALSE; if (!dc->w.hGCClipRgn) return FALSE;
/* copy rectangle to avoid overwriting by LPtoDP */ /* copy rectangle to avoid overwriting by LPtoDP */
tmpRect = *rect; tmpRect = *rect;
@ -469,8 +465,7 @@ INT16 WINAPI GetClipBox16( HDC16 hdc, LPRECT16 rect )
ret = GetRgnBox16( dc->w.hGCClipRgn, rect ); ret = GetRgnBox16( dc->w.hGCClipRgn, rect );
OffsetRect16( rect, -dc->w.DCOrgX, -dc->w.DCOrgY ); OffsetRect16( rect, -dc->w.DCOrgX, -dc->w.DCOrgY );
DPtoLP16( hdc, (LPPOINT16)rect, 2 ); DPtoLP16( hdc, (LPPOINT16)rect, 2 );
TRACE_(clipping)("%d,%d-%d,%d\n", TRACE("%d,%d-%d,%d\n", rect->left,rect->top,rect->right,rect->bottom );
rect->left,rect->top,rect->right,rect->bottom );
return ret; return ret;
} }
@ -523,7 +518,7 @@ HRGN16 WINAPI SaveVisRgn16( HDC16 hdc )
RGNOBJ *obj, *copyObj; RGNOBJ *obj, *copyObj;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0; if (!dc) return 0;
TRACE_(clipping)("%04x\n", hdc ); TRACE("%04x\n", hdc );
if (!dc->w.hVisRgn) if (!dc->w.hVisRgn)
{ {
ERR_(region)("hVisRgn is zero. Please report this.\n" ); ERR_(region)("hVisRgn is zero. Please report this.\n" );
@ -575,7 +570,7 @@ INT16 WINAPI RestoreVisRgn16( HDC16 hdc )
GDI_HEAP_UNLOCK( hdc ); GDI_HEAP_UNLOCK( hdc );
return ERROR; return ERROR;
} }
TRACE_(clipping)("%04x\n", hdc ); TRACE("%04x\n", hdc );
if (!(obj = (RGNOBJ *) GDI_GetObjPtr( dc->w.hVisRgn, REGION_MAGIC ))) if (!(obj = (RGNOBJ *) GDI_GetObjPtr( dc->w.hVisRgn, REGION_MAGIC )))
{ {
GDI_HEAP_UNLOCK( hdc ); GDI_HEAP_UNLOCK( hdc );

View File

@ -16,7 +16,7 @@
#include "winerror.h" #include "winerror.h"
#include "dc.h" #include "dc.h"
DECLARE_DEBUG_CHANNEL(font) DEFAULT_DEBUG_CHANNEL(font)
DECLARE_DEBUG_CHANNEL(gdi) DECLARE_DEBUG_CHANNEL(gdi)
#define ENUM_UNICODE 0x00000001 #define ENUM_UNICODE 0x00000001
@ -319,25 +319,24 @@ HFONT16 WINAPI CreateFontIndirect16( const LOGFONT16 *font )
fontPtr = (FONTOBJ *) GDI_HEAP_LOCK( hFont ); fontPtr = (FONTOBJ *) GDI_HEAP_LOCK( hFont );
memcpy( &fontPtr->logfont, font, sizeof(LOGFONT16) ); memcpy( &fontPtr->logfont, font, sizeof(LOGFONT16) );
TRACE_(font)("(%i %i %i %i) '%s' %s %s => %04x\n", TRACE("(%i %i %i %i) '%s' %s %s => %04x\n",
font->lfHeight, font->lfWidth, font->lfHeight, font->lfWidth,
font->lfEscapement, font->lfOrientation, font->lfEscapement, font->lfOrientation,
font->lfFaceName ? font->lfFaceName : "NULL", font->lfFaceName ? font->lfFaceName : "NULL",
font->lfWeight > 400 ? "Bold" : "", font->lfWeight > 400 ? "Bold" : "",
font->lfItalic ? "Italic" : "", font->lfItalic ? "Italic" : "", hFont);
hFont);
if (font->lfEscapement != font->lfOrientation) { if (font->lfEscapement != font->lfOrientation) {
/* this should really depend on whether GM_ADVANCED is set */ /* this should really depend on whether GM_ADVANCED is set */
fontPtr->logfont.lfOrientation = fontPtr->logfont.lfEscapement; fontPtr->logfont.lfOrientation = fontPtr->logfont.lfEscapement;
WARN_(font)( WARN("orientation angle %f set to "
"orientation angle %f set to escapement angle %f for new font %04x\n", "escapement angle %f for new font %04x\n",
font->lfOrientation/10., font->lfEscapement/10., hFont); font->lfOrientation/10., font->lfEscapement/10., hFont);
} }
GDI_HEAP_UNLOCK( hFont ); GDI_HEAP_UNLOCK( hFont );
} }
} }
else WARN_(font)("(NULL) => NULL\n"); else WARN("(NULL) => NULL\n");
return hFont; return hFont;
} }
@ -375,8 +374,7 @@ HFONT16 WINAPI CreateFont16(INT16 height, INT16 width, INT16 esc, INT16 orient,
{ {
LOGFONT16 logfont; LOGFONT16 logfont;
TRACE_(font)("('%s',%d,%d)\n", TRACE("('%s',%d,%d)\n", (name ? name : "(null)") , height, width);
(name ? name : "(null)") , height, width);
logfont.lfHeight = height; logfont.lfHeight = height;
logfont.lfWidth = width; logfont.lfWidth = width;
@ -877,9 +875,8 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count,
!dc->funcs->pGetTextExtentPoint( dc, str, count, size )) !dc->funcs->pGetTextExtentPoint( dc, str, count, size ))
return FALSE; return FALSE;
TRACE_(font)("(%08x %s %d %p): returning %d,%d\n", TRACE("(%08x %s %d %p): returning %d,%d\n",
hdc, debugstr_an (str, count), count, hdc, debugstr_an (str, count), count, size, size->cx, size->cy );
size, size->cx, size->cy );
return TRUE; return TRUE;
} }
@ -922,7 +919,7 @@ BOOL WINAPI GetTextExtentPoint32W(
BOOL WINAPI GetTextExtentPointA( HDC hdc, LPCSTR str, INT count, BOOL WINAPI GetTextExtentPointA( HDC hdc, LPCSTR str, INT count,
LPSIZE size ) LPSIZE size )
{ {
TRACE_(font)("not bug compatible.\n"); TRACE("not bug compatible.\n");
return GetTextExtentPoint32A( hdc, str, count, size ); return GetTextExtentPoint32A( hdc, str, count, size );
} }
@ -932,7 +929,7 @@ BOOL WINAPI GetTextExtentPointA( HDC hdc, LPCSTR str, INT count,
BOOL WINAPI GetTextExtentPointW( HDC hdc, LPCWSTR str, INT count, BOOL WINAPI GetTextExtentPointW( HDC hdc, LPCWSTR str, INT count,
LPSIZE size ) LPSIZE size )
{ {
TRACE_(font)("not bug compatible.\n"); TRACE("not bug compatible.\n");
return GetTextExtentPoint32W( hdc, str, count, size ); return GetTextExtentPoint32W( hdc, str, count, size );
} }
@ -972,8 +969,8 @@ BOOL WINAPI GetTextExtentExPointA( HDC hdc, LPCSTR str, INT count,
size->cx = extent; size->cx = extent;
*lpnFit = nFit; *lpnFit = nFit;
TRACE_(font)("(%08x '%.*s' %d) returning %d %d %d\n", TRACE("(%08x '%.*s' %d) returning %d %d %d\n",
hdc,count,str,maxExt,nFit, size->cx,size->cy); hdc,count,str,maxExt,nFit, size->cx,size->cy);
return TRUE; return TRUE;
} }
@ -1049,26 +1046,26 @@ BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
metrics->tmMaxCharWidth = WDPTOLP(metrics->tmMaxCharWidth); metrics->tmMaxCharWidth = WDPTOLP(metrics->tmMaxCharWidth);
metrics->tmOverhang = WDPTOLP(metrics->tmOverhang); metrics->tmOverhang = WDPTOLP(metrics->tmOverhang);
TRACE_(font)("text metrics:\n" TRACE("text metrics:\n"
" Weight = %03li\t FirstChar = %03i\t AveCharWidth = %li\n" " Weight = %03li\t FirstChar = %03i\t AveCharWidth = %li\n"
" Italic = % 3i\t LastChar = %03i\t\t MaxCharWidth = %li\n" " Italic = % 3i\t LastChar = %03i\t\t MaxCharWidth = %li\n"
" UnderLined = %01i\t DefaultChar = %03i\t Overhang = %li\n" " UnderLined = %01i\t DefaultChar = %03i\t Overhang = %li\n"
" StruckOut = %01i\t BreakChar = %03i\t CharSet = %i\n" " StruckOut = %01i\t BreakChar = %03i\t CharSet = %i\n"
" PitchAndFamily = %02x\n" " PitchAndFamily = %02x\n"
" --------------------\n" " --------------------\n"
" InternalLeading = %li\n" " InternalLeading = %li\n"
" Ascent = %li\n" " Ascent = %li\n"
" Descent = %li\n" " Descent = %li\n"
" Height = %li\n", " Height = %li\n",
metrics->tmWeight, metrics->tmFirstChar, metrics->tmAveCharWidth, metrics->tmWeight, metrics->tmFirstChar, metrics->tmAveCharWidth,
metrics->tmItalic, metrics->tmLastChar, metrics->tmMaxCharWidth, metrics->tmItalic, metrics->tmLastChar, metrics->tmMaxCharWidth,
metrics->tmUnderlined, metrics->tmDefaultChar, metrics->tmOverhang, metrics->tmUnderlined, metrics->tmDefaultChar, metrics->tmOverhang,
metrics->tmStruckOut, metrics->tmBreakChar, metrics->tmCharSet, metrics->tmStruckOut, metrics->tmBreakChar, metrics->tmCharSet,
metrics->tmPitchAndFamily, metrics->tmPitchAndFamily,
metrics->tmInternalLeading, metrics->tmInternalLeading,
metrics->tmAscent, metrics->tmAscent,
metrics->tmDescent, metrics->tmDescent,
metrics->tmHeight ); metrics->tmHeight );
return TRUE; return TRUE;
} }
@ -1100,7 +1097,7 @@ UINT16 WINAPI GetOutlineTextMetrics16(
UINT16 cbData, /* [in] Size of metric data array */ UINT16 cbData, /* [in] Size of metric data array */
LPOUTLINETEXTMETRIC16 lpOTM) /* [out] Address of metric data array */ LPOUTLINETEXTMETRIC16 lpOTM) /* [out] Address of metric data array */
{ {
FIXME_(font)("(%04x,%04x,%p): stub\n", hdc,cbData,lpOTM); FIXME("(%04x,%04x,%p): stub\n", hdc,cbData,lpOTM);
return 0; return 0;
} }
@ -1183,7 +1180,7 @@ UINT WINAPI GetOutlineTextMetricsW(
UINT cbData, /* [in] Size of metric data array */ UINT cbData, /* [in] Size of metric data array */
LPOUTLINETEXTMETRICW lpOTM) /* [out] Address of metric data array */ LPOUTLINETEXTMETRICW lpOTM) /* [out] Address of metric data array */
{ {
FIXME_(font)("(%d,%d,%p): stub\n", hdc, cbData, lpOTM); FIXME("(%d,%d,%p): stub\n", hdc, cbData, lpOTM);
return 0; return 0;
} }
@ -1284,7 +1281,7 @@ DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
if(dc->funcs->pSetMapperFlags) if(dc->funcs->pSetMapperFlags)
ret = dc->funcs->pSetMapperFlags( dc, dwFlag ); ret = dc->funcs->pSetMapperFlags( dc, dwFlag );
else else
FIXME_(font)("(0x%04x, 0x%08lx): stub - harmless\n", hDC, dwFlag); FIXME("(0x%04x, 0x%08lx): stub - harmless\n", hDC, dwFlag);
GDI_HEAP_UNLOCK( hDC ); GDI_HEAP_UNLOCK( hDC );
return ret; return ret;
} }
@ -1294,8 +1291,7 @@ DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
*/ */
BOOL16 WINAPI GetAspectRatioFilterEx16( HDC16 hdc, LPSIZE16 pAspectRatio ) BOOL16 WINAPI GetAspectRatioFilterEx16( HDC16 hdc, LPSIZE16 pAspectRatio )
{ {
FIXME_(font)("(%04x, %p): -- Empty Stub !\n", FIXME("(%04x, %p): -- Empty Stub !\n", hdc, pAspectRatio);
hdc, pAspectRatio);
return FALSE; return FALSE;
} }
@ -1304,8 +1300,7 @@ BOOL16 WINAPI GetAspectRatioFilterEx16( HDC16 hdc, LPSIZE16 pAspectRatio )
*/ */
BOOL WINAPI GetAspectRatioFilterEx( HDC hdc, LPSIZE pAspectRatio ) BOOL WINAPI GetAspectRatioFilterEx( HDC hdc, LPSIZE pAspectRatio )
{ {
FIXME_(font)("(%04x, %p): -- Empty Stub !\n", FIXME("(%04x, %p): -- Empty Stub !\n", hdc, pAspectRatio);
hdc, pAspectRatio);
return FALSE; return FALSE;
} }
@ -1354,7 +1349,7 @@ BOOL WINAPI GetCharABCWidthsW( HDC hdc, UINT firstChar, UINT lastChar,
LPABC abc ) LPABC abc )
{ {
/* No TrueType fonts in Wine so far */ /* No TrueType fonts in Wine so far */
FIXME_(font)("(%04x,%04x,%04x,%p): stub\n", hdc, firstChar, lastChar, abc); FIXME("(%04x,%04x,%04x,%p): stub\n", hdc, firstChar, lastChar, abc);
return FALSE; return FALSE;
} }
@ -1366,7 +1361,7 @@ DWORD WINAPI GetGlyphOutline16( HDC16 hdc, UINT16 uChar, UINT16 fuFormat,
LPGLYPHMETRICS16 lpgm, DWORD cbBuffer, LPGLYPHMETRICS16 lpgm, DWORD cbBuffer,
LPVOID lpBuffer, const MAT2 *lpmat2 ) LPVOID lpBuffer, const MAT2 *lpmat2 )
{ {
FIXME_(font)("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n", FIXME("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n",
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 ); hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
return (DWORD)-1; /* failure */ return (DWORD)-1; /* failure */
} }
@ -1379,7 +1374,7 @@ DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat,
LPGLYPHMETRICS lpgm, DWORD cbBuffer, LPGLYPHMETRICS lpgm, DWORD cbBuffer,
LPVOID lpBuffer, const MAT2 *lpmat2 ) LPVOID lpBuffer, const MAT2 *lpmat2 )
{ {
FIXME_(font)("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n", FIXME("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n",
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 ); hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
return (DWORD)-1; /* failure */ return (DWORD)-1; /* failure */
} }
@ -1391,7 +1386,7 @@ DWORD WINAPI GetGlyphOutlineW( HDC hdc, UINT uChar, UINT fuFormat,
LPGLYPHMETRICS lpgm, DWORD cbBuffer, LPGLYPHMETRICS lpgm, DWORD cbBuffer,
LPVOID lpBuffer, const MAT2 *lpmat2 ) LPVOID lpBuffer, const MAT2 *lpmat2 )
{ {
FIXME_(font)("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n", FIXME("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n",
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 ); hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
return (DWORD)-1; /* failure */ return (DWORD)-1; /* failure */
} }
@ -1419,7 +1414,7 @@ BOOL WINAPI CreateScalableFontResourceA( DWORD fHidden,
* enumbered with EnumFonts/EnumFontFamilies * enumbered with EnumFonts/EnumFontFamilies
* lpszCurrentPath can be NULL * lpszCurrentPath can be NULL
*/ */
FIXME_(font)("(%ld,%s,%s,%s): stub\n", FIXME("(%ld,%s,%s,%s): stub\n",
fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath ); fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath );
return FALSE; /* create failed */ return FALSE; /* create failed */
} }
@ -1432,7 +1427,7 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD fHidden,
LPCWSTR lpszFontFile, LPCWSTR lpszFontFile,
LPCWSTR lpszCurrentPath ) LPCWSTR lpszCurrentPath )
{ {
FIXME_(font)("(%ld,%p,%p,%p): stub\n", FIXME("(%ld,%p,%p,%p): stub\n",
fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath ); fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath );
return FALSE; /* create failed */ return FALSE; /* create failed */
} }
@ -1467,8 +1462,7 @@ INT16 WINAPI GetKerningPairs16( HDC16 hDC, INT16 cPairs,
{ {
/* At this time kerning is ignored (set to 0) */ /* At this time kerning is ignored (set to 0) */
int i; int i;
FIXME_(font)("(%x,%d,%p): almost empty stub!\n", FIXME("(%x,%d,%p): almost empty stub!\n", hDC, cPairs, lpKerningPairs);
hDC, cPairs, lpKerningPairs);
for (i = 0; i < cPairs; i++) for (i = 0; i < cPairs; i++)
lpKerningPairs[i].iKernAmount = 0; lpKerningPairs[i].iKernAmount = 0;
return 0; return 0;
@ -1483,8 +1477,7 @@ DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs,
LPKERNINGPAIR lpKerningPairs ) LPKERNINGPAIR lpKerningPairs )
{ {
int i; int i;
FIXME_(font)("(%x,%ld,%p): almost empty stub!\n", FIXME("(%x,%ld,%p): almost empty stub!\n", hDC, cPairs, lpKerningPairs);
hDC, cPairs, lpKerningPairs);
for (i = 0; i < cPairs; i++) for (i = 0; i < cPairs; i++)
lpKerningPairs[i].iKernAmount = 0; lpKerningPairs[i].iKernAmount = 0;
return 0; return 0;
@ -1548,7 +1541,7 @@ BOOL WINAPI TranslateCharsetInfo(
*/ */
DWORD WINAPI GetFontLanguageInfo(HDC hdc) { DWORD WINAPI GetFontLanguageInfo(HDC hdc) {
/* return value 0 is correct for most cases anyway */ /* return value 0 is correct for most cases anyway */
FIXME_(font)("(%x):stub!\n", hdc); FIXME("(%x):stub!\n", hdc);
return 0; return 0;
} }
@ -1557,7 +1550,7 @@ DWORD WINAPI GetFontLanguageInfo(HDC hdc) {
*/ */
DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) { DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) {
/* return value 0 is correct for most cases anyway */ /* return value 0 is correct for most cases anyway */
FIXME_(font)("(%x):stub!\n",hdc); FIXME("(%x):stub!\n",hdc);
return 0; return 0;
} }
@ -1580,8 +1573,7 @@ DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) {
DWORD WINAPI GetFontData(HDC hdc, DWORD table, DWORD offset, DWORD WINAPI GetFontData(HDC hdc, DWORD table, DWORD offset,
LPVOID buffer, DWORD length) LPVOID buffer, DWORD length)
{ {
FIXME_(font)("(%x,%ld,%ld,%p,%ld): stub\n", FIXME("(%x,%ld,%ld,%p,%ld): stub\n", hdc, table, offset, buffer, length);
hdc, table, offset, buffer, length);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return GDI_ERROR; return GDI_ERROR;
} }
@ -1610,18 +1602,19 @@ GetCharacterPlacementA(HDC hdc, LPCSTR lpString, INT uCount,
DWORD ret=0; DWORD ret=0;
SIZE size; SIZE size;
TRACE_(font)("%s 0x%08x 0x%08x 0x%08lx:stub!\n", TRACE("%s 0x%08x 0x%08x 0x%08lx:stub!\n",
debugstr_a(lpString), uCount, nMaxExtent, dwFlags); debugstr_a(lpString), uCount, nMaxExtent, dwFlags);
TRACE_(font)("lpOrder=%p lpDx=%p lpCaretPos=%p lpClass=%p lpOutString=%p lpGlyphs=%p\n", TRACE("lpOrder=%p lpDx=%p lpCaretPos=%p lpClass=%p "
lpResults->lpOrder, lpResults->lpDx, lpResults->lpCaretPos, lpResults->lpClass, "lpOutString=%p lpGlyphs=%p\n",
lpResults->lpOutString, lpResults->lpGlyphs); lpResults->lpOrder, lpResults->lpDx, lpResults->lpCaretPos,
lpResults->lpClass, lpResults->lpOutString, lpResults->lpGlyphs);
if(dwFlags) FIXME_(font)("flags 0x%08lx ignored\n", dwFlags); if(dwFlags) FIXME("flags 0x%08lx ignored\n", dwFlags);
if(lpResults->lpOrder) FIXME_(font)("reordering not implemented\n"); if(lpResults->lpOrder) FIXME("reordering not implemented\n");
if(lpResults->lpCaretPos) FIXME_(font)("caret positions not implemented\n"); if(lpResults->lpCaretPos) FIXME("caret positions not implemented\n");
if(lpResults->lpClass) FIXME_(font)("classes not implemented\n"); if(lpResults->lpClass) FIXME("classes not implemented\n");
if(lpResults->lpGlyphs) FIXME_(font)("glyphs not implemented\n"); if(lpResults->lpGlyphs) FIXME("glyphs not implemented\n");
/* copy will do if the GCP_REORDER flag is not set */ /* copy will do if the GCP_REORDER flag is not set */
if(lpResults->lpOutString) if(lpResults->lpOutString)
@ -1654,7 +1647,7 @@ GetCharacterPlacementW(HDC hdc, LPCWSTR lpString, INT uCount,
DWORD dwFlags) DWORD dwFlags)
{ {
/* return value 0 is correct for most cases anyway */ /* return value 0 is correct for most cases anyway */
FIXME_(font)(":stub!\n"); FIXME(":stub!\n");
return 0; return 0;
} }

View File

@ -19,8 +19,8 @@
#include "crtdll.h" #include "crtdll.h"
#include "main.h" #include "main.h"
DEFAULT_DEBUG_CHANNEL(ole)
DECLARE_DEBUG_CHANNEL(file) DECLARE_DEBUG_CHANNEL(file)
DECLARE_DEBUG_CHANNEL(ole)
DECLARE_DEBUG_CHANNEL(string) DECLARE_DEBUG_CHANNEL(string)
DECLARE_DEBUG_CHANNEL(win32) DECLARE_DEBUG_CHANNEL(win32)
@ -690,7 +690,7 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
int found,i; int found,i;
int lang=0; int lang=0;
TRACE_(ole)("(lcid=0x%lx,lctype=0x%lx,%p,%x)\n",lcid,LCType,buf,len); TRACE("(lcid=0x%lx,lctype=0x%lx,%p,%x)\n",lcid,LCType,buf,len);
if (len && (! buf) ) { if (len && (! buf) ) {
SetLastError(ERROR_INSUFFICIENT_BUFFER); SetLastError(ERROR_INSUFFICIENT_BUFFER);
@ -722,7 +722,7 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
i++; i++;
} }
if (!retString) { if (!retString) {
FIXME_(ole)("Unkown LC type %lX\n",LCType); FIXME("Unkown LC type %lX\n",LCType);
return 0; return 0;
} }
@ -752,7 +752,7 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
} }
if(!found) { if(!found) {
ERR_(ole)("'%s' not supported for your language (%04X).\n", ERR("'%s' not supported for your language (%04X).\n",
retString,(WORD)lcid); retString,(WORD)lcid);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
@ -800,7 +800,7 @@ INT WINAPI GetLocaleInfoW(LCID lcid,LCTYPE LCType,LPWSTR wbuf,INT len)
*/ */
BOOL16 WINAPI SetLocaleInfoA(DWORD lcid, DWORD lctype, LPCSTR data) BOOL16 WINAPI SetLocaleInfoA(DWORD lcid, DWORD lctype, LPCSTR data)
{ {
FIXME_(ole)("(%ld,%ld,%s): stub\n",lcid,lctype,data); FIXME("(%ld,%ld,%s): stub\n",lcid,lctype,data);
return TRUE; return TRUE;
} }
@ -1479,7 +1479,7 @@ BOOL WINAPI GetStringTypeExA(LCID locale,DWORD dwInfoType,LPCSTR src,
return TRUE; return TRUE;
default: default:
ERR_(ole)("Unknown dwInfoType:%ld\n",dwInfoType); ERR("Unknown dwInfoType:%ld\n",dwInfoType);
return FALSE; return FALSE;
} }
} }
@ -1512,10 +1512,10 @@ BOOL WINAPI GetStringTypeExW(LCID locale,DWORD dwInfoType,LPCWSTR src,
switch (dwInfoType) { switch (dwInfoType) {
case CT_CTYPE2: case CT_CTYPE2:
FIXME_(ole)("CT_CTYPE2 not supported.\n"); FIXME("CT_CTYPE2 not supported.\n");
return FALSE; return FALSE;
case CT_CTYPE3: case CT_CTYPE3:
FIXME_(ole)("CT_CTYPE3 not supported.\n"); FIXME("CT_CTYPE3 not supported.\n");
return FALSE; return FALSE;
default:break; default:break;
} }
@ -2091,7 +2091,7 @@ INT WINAPI LCMapStringA(
if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) ) if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) )
{ {
ERR_(ole)("(src=%s,dest=%s): Invalid NULL string\n", srcstr, dststr); ERR("(src=%s,dest=%s): Invalid NULL string\n", srcstr, dststr);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
} }
@ -2329,7 +2329,7 @@ INT WINAPI LCMapStringW(
if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) ) if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) )
{ {
ERR_(ole)("(src=%p,dst=%p): Invalid NULL string\n", srcstr, dststr); ERR("(src=%p,dst=%p): Invalid NULL string\n", srcstr, dststr);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
} }
@ -2406,18 +2406,18 @@ UINT WINAPI CompareStringA(
int len1,len2; int len1,len2;
int result; int result;
LPSTR sk1,sk2; LPSTR sk1,sk2;
TRACE_(ole)("%s and %s\n", TRACE("%s and %s\n",
debugstr_a (s1), debugstr_a (s2)); debugstr_a (s1), debugstr_a (s2));
if ( (s1==NULL) || (s2==NULL) ) if ( (s1==NULL) || (s2==NULL) )
{ {
ERR_(ole)("(s1=%s,s2=%s): Invalid NULL string\n", s1, s2); ERR("(s1=%s,s2=%s): Invalid NULL string\n", s1, s2);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
} }
if(fdwStyle & NORM_IGNORESYMBOLS) if(fdwStyle & NORM_IGNORESYMBOLS)
FIXME_(ole)("IGNORESYMBOLS not supported\n"); FIXME("IGNORESYMBOLS not supported\n");
mapstring_flags = LCMAP_SORTKEY | fdwStyle ; mapstring_flags = LCMAP_SORTKEY | fdwStyle ;
len1 = LCMapStringA(lcid,mapstring_flags,s1,l1,NULL,0); len1 = LCMapStringA(lcid,mapstring_flags,s1,l1,NULL,0);
@ -2431,7 +2431,7 @@ UINT WINAPI CompareStringA(
if ( (!LCMapStringA(lcid,mapstring_flags,s1,l1,sk1,len1)) if ( (!LCMapStringA(lcid,mapstring_flags,s1,l1,sk1,len1))
|| (!LCMapStringA(lcid,mapstring_flags,s2,l2,sk2,len2)) ) || (!LCMapStringA(lcid,mapstring_flags,s2,l2,sk2,len2)) )
{ {
ERR_(ole)("Bug in LCmapString32A.\n"); ERR("Bug in LCmapString32A.\n");
result = 0; result = 0;
} }
else else
@ -2462,9 +2462,9 @@ UINT WINAPI CompareStringW(DWORD lcid, DWORD fdwStyle,
{ {
int len,ret; int len,ret;
if(fdwStyle & NORM_IGNORENONSPACE) if(fdwStyle & NORM_IGNORENONSPACE)
FIXME_(ole)("IGNORENONSPACE not supprted\n"); FIXME("IGNORENONSPACE not supprted\n");
if(fdwStyle & NORM_IGNORESYMBOLS) if(fdwStyle & NORM_IGNORESYMBOLS)
FIXME_(ole)("IGNORESYMBOLS not supported\n"); FIXME("IGNORESYMBOLS not supported\n");
/* Is strcmp defaulting to string sort or to word sort?? */ /* Is strcmp defaulting to string sort or to word sort?? */
/* FIXME: Handle NORM_STRINGSORT */ /* FIXME: Handle NORM_STRINGSORT */
@ -2486,7 +2486,7 @@ UINT WINAPI CompareStringW(DWORD lcid, DWORD fdwStyle,
*/ */
BOOL16 WINAPI RegisterNLSInfoChanged16(LPVOID/*FIXME*/ lpNewNLSInfo) BOOL16 WINAPI RegisterNLSInfoChanged16(LPVOID/*FIXME*/ lpNewNLSInfo)
{ {
FIXME_(ole)("Fully implemented, but doesn't effect anything.\n"); FIXME("Fully implemented, but doesn't effect anything.\n");
if (!lpNewNLSInfo) if (!lpNewNLSInfo)
{ {
@ -2560,13 +2560,13 @@ static INT OLE_GetFormatA(LCID locale,
const char ** dgfmt = _dgfmt - 1; const char ** dgfmt = _dgfmt - 1;
/* report, for debugging */ /* report, for debugging */
TRACE_(ole)("(0x%lx,0x%lx, 0x%lx, time(d=%d,h=%d,m=%d,s=%d), fmt=%p \'%s\' , %p, len=%d)\n", TRACE("(0x%lx,0x%lx, 0x%lx, time(d=%d,h=%d,m=%d,s=%d), fmt=%p \'%s\' , %p, len=%d)\n",
locale, flags, tflags, locale, flags, tflags,
xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond, xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond,
_format, _format, date, datelen); _format, _format, date, datelen);
if(datelen == 0) { if(datelen == 0) {
FIXME_(ole)("datelen = 0, returning 255\n"); FIXME("datelen = 0, returning 255\n");
return 255; return 255;
} }
@ -2652,17 +2652,17 @@ static INT OLE_GetFormatA(LCID locale,
sprintf(buf, "%d", xtime->wYear); sprintf(buf, "%d", xtime->wYear);
} else if (count == 3) { } else if (count == 3) {
strcpy(buf, "yyy"); strcpy(buf, "yyy");
WARN_(ole)("unknown format, c=%c, n=%d\n", type, count); WARN("unknown format, c=%c, n=%d\n", type, count);
} else { } else {
sprintf(buf, dgfmt[count], xtime->wYear % 100); sprintf(buf, dgfmt[count], xtime->wYear % 100);
} }
} else if (type == 'g') { } else if (type == 'g') {
if (count == 2) { if (count == 2) {
FIXME_(ole)("LOCALE_ICALENDARTYPE unimp.\n"); FIXME("LOCALE_ICALENDARTYPE unimp.\n");
strcpy(buf, "AD"); strcpy(buf, "AD");
} else { } else {
strcpy(buf, "g"); strcpy(buf, "g");
WARN_(ole)("unknown format, c=%c, n=%d\n", type, count); WARN("unknown format, c=%c, n=%d\n", type, count);
} }
} else if (type == 'h') { } else if (type == 'h') {
/* gives us hours 1:00 -- 12:00 */ /* gives us hours 1:00 -- 12:00 */
@ -2701,7 +2701,7 @@ static INT OLE_GetFormatA(LCID locale,
strncat(date, buf, datelen - outpos); strncat(date, buf, datelen - outpos);
date[datelen - 1] = '\0'; date[datelen - 1] = '\0';
SetLastError(ERROR_INSUFFICIENT_BUFFER); SetLastError(ERROR_INSUFFICIENT_BUFFER);
WARN_(ole)("insufficient buffer\n"); WARN("insufficient buffer\n");
return 0; return 0;
} }
@ -2745,7 +2745,7 @@ static INT OLE_GetFormatA(LCID locale,
if (outpos > datelen-1) outpos = datelen-1; if (outpos > datelen-1) outpos = datelen-1;
date[outpos] = '\0'; date[outpos] = '\0';
TRACE_(ole)("OLE_GetFormatA returns string '%s', len %d\n", TRACE("OLE_GetFormatA returns string '%s', len %d\n",
date, outpos); date, outpos);
return outpos; return outpos;
} }
@ -2773,14 +2773,14 @@ static INT OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
argarr[2] = arg2; argarr[2] = arg2;
/* make a debug report */ /* make a debug report */
TRACE_(ole)("args: 0x%lx, 0x%lx, 0x%lx, time(d=%d,h=%d,m=%d,s=%d), fmt:%s (at %p), " TRACE("args: 0x%lx, 0x%lx, 0x%lx, time(d=%d,h=%d,m=%d,s=%d), fmt:%s (at %p), "
"%p with max len %d\n", "%p with max len %d\n",
locale, flags, tflags, locale, flags, tflags,
xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond, xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond,
debugstr_w(format), format, output, outlen); debugstr_w(format), format, output, outlen);
if(outlen == 0) { if(outlen == 0) {
FIXME_(ole)("outlen = 0, returning 255\n"); FIXME("outlen = 0, returning 255\n");
return 255; return 255;
} }
@ -2861,7 +2861,7 @@ static INT OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
} }
} else if (type == 'g') { } else if (type == 'g') {
if (count == 2) { if (count == 2) {
FIXME_(ole)("LOCALE_ICALENDARTYPE unimplemented\n"); FIXME("LOCALE_ICALENDARTYPE unimplemented\n");
lstrcpynAtoW(buf, "AD", 5); lstrcpynAtoW(buf, "AD", 5);
} else { } else {
/* Win API sez we copy it verbatim */ /* Win API sez we copy it verbatim */
@ -2940,7 +2940,7 @@ static INT OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
if (Overflow) { if (Overflow) {
SetLastError(ERROR_INSUFFICIENT_BUFFER); SetLastError(ERROR_INSUFFICIENT_BUFFER);
WARN_(ole)(" buffer overflow\n"); WARN(" buffer overflow\n");
}; };
/* final string terminator and sanity check */ /* final string terminator and sanity check */
@ -2948,7 +2948,7 @@ static INT OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
if (outpos > outlen-1) outpos = outlen-1; if (outpos > outlen-1) outpos = outlen-1;
output[outpos] = '0'; output[outpos] = '0';
TRACE_(ole)(" returning %s\n", debugstr_w(output)); TRACE(" returning %s\n", debugstr_w(output));
return (!Overflow) ? outlen : 0; return (!Overflow) ? outlen : 0;
@ -2989,7 +2989,7 @@ INT WINAPI GetDateFormatA(LCID locale,DWORD flags,
LCID thislocale; LCID thislocale;
INT ret; INT ret;
TRACE_(ole)("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n", TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",
locale,flags,xtime,format,date,datelen); locale,flags,xtime,format,date,datelen);
if (!locale) { if (!locale) {
@ -3026,7 +3026,7 @@ INT WINAPI GetDateFormatA(LCID locale,DWORD flags,
date, datelen); date, datelen);
TRACE_(ole)( TRACE(
"GetDateFormat32A() returning %d, with data=%s\n", "GetDateFormat32A() returning %d, with data=%s\n",
ret, date); ret, date);
return ret; return ret;
@ -3047,7 +3047,7 @@ INT WINAPI GetDateFormatW(LCID locale,DWORD flags,
{ {
unsigned short datearr[] = {'1','9','9','4','-','1','-','1',0}; unsigned short datearr[] = {'1','9','9','4','-','1','-','1',0};
FIXME_(ole)("STUB (should call OLE_GetFormatW)\n"); FIXME("STUB (should call OLE_GetFormatW)\n");
lstrcpynW(date, datearr, datelen); lstrcpynW(date, datearr, datelen);
return ( datelen < 9) ? datelen : 9; return ( datelen < 9) ? datelen : 9;
@ -3060,7 +3060,7 @@ INT WINAPI GetDateFormatW(LCID locale,DWORD flags,
BOOL WINAPI EnumDateFormatsA( BOOL WINAPI EnumDateFormatsA(
DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD dwFlags) DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD dwFlags)
{ {
FIXME_(ole)("Only US English supported\n"); FIXME("Only US English supported\n");
if(!lpDateFmtEnumProc) if(!lpDateFmtEnumProc)
{ {
@ -3085,7 +3085,7 @@ BOOL WINAPI EnumDateFormatsA(
if(!(*lpDateFmtEnumProc)("dd MMMM, yyyy")) return TRUE; if(!(*lpDateFmtEnumProc)("dd MMMM, yyyy")) return TRUE;
return TRUE; return TRUE;
default: default:
FIXME_(ole)("Unknown date format (%ld)\n", dwFlags); FIXME("Unknown date format (%ld)\n", dwFlags);
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return FALSE; return FALSE;
} }
@ -3097,7 +3097,7 @@ BOOL WINAPI EnumDateFormatsA(
BOOL WINAPI EnumDateFormatsW( BOOL WINAPI EnumDateFormatsW(
DATEFMT_ENUMPROCW lpDateFmtEnumProc, LCID Locale, DWORD dwFlags) DATEFMT_ENUMPROCW lpDateFmtEnumProc, LCID Locale, DWORD dwFlags)
{ {
FIXME_(ole)("(%p, %ld, %ld): stub\n", lpDateFmtEnumProc, Locale, dwFlags); FIXME("(%p, %ld, %ld): stub\n", lpDateFmtEnumProc, Locale, dwFlags);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -3108,7 +3108,7 @@ BOOL WINAPI EnumDateFormatsW(
BOOL WINAPI EnumTimeFormatsA( BOOL WINAPI EnumTimeFormatsA(
TIMEFMT_ENUMPROCA lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags) TIMEFMT_ENUMPROCA lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags)
{ {
FIXME_(ole)("Only US English supported\n"); FIXME("Only US English supported\n");
if(!lpTimeFmtEnumProc) if(!lpTimeFmtEnumProc)
{ {
@ -3118,7 +3118,7 @@ BOOL WINAPI EnumTimeFormatsA(
if(dwFlags) if(dwFlags)
{ {
FIXME_(ole)("Unknown time format (%ld)\n", dwFlags); FIXME("Unknown time format (%ld)\n", dwFlags);
} }
if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE; if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE;
@ -3135,7 +3135,7 @@ BOOL WINAPI EnumTimeFormatsA(
BOOL WINAPI EnumTimeFormatsW( BOOL WINAPI EnumTimeFormatsW(
TIMEFMT_ENUMPROCW lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags) TIMEFMT_ENUMPROCW lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags)
{ {
FIXME_(ole)("(%p,%ld,%ld): stub\n", lpTimeFmtEnumProc, Locale, dwFlags); FIXME("(%p,%ld,%ld): stub\n", lpTimeFmtEnumProc, Locale, dwFlags);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -3217,12 +3217,12 @@ GetTimeFormatA(LCID locale, /* in */
DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */ DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */
INT ret; INT ret;
TRACE_(ole)("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,xtime,format,timestr,timelen); TRACE("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,xtime,format,timestr,timelen);
thislocale = OLE2NLS_CheckLocale ( locale ); thislocale = OLE2NLS_CheckLocale ( locale );
if ( flags & (TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT )) if ( flags & (TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT ))
{ FIXME_(ole)("TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented\n"); { FIXME("TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented\n");
} }
flags &= (TIME_NOSECONDS | TIME_NOMINUTESORSECONDS); /* mask for OLE_GetFormatA*/ flags &= (TIME_NOSECONDS | TIME_NOMINUTESORSECONDS); /* mask for OLE_GetFormatA*/
@ -3270,13 +3270,13 @@ GetTimeFormatW(LCID locale, /* in */
DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */ DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */
INT ret; INT ret;
TRACE_(ole)("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags, TRACE("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,
xtime,debugstr_w(format),timestr,timelen); xtime,debugstr_w(format),timestr,timelen);
thislocale = OLE2NLS_CheckLocale ( locale ); thislocale = OLE2NLS_CheckLocale ( locale );
if ( flags & (TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT )) if ( flags & (TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT ))
{ FIXME_(ole)("TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented\n"); { FIXME("TIME_NOTIMEMARKER or TIME_FORCE24HOURFORMAT not implemented\n");
} }
flags &= (TIME_NOSECONDS | TIME_NOMINUTESORSECONDS); /* mask for OLE_GetFormatA*/ flags &= (TIME_NOSECONDS | TIME_NOMINUTESORSECONDS); /* mask for OLE_GetFormatA*/
@ -3311,6 +3311,6 @@ GetTimeFormatW(LCID locale, /* in */
BOOL WINAPI EnumCalendarInfoA( BOOL WINAPI EnumCalendarInfoA(
CALINFO_ENUMPROCA calinfoproc,LCID locale,CALID calendar,CALTYPE caltype CALINFO_ENUMPROCA calinfoproc,LCID locale,CALID calendar,CALTYPE caltype
) { ) {
FIXME_(ole)("(%p,0x%04lx,0x%08lx,0x%08lx),stub!\n",calinfoproc,locale,calendar,caltype); FIXME("(%p,0x%04lx,0x%08lx,0x%08lx),stub!\n",calinfoproc,locale,calendar,caltype);
return FALSE; return FALSE;
} }

View File

@ -40,7 +40,7 @@ void WINAPI DeleteCriticalSection( CRITICAL_SECTION *crit )
if (crit->LockSemaphore) if (crit->LockSemaphore)
{ {
if (crit->RecursionCount) /* Should not happen */ if (crit->RecursionCount) /* Should not happen */
ERR_(win32)("Deleting owned critical section (%p)\n", crit ); ERR("Deleting owned critical section (%p)\n", crit );
crit->LockCount = -1; crit->LockCount = -1;
crit->RecursionCount = 0; crit->RecursionCount = 0;
@ -61,13 +61,13 @@ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit )
if (!crit->LockSemaphore) if (!crit->LockSemaphore)
{ {
FIXME_(win32)("entering uninitialized section(%p)?\n",crit); FIXME("entering uninitialized section(%p)?\n",crit);
InitializeCriticalSection(crit); InitializeCriticalSection(crit);
} }
if ( crit->Reserved && crit->Reserved != GetCurrentProcessId() ) if ( crit->Reserved && crit->Reserved != GetCurrentProcessId() )
{ {
FIXME_(win32)("Crst %p belongs to process %ld, current is %ld!\n", FIXME("Crst %p belongs to process %ld, current is %ld!\n",
crit, crit->Reserved, GetCurrentProcessId() ); crit, crit->Reserved, GetCurrentProcessId() );
return; return;
} }
if (InterlockedIncrement( &crit->LockCount )) if (InterlockedIncrement( &crit->LockCount ))
@ -86,11 +86,11 @@ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit )
res = WaitForSingleObject( crit->LockSemaphore, 5000L ); res = WaitForSingleObject( crit->LockSemaphore, 5000L );
if ( res == WAIT_TIMEOUT ) if ( res == WAIT_TIMEOUT )
{ {
ERR_(win32)("Critical section %p wait timed out, retrying (60 sec)\n", crit ); ERR("Critical section %p wait timed out, retrying (60 sec)\n", crit );
res = WaitForSingleObject( crit->LockSemaphore, 60000L ); res = WaitForSingleObject( crit->LockSemaphore, 60000L );
if ( res == WAIT_TIMEOUT && TRACE_ON(relay) ) if ( res == WAIT_TIMEOUT && TRACE_ON(relay) )
{ {
ERR_(win32)("Critical section %p wait timed out, retrying (5 min)\n", crit ); ERR("Critical section %p wait timed out, retrying (5 min)\n", crit );
res = WaitForSingleObject( crit->LockSemaphore, 300000L ); res = WaitForSingleObject( crit->LockSemaphore, 300000L );
} }
} }
@ -173,8 +173,8 @@ void WINAPI ReinitializeCriticalSection( CRITICAL_SECTION *crit )
else if ( crit->Reserved && crit->Reserved != GetCurrentProcessId() ) else if ( crit->Reserved && crit->Reserved != GetCurrentProcessId() )
{ {
FIXME_(win32)("(%p) called for %08lx first, %08lx now: making global\n", FIXME("(%p) called for %08lx first, %08lx now: making global\n",
crit, crit->Reserved, GetCurrentProcessId() ); crit, crit->Reserved, GetCurrentProcessId() );
MakeCriticalSectionGlobal( crit ); MakeCriticalSectionGlobal( crit );
} }
@ -191,8 +191,8 @@ void WINAPI UninitializeCriticalSection( CRITICAL_SECTION *crit )
if ( crit->Reserved ) /* not global */ if ( crit->Reserved ) /* not global */
DeleteCriticalSection( crit ); DeleteCriticalSection( crit );
else else
FIXME_(win32)("(%p) for %08lx: Crst is global, don't know whether to delete\n", FIXME("(%p) for %08lx: Crst is global, don't know whether to delete\n",
crit, GetCurrentProcessId() ); crit, GetCurrentProcessId() );
} }
} }

View File

@ -11,7 +11,7 @@
#include "server.h" #include "server.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(debugstr) DEFAULT_DEBUG_CHANNEL(debugstr)
/********************************************************************** /**********************************************************************
* DEBUG_SendEvent * DEBUG_SendEvent
@ -258,7 +258,7 @@ void WINAPI OutputDebugStringA( LPCSTR str )
DEBUG_SendEvent( OUTPUT_DEBUG_STRING_EVENT, &event, sizeof(event) ); DEBUG_SendEvent( OUTPUT_DEBUG_STRING_EVENT, &event, sizeof(event) );
} }
TRACE_(debugstr)("%s\n", str); TRACE("%s\n", str);
} }
@ -276,7 +276,7 @@ void WINAPI OutputDebugStringW( LPCWSTR str )
DEBUG_SendEvent( OUTPUT_DEBUG_STRING_EVENT, &event, sizeof(event) ); DEBUG_SendEvent( OUTPUT_DEBUG_STRING_EVENT, &event, sizeof(event) );
} }
TRACE_(debugstr)("%s\n", debugstr_w(str)); TRACE("%s\n", debugstr_w(str));
} }

View File

@ -27,7 +27,7 @@
#include "callback.h" #include "callback.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(process) DEFAULT_DEBUG_CHANNEL(process)
DECLARE_DEBUG_CHANNEL(relay) DECLARE_DEBUG_CHANNEL(relay)
DECLARE_DEBUG_CHANNEL(win32) DECLARE_DEBUG_CHANNEL(win32)
@ -604,7 +604,7 @@ PDB *PROCESS_Create( NE_MODULE *pModule, LPCSTR cmd_line, LPCSTR env,
switch ( WaitForMultipleObjects( 2, handles, FALSE, INFINITE ) ) switch ( WaitForMultipleObjects( 2, handles, FALSE, INFINITE ) )
{ {
default: default:
ERR_(process)( "WaitForMultipleObjects failed\n" ); ERR( "WaitForMultipleObjects failed\n" );
break; break;
case 0: case 0:
@ -994,7 +994,7 @@ DWORD WINAPI GetProcessFlags( DWORD processid )
BOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,DWORD minset, BOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,DWORD minset,
DWORD maxset) DWORD maxset)
{ {
FIXME_(process)("(0x%08x,%ld,%ld): stub - harmless\n",hProcess,minset,maxset); FIXME("(0x%08x,%ld,%ld): stub - harmless\n",hProcess,minset,maxset);
if(( minset == -1) && (maxset == -1)) { if(( minset == -1) && (maxset == -1)) {
/* Trim the working set to zero */ /* Trim the working set to zero */
/* Swap the process out of physical RAM */ /* Swap the process out of physical RAM */
@ -1008,7 +1008,7 @@ BOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,DWORD minset,
BOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess,LPDWORD minset, BOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess,LPDWORD minset,
LPDWORD maxset) LPDWORD maxset)
{ {
FIXME_(process)("(0x%08x,%p,%p): stub\n",hProcess,minset,maxset); FIXME("(0x%08x,%p,%p): stub\n",hProcess,minset,maxset);
/* 32 MB working set size */ /* 32 MB working set size */
if (minset) *minset = 32*1024*1024; if (minset) *minset = 32*1024*1024;
if (maxset) *maxset = 32*1024*1024; if (maxset) *maxset = 32*1024*1024;
@ -1036,7 +1036,7 @@ BOOL WINAPI SetProcessShutdownParameters(DWORD level,DWORD flags)
shutdown_priority = level; shutdown_priority = level;
else else
{ {
ERR_(process)("invalid priority level 0x%08lx\n", level); ERR("invalid priority level 0x%08lx\n", level);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
@ -1059,7 +1059,7 @@ BOOL WINAPI GetProcessShutdownParameters( LPDWORD lpdwLevel,
*/ */
BOOL WINAPI SetProcessPriorityBoost(HANDLE hprocess,BOOL disableboost) BOOL WINAPI SetProcessPriorityBoost(HANDLE hprocess,BOOL disableboost)
{ {
FIXME_(process)("(%d,%d): stub\n",hprocess,disableboost); FIXME("(%d,%d): stub\n",hprocess,disableboost);
/* Say we can do it. I doubt the program will notice that we don't. */ /* Say we can do it. I doubt the program will notice that we don't. */
return TRUE; return TRUE;
} }

View File

@ -26,8 +26,8 @@
#include "syslevel.h" #include "syslevel.h"
#include "winerror.h" #include "winerror.h"
DECLARE_DEBUG_CHANNEL(dosmem)
DECLARE_DEBUG_CHANNEL(thunk) DECLARE_DEBUG_CHANNEL(thunk)
DECLARE_DEBUG_CHANNEL(dosmem)
DECLARE_DEBUG_CHANNEL(win32) DECLARE_DEBUG_CHANNEL(win32)

View File

@ -16,8 +16,8 @@ at a later date. */
#include "debugtools.h" #include "debugtools.h"
#include "debugstr.h" #include "debugstr.h"
DEFAULT_DEBUG_CHANNEL(win32)
DECLARE_DEBUG_CHANNEL(debug) DECLARE_DEBUG_CHANNEL(debug)
DECLARE_DEBUG_CHANNEL(win32)
/**************************************************************************** /****************************************************************************
@ -60,10 +60,9 @@ HANDLE WINAPI CreateNamedPipeA (LPCSTR lpName, DWORD dwOpenMode,
DWORD nDefaultTimeOut, DWORD nDefaultTimeOut,
LPSECURITY_ATTRIBUTES lpSecurityAttributes) LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{ {
FIXME_(win32)("(Name=%s, OpenMode=%#08lx, dwPipeMode=%#08lx, MaxInst=%ld, OutBSize=%ld, InBuffSize=%ld, DefTimeOut=%ld, SecAttr=%p): stub\n", FIXME("(Name=%s, OpenMode=%#08lx, dwPipeMode=%#08lx, MaxInst=%ld, OutBSize=%ld, InBuffSize=%ld, DefTimeOut=%ld, SecAttr=%p): stub\n",
debugstr_a(lpName), dwOpenMode, dwPipeMode, nMaxInstances, debugstr_a(lpName), dwOpenMode, dwPipeMode, nMaxInstances,
nOutBufferSize, nInBufferSize, nDefaultTimeOut, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes);
lpSecurityAttributes);
/* if (nMaxInstances > PIPE_UNLIMITED_INSTANCES) { /* if (nMaxInstances > PIPE_UNLIMITED_INSTANCES) {
SetLastError (ERROR_INVALID_PARAMETER); SetLastError (ERROR_INVALID_PARAMETER);
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
@ -82,10 +81,9 @@ HANDLE WINAPI CreateNamedPipeW (LPCWSTR lpName, DWORD dwOpenMode,
DWORD nDefaultTimeOut, DWORD nDefaultTimeOut,
LPSECURITY_ATTRIBUTES lpSecurityAttributes) LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{ {
FIXME_(win32)("(Name=%s, OpenMode=%#08lx, dwPipeMode=%#08lx, MaxInst=%ld, OutBSize=%ld, InBuffSize=%ld, DefTimeOut=%ld, SecAttr=%p): stub\n", FIXME("(Name=%s, OpenMode=%#08lx, dwPipeMode=%#08lx, MaxInst=%ld, OutBSize=%ld, InBuffSize=%ld, DefTimeOut=%ld, SecAttr=%p): stub\n",
debugstr_w(lpName), dwOpenMode, dwPipeMode, nMaxInstances, debugstr_w(lpName), dwOpenMode, dwPipeMode, nMaxInstances,
nOutBufferSize, nInBufferSize, nDefaultTimeOut, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes);
lpSecurityAttributes);
SetLastError (ERROR_UNKNOWN); SetLastError (ERROR_UNKNOWN);
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
@ -128,7 +126,7 @@ BOOL WINAPI SetSystemPowerState(BOOL suspend_or_hibernate,
HANDLE WINAPI CreateMailslotA( LPCSTR lpName, DWORD nMaxMessageSize, HANDLE WINAPI CreateMailslotA( LPCSTR lpName, DWORD nMaxMessageSize,
DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa) DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa)
{ {
FIXME_(win32)("(%s,%ld,%ld,%p): stub\n", debugstr_a(lpName), FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_a(lpName),
nMaxMessageSize, lReadTimeout, sa); nMaxMessageSize, lReadTimeout, sa);
return 1; return 1;
} }
@ -150,7 +148,7 @@ HANDLE WINAPI CreateMailslotA( LPCSTR lpName, DWORD nMaxMessageSize,
HANDLE WINAPI CreateMailslotW( LPCWSTR lpName, DWORD nMaxMessageSize, HANDLE WINAPI CreateMailslotW( LPCWSTR lpName, DWORD nMaxMessageSize,
DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa ) DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa )
{ {
FIXME_(win32)("(%s,%ld,%ld,%p): stub\n", debugstr_w(lpName), FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_w(lpName),
nMaxMessageSize, lReadTimeout, sa); nMaxMessageSize, lReadTimeout, sa);
return 1; return 1;
} }
@ -174,7 +172,7 @@ BOOL WINAPI GetMailslotInfo( HANDLE hMailslot, LPDWORD lpMaxMessageSize,
LPDWORD lpNextSize, LPDWORD lpMessageCount, LPDWORD lpNextSize, LPDWORD lpMessageCount,
LPDWORD lpReadTimeout ) LPDWORD lpReadTimeout )
{ {
FIXME_(win32)("(%04x): stub\n",hMailslot); FIXME("(%04x): stub\n",hMailslot);
if (lpMaxMessageSize) *lpMaxMessageSize = (DWORD)NULL; if (lpMaxMessageSize) *lpMaxMessageSize = (DWORD)NULL;
if (lpNextSize) *lpNextSize = (DWORD)NULL; if (lpNextSize) *lpNextSize = (DWORD)NULL;
if (lpMessageCount) *lpMessageCount = (DWORD)NULL; if (lpMessageCount) *lpMessageCount = (DWORD)NULL;
@ -193,7 +191,7 @@ DWORD WINAPI GetCompressedFileSizeA(
LPCSTR lpFileName, LPCSTR lpFileName,
LPDWORD lpFileSizeHigh) LPDWORD lpFileSizeHigh)
{ {
FIXME_(win32)("(...): stub\n"); FIXME("(...): stub\n");
return 0xffffffff; return 0xffffffff;
} }
@ -209,7 +207,7 @@ DWORD WINAPI GetCompressedFileSizeW(
LPCWSTR lpFileName, /* [in] Pointer to name of file */ LPCWSTR lpFileName, /* [in] Pointer to name of file */
LPDWORD lpFileSizeHigh) /* [out] Receives high-order doubleword of size */ LPDWORD lpFileSizeHigh) /* [out] Receives high-order doubleword of size */
{ {
FIXME_(win32)("(%s,%p): stub\n",debugstr_w(lpFileName),lpFileSizeHigh); FIXME("(%s,%p): stub\n",debugstr_w(lpFileName),lpFileSizeHigh);
return 0xffffffff; return 0xffffffff;
} }
@ -226,7 +224,7 @@ DWORD WINAPI GetCompressedFileSizeW(
*/ */
DWORD WINAPI GetProcessWindowStation(void) DWORD WINAPI GetProcessWindowStation(void)
{ {
FIXME_(win32)("(void): stub\n"); FIXME("(void): stub\n");
return 1; return 1;
} }
@ -246,7 +244,7 @@ DWORD WINAPI GetProcessWindowStation(void)
*/ */
DWORD WINAPI GetThreadDesktop( DWORD dwThreadId ) DWORD WINAPI GetThreadDesktop( DWORD dwThreadId )
{ {
FIXME_(win32)("(%lx): stub\n",dwThreadId); FIXME("(%lx): stub\n",dwThreadId);
return 1; return 1;
} }
@ -260,7 +258,7 @@ DWORD WINAPI GetThreadDesktop( DWORD dwThreadId )
*/ */
VOID WINAPI SetDebugErrorLevel( DWORD dwLevel ) VOID WINAPI SetDebugErrorLevel( DWORD dwLevel )
{ {
FIXME_(win32)("(%ld): stub\n", dwLevel); FIXME("(%ld): stub\n", dwLevel);
} }
@ -286,13 +284,13 @@ BOOL WINAPI SetComputerNameA( LPCSTR lpComputerName )
*/ */
BOOL WINAPI SetComputerNameW( LPCWSTR lpComputerName ) BOOL WINAPI SetComputerNameW( LPCWSTR lpComputerName )
{ {
FIXME_(win32)("(%s): stub\n", debugstr_w(lpComputerName)); FIXME("(%s): stub\n", debugstr_w(lpComputerName));
return TRUE; return TRUE;
} }
BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE ports,DWORD bufsize,LPDWORD bufneeded,LPDWORD bufreturned) { BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE ports,DWORD bufsize,LPDWORD bufneeded,LPDWORD bufreturned) {
FIXME_(win32)("(%s,%ld,%p,%ld,%p,%p), stub!\n",name,level,ports,bufsize,bufneeded,bufreturned); FIXME("(%s,%ld,%p,%ld,%p,%p), stub!\n",name,level,ports,bufsize,bufneeded,bufreturned);
return FALSE; return FALSE;
} }
@ -301,7 +299,7 @@ BOOL WINAPI EnumPortsA(LPSTR name,DWORD level,LPBYTE ports,DWORD bufsize,LPDWORD
* *
*/ */
BOOL WINAPI IsDebuggerPresent() { BOOL WINAPI IsDebuggerPresent() {
FIXME_(win32)(" ... no debuggers yet, returning FALSE.\n"); FIXME(" ... no debuggers yet, returning FALSE.\n");
return FALSE; return FALSE;
} }
@ -316,7 +314,7 @@ BOOL WINAPI IsDebuggerPresent() {
HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags, HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
BOOL fInherit, DWORD dwDesiredAccess ) BOOL fInherit, DWORD dwDesiredAccess )
{ {
FIXME_(win32)("(%s,%lx,%i,%lx): stub\n",debugstr_a(lpszDesktop),dwFlags, FIXME("(%s,%lx,%i,%lx): stub\n",debugstr_a(lpszDesktop),dwFlags,
fInherit,dwDesiredAccess); fInherit,dwDesiredAccess);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -327,14 +325,14 @@ HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, int nIndex, BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, int nIndex,
LPVOID pvInfo, DWORD nLength ) LPVOID pvInfo, DWORD nLength )
{ {
FIXME_(win32)("(%x,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength); FIXME("(%x,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength);
return TRUE; return TRUE;
} }
BOOL WINAPI SetThreadDesktop( HANDLE hDesktop ) BOOL WINAPI SetThreadDesktop( HANDLE hDesktop )
{ {
FIXME_(win32)("(%x): stub\n",hDesktop); FIXME("(%x): stub\n",hDesktop);
return TRUE; return TRUE;
} }
@ -342,7 +340,7 @@ HANDLE WINAPI CreateIoCompletionPort(HANDLE hFileHandle,
HANDLE hExistingCompletionPort, DWORD dwCompletionKey, HANDLE hExistingCompletionPort, DWORD dwCompletionKey,
DWORD dwNumberOfConcurrentThreads) DWORD dwNumberOfConcurrentThreads)
{ {
FIXME_(win32)("(%04x, %04x, %08lx, %08lx): stub.\n", hFileHandle, hExistingCompletionPort, dwCompletionKey, dwNumberOfConcurrentThreads); FIXME("(%04x, %04x, %08lx, %08lx): stub.\n", hFileHandle, hExistingCompletionPort, dwCompletionKey, dwNumberOfConcurrentThreads);
return (HANDLE)NULL; return (HANDLE)NULL;
} }

View File

@ -25,8 +25,8 @@
#include "struct32.h" #include "struct32.h"
#include "winerror.h" #include "winerror.h"
DEFAULT_DEBUG_CHANNEL(keyboard)
DECLARE_DEBUG_CHANNEL(event) DECLARE_DEBUG_CHANNEL(event)
DECLARE_DEBUG_CHANNEL(keyboard)
/**********************************************************************/ /**********************************************************************/
@ -137,7 +137,7 @@ void KEYBOARD_SendEvent( BYTE bVk, BYTE bScan, DWORD dwFlags,
*/ */
WORD WINAPI SetSpeed16(WORD unused) WORD WINAPI SetSpeed16(WORD unused)
{ {
FIXME_(keyboard)("(%04x): stub\n",unused); FIXME("(%04x): stub\n", unused);
return 0xffff; return 0xffff;
} }
@ -146,7 +146,7 @@ WORD WINAPI SetSpeed16(WORD unused)
*/ */
VOID WINAPI ScreenSwitchEnable16(WORD unused) VOID WINAPI ScreenSwitchEnable16(WORD unused)
{ {
FIXME_(keyboard)("(%04x): stub\n",unused); FIXME("(%04x): stub\n", unused);
} }
/********************************************************************** /**********************************************************************
@ -154,7 +154,7 @@ VOID WINAPI ScreenSwitchEnable16(WORD unused)
*/ */
DWORD WINAPI OemKeyScan(WORD wOemChar) DWORD WINAPI OemKeyScan(WORD wOemChar)
{ {
TRACE_(keyboard)("*OemKeyScan (%d)\n",wOemChar); TRACE("*OemKeyScan (%d)\n", wOemChar);
return wOemChar; return wOemChar;
} }
@ -187,7 +187,7 @@ WORD WINAPI VkKeyScan16(CHAR cChar)
*/ */
INT16 WINAPI GetKeyboardType16(INT16 nTypeFlag) INT16 WINAPI GetKeyboardType16(INT16 nTypeFlag)
{ {
TRACE_(keyboard)("(%d)\n",nTypeFlag); TRACE("(%d)\n", nTypeFlag);
switch(nTypeFlag) switch(nTypeFlag)
{ {
case 0: /* Keyboard type */ case 0: /* Keyboard type */
@ -200,7 +200,7 @@ INT16 WINAPI GetKeyboardType16(INT16 nTypeFlag)
return 12; /* We're doing an 101 for now, so return 12 F-keys */ return 12; /* We're doing an 101 for now, so return 12 F-keys */
break; break;
default: default:
WARN_(keyboard)("Unknown type\n"); WARN("Unknown type\n");
return 0; /* The book says 0 here, so 0 */ return 0; /* The book says 0 here, so 0 */
} }
} }
@ -220,7 +220,7 @@ UINT16 WINAPI MapVirtualKey16(UINT16 wCode, UINT16 wMapType)
*/ */
INT16 WINAPI GetKBCodePage16(void) INT16 WINAPI GetKBCodePage16(void)
{ {
TRACE_(keyboard)("(void)\n"); TRACE("(void)\n");
return 850; return 850;
} }

View File

@ -29,8 +29,8 @@
#include "struct32.h" #include "struct32.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(msg)
DECLARE_DEBUG_CHANNEL(key) DECLARE_DEBUG_CHANNEL(key)
DECLARE_DEBUG_CHANNEL(msg)
DECLARE_DEBUG_CHANNEL(sendmsg) DECLARE_DEBUG_CHANNEL(sendmsg)
#define WM_NCMOUSEFIRST WM_NCMOUSEMOVE #define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
@ -1343,8 +1343,8 @@ BOOL16 WINAPI GetMessage16( SEGPTR msg, HWND16 hwnd, UINT16 first, UINT16 last)
STRUCT32_MSG32to16( &msg32, lpmsg ); STRUCT32_MSG32to16( &msg32, lpmsg );
TRACE_(msg)("message %04x, hwnd %04x, filter(%04x - %04x)\n", lpmsg->message, TRACE("message %04x, hwnd %04x, filter(%04x - %04x)\n",
hwnd, first, last ); lpmsg->message, hwnd, first, last );
return ret; return ret;
} }
@ -1389,7 +1389,7 @@ BOOL WINAPI GetMessageA(MSG* lpmsg,HWND hwnd,UINT min,UINT max)
{ {
MSG_PeekMessage( lpmsg, hwnd, min, max, PM_REMOVE, FALSE ); MSG_PeekMessage( lpmsg, hwnd, min, max, PM_REMOVE, FALSE );
TRACE_(msg)("message %04x, hwnd %04x, filter(%04x - %04x)\n", lpmsg->message, TRACE("message %04x, hwnd %04x, filter(%04x - %04x)\n", lpmsg->message,
hwnd, min, max ); hwnd, min, max );
HOOK_CallHooksA( WH_GETMESSAGE, HC_ACTION, 0, (LPARAM)lpmsg ); HOOK_CallHooksA( WH_GETMESSAGE, HC_ACTION, 0, (LPARAM)lpmsg );
@ -1433,7 +1433,8 @@ BOOL WINAPI GetMessageW(
{ {
BOOL bRet = GetMessageA(lpmsg, hwnd, min, max); BOOL bRet = GetMessageA(lpmsg, hwnd, min, max);
if (bRet) if (bRet)
FIXME_(sendmsg)("(%s) unicode<->ascii\n", SPY_GetMsgName(lpmsg->message)); FIXME_(sendmsg)("(%s) unicode<->ascii\n",
SPY_GetMsgName(lpmsg->message));
return bRet; return bRet;
} }
@ -1470,19 +1471,19 @@ BOOL WINAPI PostMessageA( HWND hwnd, UINT message, WPARAM wParam,
if (hwnd == HWND_BROADCAST) if (hwnd == HWND_BROADCAST)
{ {
WND *pDesktop = WIN_GetDesktop(); WND *pDesktop = WIN_GetDesktop();
TRACE_(msg)("HWND_BROADCAST !\n"); TRACE("HWND_BROADCAST !\n");
for (wndPtr=WIN_LockWndPtr(pDesktop->child); wndPtr; WIN_UpdateWndPtr(&wndPtr,wndPtr->next)) for (wndPtr=WIN_LockWndPtr(pDesktop->child); wndPtr; WIN_UpdateWndPtr(&wndPtr,wndPtr->next))
{ {
if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION) if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION)
{ {
TRACE_(msg)("BROADCAST Message to hWnd=%04x m=%04X w=%04X l=%08lX !\n", TRACE("BROADCAST Message to hWnd=%04x m=%04X w=%04X l=%08lX !\n",
wndPtr->hwndSelf, message, wParam, lParam); wndPtr->hwndSelf, message, wParam, lParam);
PostMessageA( wndPtr->hwndSelf, message, wParam, lParam ); PostMessageA( wndPtr->hwndSelf, message, wParam, lParam );
} }
} }
WIN_ReleaseDesktop(); WIN_ReleaseDesktop();
TRACE_(msg)("End of HWND_BROADCAST !\n"); TRACE("End of HWND_BROADCAST !\n");
return TRUE; return TRUE;
} }
@ -1580,22 +1581,22 @@ static LRESULT MSG_SendMessage( HWND hwnd, UINT msg, WPARAM wParam,
} }
WIN_ReleaseDesktop(); WIN_ReleaseDesktop();
TRACE_(msg)("HWND_BROADCAST !\n"); TRACE("HWND_BROADCAST !\n");
for (ppWnd = list; *ppWnd; ppWnd++) for (ppWnd = list; *ppWnd; ppWnd++)
{ {
WIN_UpdateWndPtr(&wndPtr,*ppWnd); WIN_UpdateWndPtr(&wndPtr,*ppWnd);
if (!IsWindow(wndPtr->hwndSelf)) continue; if (!IsWindow(wndPtr->hwndSelf)) continue;
if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION) if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION)
{ {
TRACE_(msg)("BROADCAST Message to hWnd=%04x m=%04X w=%04lX l=%08lX !\n", TRACE("BROADCAST Message to hWnd=%04x m=%04X w=%04lX l=%08lX !\n",
wndPtr->hwndSelf, msg, (DWORD)wParam, lParam); wndPtr->hwndSelf, msg, (DWORD)wParam, lParam);
MSG_SendMessage( wndPtr->hwndSelf, msg, wParam, lParam, MSG_SendMessage( wndPtr->hwndSelf, msg, wParam, lParam,
timeout, flags, pRes); timeout, flags, pRes);
} }
} }
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
WIN_ReleaseWinArray(list); WIN_ReleaseWinArray(list);
TRACE_(msg)("End of HWND_BROADCAST !\n"); TRACE("End of HWND_BROADCAST !\n");
return 1; return 1;
} }
@ -1628,7 +1629,7 @@ static LRESULT MSG_SendMessage( HWND hwnd, UINT msg, WPARAM wParam,
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) if (!(wndPtr = WIN_FindWndPtr( hwnd )))
{ {
WARN_(msg)("invalid hwnd %04x\n", hwnd ); WARN("invalid hwnd %04x\n", hwnd );
return 0; return 0;
} }
if (QUEUE_IsExitingQueue(wndPtr->hmemTaskQ)) if (QUEUE_IsExitingQueue(wndPtr->hmemTaskQ))
@ -2082,7 +2083,7 @@ static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd,
BYTE wp[2]; BYTE wp[2];
if (message != WM_MOUSEMOVE && message != WM_TIMER) if (message != WM_MOUSEMOVE && message != WM_TIMER)
TRACE_(msg)("(%s, %04X, %08lX)\n", TRACE("(%s, %04X, %08lX)\n",
SPY_GetMsgName(message), wParam, lParam ); SPY_GetMsgName(message), wParam, lParam );
if(message >= WM_KEYFIRST && message <= WM_KEYLAST) if(message >= WM_KEYFIRST && message <= WM_KEYLAST)
TRACE_(key)("(%s, %04X, %08lX)\n", TRACE_(key)("(%s, %04X, %08lX)\n",
@ -2214,7 +2215,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
if (painting && wndPtr && if (painting && wndPtr &&
(wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) (wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate)
{ {
ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n", ERR("BeginPaint not called on WM_PAINT for hwnd %04x!\n",
msg->hwnd); msg->hwnd);
wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT;
/* Validate the update region to avoid infinite WM_PAINT loop */ /* Validate the update region to avoid infinite WM_PAINT loop */
@ -2292,7 +2293,7 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
if (painting && wndPtr && if (painting && wndPtr &&
(wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) (wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate)
{ {
ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n", ERR("BeginPaint not called on WM_PAINT for hwnd %04x!\n",
msg->hwnd); msg->hwnd);
wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT;
/* Validate the update region to avoid infinite WM_PAINT loop */ /* Validate the update region to avoid infinite WM_PAINT loop */
@ -2366,7 +2367,7 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
if (painting && wndPtr && if (painting && wndPtr &&
(wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) (wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate)
{ {
ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n", ERR("BeginPaint not called on WM_PAINT for hwnd %04x!\n",
msg->hwnd); msg->hwnd);
wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT;
/* Validate the update region to avoid infinite WM_PAINT loop */ /* Validate the update region to avoid infinite WM_PAINT loop */
@ -2383,7 +2384,7 @@ END:
*/ */
WORD WINAPI RegisterWindowMessage16( SEGPTR str ) WORD WINAPI RegisterWindowMessage16( SEGPTR str )
{ {
TRACE_(msg)("%08lx\n", (DWORD)str ); TRACE("%08lx\n", (DWORD)str );
return GlobalAddAtom16( str ); return GlobalAddAtom16( str );
} }
@ -2393,7 +2394,7 @@ WORD WINAPI RegisterWindowMessage16( SEGPTR str )
*/ */
WORD WINAPI RegisterWindowMessageA( LPCSTR str ) WORD WINAPI RegisterWindowMessageA( LPCSTR str )
{ {
TRACE_(msg)("%s\n", str ); TRACE("%s\n", str );
return GlobalAddAtomA( str ); return GlobalAddAtomA( str );
} }
@ -2403,7 +2404,7 @@ WORD WINAPI RegisterWindowMessageA( LPCSTR str )
*/ */
WORD WINAPI RegisterWindowMessageW( LPCWSTR str ) WORD WINAPI RegisterWindowMessageW( LPCWSTR str )
{ {
TRACE_(msg)("%p\n", str ); TRACE("%p\n", str );
return GlobalAddAtomW( str ); return GlobalAddAtomW( str );
} }
@ -2484,7 +2485,7 @@ LONG WINAPI BroadcastSystemMessage(
*/ */
BOOL WINAPI SendNotifyMessageA(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) BOOL WINAPI SendNotifyMessageA(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
{ BOOL ret = TRUE; { BOOL ret = TRUE;
FIXME_(msg)("(%04x,%08x,%08x,%08lx) not complete\n", FIXME("(%04x,%08x,%08x,%08lx) not complete\n",
hwnd, msg, wParam, lParam); hwnd, msg, wParam, lParam);
if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL)) if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL))
@ -2505,7 +2506,7 @@ BOOL WINAPI SendNotifyMessageA(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
*/ */
BOOL WINAPI SendNotifyMessageW(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) BOOL WINAPI SendNotifyMessageW(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
{ BOOL ret = TRUE; { BOOL ret = TRUE;
FIXME_(msg)("(%04x,%08x,%08x,%08lx) not complete\n", FIXME("(%04x,%08x,%08x,%08lx) not complete\n",
hwnd, msg, wParam, lParam); hwnd, msg, wParam, lParam);
if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL)) if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL))
@ -2527,11 +2528,11 @@ BOOL WINAPI SendMessageCallbackA(
HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam, HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,
FARPROC lpResultCallBack,DWORD dwData) FARPROC lpResultCallBack,DWORD dwData)
{ {
FIXME_(msg)("(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!\n", FIXME("(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!\n",
hWnd,Msg,wParam,lParam,lpResultCallBack,dwData); hWnd,Msg,wParam,lParam,lpResultCallBack,dwData);
if ( hWnd == HWND_BROADCAST) if ( hWnd == HWND_BROADCAST)
{ PostMessageA( hWnd, Msg, wParam, lParam); { PostMessageA( hWnd, Msg, wParam, lParam);
FIXME_(msg)("Broadcast: Callback will not be called!\n"); FIXME("Broadcast: Callback will not be called!\n");
return TRUE; return TRUE;
} }
(lpResultCallBack)( hWnd, Msg, dwData, SendMessageA ( hWnd, Msg, wParam, lParam )); (lpResultCallBack)( hWnd, Msg, dwData, SendMessageA ( hWnd, Msg, wParam, lParam ));
@ -2547,11 +2548,11 @@ BOOL WINAPI SendMessageCallbackW(
HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam, HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,
FARPROC lpResultCallBack,DWORD dwData) FARPROC lpResultCallBack,DWORD dwData)
{ {
FIXME_(msg)("(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!\n", FIXME("(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!\n",
hWnd,Msg,wParam,lParam,lpResultCallBack,dwData); hWnd,Msg,wParam,lParam,lpResultCallBack,dwData);
if ( hWnd == HWND_BROADCAST) if ( hWnd == HWND_BROADCAST)
{ PostMessageW( hWnd, Msg, wParam, lParam); { PostMessageW( hWnd, Msg, wParam, lParam);
FIXME_(msg)("Broadcast: Callback will not be called!\n"); FIXME("Broadcast: Callback will not be called!\n");
return TRUE; return TRUE;
} }
(lpResultCallBack)( hWnd, Msg, dwData, SendMessageA ( hWnd, Msg, wParam, lParam )); (lpResultCallBack)( hWnd, Msg, dwData, SendMessageA ( hWnd, Msg, wParam, lParam ));

View File

@ -28,7 +28,7 @@
#include "cache.h" #include "cache.h"
#include "bitmap.h" #include "bitmap.h"
DECLARE_DEBUG_CHANNEL(nonclient) DEFAULT_DEBUG_CHANNEL(nonclient)
DECLARE_DEBUG_CHANNEL(shell) DECLARE_DEBUG_CHANNEL(shell)
BOOL NC_DrawGrayButton(HDC hdc, int x, int y); BOOL NC_DrawGrayButton(HDC hdc, int x, int y);
@ -115,7 +115,7 @@ static void NC_AdjustRect( LPRECT16 rect, DWORD style, BOOL menu,
DWORD exStyle ) DWORD exStyle )
{ {
if (TWEAK_WineLook > WIN31_LOOK) if (TWEAK_WineLook > WIN31_LOOK)
ERR_(nonclient)("Called in Win95 mode. Aiee! Please report this.\n" ); ERR("Called in Win95 mode. Aiee! Please report this.\n" );
if(style & WS_ICONIC) return; if(style & WS_ICONIC) return;
/* Decide if the window will be managed (see CreateWindowEx) */ /* Decide if the window will be managed (see CreateWindowEx) */
@ -340,8 +340,8 @@ DrawCaptionTempA (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
{ {
RECT rc = *rect; RECT rc = *rect;
TRACE_(nonclient)("(%08x,%08x,%p,%08x,%08x,\"%s\",%08x)\n", TRACE("(%08x,%08x,%p,%08x,%08x,\"%s\",%08x)\n",
hwnd, hdc, rect, hFont, hIcon, str, uFlags); hwnd, hdc, rect, hFont, hIcon, str, uFlags);
/* drawing background */ /* drawing background */
if (uFlags & DC_INBUTTON) { if (uFlags & DC_INBUTTON) {
@ -426,7 +426,7 @@ DrawCaptionTempA (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
/* drawing focus ??? */ /* drawing focus ??? */
if (uFlags & 0x2000) if (uFlags & 0x2000)
FIXME_(nonclient)("undocumented flag (0x2000)!\n"); FIXME("undocumented flag (0x2000)!\n");
return 0; return 0;
} }
@ -486,9 +486,9 @@ BOOL16 WINAPI AdjustWindowRectEx16( LPRECT16 rect, DWORD style,
WS_EX_STATICEDGE | WS_EX_TOOLWINDOW); WS_EX_STATICEDGE | WS_EX_TOOLWINDOW);
if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME; if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME;
TRACE_(nonclient)("(%d,%d)-(%d,%d) %08lx %d %08lx\n", TRACE("(%d,%d)-(%d,%d) %08lx %d %08lx\n",
rect->left, rect->top, rect->right, rect->bottom, rect->left, rect->top, rect->right, rect->bottom,
style, menu, exStyle ); style, menu, exStyle );
if (TWEAK_WineLook == WIN31_LOOK) if (TWEAK_WineLook == WIN31_LOOK)
NC_AdjustRect( rect, style, menu, exStyle ); NC_AdjustRect( rect, style, menu, exStyle );
@ -543,11 +543,10 @@ LONG NC_HandleNCCalcSize( WND *pWnd, RECT *winRect )
winRect->bottom -= tmpRect.bottom; winRect->bottom -= tmpRect.bottom;
if (HAS_MENU(pWnd)) { if (HAS_MENU(pWnd)) {
TRACE_(nonclient)("Calling " TRACE("Calling GetMenuBarHeight with HWND 0x%x, width %d, "
"GetMenuBarHeight with HWND 0x%x, width %d, " "at (%d, %d).\n", pWnd->hwndSelf,
"at (%d, %d).\n", pWnd->hwndSelf, winRect->right - winRect->left,
winRect->right - winRect->left, -tmpRect.left, -tmpRect.top );
-tmpRect.left, -tmpRect.top );
winRect->top += winRect->top +=
MENU_GetMenuBarHeight( pWnd->hwndSelf, MENU_GetMenuBarHeight( pWnd->hwndSelf,
@ -665,8 +664,7 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt )
{ {
RECT16 rect; RECT16 rect;
TRACE_(nonclient)("hwnd=%04x pt=%d,%d\n", TRACE("hwnd=%04x pt=%d,%d\n", wndPtr->hwndSelf, pt.x, pt.y );
wndPtr->hwndSelf, pt.x, pt.y );
GetWindowRect16 (wndPtr->hwndSelf, &rect ); GetWindowRect16 (wndPtr->hwndSelf, &rect );
if (!PtInRect16( &rect, pt )) return HTNOWHERE; if (!PtInRect16( &rect, pt )) return HTNOWHERE;
@ -801,8 +799,7 @@ NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt )
{ {
RECT16 rect; RECT16 rect;
TRACE_(nonclient)("hwnd=%04x pt=%d,%d\n", TRACE("hwnd=%04x pt=%d,%d\n", wndPtr->hwndSelf, pt.x, pt.y );
wndPtr->hwndSelf, pt.x, pt.y );
GetWindowRect16 (wndPtr->hwndSelf, &rect ); GetWindowRect16 (wndPtr->hwndSelf, &rect );
if (!PtInRect16( &rect, pt )) return HTNOWHERE; if (!PtInRect16( &rect, pt )) return HTNOWHERE;
@ -1280,7 +1277,7 @@ static void NC_DrawFrame( HDC hdc, RECT *rect, BOOL dlgFrame,
INT width, height; INT width, height;
if (TWEAK_WineLook != WIN31_LOOK) if (TWEAK_WineLook != WIN31_LOOK)
ERR_(nonclient)("Called in Win95 mode. Aiee! Please report this.\n" ); ERR("Called in Win95 mode. Aiee! Please report this.\n" );
if (dlgFrame) if (dlgFrame)
{ {
@ -1651,7 +1648,7 @@ static void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint )
active = wndPtr->flags & WIN_NCACTIVATED; active = wndPtr->flags & WIN_NCACTIVATED;
TRACE_(nonclient)("%04x %d\n", hwnd, active ); TRACE("%04x %d\n", hwnd, active );
if (!(hdc = GetDCEx( hwnd, (clip > 1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW | if (!(hdc = GetDCEx( hwnd, (clip > 1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW |
((clip > 1) ? (DCX_INTERSECTRGN | DCX_KEEPCLIPRGN): 0) ))) return; ((clip > 1) ? (DCX_INTERSECTRGN | DCX_KEEPCLIPRGN): 0) ))) return;
@ -1766,12 +1763,13 @@ static void NC_DoNCPaint95(
active = wndPtr->flags & WIN_NCACTIVATED; active = wndPtr->flags & WIN_NCACTIVATED;
TRACE_(nonclient)("%04x %d\n", hwnd, active ); TRACE("%04x %d\n", hwnd, active );
/* MSDN docs are pretty idiotic here, they say app CAN use clipRgn in the call to /* MSDN docs are pretty idiotic here, they say app CAN use clipRgn in
* GetDCEx implying that it is allowed not to use it either. However, the suggested the call to GetDCEx implying that it is allowed not to use it either.
* GetDCEx( , DCX_WINDOW | DCX_INTERSECTRGN) will cause clipRgn to be deleted However, the suggested GetDCEx( , DCX_WINDOW | DCX_INTERSECTRGN)
* after ReleaseDC(). Now, how is the "system" supposed to tell what happened? will cause clipRgn to be deleted after ReleaseDC().
Now, how is the "system" supposed to tell what happened?
*/ */
if (!(hdc = GetDCEx( hwnd, (clip > 1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW | if (!(hdc = GetDCEx( hwnd, (clip > 1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW |
@ -1837,15 +1835,14 @@ static void NC_DoNCPaint95(
RECT r = rect; RECT r = rect;
r.bottom = rect.top + GetSystemMetrics(SM_CYMENU); r.bottom = rect.top + GetSystemMetrics(SM_CYMENU);
TRACE_(nonclient)("Calling DrawMenuBar with " TRACE("Calling DrawMenuBar with rect (%d, %d)-(%d, %d)\n",
"rect (%d, %d)-(%d, %d)\n", r.left, r.top, r.left, r.top, r.right, r.bottom);
r.right, r.bottom);
rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ) + 1; rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ) + 1;
} }
TRACE_(nonclient)("After MenuBar, rect is (%d, %d)-(%d, %d).\n", TRACE("After MenuBar, rect is (%d, %d)-(%d, %d).\n",
rect.left, rect.top, rect.right, rect.bottom ); rect.left, rect.top, rect.right, rect.bottom );
if (wndPtr->dwExStyle & WS_EX_CLIENTEDGE) if (wndPtr->dwExStyle & WS_EX_CLIENTEDGE)
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST); DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
@ -2715,8 +2712,7 @@ LONG NC_HandleSysCommand( HWND hwnd, WPARAM16 wParam, POINT16 pt )
POINT pt32; POINT pt32;
UINT16 uCommand = wParam & 0xFFF0; UINT16 uCommand = wParam & 0xFFF0;
TRACE_(nonclient)("Handling WM_SYSCOMMAND %x %d,%d\n", TRACE("Handling WM_SYSCOMMAND %x %d,%d\n", wParam, pt.x, pt.y );
wParam, pt.x, pt.y );
if (wndPtr->dwStyle & WS_CHILD && uCommand != SC_KEYMENU ) if (wndPtr->dwStyle & WS_CHILD && uCommand != SC_KEYMENU )
ScreenToClient16( wndPtr->parent->hwndSelf, &pt ); ScreenToClient16( wndPtr->parent->hwndSelf, &pt );
@ -2781,7 +2777,7 @@ LONG NC_HandleSysCommand( HWND hwnd, WPARAM16 wParam, POINT16 pt )
case SC_ARRANGE: case SC_ARRANGE:
case SC_NEXTWINDOW: case SC_NEXTWINDOW:
case SC_PREVWINDOW: case SC_PREVWINDOW:
FIXME_(nonclient)("unimplemented!\n"); FIXME("unimplemented!\n");
break; break;
} }
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);

View File

@ -14,8 +14,8 @@
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "cache.h" #include "cache.h"
DEFAULT_DEBUG_CHANNEL(win)
DECLARE_DEBUG_CHANNEL(nonclient) DECLARE_DEBUG_CHANNEL(nonclient)
DECLARE_DEBUG_CHANNEL(win)
/* client rect in window coordinates */ /* client rect in window coordinates */
@ -294,7 +294,7 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
HideCaret( hwnd ); HideCaret( hwnd );
TRACE_(win)("hrgnUpdate = %04x, \n", hrgnUpdate); TRACE("hrgnUpdate = %04x, \n", hrgnUpdate);
if (GetClassWord16(wndPtr->hwndSelf, GCW_STYLE) & CS_PARENTDC) if (GetClassWord16(wndPtr->hwndSelf, GCW_STYLE) & CS_PARENTDC)
{ {
@ -314,11 +314,11 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
/* ReleaseDC() in EndPaint() will delete the region */ /* ReleaseDC() in EndPaint() will delete the region */
} }
TRACE_(win)("hdc = %04x\n", lps->hdc); TRACE("hdc = %04x\n", lps->hdc);
if (!lps->hdc) if (!lps->hdc)
{ {
WARN_(win)("GetDCEx() failed in BeginPaint(), hwnd=%04x\n", hwnd); WARN("GetDCEx() failed in BeginPaint(), hwnd=%04x\n", hwnd);
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
return 0; return 0;
} }
@ -336,7 +336,7 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
IntersectRect16(&lps->rcPaint, &clientRect, &clipRect); IntersectRect16(&lps->rcPaint, &clientRect, &clipRect);
TRACE_(win)("box = (%i,%i - %i,%i)\n", lps->rcPaint.left, lps->rcPaint.top, TRACE("box = (%i,%i - %i,%i)\n", lps->rcPaint.left, lps->rcPaint.top,
lps->rcPaint.right, lps->rcPaint.bottom ); lps->rcPaint.right, lps->rcPaint.bottom );
if (wndPtr->flags & WIN_NEEDS_ERASEBKGND) if (wndPtr->flags & WIN_NEEDS_ERASEBKGND)
@ -546,7 +546,7 @@ static void RDW_UpdateRgns( WND* wndPtr, HRGN hRgn, UINT flags, BOOL firstRecurs
r.right = wndPtr->rectWindow.right - wndPtr->rectWindow.left; r.right = wndPtr->rectWindow.right - wndPtr->rectWindow.left;
r.bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top; r.bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top;
TRACE_(win)("\thwnd %04x [%04x] -> hrgn [%04x], flags [%04x]\n", wndPtr->hwndSelf, wndPtr->hrgnUpdate, hRgn, flags ); TRACE("\thwnd %04x [%04x] -> hrgn [%04x], flags [%04x]\n", wndPtr->hwndSelf, wndPtr->hrgnUpdate, hRgn, flags );
if( flags & RDW_INVALIDATE ) if( flags & RDW_INVALIDATE )
{ {
@ -735,7 +735,7 @@ static HRGN RDW_Paint( WND* wndPtr, HRGN hrgn, UINT flags, UINT ex )
/* Erase/update the window itself ... */ /* Erase/update the window itself ... */
TRACE_(win)("\thwnd %04x [%04x] -> hrgn [%04x], flags [%04x]\n", hWnd, wndPtr->hrgnUpdate, hrgn, flags ); TRACE("\thwnd %04x [%04x] -> hrgn [%04x], flags [%04x]\n", hWnd, wndPtr->hrgnUpdate, hrgn, flags );
/* /*
* Check if this window should delay it's processing of WM_NCPAINT. * Check if this window should delay it's processing of WM_NCPAINT.
@ -840,7 +840,7 @@ BOOL PAINT_RedrawWindow( HWND hwnd, const RECT *rectUpdate,
if( hrgnUpdate ) if( hrgnUpdate )
{ {
GetRgnBox( hrgnUpdate, &r ); GetRgnBox( hrgnUpdate, &r );
TRACE_(win)( "%04x (%04x) NULL %04x box (%i,%i-%i,%i) flags=%04x, exflags=%04x\n", TRACE( "%04x (%04x) NULL %04x box (%i,%i-%i,%i) flags=%04x, exflags=%04x\n",
hwnd, wndPtr->hrgnUpdate, hrgnUpdate, r.left, r.top, r.right, r.bottom, flags, ex); hwnd, wndPtr->hrgnUpdate, hrgnUpdate, r.left, r.top, r.right, r.bottom, flags, ex);
} }
else else
@ -849,7 +849,7 @@ BOOL PAINT_RedrawWindow( HWND hwnd, const RECT *rectUpdate,
r = *rectUpdate; r = *rectUpdate;
else else
SetRectEmpty( &r ); SetRectEmpty( &r );
TRACE_(win)( "%04x (%04x) %s %d,%d-%d,%d %04x flags=%04x, exflags=%04x\n", TRACE( "%04x (%04x) %s %d,%d-%d,%d %04x flags=%04x, exflags=%04x\n",
hwnd, wndPtr->hrgnUpdate, rectUpdate ? "rect" : "NULL", r.left, hwnd, wndPtr->hrgnUpdate, rectUpdate ? "rect" : "NULL", r.left,
r.top, r.right, r.bottom, hrgnUpdate, flags, ex ); r.top, r.right, r.bottom, hrgnUpdate, flags, ex );
} }

View File

@ -34,8 +34,8 @@
#include "stackframe.h" #include "stackframe.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win)
DECLARE_DEBUG_CHANNEL(msg) DECLARE_DEBUG_CHANNEL(msg)
DECLARE_DEBUG_CHANNEL(win)
/**********************************************************************/ /**********************************************************************/
@ -128,7 +128,7 @@ WND * WIN_FindWndPtr( HWND hwnd )
if (ptr->dwMagic != WND_MAGIC) goto error; if (ptr->dwMagic != WND_MAGIC) goto error;
if (ptr->hwndSelf != hwnd) if (ptr->hwndSelf != hwnd)
{ {
ERR_(win)("Can't happen: hwnd %04x self pointer is %04x\n",hwnd, ptr->hwndSelf ); ERR("Can't happen: hwnd %04x self pointer is %04x\n",hwnd, ptr->hwndSelf );
goto error; goto error;
} }
/* returns a locked pointer */ /* returns a locked pointer */
@ -186,7 +186,7 @@ void WIN_ReleaseWndPtr(WND *wndPtr)
else if(wndPtr->irefCount < 0) else if(wndPtr->irefCount < 0)
{ {
/* This else if is useful to monitor the WIN_ReleaseWndPtr function */ /* This else if is useful to monitor the WIN_ReleaseWndPtr function */
ERR_(win)("forgot a Lock on %p somewhere\n",wndPtr); ERR("forgot a Lock on %p somewhere\n",wndPtr);
} }
/*unlock all WND structures for thread safeness*/ /*unlock all WND structures for thread safeness*/
WIN_UnlockWnds(); WIN_UnlockWnds();
@ -220,14 +220,14 @@ void WIN_DumpWindow( HWND hwnd )
if (!(ptr = WIN_FindWndPtr( hwnd ))) if (!(ptr = WIN_FindWndPtr( hwnd )))
{ {
WARN_(win)("%04x is not a window handle\n", hwnd ); WARN("%04x is not a window handle\n", hwnd );
return; return;
} }
if (!GetClassNameA( hwnd, className, sizeof(className ) )) if (!GetClassNameA( hwnd, className, sizeof(className ) ))
strcpy( className, "#NULL#" ); strcpy( className, "#NULL#" );
TRACE_(win)("Window %04x (%p):\n", hwnd, ptr ); TRACE("Window %04x (%p):\n", hwnd, ptr );
DPRINTF( "next=%p child=%p parent=%p owner=%p class=%p '%s'\n" DPRINTF( "next=%p child=%p parent=%p owner=%p class=%p '%s'\n"
"inst=%04x taskQ=%04x updRgn=%04x active=%04x dce=%p idmenu=%08x\n" "inst=%04x taskQ=%04x updRgn=%04x active=%04x dce=%p idmenu=%08x\n"
"style=%08lx exstyle=%08lx wndproc=%08x text='%s'\n" "style=%08lx exstyle=%08lx wndproc=%08x text='%s'\n"
@ -269,7 +269,7 @@ void WIN_WalkWindows( HWND hwnd, int indent )
if (!ptr) if (!ptr)
{ {
WARN_(win)("Invalid window handle %04x\n", hwnd ); WARN("Invalid window handle %04x\n", hwnd );
return; return;
} }
@ -387,7 +387,7 @@ HWND WIN_FindWinToRepaint( HWND hwnd, HQUEUE16 hQueue )
{ {
if (!(pWnd->dwStyle & WS_VISIBLE)) if (!(pWnd->dwStyle & WS_VISIBLE))
{ {
TRACE_(win)("skipping window %04x\n", TRACE("skipping window %04x\n",
pWnd->hwndSelf ); pWnd->hwndSelf );
} }
else if ((pWnd->hmemTaskQ == hQueue) && else if ((pWnd->hmemTaskQ == hQueue) &&
@ -421,7 +421,7 @@ HWND WIN_FindWinToRepaint( HWND hwnd, HQUEUE16 hQueue )
hwndRet = pWnd->hwndSelf; hwndRet = pWnd->hwndSelf;
WIN_ReleaseWndPtr(pWnd); WIN_ReleaseWndPtr(pWnd);
} }
TRACE_(win)("found %04x\n",hwndRet); TRACE("found %04x\n",hwndRet);
return hwndRet; return hwndRet;
} }
@ -437,7 +437,7 @@ static WND* WIN_DestroyWindow( WND* wndPtr )
HWND hwnd = wndPtr->hwndSelf; HWND hwnd = wndPtr->hwndSelf;
WND *pWnd; WND *pWnd;
TRACE_(win)("%04x\n", wndPtr->hwndSelf ); TRACE("%04x\n", wndPtr->hwndSelf );
/* free child windows */ /* free child windows */
WIN_LockWndPtr(wndPtr->child); WIN_LockWndPtr(wndPtr->child);
@ -587,7 +587,7 @@ BOOL WIN_CreateDesktopWindow(void)
HWND hwndDesktop; HWND hwndDesktop;
DESKTOP *pDesktop; DESKTOP *pDesktop;
TRACE_(win)("Creating desktop window\n"); TRACE("Creating desktop window\n");
if (!ICONTITLE_Init() || if (!ICONTITLE_Init() ||
@ -665,7 +665,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
LRESULT (CALLBACK *localSend32)(HWND, UINT, WPARAM, LPARAM); LRESULT (CALLBACK *localSend32)(HWND, UINT, WPARAM, LPARAM);
char buffer[256]; char buffer[256];
TRACE_(win)("%s %s %08lx %08lx %d,%d %dx%d %04x %04x %08x %p\n", TRACE("%s %s %08lx %08lx %d,%d %dx%d %04x %04x %08x %p\n",
unicode ? debugres_w((LPWSTR)cs->lpszName) : debugres_a(cs->lpszName), unicode ? debugres_w((LPWSTR)cs->lpszName) : debugres_a(cs->lpszName),
unicode ? debugres_w((LPWSTR)cs->lpszClass) : debugres_a(cs->lpszClass), unicode ? debugres_w((LPWSTR)cs->lpszClass) : debugres_a(cs->lpszClass),
cs->dwExStyle, cs->style, cs->x, cs->y, cs->cx, cs->cy, cs->dwExStyle, cs->style, cs->x, cs->y, cs->cx, cs->cy,
@ -678,11 +678,11 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
/* Make sure parent is valid */ /* Make sure parent is valid */
if (!IsWindow( cs->hwndParent )) if (!IsWindow( cs->hwndParent ))
{ {
WARN_(win)("Bad parent %04x\n", cs->hwndParent ); WARN("Bad parent %04x\n", cs->hwndParent );
return 0; return 0;
} }
} else if ((cs->style & WS_CHILD) && !(cs->style & WS_POPUP)) { } else if ((cs->style & WS_CHILD) && !(cs->style & WS_POPUP)) {
WARN_(win)("No parent for child window\n" ); WARN("No parent for child window\n" );
return 0; /* WS_CHILD needs a parent, but WS_POPUP doesn't */ return 0; /* WS_CHILD needs a parent, but WS_POPUP doesn't */
} }
@ -690,7 +690,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
if (!(classPtr = CLASS_FindClassByAtom( classAtom, win32?cs->hInstance:GetExePtr(cs->hInstance) ))) if (!(classPtr = CLASS_FindClassByAtom( classAtom, win32?cs->hInstance:GetExePtr(cs->hInstance) )))
{ {
GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) ); GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) );
WARN_(win)("Bad class '%s'\n", buffer ); WARN("Bad class '%s'\n", buffer );
return 0; return 0;
} }
@ -765,7 +765,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
if (!(hwnd = USER_HEAP_ALLOC( sizeof(*wndPtr) + classPtr->cbWndExtra if (!(hwnd = USER_HEAP_ALLOC( sizeof(*wndPtr) + classPtr->cbWndExtra
- sizeof(wndPtr->wExtra) ))) - sizeof(wndPtr->wExtra) )))
{ {
TRACE_(win)("out of memory\n" ); TRACE("out of memory\n" );
return 0; return 0;
} }
@ -839,7 +839,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
: HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc); : HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc);
if (ret) if (ret)
{ {
TRACE_(win)("CBT-hook returned 0\n"); TRACE("CBT-hook returned 0\n");
wndPtr->pDriver->pFinalize(wndPtr); wndPtr->pDriver->pFinalize(wndPtr);
USER_HEAP_FREE( hwnd ); USER_HEAP_FREE( hwnd );
retvalue = 0; retvalue = 0;
@ -958,7 +958,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
/* send it anyway */ /* send it anyway */
if (((wndPtr->rectClient.right-wndPtr->rectClient.left) <0) if (((wndPtr->rectClient.right-wndPtr->rectClient.left) <0)
||((wndPtr->rectClient.bottom-wndPtr->rectClient.top)<0)) ||((wndPtr->rectClient.bottom-wndPtr->rectClient.top)<0))
WARN_(win)("sending bogus WM_SIZE message 0x%08lx\n", WARN("sending bogus WM_SIZE message 0x%08lx\n",
MAKELONG(wndPtr->rectClient.right-wndPtr->rectClient.left, MAKELONG(wndPtr->rectClient.right-wndPtr->rectClient.left,
wndPtr->rectClient.bottom-wndPtr->rectClient.top)); wndPtr->rectClient.bottom-wndPtr->rectClient.top));
SendMessageA( hwnd, WM_SIZE, SIZE_RESTORED, SendMessageA( hwnd, WM_SIZE, SIZE_RESTORED,
@ -1004,7 +1004,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
if (!(wndPtr->dwStyle & WS_CHILD) && !wndPtr->owner) if (!(wndPtr->dwStyle & WS_CHILD) && !wndPtr->owner)
HOOK_CallHooks16( WH_SHELL, HSHELL_WINDOWCREATED, hwnd, 0 ); HOOK_CallHooks16( WH_SHELL, HSHELL_WINDOWCREATED, hwnd, 0 );
TRACE_(win)("created window %04x\n", hwnd); TRACE("created window %04x\n", hwnd);
retvalue = hwnd; retvalue = hwnd;
goto end; goto end;
} }
@ -1013,7 +1013,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
/* Abort window creation */ /* Abort window creation */
WARN_(win)("aborted by WM_xxCREATE!\n"); WARN("aborted by WM_xxCREATE!\n");
WIN_ReleaseWndPtr(WIN_DestroyWindow( wndPtr )); WIN_ReleaseWndPtr(WIN_DestroyWindow( wndPtr ));
retvalue = 0; retvalue = 0;
end: end:
@ -1149,11 +1149,11 @@ HWND WINAPI CreateWindowExW( DWORD exStyle, LPCWSTR className,
if (HIWORD(className)) if (HIWORD(className))
{ {
LPSTR cn = HEAP_strdupWtoA( GetProcessHeap(), 0, className ); LPSTR cn = HEAP_strdupWtoA( GetProcessHeap(), 0, className );
WARN_(win)("Bad class name '%s'\n",cn); WARN("Bad class name '%s'\n",cn);
HeapFree( GetProcessHeap(), 0, cn ); HeapFree( GetProcessHeap(), 0, cn );
} }
else else
WARN_(win)("Bad class name %p\n", className ); WARN("Bad class name %p\n", className );
return 0; return 0;
} }
@ -1276,7 +1276,7 @@ static void WIN_SendDestroyMsg( WND* pWnd )
WIN_CheckFocus(pWnd); WIN_CheckFocus(pWnd);
} }
else else
WARN_(win)("\tdestroyed itself while in WM_DESTROY!\n"); WARN("\tdestroyed itself while in WM_DESTROY!\n");
} }
@ -1297,7 +1297,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
WND * wndPtr; WND * wndPtr;
BOOL retvalue; BOOL retvalue;
TRACE_(win)("(%04x)\n", hwnd); TRACE("(%04x)\n", hwnd);
/* Initialization */ /* Initialization */
@ -1571,7 +1571,7 @@ HWND16 WINAPI FindWindowEx16( HWND16 parent, HWND16 child,
{ {
ATOM atom = 0; ATOM atom = 0;
TRACE_(win)("%04x %04x '%s' '%s'\n", parent, TRACE("%04x %04x '%s' '%s'\n", parent,
child, HIWORD(className)?(char *)PTR_SEG_TO_LIN(className):"", child, HIWORD(className)?(char *)PTR_SEG_TO_LIN(className):"",
title ? title : ""); title ? title : "");
@ -1687,7 +1687,7 @@ HWND16 WINAPI GetDesktopWindow16(void)
HWND WINAPI GetDesktopWindow(void) HWND WINAPI GetDesktopWindow(void)
{ {
if (pWndDesktop) return pWndDesktop->hwndSelf; if (pWndDesktop) return pWndDesktop->hwndSelf;
ERR_(win)( "You need the -desktop option when running with native USER\n" ); ERR( "You need the -desktop option when running with native USER\n" );
ExitProcess(1); ExitProcess(1);
return 0; return 0;
} }
@ -1722,7 +1722,7 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
WND *wndPtr; WND *wndPtr;
BOOL retvalue; BOOL retvalue;
TRACE_(win)("EnableWindow32: ( %x, %d )\n", hwnd, enable); TRACE("EnableWindow32: ( %x, %d )\n", hwnd, enable);
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE; if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE;
if (enable && (wndPtr->dwStyle & WS_DISABLED)) if (enable && (wndPtr->dwStyle & WS_DISABLED))
@ -1827,7 +1827,7 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
{ {
if (offset + sizeof(WORD) > wndPtr->class->cbWndExtra) if (offset + sizeof(WORD) > wndPtr->class->cbWndExtra)
{ {
WARN_(win)("Invalid offset %d\n", offset ); WARN("Invalid offset %d\n", offset );
retvalue = 0; retvalue = 0;
goto end; goto end;
} }
@ -1838,7 +1838,7 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
{ {
case GWW_ID: case GWW_ID:
if (HIWORD(wndPtr->wIDmenu)) if (HIWORD(wndPtr->wIDmenu))
WARN_(win)("GWW_ID: discards high bits of 0x%08x!\n", WARN("GWW_ID: discards high bits of 0x%08x!\n",
wndPtr->wIDmenu); wndPtr->wIDmenu);
retvalue = (WORD)wndPtr->wIDmenu; retvalue = (WORD)wndPtr->wIDmenu;
goto end; goto end;
@ -1847,12 +1847,12 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
goto end; goto end;
case GWW_HINSTANCE: case GWW_HINSTANCE:
if (HIWORD(wndPtr->hInstance)) if (HIWORD(wndPtr->hInstance))
WARN_(win)("GWW_HINSTANCE: discards high bits of 0x%08x!\n", WARN("GWW_HINSTANCE: discards high bits of 0x%08x!\n",
wndPtr->hInstance); wndPtr->hInstance);
retvalue = (WORD)wndPtr->hInstance; retvalue = (WORD)wndPtr->hInstance;
goto end; goto end;
default: default:
WARN_(win)("Invalid offset %d\n", offset ); WARN("Invalid offset %d\n", offset );
retvalue = 0; retvalue = 0;
goto end; goto end;
} }
@ -1882,7 +1882,7 @@ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval )
{ {
if (offset + sizeof(WORD) > wndPtr->class->cbWndExtra) if (offset + sizeof(WORD) > wndPtr->class->cbWndExtra)
{ {
WARN_(win)("Invalid offset %d\n", offset ); WARN("Invalid offset %d\n", offset );
retval = 0; retval = 0;
goto end; goto end;
} }
@ -1895,7 +1895,7 @@ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval )
case GWW_HWNDPARENT: retval = SetParent( hwnd, newval ); case GWW_HWNDPARENT: retval = SetParent( hwnd, newval );
goto end; goto end;
default: default:
WARN_(win)("Invalid offset %d\n", offset ); WARN("Invalid offset %d\n", offset );
retval = 0; retval = 0;
goto end; goto end;
} }
@ -1921,7 +1921,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
{ {
if (offset + sizeof(LONG) > wndPtr->class->cbWndExtra) if (offset + sizeof(LONG) > wndPtr->class->cbWndExtra)
{ {
WARN_(win)("Invalid offset %d\n", offset ); WARN("Invalid offset %d\n", offset );
retvalue = 0; retvalue = 0;
goto end; goto end;
} }
@ -1952,7 +1952,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
case GWL_HINSTANCE: retvalue = wndPtr->hInstance; case GWL_HINSTANCE: retvalue = wndPtr->hInstance;
goto end; goto end;
default: default:
WARN_(win)("Unknown offset %d\n", offset ); WARN("Unknown offset %d\n", offset );
} }
retvalue = 0; retvalue = 0;
end: end:
@ -1979,7 +1979,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
WND * wndPtr = WIN_FindWndPtr( hwnd ); WND * wndPtr = WIN_FindWndPtr( hwnd );
STYLESTRUCT style; STYLESTRUCT style;
TRACE_(win)("%x=%p %x %lx %x\n",hwnd, wndPtr, offset, newval, type); TRACE("%x=%p %x %lx %x\n",hwnd, wndPtr, offset, newval, type);
if (!wndPtr) if (!wndPtr)
{ {
@ -1992,7 +1992,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
{ {
if (offset + sizeof(LONG) > wndPtr->class->cbWndExtra) if (offset + sizeof(LONG) > wndPtr->class->cbWndExtra)
{ {
WARN_(win)("Invalid offset %d\n", offset ); WARN("Invalid offset %d\n", offset );
/* Is this the right error? */ /* Is this the right error? */
SetLastError( ERROR_OUTOFMEMORY ); SetLastError( ERROR_OUTOFMEMORY );
@ -2051,7 +2051,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
goto end; goto end;
default: default:
WARN_(win)("Invalid offset %d\n", offset ); WARN("Invalid offset %d\n", offset );
/* Don't think this is right error but it should do */ /* Don't think this is right error but it should do */
SetLastError( ERROR_OUTOFMEMORY ); SetLastError( ERROR_OUTOFMEMORY );
@ -2219,7 +2219,7 @@ INT WINAPI GetWindowTextA( HWND hwnd, LPSTR lpString, INT nMaxCount )
*/ */
INT WINAPI InternalGetWindowText(HWND hwnd,LPWSTR lpString,INT nMaxCount ) INT WINAPI InternalGetWindowText(HWND hwnd,LPWSTR lpString,INT nMaxCount )
{ {
FIXME_(win)("(0x%08x,%p,0x%x),stub!\n",hwnd,lpString,nMaxCount); FIXME("(0x%08x,%p,0x%x),stub!\n",hwnd,lpString,nMaxCount);
return GetWindowTextW(hwnd,lpString,nMaxCount); return GetWindowTextW(hwnd,lpString,nMaxCount);
} }
@ -2982,7 +2982,7 @@ BOOL WINAPI FlashWindow( HWND hWnd, BOOL bInvert )
{ {
WND *wndPtr = WIN_FindWndPtr(hWnd); WND *wndPtr = WIN_FindWndPtr(hWnd);
TRACE_(win)("%04x\n", hWnd); TRACE("%04x\n", hWnd);
if (!wndPtr) return FALSE; if (!wndPtr) return FALSE;
@ -3027,7 +3027,7 @@ HWND16 WINAPI SetSysModalWindow16( HWND16 hWnd )
{ {
HWND hWndOldModal = hwndSysModal; HWND hWndOldModal = hwndSysModal;
hwndSysModal = hWnd; hwndSysModal = hWnd;
FIXME_(win)("EMPTY STUB !! SetSysModalWindow(%04x) !\n", hWnd); FIXME("EMPTY STUB !! SetSysModalWindow(%04x) !\n", hWnd);
return hWndOldModal; return hWndOldModal;
} }

View File

@ -38,7 +38,7 @@
#include "windef.h" #include "windef.h"
#include "x11drv.h" #include "x11drv.h"
DECLARE_DEBUG_CHANNEL(event) DEFAULT_DEBUG_CHANNEL(event)
DECLARE_DEBUG_CHANNEL(win) DECLARE_DEBUG_CHANNEL(win)
/* X context to associate a hwnd to an X window */ /* X context to associate a hwnd to an X window */
@ -163,7 +163,7 @@ static void CALLBACK EVENT_ProcessAllEvents( ULONG_PTR arg )
{ {
XEvent event; XEvent event;
TRACE_(event)( "called (thread %lx).\n", GetCurrentThreadId() ); TRACE( "called (thread %lx).\n", GetCurrentThreadId() );
EnterCriticalSection( &X11DRV_CritSection ); EnterCriticalSection( &X11DRV_CritSection );
while ( XPending( display ) ) while ( XPending( display ) )
@ -205,12 +205,12 @@ static void EVENT_ProcessEvent( XEvent *event )
{ {
HWND hWnd; HWND hWnd;
TRACE_(event)( "called.\n" ); TRACE( "called.\n" );
switch (event->type) switch (event->type)
{ {
case SelectionNotify: /* all of these should be caught by XCheckTypedWindowEvent() */ case SelectionNotify: /* all of these should be caught by XCheckTypedWindowEvent() */
FIXME_(event)("Got SelectionNotify - must not happen!\n"); FIXME("Got SelectionNotify - must not happen!\n");
/* fall through */ /* fall through */
/* We get all these because of StructureNotifyMask. /* We get all these because of StructureNotifyMask.
@ -250,11 +250,11 @@ static void EVENT_ProcessEvent( XEvent *event )
if ( !hWnd && event->xany.window != X11DRV_GetXRootWindow() if ( !hWnd && event->xany.window != X11DRV_GetXRootWindow()
&& event->type != PropertyNotify ) && event->type != PropertyNotify )
ERR_(event)("Got event %s for unknown Window %08lx\n", ERR("Got event %s for unknown Window %08lx\n",
event_names[event->type], event->xany.window ); event_names[event->type], event->xany.window );
else else
TRACE_(event)("Got event %s for hwnd %04x\n", TRACE("Got event %s for hwnd %04x\n",
event_names[event->type], hWnd ); event_names[event->type], hWnd );
switch(event->type) switch(event->type)
{ {
@ -389,11 +389,11 @@ static void EVENT_ProcessEvent( XEvent *event )
break; break;
default: default:
WARN_(event)("Unprocessed event %s for hwnd %04x\n", WARN("Unprocessed event %s for hwnd %04x\n",
event_names[event->type], hWnd ); event_names[event->type], hWnd );
break; break;
} }
TRACE_(event)( "returns.\n" ); TRACE( "returns.\n" );
} }
/*********************************************************************** /***********************************************************************
@ -450,7 +450,7 @@ static Window __get_top_decoration( Window w, Window ancestor )
TSXQueryTree( display, w, &root, &parent, &children, &total ); TSXQueryTree( display, w, &root, &parent, &children, &total );
if( children ) TSXFree( children ); if( children ) TSXFree( children );
} while( parent && parent != ancestor ); } while( parent && parent != ancestor );
TRACE_(event)("\t%08x -> %08x\n", (unsigned)prev, (unsigned)w ); TRACE("\t%08x -> %08x\n", (unsigned)prev, (unsigned)w );
return ( parent ) ? w : 0 ; return ( parent ) ? w : 0 ;
} }
@ -886,7 +886,7 @@ static Atom EVENT_SelectionRequest_TARGETS( Window requestor, Atom target, Atom
BOOL bHavePixmap; BOOL bHavePixmap;
int xRc; int xRc;
TRACE_(event)("Request for %s\n", TSXGetAtomName(display, target)); TRACE("Request for %s\n", TSXGetAtomName(display, target));
/* /*
* Count the number of items we wish to expose as selection targets. * Count the number of items we wish to expose as selection targets.
@ -940,7 +940,7 @@ static Atom EVENT_SelectionRequest_TARGETS( Window requestor, Atom target, Atom
if (targets[i]) if (targets[i])
{ {
char *itemFmtName = TSXGetAtomName(display, targets[i]); char *itemFmtName = TSXGetAtomName(display, targets[i]);
TRACE_(event)("\tAtom# %d: Type %s\n", i, itemFmtName); TRACE("\tAtom# %d: Type %s\n", i, itemFmtName);
TSXFree(itemFmtName); TSXFree(itemFmtName);
} }
} }
@ -948,14 +948,14 @@ static Atom EVENT_SelectionRequest_TARGETS( Window requestor, Atom target, Atom
#endif #endif
/* Update the X property */ /* Update the X property */
TRACE_(event)("\tUpdating property %s...", TSXGetAtomName(display, rprop)); TRACE("\tUpdating property %s...", TSXGetAtomName(display, rprop));
/* We may want to consider setting the type to xaTargets instead, /* We may want to consider setting the type to xaTargets instead,
* in case some apps expect this instead of XA_ATOM */ * in case some apps expect this instead of XA_ATOM */
xRc = TSXChangeProperty(display, requestor, rprop, xRc = TSXChangeProperty(display, requestor, rprop,
XA_ATOM, 32, PropModeReplace, XA_ATOM, 32, PropModeReplace,
(unsigned char *)targets, cTargets); (unsigned char *)targets, cTargets);
TRACE_(event)("(Rc=%d)\n", xRc); TRACE("(Rc=%d)\n", xRc);
HeapFree( GetProcessHeap(), 0, targets ); HeapFree( GetProcessHeap(), 0, targets );
@ -981,7 +981,7 @@ static Atom EVENT_SelectionRequest_STRING( Window requestor, Atom target, Atom r
* windows clipboard format ID. * windows clipboard format ID.
*/ */
itemFmtName = TSXGetAtomName(display, target); itemFmtName = TSXGetAtomName(display, target);
TRACE_(event)("Request for %s (wFormat=%x %s)\n", TRACE("Request for %s (wFormat=%x %s)\n",
itemFmtName, CF_TEXT, CLIPBOARD_GetFormatName(CF_TEXT)); itemFmtName, CF_TEXT, CLIPBOARD_GetFormatName(CF_TEXT));
TSXFree(itemFmtName); TSXFree(itemFmtName);
@ -1007,11 +1007,11 @@ static Atom EVENT_SelectionRequest_STRING( Window requestor, Atom target, Atom r
lpstr[j]='\0'; lpstr[j]='\0';
/* Update the X property */ /* Update the X property */
TRACE_(event)("\tUpdating property %s...\n", TSXGetAtomName(display, rprop)); TRACE("\tUpdating property %s...\n", TSXGetAtomName(display, rprop));
xRc = TSXChangeProperty(display, requestor, rprop, xRc = TSXChangeProperty(display, requestor, rprop,
XA_STRING, 8, PropModeReplace, XA_STRING, 8, PropModeReplace,
lpstr, j); lpstr, j);
TRACE_(event)("(Rc=%d)\n", xRc); TRACE("(Rc=%d)\n", xRc);
GlobalUnlock16(hText); GlobalUnlock16(hText);
HeapFree( GetProcessHeap(), 0, lpstr ); HeapFree( GetProcessHeap(), 0, lpstr );
@ -1042,14 +1042,14 @@ static Atom EVENT_SelectionRequest_PIXMAP( Window requestor, Atom target, Atom r
*/ */
itemFmtName = TSXGetAtomName(display, target); itemFmtName = TSXGetAtomName(display, target);
wFormat = X11DRV_CLIPBOARD_MapPropertyToFormat(itemFmtName); wFormat = X11DRV_CLIPBOARD_MapPropertyToFormat(itemFmtName);
TRACE_(event)("Request for %s (wFormat=%x %s)\n", TRACE("Request for %s (wFormat=%x %s)\n",
itemFmtName, wFormat, CLIPBOARD_GetFormatName( wFormat)); itemFmtName, wFormat, CLIPBOARD_GetFormatName( wFormat));
TSXFree(itemFmtName); TSXFree(itemFmtName);
hClipData = GetClipboardData(wFormat); hClipData = GetClipboardData(wFormat);
if ( !hClipData ) if ( !hClipData )
{ {
TRACE_(event)("Could not retrieve a Pixmap compatible format from clipboard!\n"); TRACE("Could not retrieve a Pixmap compatible format from clipboard!\n");
rprop = None; /* Fail the request */ rprop = None; /* Fail the request */
goto END; goto END;
} }
@ -1075,22 +1075,21 @@ static Atom EVENT_SelectionRequest_PIXMAP( Window requestor, Atom target, Atom r
} }
else else
{ {
FIXME_(event)("%s to PIXMAP conversion not yet implemented!\n", FIXME("%s to PIXMAP conversion not yet implemented!\n",
CLIPBOARD_GetFormatName(wFormat)); CLIPBOARD_GetFormatName(wFormat));
rprop = None; rprop = None;
goto END; goto END;
} }
TRACE_(event)("\tUpdating property %s on Window %ld with %s %ld...\n", TRACE("\tUpdating property %s on Window %ld with %s %ld...\n",
TSXGetAtomName(display, rprop), (long)requestor, TSXGetAtomName(display, rprop), (long)requestor,
TSXGetAtomName(display, target), TSXGetAtomName(display, target), pixmap);
pixmap);
/* Store the Pixmap handle in the property */ /* Store the Pixmap handle in the property */
xRc = TSXChangeProperty(display, requestor, rprop, target, xRc = TSXChangeProperty(display, requestor, rprop, target,
32, PropModeReplace, 32, PropModeReplace,
(unsigned char *)&pixmap, 1); (unsigned char *)&pixmap, 1);
TRACE_(event)("(Rc=%d)\n", xRc); TRACE("(Rc=%d)\n", xRc);
/* Enable the code below if you want to handle destroying Pixmap resources /* Enable the code below if you want to handle destroying Pixmap resources
* in response to property notify events. Clients like XPaint don't * in response to property notify events. Clients like XPaint don't
@ -1102,8 +1101,8 @@ static Atom EVENT_SelectionRequest_PIXMAP( Window requestor, Atom target, Atom r
* pixmap when the client deletes the property atom. * pixmap when the client deletes the property atom.
*/ */
xRc = TSXGetWindowAttributes(display, requestor, &win_attr_src); xRc = TSXGetWindowAttributes(display, requestor, &win_attr_src);
TRACE_(event)("Turning on PropertyChangeEvent notifications from window %ld\n", TRACE("Turning on PropertyChangeEvent notifications from window %ld\n",
(long)requestor); (long)requestor);
win_attr.event_mask = win_attr_src.your_event_mask | PropertyChangeMask; win_attr.event_mask = win_attr_src.your_event_mask | PropertyChangeMask;
TSXChangeWindowAttributes(display, requestor, CWEventMask, &win_attr); TSXChangeWindowAttributes(display, requestor, CWEventMask, &win_attr);
@ -1139,8 +1138,8 @@ static Atom EVENT_SelectionRequest_WCF( Window requestor, Atom target, Atom rpro
*/ */
itemFmtName = TSXGetAtomName(display, target); itemFmtName = TSXGetAtomName(display, target);
wFormat = X11DRV_CLIPBOARD_MapPropertyToFormat(itemFmtName); wFormat = X11DRV_CLIPBOARD_MapPropertyToFormat(itemFmtName);
TRACE_(event)("Request for %s (wFormat=%x %s)\n", TRACE("Request for %s (wFormat=%x %s)\n",
itemFmtName, wFormat, CLIPBOARD_GetFormatName( wFormat)); itemFmtName, wFormat, CLIPBOARD_GetFormatName( wFormat));
TSXFree(itemFmtName); TSXFree(itemFmtName);
hClipData = GetClipboardData16(wFormat); hClipData = GetClipboardData16(wFormat);
@ -1149,19 +1148,19 @@ static Atom EVENT_SelectionRequest_WCF( Window requestor, Atom target, Atom rpro
{ {
cBytes = GlobalSize16(hClipData); cBytes = GlobalSize16(hClipData);
TRACE_(event)("\tUpdating property %s, %d bytes...\n", TRACE("\tUpdating property %s, %d bytes...\n",
TSXGetAtomName(display, rprop), cBytes); TSXGetAtomName(display, rprop), cBytes);
xRc = TSXChangeProperty(display, requestor, rprop, xRc = TSXChangeProperty(display, requestor, rprop,
target, 8, PropModeReplace, target, 8, PropModeReplace,
(unsigned char *)lpClipData, cBytes); (unsigned char *)lpClipData, cBytes);
TRACE_(event)("(Rc=%d)\n", xRc); TRACE("(Rc=%d)\n", xRc);
GlobalUnlock16(hClipData); GlobalUnlock16(hClipData);
} }
else else
{ {
TRACE_(event)("\tCould not retrieve native format!\n"); TRACE("\tCould not retrieve native format!\n");
rprop = None; /* Fail the request */ rprop = None; /* Fail the request */
} }
@ -1204,13 +1203,14 @@ static Atom EVENT_SelectionRequest_MULTIPLE( HWND hWnd, XSelectionRequestEvent *
* (target,property) atom pairs. * (target,property) atom pairs.
*/ */
if(TSXGetWindowProperty(display, pevent->requestor, rprop, if(TSXGetWindowProperty(display, pevent->requestor, rprop,
0, 0x3FFF, False, AnyPropertyType, &atype, &aformat, 0, 0x3FFF, False, AnyPropertyType, &atype,&aformat,
&cTargetPropList, &remain, (unsigned char**)&targetPropList) != Success) &cTargetPropList, &remain,
TRACE_(event)("\tCouldn't read MULTIPLE property\n"); (unsigned char**)&targetPropList) != Success)
TRACE("\tCouldn't read MULTIPLE property\n");
else else
{ {
TRACE_(event)("\tType %s,Format %d,nItems %ld, Remain %ld\n", TRACE("\tType %s,Format %d,nItems %ld, Remain %ld\n",
TSXGetAtomName(display,atype),aformat,cTargetPropList,remain); TSXGetAtomName(display, atype), aformat, cTargetPropList, remain);
/* /*
* Make sure we got what we expect. * Make sure we got what we expect.
@ -1233,14 +1233,15 @@ static Atom EVENT_SelectionRequest_MULTIPLE( HWND hWnd, XSelectionRequestEvent *
char *propName = TSXGetAtomName(display, targetPropList[i+1]); char *propName = TSXGetAtomName(display, targetPropList[i+1]);
XSelectionRequestEvent event; XSelectionRequestEvent event;
TRACE_(event)("MULTIPLE(%d): Target='%s' Prop='%s'\n", i/2, targetName, propName); TRACE("MULTIPLE(%d): Target='%s' Prop='%s'\n",
i/2, targetName, propName);
TSXFree(targetName); TSXFree(targetName);
TSXFree(propName); TSXFree(propName);
/* We must have a non "None" property to service a MULTIPLE target atom */ /* We must have a non "None" property to service a MULTIPLE target atom */
if ( !targetPropList[i+1] ) if ( !targetPropList[i+1] )
{ {
TRACE_(event)("\tMULTIPLE(%d): Skipping target with empty property!", i); TRACE("\tMULTIPLE(%d): Skipping target with empty property!", i);
continue; continue;
} }
@ -1341,7 +1342,7 @@ END:
if(couldOpen) CloseClipboard(); if(couldOpen) CloseClipboard();
if( rprop == None) if( rprop == None)
TRACE_(event)("\tRequest ignored\n"); TRACE("\tRequest ignored\n");
/* reply to sender /* reply to sender
* SelectionNotify should be sent only at the end of a MULTIPLE request * SelectionNotify should be sent only at the end of a MULTIPLE request
@ -1355,7 +1356,7 @@ END:
result.property = rprop; result.property = rprop;
result.target = event->target; result.target = event->target;
result.time = event->time; result.time = event->time;
TRACE_(event)("Sending SelectionNotify event...\n"); TRACE("Sending SelectionNotify event...\n");
TSXSendEvent(display,event->requestor,False,NoEventMask,(XEvent*)&result); TSXSendEvent(display,event->requestor,False,NoEventMask,(XEvent*)&result);
} }
} }
@ -1379,14 +1380,14 @@ static void EVENT_SelectionClear( HWND hWnd, XSelectionClearEvent *event )
static void EVENT_PropertyNotify( XPropertyEvent *event ) static void EVENT_PropertyNotify( XPropertyEvent *event )
{ {
/* Check if we have any resources to free */ /* Check if we have any resources to free */
TRACE_(event)("Received PropertyNotify event: "); TRACE("Received PropertyNotify event: ");
switch(event->state) switch(event->state)
{ {
case PropertyDelete: case PropertyDelete:
{ {
TRACE_(event)("\tPropertyDelete for atom %s on window %ld\n", TRACE("\tPropertyDelete for atom %s on window %ld\n",
TSXGetAtomName(event->display, event->atom), (long)event->window); TSXGetAtomName(event->display, event->atom), (long)event->window);
if (X11DRV_CLIPBOARD_IsSelectionowner()) if (X11DRV_CLIPBOARD_IsSelectionowner())
X11DRV_CLIPBOARD_FreeResources( event->atom ); X11DRV_CLIPBOARD_FreeResources( event->atom );
@ -1395,8 +1396,8 @@ static void EVENT_PropertyNotify( XPropertyEvent *event )
case PropertyNewValue: case PropertyNewValue:
{ {
TRACE_(event)("\tPropertyNewValue for atom %s on window %ld\n\n", TRACE("\tPropertyNewValue for atom %s on window %ld\n\n",
TSXGetAtomName(event->display, event->atom), (long)event->window); TSXGetAtomName(event->display, event->atom), (long)event->window);
break; break;
} }
@ -1571,8 +1572,8 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event )
AnyPropertyType, &u.atom_aux, &u.i, AnyPropertyType, &u.atom_aux, &u.i,
&data_length, &aux_long, &p_data); &data_length, &aux_long, &p_data);
if (aux_long) if (aux_long)
WARN_(event)("property too large, truncated!\n"); WARN("property too large, truncated!\n");
TRACE_(event)("urls=%s\n", p_data); TRACE("urls=%s\n", p_data);
if( !aux_long && p_data) { /* don't bother if > 64K */ if( !aux_long && p_data) { /* don't bother if > 64K */
/* calculate length */ /* calculate length */
@ -1645,13 +1646,13 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event )
if (strncmp(p,"file:",5) == 0 ) { if (strncmp(p,"file:",5) == 0 ) {
INT len = GetShortPathNameA( p+5, p_drop, 65535 ); INT len = GetShortPathNameA( p+5, p_drop, 65535 );
if (len) { if (len) {
TRACE_(event)("drop file %s as %s\n", p+5, p_drop); TRACE("drop file %s as %s\n", p+5, p_drop);
p_drop += len+1; p_drop += len+1;
} else { } else {
WARN_(event)("can't convert file %s to dos name \n", p+5); WARN("can't convert file %s to dos name \n", p+5);
} }
} else { } else {
WARN_(event)("unknown mime type %s\n", p); WARN("unknown mime type %s\n", p);
} }
if (next) { if (next) {
*next = '\n'; *next = '\n';
@ -1720,12 +1721,12 @@ static void EVENT_ClientMessage( HWND hWnd, XClientMessageEvent *event )
dndSelection, 0, 65535, FALSE, dndSelection, 0, 65535, FALSE,
AnyPropertyType, &u.atom, &u.i, AnyPropertyType, &u.atom, &u.i,
&u.l, &u.l, &p_data); &u.l, &u.l, &p_data);
TRACE_(event)("message_type=%ld, data=%ld,%ld,%ld,%ld,%ld, msg=%s\n", TRACE("message_type=%ld, data=%ld,%ld,%ld,%ld,%ld, msg=%s\n",
event->message_type, event->data.l[0], event->data.l[1], event->message_type, event->data.l[0], event->data.l[1],
event->data.l[2], event->data.l[3], event->data.l[4], event->data.l[2], event->data.l[3], event->data.l[4],
p_data); p_data);
#endif #endif
TRACE_(event)("unrecognized ClientMessage\n" ); TRACE("unrecognized ClientMessage\n" );
} }
} }
} }
@ -1842,22 +1843,22 @@ static HANDLE shm_event = 0, shm_read = 0;
static void EVENT_ShmCompletion( XShmCompletionEvent *event ) static void EVENT_ShmCompletion( XShmCompletionEvent *event )
{ {
TRACE_(event)("Got ShmCompletion for drawable %ld (time %ld)\n", event->drawable, GetTickCount() ); TRACE("Got ShmCompletion for drawable %ld (time %ld)\n", event->drawable, GetTickCount() );
if (event->drawable == shm_draw) { if (event->drawable == shm_draw) {
HANDLE event = shm_event; HANDLE event = shm_event;
shm_draw = 0; shm_draw = 0;
SetEvent(event); SetEvent(event);
TRACE_(event)("Event object triggered\n" ); TRACE("Event object triggered\n" );
} else ERR_(event)("Got ShmCompletion for unknown drawable %ld\n", event->drawable ); } else ERR("Got ShmCompletion for unknown drawable %ld\n", event->drawable );
} }
int X11DRV_EVENT_PrepareShmCompletion( Drawable dw ) int X11DRV_EVENT_PrepareShmCompletion( Drawable dw )
{ {
if (shm_draw) { if (shm_draw) {
ERR_(event)("Multiple ShmCompletion requests not implemented\n"); ERR("Multiple ShmCompletion requests not implemented\n");
return 0; return 0;
} }
TRACE_(event)("Preparing ShmCompletion (%d) wait for drawable %ld (time %ld)\n", ShmCompletionType, dw, GetTickCount() ); TRACE("Preparing ShmCompletion (%d) wait for drawable %ld (time %ld)\n", ShmCompletionType, dw, GetTickCount() );
shm_draw = dw; shm_draw = dw;
if (!shm_event) if (!shm_event)
/* use manual reset just in case */ /* use manual reset just in case */
@ -1870,7 +1871,7 @@ int X11DRV_EVENT_PrepareShmCompletion( Drawable dw )
void X11DRV_EVENT_WaitShmCompletion( int compl ) void X11DRV_EVENT_WaitShmCompletion( int compl )
{ {
if (!compl) return; if (!compl) return;
TRACE_(event)("Waiting for ShmCompletion (%d) (thread %lx) (time %ld)\n", ShmCompletionType, GetCurrentThreadId(), GetTickCount() ); TRACE("Waiting for ShmCompletion (%d) (thread %lx) (time %ld)\n", ShmCompletionType, GetCurrentThreadId(), GetTickCount() );
/* already triggered? */ /* already triggered? */
if ( WaitForSingleObject( compl, 0 ) != WAIT_OBJECT_0 ) { if ( WaitForSingleObject( compl, 0 ) != WAIT_OBJECT_0 ) {
/* nope, may need to poll X event queue, in case the service thread is blocked */ /* nope, may need to poll X event queue, in case the service thread is blocked */
@ -1887,7 +1888,7 @@ void X11DRV_EVENT_WaitShmCompletion( int compl )
} while ( WaitForMultipleObjects(2, hnd, FALSE, INFINITE) > WAIT_OBJECT_0 ); } while ( WaitForMultipleObjects(2, hnd, FALSE, INFINITE) > WAIT_OBJECT_0 );
} }
ResetEvent(compl); /* manual reset */ ResetEvent(compl); /* manual reset */
TRACE_(event)("Wait complete (time %ld)\n", GetTickCount() ); TRACE("Wait complete (time %ld)\n", GetTickCount() );
} }
#endif /* defined(HAVE_LIBXXSHM) */ #endif /* defined(HAVE_LIBXXSHM) */

View File

@ -30,8 +30,8 @@
#include "winnls.h" #include "winnls.h"
#include "x11drv.h" #include "x11drv.h"
DEFAULT_DEBUG_CHANNEL(keyboard)
DECLARE_DEBUG_CHANNEL(key) DECLARE_DEBUG_CHANNEL(key)
DECLARE_DEBUG_CHANNEL(keyboard)
DECLARE_DEBUG_CHANNEL(x11drv) DECLARE_DEBUG_CHANNEL(x11drv)
DECLARE_DEBUG_CHANNEL(dinput) DECLARE_DEBUG_CHANNEL(dinput)
@ -433,7 +433,7 @@ static void KEYBOARD_GenerateMsg( WORD vkey, WORD scan, int Evtype, INT event_x,
don't treat it. It's from the same key press. Then the state goes to ON. don't treat it. It's from the same key press. Then the state goes to ON.
And from there, a 'release' event will switch off the toggle key. */ And from there, a 'release' event will switch off the toggle key. */
*State=FALSE; *State=FALSE;
TRACE_(keyboard)("INTERM : don\'t treat release of toggle key. InputKeyStateTable[%#x] = %#x\n",vkey,pKeyStateTable[vkey]); TRACE("INTERM : don\'t treat release of toggle key. InputKeyStateTable[%#x] = %#x\n",vkey,pKeyStateTable[vkey]);
} else } else
{ {
down = (vkey==VK_NUMLOCK ? KEYEVENTF_EXTENDEDKEY : 0); down = (vkey==VK_NUMLOCK ? KEYEVENTF_EXTENDEDKEY : 0);
@ -442,7 +442,7 @@ static void KEYBOARD_GenerateMsg( WORD vkey, WORD scan, int Evtype, INT event_x,
{ {
if (Evtype!=KeyPress) if (Evtype!=KeyPress)
{ {
TRACE_(keyboard)("ON + KeyRelease => generating DOWN and UP messages.\n"); TRACE("ON + KeyRelease => generating DOWN and UP messages.\n");
KEYBOARD_SendEvent( vkey, scan, down, KEYBOARD_SendEvent( vkey, scan, down,
event_x, event_y, event_time ); event_x, event_y, event_time );
KEYBOARD_SendEvent( vkey, scan, up, KEYBOARD_SendEvent( vkey, scan, up,
@ -454,7 +454,7 @@ static void KEYBOARD_GenerateMsg( WORD vkey, WORD scan, int Evtype, INT event_x,
else /* it was OFF */ else /* it was OFF */
if (Evtype==KeyPress) if (Evtype==KeyPress)
{ {
TRACE_(keyboard)("OFF + Keypress => generating DOWN and UP messages.\n"); TRACE("OFF + Keypress => generating DOWN and UP messages.\n");
KEYBOARD_SendEvent( vkey, scan, down, KEYBOARD_SendEvent( vkey, scan, down,
event_x, event_y, event_time ); event_x, event_y, event_time );
KEYBOARD_SendEvent( vkey, scan, up, KEYBOARD_SendEvent( vkey, scan, up,
@ -476,14 +476,14 @@ static void KEYBOARD_UpdateOneState ( int vkey, int state )
/* Do something if internal table state != X state for keycode */ /* Do something if internal table state != X state for keycode */
if (((pKeyStateTable[vkey] & 0x80)!=0) != state) if (((pKeyStateTable[vkey] & 0x80)!=0) != state)
{ {
TRACE_(keyboard)("Adjusting state for vkey %#.2x. State before %#.2x \n", TRACE("Adjusting state for vkey %#.2x. State before %#.2x \n",
vkey, pKeyStateTable[vkey]); vkey, pKeyStateTable[vkey]);
/* Fake key being pressed inside wine */ /* Fake key being pressed inside wine */
KEYBOARD_SendEvent( vkey, 0, state? 0 : KEYEVENTF_KEYUP, KEYBOARD_SendEvent( vkey, 0, state? 0 : KEYEVENTF_KEYUP,
0, 0, GetTickCount() ); 0, 0, GetTickCount() );
TRACE_(keyboard)("State after %#.2x \n",pKeyStateTable[vkey]); TRACE("State after %#.2x \n",pKeyStateTable[vkey]);
} }
} }
@ -505,9 +505,9 @@ void X11DRV_KEYBOARD_UpdateState ( void )
char keys_return[32]; char keys_return[32];
TRACE_(keyboard)("called\n"); TRACE("called\n");
if (!TSXQueryKeymap(display, keys_return)) { if (!TSXQueryKeymap(display, keys_return)) {
ERR_(keyboard)("Error getting keymap !"); ERR("Error getting keymap !");
return; return;
} }
@ -566,15 +566,15 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
if (!ksname) if (!ksname)
ksname = "No Name"; ksname = "No Name";
TRACE_(key)("%s : keysym=%lX (%s), ascii chars=%u / %X / '%s'\n", TRACE_(key)("%s : keysym=%lX (%s), ascii chars=%u / %X / '%s'\n",
(event->type == KeyPress) ? "KeyPress" : "KeyRelease", (event->type == KeyPress) ? "KeyPress" : "KeyRelease",
keysym, ksname, ascii_chars, Str[0] & 0xff, Str); keysym, ksname, ascii_chars, Str[0] & 0xff, Str);
} }
vkey = EVENT_event_to_vkey(event); vkey = EVENT_event_to_vkey(event);
if (force_extended) vkey |= 0x100; if (force_extended) vkey |= 0x100;
TRACE_(key)("keycode 0x%x converted to vkey 0x%x\n", TRACE_(key)("keycode 0x%x converted to vkey 0x%x\n",
event->keycode, vkey); event->keycode, vkey);
if (vkey) if (vkey)
{ {
@ -585,16 +585,16 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
event_time ); event_time );
break; break;
case VK_CAPITAL: case VK_CAPITAL:
TRACE_(keyboard)("Caps Lock event. (type %d). State before : %#.2x\n",event->type,pKeyStateTable[vkey]); TRACE("Caps Lock event. (type %d). State before : %#.2x\n",event->type,pKeyStateTable[vkey]);
KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, event->type, event_x, event_y, KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, event->type, event_x, event_y,
event_time ); event_time );
TRACE_(keyboard)("State after : %#.2x\n",pKeyStateTable[vkey]); TRACE("State after : %#.2x\n",pKeyStateTable[vkey]);
break; break;
default: default:
/* Adjust the NUMLOCK state if it has been changed outside wine */ /* Adjust the NUMLOCK state if it has been changed outside wine */
if (!(pKeyStateTable[VK_NUMLOCK] & 0x01) != !(event->state & NumLockMask)) if (!(pKeyStateTable[VK_NUMLOCK] & 0x01) != !(event->state & NumLockMask))
{ {
TRACE_(keyboard)("Adjusting NumLock state. \n"); TRACE("Adjusting NumLock state. \n");
KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyPress, event_x, event_y, KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyPress, event_x, event_y,
event_time ); event_time );
KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyRelease, event_x, event_y, KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyRelease, event_x, event_y,
@ -603,7 +603,7 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
/* Adjust the CAPSLOCK state if it has been changed outside wine */ /* Adjust the CAPSLOCK state if it has been changed outside wine */
if (!(pKeyStateTable[VK_CAPITAL] & 0x01) != !(event->state & LockMask)) if (!(pKeyStateTable[VK_CAPITAL] & 0x01) != !(event->state & LockMask))
{ {
TRACE_(keyboard)("Adjusting Caps Lock state.\n"); TRACE("Adjusting Caps Lock state.\n");
KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, KeyPress, event_x, event_y, KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, KeyPress, event_x, event_y,
event_time ); event_time );
KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, KeyRelease, event_x, event_y, KEYBOARD_GenerateMsg( VK_CAPITAL, 0x3A, KeyRelease, event_x, event_y,
@ -648,11 +648,11 @@ X11DRV_KEYBOARD_DetectLayout (void)
syms = keysyms_per_keycode; syms = keysyms_per_keycode;
if (syms > 4) { if (syms > 4) {
WARN_(keyboard)("%d keysyms per keycode not supported, set to 4", syms); WARN("%d keysyms per keycode not supported, set to 4", syms);
syms = 4; syms = 4;
} }
for (current = 0; main_key_tab[current].lang; current++) { for (current = 0; main_key_tab[current].lang; current++) {
TRACE_(keyboard)("Attempting to match against layout %04x\n", TRACE("Attempting to match against layout %04x\n",
main_key_tab[current].lang); main_key_tab[current].lang);
match = 0; match = 0;
mismatch = 0; mismatch = 0;
@ -703,7 +703,7 @@ X11DRV_KEYBOARD_DetectLayout (void)
} }
} }
} }
TRACE_(keyboard)("matches=%d, mismatches=%d, score=%d\n", TRACE("matches=%d, mismatches=%d, score=%d\n",
match, mismatch, score); match, mismatch, score);
if ((score > max_score) || if ((score > max_score) ||
((score == max_score) && (seq > max_seq))) { ((score == max_score) && (seq > max_seq))) {
@ -716,7 +716,7 @@ X11DRV_KEYBOARD_DetectLayout (void)
} }
/* we're done, report results if necessary */ /* we're done, report results if necessary */
if (!ismatch) { if (!ismatch) {
FIXME_(keyboard)( FIXME(
"Your keyboard layout was not found!\n" "Your keyboard layout was not found!\n"
"Instead using closest match (%04x) for scancode mapping.\n" "Instead using closest match (%04x) for scancode mapping.\n"
"Please define your layout in windows/x11drv/keyboard.c and submit them\n" "Please define your layout in windows/x11drv/keyboard.c and submit them\n"
@ -724,7 +724,7 @@ X11DRV_KEYBOARD_DetectLayout (void)
"See documentation/keyboard for more information.\n", "See documentation/keyboard for more information.\n",
main_key_tab[kbd_layout].lang); main_key_tab[kbd_layout].lang);
} }
TRACE_(keyboard)("detected layout is %04x\n", main_key_tab[kbd_layout].lang); TRACE("detected layout is %04x\n", main_key_tab[kbd_layout].lang);
} }
/********************************************************************** /**********************************************************************
@ -889,16 +889,16 @@ void X11DRV_KEYBOARD_Init(void)
{ {
case 0xc1 : OEMvkey=0xdb; break; case 0xc1 : OEMvkey=0xdb; break;
case 0xe5 : OEMvkey=0xe9; break; case 0xe5 : OEMvkey=0xe9; break;
case 0xf6 : OEMvkey=0xf5; WARN_(keyboard)("No more OEM vkey available!\n"); case 0xf6 : OEMvkey=0xf5; WARN("No more OEM vkey available!\n");
} }
vkey = OEMvkey; vkey = OEMvkey;
if (TRACE_ON(keyboard)) if (TRACE_ON(keyboard))
{ {
TRACE_(keyboard)("OEM specific virtual key %X assigned to keycode %X:\n", TRACE("OEM specific virtual key %X assigned to keycode %X:\n",
OEMvkey, e2.keycode); OEMvkey, e2.keycode);
TRACE_(keyboard)("("); TRACE("(");
for (i = 0; i < keysyms_per_keycode; i += 1) for (i = 0; i < keysyms_per_keycode; i += 1)
{ {
char *ksname; char *ksname;
@ -960,8 +960,8 @@ WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar)
keycode = TSXKeysymToKeycode(display, keysym | 0xFE00); keycode = TSXKeysymToKeycode(display, keysym | 0xFE00);
} }
TRACE_(keyboard)("VkKeyScan '%c'(%#lx, %lu): got keycode %#.2x\n", TRACE("VkKeyScan '%c'(%#lx, %lu): got keycode %#.2x\n",
cChar,keysym,keysym,keycode); cChar,keysym,keysym,keycode);
if (keycode) if (keycode)
{ {
@ -969,12 +969,12 @@ WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar)
if (TSXKeycodeToKeysym(display,keycode,i)==keysym) index=i; if (TSXKeycodeToKeysym(display,keycode,i)==keysym) index=i;
switch (index) { switch (index) {
case -1 : case -1 :
WARN_(keyboard)("Keysym %lx not found while parsing the keycode table\n",keysym); break; WARN("Keysym %lx not found while parsing the keycode table\n",keysym); break;
case 0 : break; case 0 : break;
case 1 : highbyte = 0x0100; break; case 1 : highbyte = 0x0100; break;
case 2 : highbyte = 0x0600; break; case 2 : highbyte = 0x0600; break;
case 3 : highbyte = 0x0700; break; case 3 : highbyte = 0x0700; break;
default : ERR_(keyboard)("index %d found by XKeycodeToKeysym. please report! \n",index); default : ERR("index %d found by XKeycodeToKeysym. please report! \n",index);
} }
/* /*
index : 0 adds 0x0000 index : 0 adds 0x0000
@ -984,7 +984,7 @@ WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar)
index : 3 adds 0x0700 (ctrl+alt+shift) index : 3 adds 0x0700 (ctrl+alt+shift)
*/ */
} }
TRACE_(keyboard)(" ... returning %#.2x\n", keyc2vkey[keycode]+highbyte); TRACE(" ... returning %#.2x\n", keyc2vkey[keycode]+highbyte);
return keyc2vkey[keycode]+highbyte; /* keycode -> (keyc2vkey) vkey */ return keyc2vkey[keycode]+highbyte; /* keycode -> (keyc2vkey) vkey */
} }
@ -993,10 +993,9 @@ WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar)
*/ */
UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType) UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
{ {
#define returnMVK(value) { TRACE_(keyboard)("returning 0x%x.\n",value); return value; } #define returnMVK(value) { TRACE("returning 0x%x.\n",value); return value; }
TRACE_(keyboard)("MapVirtualKey wCode=0x%x wMapType=%d ... \n", TRACE("MapVirtualKey wCode=0x%x wMapType=%d ... \n", wCode,wMapType);
wCode,wMapType);
switch(wMapType) { switch(wMapType) {
case 0: { /* vkey-code to scan-code */ case 0: { /* vkey-code to scan-code */
/* let's do vkey -> keycode -> scan */ /* let's do vkey -> keycode -> scan */
@ -1004,7 +1003,7 @@ UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
for (keyc=min_keycode; keyc<=max_keycode; keyc++) for (keyc=min_keycode; keyc<=max_keycode; keyc++)
if ((keyc2vkey[keyc] & 0xFF) == wCode) if ((keyc2vkey[keyc] & 0xFF) == wCode)
returnMVK (keyc2scan[keyc] & 0xFF); returnMVK (keyc2scan[keyc] & 0xFF);
TRACE_(keyboard)("returning no scan-code.\n"); TRACE("returning no scan-code.\n");
return 0; } return 0; }
case 1: { /* scan-code to vkey-code */ case 1: { /* scan-code to vkey-code */
@ -1013,7 +1012,7 @@ UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
for (keyc=min_keycode; keyc<=max_keycode; keyc++) for (keyc=min_keycode; keyc<=max_keycode; keyc++)
if ((keyc2scan[keyc] & 0xFF) == (wCode & 0xFF)) if ((keyc2scan[keyc] & 0xFF) == (wCode & 0xFF))
returnMVK (keyc2vkey[keyc] & 0xFF); returnMVK (keyc2vkey[keyc] & 0xFF);
TRACE_(keyboard)("returning no vkey-code.\n"); TRACE("returning no vkey-code.\n");
return 0; } return 0; }
case 2: { /* vkey-code to unshifted ANSI code */ case 2: { /* vkey-code to unshifted ANSI code */
@ -1049,26 +1048,25 @@ UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
if (!e.keycode) if (!e.keycode)
{ {
WARN_(keyboard)("Unknown virtual key %X !!! \n", wCode); WARN("Unknown virtual key %X !!! \n", wCode);
return 0; /* whatever */ return 0; /* whatever */
} }
TRACE_(keyboard)("Found keycode %d (0x%2X)\n",e.keycode,e.keycode); TRACE("Found keycode %d (0x%2X)\n",e.keycode,e.keycode);
if (TSXLookupString(&e, s, 2, &keysym, NULL)) if (TSXLookupString(&e, s, 2, &keysym, NULL))
returnMVK (*s); returnMVK (*s);
TRACE_(keyboard)("returning no ANSI.\n"); TRACE("returning no ANSI.\n");
return 0; return 0;
} }
case 3: /* **NT only** scan-code to vkey-code but distinguish between */ case 3: /* **NT only** scan-code to vkey-code but distinguish between */
/* left and right */ /* left and right */
FIXME_(keyboard)(" stub for NT\n"); FIXME(" stub for NT\n");
return 0; return 0;
default: /* reserved */ default: /* reserved */
WARN_(keyboard)("Unknown wMapType %d !\n", WARN("Unknown wMapType %d !\n", wMapType);
wMapType);
return 0; return 0;
} }
return 0; return 0;
@ -1111,8 +1109,7 @@ INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize)
} }
ansi = X11DRV_KEYBOARD_MapVirtualKey(vkey, 2); ansi = X11DRV_KEYBOARD_MapVirtualKey(vkey, 2);
TRACE_(keyboard)("scan 0x%04x, vkey 0x%04x, ANSI 0x%04x\n", TRACE("scan 0x%04x, vkey 0x%04x, ANSI 0x%04x\n", scanCode, vkey, ansi);
scanCode, vkey, ansi);
/* first get the name of the "regular" keys which is the Upper case /* first get the name of the "regular" keys which is the Upper case
value of the keycap imprint. */ value of the keycap imprint. */
@ -1152,8 +1149,8 @@ INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize)
{ {
keys = TSXKeycodeToKeysym(display, keyc, 0); keys = TSXKeycodeToKeysym(display, keyc, 0);
name = TSXKeysymToString(keys); name = TSXKeysymToString(keys);
TRACE_(keyboard)("found scan=%04x keyc=%04x keysym=%04x string=%s\n", TRACE("found scan=%04x keyc=%04x keysym=%04x string=%s\n",
scanCode, keyc, (int)keys, name); scanCode, keyc, (int)keys, name);
if (lpBuffer && nSize && name) if (lpBuffer && nSize && name)
{ {
strncpy(lpBuffer, name, nSize); strncpy(lpBuffer, name, nSize);
@ -1163,7 +1160,7 @@ INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize)
/* Finally issue FIXME for unknown keys */ /* Finally issue FIXME for unknown keys */
FIXME_(keyboard)("(%08lx,%p,%d): unsupported key, vkey=%04x, ansi=%04x\n",lParam,lpBuffer,nSize,vkey,ansi); FIXME("(%08lx,%p,%d): unsupported key, vkey=%04x, ansi=%04x\n",lParam,lpBuffer,nSize,vkey,ansi);
if (lpBuffer && nSize) if (lpBuffer && nSize)
*lpBuffer = 0; *lpBuffer = 0;
return 0; return 0;
@ -1243,7 +1240,7 @@ static char KEYBOARD_MapDeadKeysym(KeySym keysym)
return 's'; return 's';
*/ */
} }
TRACE_(keyboard)("no character for dead keysym 0x%08lx\n",keysym); TRACE("no character for dead keysym 0x%08lx\n",keysym);
return 0; return 0;
} }
@ -1278,12 +1275,12 @@ INT16 X11DRV_KEYBOARD_ToAscii(
if (scanCode==0) { if (scanCode==0) {
/* This happens when doing Alt+letter : a fake 'down arrow' key press /* This happens when doing Alt+letter : a fake 'down arrow' key press
event is generated by windows. Just ignore it. */ event is generated by windows. Just ignore it. */
TRACE_(keyboard)("scanCode=0, doing nothing\n"); TRACE("scanCode=0, doing nothing\n");
return 0; return 0;
} }
if (scanCode & 0x8000) if (scanCode & 0x8000)
{ {
TRACE_(keyboard)("Key UP, doing nothing\n" ); TRACE("Key UP, doing nothing\n" );
return 0; return 0;
} }
e.display = display; e.display = display;
@ -1325,10 +1322,10 @@ INT16 X11DRV_KEYBOARD_ToAscii(
if (!e.keycode) if (!e.keycode)
{ {
WARN_(keyboard)("Unknown virtual key %X !!! \n",virtKey); WARN("Unknown virtual key %X !!! \n",virtKey);
return virtKey; /* whatever */ return virtKey; /* whatever */
} }
else TRACE_(keyboard)("Found keycode %d (0x%2X)\n",e.keycode,e.keycode); else TRACE("Found keycode %d (0x%2X)\n",e.keycode,e.keycode);
ret = TSXLookupString(&e, (LPVOID)lpChar, 2, &keysym, &cs); ret = TSXLookupString(&e, (LPVOID)lpChar, 2, &keysym, &cs);
if (ret == 0) if (ret == 0)
@ -1351,10 +1348,10 @@ INT16 X11DRV_KEYBOARD_ToAscii(
ksname = "No Name"; ksname = "No Name";
if ((keysym >> 8) != 0xff) if ((keysym >> 8) != 0xff)
{ {
ERR_(keyboard)("Please report: no char for keysym %04lX (%s) :\n", ERR("Please report: no char for keysym %04lX (%s) :\n",
keysym, ksname); keysym, ksname);
ERR_(keyboard)("(virtKey=%X,scanCode=%X,keycode=%X,state=%X)\n", ERR("(virtKey=%X,scanCode=%X,keycode=%X,state=%X)\n",
virtKey, scanCode, e.keycode, e.state); virtKey, scanCode, e.keycode, e.state);
} }
} }
} }