Large-scale renaming of all Win32 functions and types to use the

standard Windows names.
This commit is contained in:
Alexandre Julliard 1999-02-26 11:11:13 +00:00
parent 314f9609d8
commit a396029270
591 changed files with 29478 additions and 30730 deletions

View File

@ -22,7 +22,7 @@
char console_xterm_prog[80];
static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid);
static BOOL wine_create_console(FILE **master, FILE **slave, int *pid);
FILE *wine_openpty(int *master, int *slave, char *name,
struct termios *term, struct winsize *winsize);
@ -106,7 +106,7 @@ void XTERM_ResizeScreen(int x, int y)
}
static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid)
static BOOL wine_create_console(FILE **master, FILE **slave, int *pid)
{
/* There is definately a bug in this routine that causes a lot
of garbage to be written to the screen, but I can't find it...

View File

@ -12,12 +12,12 @@
#include "wine/winuser16.h"
#include "tweak.h"
static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
static void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text);
static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
static void UB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
static void OB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
static void PB_Paint( WND *wndPtr, HDC hDC, WORD action );
static void PB_PaintGrayOnGray(HDC hDC,HFONT hFont,RECT *rc,char *text);
static void CB_Paint( WND *wndPtr, HDC hDC, WORD action );
static void GB_Paint( WND *wndPtr, HDC hDC, WORD action );
static void UB_Paint( WND *wndPtr, HDC hDC, WORD action );
static void OB_Paint( WND *wndPtr, HDC hDC, WORD action );
static void BUTTON_CheckAutoRadioButton( WND *wndPtr );
#define MAX_BTN_TYPE 12
@ -38,7 +38,7 @@ static const WORD maxCheckState[MAX_BTN_TYPE] =
BUTTON_UNCHECKED /* BS_OWNERDRAW */
};
typedef void (*pfPaint)( WND *wndPtr, HDC32 hdc, WORD action );
typedef void (*pfPaint)( WND *wndPtr, HDC hdc, WORD action );
static const pfPaint btnPaintFunc[MAX_BTN_TYPE] =
{
@ -58,26 +58,26 @@ static const pfPaint btnPaintFunc[MAX_BTN_TYPE] =
#define PAINT_BUTTON(wndPtr,style,action) \
if (btnPaintFunc[style]) { \
HDC32 hdc = GetDC32( (wndPtr)->hwndSelf ); \
HDC hdc = GetDC( (wndPtr)->hwndSelf ); \
(btnPaintFunc[style])(wndPtr,hdc,action); \
ReleaseDC32( (wndPtr)->hwndSelf, hdc ); }
ReleaseDC( (wndPtr)->hwndSelf, hdc ); }
#define BUTTON_SEND_CTLCOLOR(wndPtr,hdc) \
SendMessage32A( GetParent32((wndPtr)->hwndSelf), WM_CTLCOLORBTN, \
SendMessageA( GetParent((wndPtr)->hwndSelf), WM_CTLCOLORBTN, \
(hdc), (wndPtr)->hwndSelf )
static HBITMAP32 hbitmapCheckBoxes = 0;
static HBITMAP hbitmapCheckBoxes = 0;
static WORD checkBoxWidth = 0, checkBoxHeight = 0;
/***********************************************************************
* ButtonWndProc
*/
LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
WPARAM32 wParam, LPARAM lParam )
LRESULT WINAPI ButtonWndProc( HWND hWnd, UINT uMsg,
WPARAM wParam, LPARAM lParam )
{
RECT32 rect;
POINT32 pt = { LOWORD(lParam), HIWORD(lParam) };
RECT rect;
POINT pt = { LOWORD(lParam), HIWORD(lParam) };
WND *wndPtr = WIN_FindWndPtr(hWnd);
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
LONG style = wndPtr->dwStyle & 0x0f;
@ -101,9 +101,9 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
case WM_CREATE:
if (!hbitmapCheckBoxes)
{
BITMAP32 bmp;
hbitmapCheckBoxes = LoadBitmap32A(0, MAKEINTRESOURCE32A(OBM_CHECKBOXES));
GetObject32A( hbitmapCheckBoxes, sizeof(bmp), &bmp );
BITMAP bmp;
hbitmapCheckBoxes = LoadBitmapA(0, MAKEINTRESOURCEA(OBM_CHECKBOXES));
GetObjectA( hbitmapCheckBoxes, sizeof(bmp), &bmp );
checkBoxWidth = bmp.bmWidth / 4;
checkBoxHeight = bmp.bmHeight / 3;
}
@ -118,59 +118,59 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
case WM_PAINT:
if (btnPaintFunc[style])
{
PAINTSTRUCT32 ps;
HDC32 hdc = wParam ? (HDC32)wParam : BeginPaint32( hWnd, &ps );
SetBkMode32( hdc, OPAQUE );
PAINTSTRUCT ps;
HDC hdc = wParam ? (HDC)wParam : BeginPaint( hWnd, &ps );
SetBkMode( hdc, OPAQUE );
(btnPaintFunc[style])( wndPtr, hdc, ODA_DRAWENTIRE );
if( !wParam ) EndPaint32( hWnd, &ps );
if( !wParam ) EndPaint( hWnd, &ps );
}
break;
case WM_LBUTTONDOWN:
case WM_LBUTTONDBLCLK:
SendMessage32A( hWnd, BM_SETSTATE32, TRUE, 0 );
SetFocus32( hWnd );
SetCapture32( hWnd );
SendMessageA( hWnd, BM_SETSTATE, TRUE, 0 );
SetFocus( hWnd );
SetCapture( hWnd );
break;
case WM_LBUTTONUP:
ReleaseCapture();
if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) break;
SendMessage32A( hWnd, BM_SETSTATE32, FALSE, 0 );
GetClientRect32( hWnd, &rect );
if (PtInRect32( &rect, pt ))
SendMessageA( hWnd, BM_SETSTATE, FALSE, 0 );
GetClientRect( hWnd, &rect );
if (PtInRect( &rect, pt ))
{
switch(style)
{
case BS_AUTOCHECKBOX:
SendMessage32A( hWnd, BM_SETCHECK32,
SendMessageA( hWnd, BM_SETCHECK,
!(infoPtr->state & BUTTON_CHECKED), 0 );
break;
case BS_AUTORADIOBUTTON:
SendMessage32A( hWnd, BM_SETCHECK32, TRUE, 0 );
SendMessageA( hWnd, BM_SETCHECK, TRUE, 0 );
break;
case BS_AUTO3STATE:
SendMessage32A( hWnd, BM_SETCHECK32,
SendMessageA( hWnd, BM_SETCHECK,
(infoPtr->state & BUTTON_3STATE) ? 0 :
((infoPtr->state & 3) + 1), 0 );
break;
}
SendMessage32A( GetParent32(hWnd), WM_COMMAND,
SendMessageA( GetParent(hWnd), WM_COMMAND,
MAKEWPARAM( wndPtr->wIDmenu, BN_CLICKED ), hWnd);
}
break;
case WM_MOUSEMOVE:
if (GetCapture32() == hWnd)
if (GetCapture() == hWnd)
{
GetClientRect32( hWnd, &rect );
SendMessage32A( hWnd, BM_SETSTATE32, PtInRect32(&rect, pt), 0 );
GetClientRect( hWnd, &rect );
SendMessageA( hWnd, BM_SETSTATE, PtInRect(&rect, pt), 0 );
}
break;
case WM_NCHITTEST:
if(style == BS_GROUPBOX) return HTTRANSPARENT;
return DefWindowProc32A( hWnd, uMsg, wParam, lParam );
return DefWindowProcA( hWnd, uMsg, wParam, lParam );
case WM_SETTEXT:
DEFWND_SetText( wndPtr, (LPCSTR)lParam );
@ -191,7 +191,7 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
infoPtr->state |= BUTTON_HASFOCUS;
if (style == BS_AUTORADIOBUTTON)
{
SendMessage32A( hWnd, BM_SETCHECK32, 1, 0 );
SendMessageA( hWnd, BM_SETCHECK, 1, 0 );
}
PAINT_BUTTON( wndPtr, style, ODA_FOCUS );
break;
@ -199,15 +199,15 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
case WM_KILLFOCUS:
infoPtr->state &= ~BUTTON_HASFOCUS;
PAINT_BUTTON( wndPtr, style, ODA_FOCUS );
InvalidateRect32( hWnd, NULL, TRUE );
InvalidateRect( hWnd, NULL, TRUE );
break;
case WM_SYSCOLORCHANGE:
InvalidateRect32( hWnd, NULL, FALSE );
InvalidateRect( hWnd, NULL, FALSE );
break;
case BM_SETSTYLE16:
case BM_SETSTYLE32:
case BM_SETSTYLE:
if ((wParam & 0x0f) >= MAX_BTN_TYPE) break;
wndPtr->dwStyle = (wndPtr->dwStyle & 0xfffffff0)
| (wParam & 0x0000000f);
@ -216,11 +216,11 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
break;
case BM_GETCHECK16:
case BM_GETCHECK32:
case BM_GETCHECK:
return infoPtr->state & 3;
case BM_SETCHECK16:
case BM_SETCHECK32:
case BM_SETCHECK:
if (wParam > maxCheckState[style]) wParam = maxCheckState[style];
if ((infoPtr->state & 3) != wParam)
{
@ -239,11 +239,11 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
break;
case BM_GETSTATE16:
case BM_GETSTATE32:
case BM_GETSTATE:
return infoPtr->state;
case BM_SETSTATE16:
case BM_SETSTATE32:
case BM_SETSTATE:
if (wParam)
{
if (infoPtr->state & BUTTON_HIGHLIGHTED) break;
@ -258,7 +258,7 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
break;
default:
return DefWindowProc32A(hWnd, uMsg, wParam, lParam);
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
}
return 0;
}
@ -268,87 +268,87 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
* Push Button Functions
*/
static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
static void PB_Paint( WND *wndPtr, HDC hDC, WORD action )
{
RECT32 rc;
HPEN32 hOldPen;
HBRUSH32 hOldBrush;
RECT rc;
HPEN hOldPen;
HBRUSH hOldBrush;
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
GetClientRect32( wndPtr->hwndSelf, &rc );
GetClientRect( wndPtr->hwndSelf, &rc );
/* Send WM_CTLCOLOR to allow changing the font (the colors are fixed) */
if (infoPtr->hFont) SelectObject32( hDC, infoPtr->hFont );
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
hOldPen = (HPEN32)SelectObject32(hDC, GetSysColorPen32(COLOR_WINDOWFRAME));
hOldBrush =(HBRUSH32)SelectObject32(hDC,GetSysColorBrush32(COLOR_BTNFACE));
SetBkMode32(hDC, TRANSPARENT);
Rectangle32(hDC, rc.left, rc.top, rc.right, rc.bottom);
hOldPen = (HPEN)SelectObject(hDC, GetSysColorPen(COLOR_WINDOWFRAME));
hOldBrush =(HBRUSH)SelectObject(hDC,GetSysColorBrush(COLOR_BTNFACE));
SetBkMode(hDC, TRANSPARENT);
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
if (action == ODA_DRAWENTIRE)
{
SetPixel32( hDC, rc.left, rc.top, GetSysColor32(COLOR_WINDOW) );
SetPixel32( hDC, rc.left, rc.bottom-1, GetSysColor32(COLOR_WINDOW) );
SetPixel32( hDC, rc.right-1, rc.top, GetSysColor32(COLOR_WINDOW) );
SetPixel32( hDC, rc.right-1, rc.bottom-1, GetSysColor32(COLOR_WINDOW));
SetPixel( hDC, rc.left, rc.top, GetSysColor(COLOR_WINDOW) );
SetPixel( hDC, rc.left, rc.bottom-1, GetSysColor(COLOR_WINDOW) );
SetPixel( hDC, rc.right-1, rc.top, GetSysColor(COLOR_WINDOW) );
SetPixel( hDC, rc.right-1, rc.bottom-1, GetSysColor(COLOR_WINDOW));
}
InflateRect32( &rc, -1, -1 );
InflateRect( &rc, -1, -1 );
if ((wndPtr->dwStyle & 0x000f) == BS_DEFPUSHBUTTON)
{
Rectangle32(hDC, rc.left, rc.top, rc.right, rc.bottom);
InflateRect32( &rc, -1, -1 );
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
InflateRect( &rc, -1, -1 );
}
if (infoPtr->state & BUTTON_HIGHLIGHTED)
{
/* draw button shadow: */
SelectObject32(hDC, GetSysColorBrush32(COLOR_BTNSHADOW));
PatBlt32(hDC, rc.left, rc.top, 1, rc.bottom-rc.top, PATCOPY );
PatBlt32(hDC, rc.left, rc.top, rc.right-rc.left, 1, PATCOPY );
SelectObject(hDC, GetSysColorBrush(COLOR_BTNSHADOW));
PatBlt(hDC, rc.left, rc.top, 1, rc.bottom-rc.top, PATCOPY );
PatBlt(hDC, rc.left, rc.top, rc.right-rc.left, 1, PATCOPY );
rc.left += 2; /* To position the text down and right */
rc.top += 2;
} else {
rc.right++, rc.bottom++;
DrawEdge32( hDC, &rc, EDGE_RAISED, BF_RECT );
DrawEdge( hDC, &rc, EDGE_RAISED, BF_RECT );
rc.right--, rc.bottom--;
}
/* draw button label, if any: */
if (wndPtr->text && wndPtr->text[0])
{
LOGBRUSH32 lb;
GetObject32A( GetSysColorBrush32(COLOR_BTNFACE), sizeof(lb), &lb );
LOGBRUSH lb;
GetObjectA( GetSysColorBrush(COLOR_BTNFACE), sizeof(lb), &lb );
if (wndPtr->dwStyle & WS_DISABLED &&
GetSysColor32(COLOR_GRAYTEXT)==lb.lbColor)
GetSysColor(COLOR_GRAYTEXT)==lb.lbColor)
/* don't write gray text on gray bkg */
PB_PaintGrayOnGray(hDC,infoPtr->hFont,&rc,wndPtr->text);
else
{
SetTextColor32( hDC, (wndPtr->dwStyle & WS_DISABLED) ?
GetSysColor32(COLOR_GRAYTEXT) :
GetSysColor32(COLOR_BTNTEXT) );
DrawText32A( hDC, wndPtr->text, -1, &rc,
SetTextColor( hDC, (wndPtr->dwStyle & WS_DISABLED) ?
GetSysColor(COLOR_GRAYTEXT) :
GetSysColor(COLOR_BTNTEXT) );
DrawTextA( hDC, wndPtr->text, -1, &rc,
DT_SINGLELINE | DT_CENTER | DT_VCENTER );
/* do we have the focus? */
if (infoPtr->state & BUTTON_HASFOCUS)
{
RECT32 r = { 0, 0, 0, 0 };
INT32 xdelta, ydelta;
RECT r = { 0, 0, 0, 0 };
INT xdelta, ydelta;
DrawText32A( hDC, wndPtr->text, -1, &r,
DrawTextA( hDC, wndPtr->text, -1, &r,
DT_SINGLELINE | DT_CALCRECT );
xdelta = ((rc.right - rc.left) - (r.right - r.left) - 1) / 2;
ydelta = ((rc.bottom - rc.top) - (r.bottom - r.top) - 1) / 2;
if (xdelta < 0) xdelta = 0;
if (ydelta < 0) ydelta = 0;
InflateRect32( &rc, -xdelta, -ydelta );
DrawFocusRect32( hDC, &rc );
InflateRect( &rc, -xdelta, -ydelta );
DrawFocusRect( hDC, &rc );
}
}
}
SelectObject32( hDC, hOldPen );
SelectObject32( hDC, hOldBrush );
SelectObject( hDC, hOldPen );
SelectObject( hDC, hOldBrush );
}
@ -357,32 +357,32 @@ static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
* using a raster brush to avoid gray text on gray background
*/
void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
void PB_PaintGrayOnGray(HDC hDC,HFONT hFont,RECT *rc,char *text)
{
static const int Pattern[] = {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55};
HBITMAP32 hbm = CreateBitmap32( 8, 8, 1, 1, Pattern );
HDC32 hdcMem = CreateCompatibleDC32(hDC);
HBITMAP32 hbmMem;
HBRUSH32 hBr;
RECT32 rect,rc2;
HBITMAP hbm = CreateBitmap( 8, 8, 1, 1, Pattern );
HDC hdcMem = CreateCompatibleDC(hDC);
HBITMAP hbmMem;
HBRUSH hBr;
RECT rect,rc2;
rect=*rc;
DrawText32A( hDC, text, -1, &rect, DT_SINGLELINE | DT_CALCRECT);
DrawTextA( hDC, text, -1, &rect, DT_SINGLELINE | DT_CALCRECT);
rc2=rect;
rect.left=(rc->right-rect.right)/2; /* for centering text bitmap */
rect.top=(rc->bottom-rect.bottom)/2;
hbmMem = CreateCompatibleBitmap32( hDC,rect.right,rect.bottom );
SelectObject32( hdcMem, hbmMem);
hBr = SelectObject32( hdcMem, CreatePatternBrush32(hbm) );
DeleteObject32( hbm );
PatBlt32( hdcMem,0,0,rect.right,rect.bottom,WHITENESS);
if (hFont) SelectObject32( hdcMem, hFont);
DrawText32A( hdcMem, text, -1, &rc2, DT_SINGLELINE);
PatBlt32( hdcMem,0,0,rect.right,rect.bottom,0xFA0089);
DeleteObject32( SelectObject32( hdcMem,hBr) );
BitBlt32(hDC,rect.left,rect.top,rect.right,rect.bottom,hdcMem,0,0,0x990000);
DeleteDC32( hdcMem);
DeleteObject32( hbmMem );
hbmMem = CreateCompatibleBitmap( hDC,rect.right,rect.bottom );
SelectObject( hdcMem, hbmMem);
hBr = SelectObject( hdcMem, CreatePatternBrush(hbm) );
DeleteObject( hbm );
PatBlt( hdcMem,0,0,rect.right,rect.bottom,WHITENESS);
if (hFont) SelectObject( hdcMem, hFont);
DrawTextA( hdcMem, text, -1, &rc2, DT_SINGLELINE);
PatBlt( hdcMem,0,0,rect.right,rect.bottom,0xFA0089);
DeleteObject( SelectObject( hdcMem,hBr) );
BitBlt(hDC,rect.left,rect.top,rect.right,rect.bottom,hdcMem,0,0,0x990000);
DeleteDC( hdcMem);
DeleteObject( hbmMem );
}
@ -390,18 +390,18 @@ void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
* Check Box & Radio Button Functions
*/
static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
static void CB_Paint( WND *wndPtr, HDC hDC, WORD action )
{
RECT32 rbox, rtext, client;
HBRUSH32 hBrush;
RECT rbox, rtext, client;
HBRUSH hBrush;
int textlen, delta;
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
textlen = 0;
GetClientRect32(wndPtr->hwndSelf, &client);
GetClientRect(wndPtr->hwndSelf, &client);
rbox = rtext = client;
if (infoPtr->hFont) SelectObject32( hDC, infoPtr->hFont );
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
/* Something is still not right, checkboxes (and edit controls)
* in wsping32 have white backgrounds instead of dark grey.
@ -409,7 +409,7 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
* particular case and the background is not painted at all.
*/
hBrush = GetControlBrush( wndPtr->hwndSelf, hDC, CTLCOLOR_BTN );
hBrush = GetControlBrush16( wndPtr->hwndSelf, hDC, CTLCOLOR_BTN );
if (wndPtr->dwStyle & BS_LEFTTEXT)
{
@ -429,12 +429,12 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
if (wndPtr->text) textlen = strlen( wndPtr->text );
if (action == ODA_DRAWENTIRE || action == ODA_SELECT)
{
HDC32 hMemDC = CreateCompatibleDC32( hDC );
HDC hMemDC = CreateCompatibleDC( hDC );
int x = 0, y = 0;
delta = (rbox.bottom - rbox.top - checkBoxHeight) >> 1;
if (action == ODA_SELECT) FillRect32( hDC, &rbox, hBrush );
else FillRect32( hDC, &client, hBrush );
if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush );
else FillRect( hDC, &client, hBrush );
if (infoPtr->state & BUTTON_HIGHLIGHTED) x += 2 * checkBoxWidth;
if (infoPtr->state & (BUTTON_CHECKED | BUTTON_3STATE)) x += checkBoxWidth;
@ -442,16 +442,16 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
((wndPtr->dwStyle & 0x0f) == BS_AUTORADIOBUTTON)) y += checkBoxHeight;
else if (infoPtr->state & BUTTON_3STATE) y += 2 * checkBoxHeight;
SelectObject32( hMemDC, hbitmapCheckBoxes );
BitBlt32( hDC, rbox.left, rbox.top + delta, checkBoxWidth,
SelectObject( hMemDC, hbitmapCheckBoxes );
BitBlt( hDC, rbox.left, rbox.top + delta, checkBoxWidth,
checkBoxHeight, hMemDC, x, y, SRCCOPY );
DeleteDC32( hMemDC );
DeleteDC( hMemDC );
if( textlen && action != ODA_SELECT )
{
if (wndPtr->dwStyle & WS_DISABLED)
SetTextColor32( hDC, GetSysColor32(COLOR_GRAYTEXT) );
DrawText32A( hDC, wndPtr->text, textlen, &rtext,
SetTextColor( hDC, GetSysColor(COLOR_GRAYTEXT) );
DrawTextA( hDC, wndPtr->text, textlen, &rtext,
DT_SINGLELINE | DT_VCENTER );
textlen = 0; /* skip DrawText() below */
}
@ -462,17 +462,17 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
{
/* again, this is what CTL3D expects */
SetRectEmpty32(&rbox);
SetRectEmpty(&rbox);
if( textlen )
DrawText32A( hDC, wndPtr->text, textlen, &rbox,
DrawTextA( hDC, wndPtr->text, textlen, &rbox,
DT_SINGLELINE | DT_CALCRECT );
textlen = rbox.bottom - rbox.top;
delta = ((rtext.bottom - rtext.top) - textlen)/2;
rbox.bottom = (rbox.top = rtext.top + delta - 1) + textlen + 2;
textlen = rbox.right - rbox.left;
rbox.right = (rbox.left += --rtext.left) + textlen + 2;
IntersectRect32(&rbox, &rbox, &rtext);
DrawFocusRect32( hDC, &rbox );
IntersectRect(&rbox, &rbox, &rtext);
DrawFocusRect( hDC, &rbox );
}
}
@ -484,18 +484,18 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
*/
static void BUTTON_CheckAutoRadioButton( WND *wndPtr )
{
HWND32 parent, sibling, start;
HWND parent, sibling, start;
if (!(wndPtr->dwStyle & WS_CHILD)) return;
parent = wndPtr->parent->hwndSelf;
/* assure that starting control is not disabled or invisible */
start = sibling = GetNextDlgGroupItem32( parent, wndPtr->hwndSelf, TRUE );
start = sibling = GetNextDlgGroupItem( parent, wndPtr->hwndSelf, TRUE );
do
{
if (!sibling) break;
if ((wndPtr->hwndSelf != sibling) &&
((WIN_FindWndPtr(sibling)->dwStyle & 0x0f) == BS_AUTORADIOBUTTON))
SendMessage32A( sibling, BM_SETCHECK32, BUTTON_UNCHECKED, 0 );
sibling = GetNextDlgGroupItem32( parent, sibling, FALSE );
SendMessageA( sibling, BM_SETCHECK, BUTTON_UNCHECKED, 0 );
sibling = GetNextDlgGroupItem( parent, sibling, FALSE );
} while (sibling != start);
}
@ -504,43 +504,43 @@ static void BUTTON_CheckAutoRadioButton( WND *wndPtr )
* Group Box Functions
*/
static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
static void GB_Paint( WND *wndPtr, HDC hDC, WORD action )
{
RECT32 rc, rcFrame;
RECT rc, rcFrame;
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
if (action != ODA_DRAWENTIRE) return;
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
GetClientRect32( wndPtr->hwndSelf, &rc);
GetClientRect( wndPtr->hwndSelf, &rc);
if (TWEAK_WineLook == WIN31_LOOK) {
HPEN32 hPrevPen = SelectObject32( hDC,
GetSysColorPen32(COLOR_WINDOWFRAME));
HBRUSH32 hPrevBrush = SelectObject32( hDC,
GetStockObject32(NULL_BRUSH) );
HPEN hPrevPen = SelectObject( hDC,
GetSysColorPen(COLOR_WINDOWFRAME));
HBRUSH hPrevBrush = SelectObject( hDC,
GetStockObject(NULL_BRUSH) );
Rectangle32( hDC, rc.left, rc.top + 2, rc.right - 1, rc.bottom - 1 );
SelectObject32( hDC, hPrevBrush );
SelectObject32( hDC, hPrevPen );
Rectangle( hDC, rc.left, rc.top + 2, rc.right - 1, rc.bottom - 1 );
SelectObject( hDC, hPrevBrush );
SelectObject( hDC, hPrevPen );
} else {
TEXTMETRIC32A tm;
TEXTMETRICA tm;
rcFrame = rc;
if (infoPtr->hFont)
SelectObject32 (hDC, infoPtr->hFont);
GetTextMetrics32A (hDC, &tm);
SelectObject (hDC, infoPtr->hFont);
GetTextMetricsA (hDC, &tm);
rcFrame.top += (tm.tmHeight / 2) - 1;
DrawEdge32 (hDC, &rcFrame, EDGE_ETCHED, BF_RECT);
DrawEdge (hDC, &rcFrame, EDGE_ETCHED, BF_RECT);
}
if (wndPtr->text)
{
if (infoPtr->hFont) SelectObject32( hDC, infoPtr->hFont );
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
if (wndPtr->dwStyle & WS_DISABLED)
SetTextColor32( hDC, GetSysColor32(COLOR_GRAYTEXT) );
SetTextColor( hDC, GetSysColor(COLOR_GRAYTEXT) );
rc.left += 10;
DrawText32A( hDC, wndPtr->text, -1, &rc, DT_SINGLELINE | DT_NOCLIP );
DrawTextA( hDC, wndPtr->text, -1, &rc, DT_SINGLELINE | DT_NOCLIP );
}
}
@ -549,23 +549,23 @@ static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
* User Button Functions
*/
static void UB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
static void UB_Paint( WND *wndPtr, HDC hDC, WORD action )
{
RECT32 rc;
HBRUSH32 hBrush;
RECT rc;
HBRUSH hBrush;
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
if (action == ODA_SELECT) return;
GetClientRect32( wndPtr->hwndSelf, &rc);
GetClientRect( wndPtr->hwndSelf, &rc);
if (infoPtr->hFont) SelectObject32( hDC, infoPtr->hFont );
hBrush = GetControlBrush( wndPtr->hwndSelf, hDC, CTLCOLOR_BTN );
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
hBrush = GetControlBrush16( wndPtr->hwndSelf, hDC, CTLCOLOR_BTN );
FillRect32( hDC, &rc, hBrush );
FillRect( hDC, &rc, hBrush );
if ((action == ODA_FOCUS) ||
((action == ODA_DRAWENTIRE) && (infoPtr->state & BUTTON_HASFOCUS)))
DrawFocusRect32( hDC, &rc );
DrawFocusRect( hDC, &rc );
}
@ -573,10 +573,10 @@ static void UB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
* Ownerdrawn Button Functions
*/
static void OB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
static void OB_Paint( WND *wndPtr, HDC hDC, WORD action )
{
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
DRAWITEMSTRUCT32 dis;
DRAWITEMSTRUCT dis;
dis.CtlType = ODT_BUTTON;
dis.CtlID = wndPtr->wIDmenu;
@ -588,7 +588,7 @@ static void OB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
dis.hwndItem = wndPtr->hwndSelf;
dis.hDC = hDC;
dis.itemData = 0;
GetClientRect32( wndPtr->hwndSelf, &dis.rcItem );
SendMessage32A( GetParent32(wndPtr->hwndSelf), WM_DRAWITEM,
GetClientRect( wndPtr->hwndSelf, &dis.rcItem );
SendMessageA( GetParent(wndPtr->hwndSelf), WM_DRAWITEM,
wndPtr->wIDmenu, (LPARAM)&dis );
}

File diff suppressed because it is too large Load Diff

View File

@ -55,39 +55,39 @@ int DESKTOP_GetScreenDepth()
*
* Load a bitmap from a file. Used by SetDeskWallPaper().
*/
static HBITMAP32 DESKTOP_LoadBitmap( HDC32 hdc, const char *filename )
static HBITMAP DESKTOP_LoadBitmap( HDC hdc, const char *filename )
{
BITMAPFILEHEADER *fileHeader;
BITMAPINFO *bitmapInfo;
HBITMAP32 hbitmap;
HFILE32 file;
HBITMAP hbitmap;
HFILE file;
LPSTR buffer;
LONG size;
/* Read all the file into memory */
if ((file = _lopen32( filename, OF_READ )) == HFILE_ERROR32)
if ((file = _lopen( filename, OF_READ )) == HFILE_ERROR)
{
UINT32 len = GetWindowsDirectory32A( NULL, 0 );
UINT len = GetWindowsDirectoryA( NULL, 0 );
if (!(buffer = HeapAlloc( GetProcessHeap(), 0,
len + strlen(filename) + 2 )))
return 0;
GetWindowsDirectory32A( buffer, len + 1 );
GetWindowsDirectoryA( buffer, len + 1 );
strcat( buffer, "\\" );
strcat( buffer, filename );
file = _lopen32( buffer, OF_READ );
file = _lopen( buffer, OF_READ );
HeapFree( GetProcessHeap(), 0, buffer );
}
if (file == HFILE_ERROR32) return 0;
size = _llseek32( file, 0, 2 );
if (file == HFILE_ERROR) return 0;
size = _llseek( file, 0, 2 );
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, size )))
{
_lclose32( file );
_lclose( file );
return 0;
}
_llseek32( file, 0, 0 );
size = _lread32( file, buffer, size );
_lclose32( file );
_llseek( file, 0, 0 );
size = _lread( file, buffer, size );
_lclose( file );
fileHeader = (BITMAPFILEHEADER *)buffer;
bitmapInfo = (BITMAPINFO *)(buffer + sizeof(BITMAPFILEHEADER));
@ -97,7 +97,7 @@ static HBITMAP32 DESKTOP_LoadBitmap( HDC32 hdc, const char *filename )
HeapFree( GetProcessHeap(), 0, buffer );
return 0;
}
hbitmap = CreateDIBitmap32( hdc, &bitmapInfo->bmiHeader, CBM_INIT,
hbitmap = CreateDIBitmap( hdc, &bitmapInfo->bmiHeader, CBM_INIT,
buffer + fileHeader->bfOffBits,
bitmapInfo, DIB_RGB_COLORS );
HeapFree( GetProcessHeap(), 0, buffer );
@ -110,16 +110,16 @@ static HBITMAP32 DESKTOP_LoadBitmap( HDC32 hdc, const char *filename )
*
* Handle the WM_ERASEBKGND message.
*/
static LRESULT DESKTOP_DoEraseBkgnd( HWND32 hwnd, HDC32 hdc,
static LRESULT DESKTOP_DoEraseBkgnd( HWND hwnd, HDC hdc,
DESKTOP *desktopPtr )
{
RECT32 rect;
RECT rect;
WND* Wnd = WIN_FindWndPtr( hwnd );
if (Wnd->hrgnUpdate > 1) DeleteObject32( Wnd->hrgnUpdate );
if (Wnd->hrgnUpdate > 1) DeleteObject( Wnd->hrgnUpdate );
Wnd->hrgnUpdate = 0;
GetClientRect32( hwnd, &rect );
GetClientRect( hwnd, &rect );
/* Paint desktop pattern (only if wall paper does not cover everything) */
@ -128,25 +128,25 @@ static LRESULT DESKTOP_DoEraseBkgnd( HWND32 hwnd, HDC32 hdc,
(desktopPtr->bitmapSize.cy < rect.bottom))))
{
/* Set colors in case pattern is a monochrome bitmap */
SetBkColor32( hdc, RGB(0,0,0) );
SetTextColor32( hdc, GetSysColor32(COLOR_BACKGROUND) );
FillRect32( hdc, &rect, desktopPtr->hbrushPattern );
SetBkColor( hdc, RGB(0,0,0) );
SetTextColor( hdc, GetSysColor(COLOR_BACKGROUND) );
FillRect( hdc, &rect, desktopPtr->hbrushPattern );
}
/* Paint wall paper */
if (desktopPtr->hbitmapWallPaper)
{
INT32 x, y;
HDC32 hMemDC = CreateCompatibleDC32( hdc );
INT x, y;
HDC hMemDC = CreateCompatibleDC( hdc );
SelectObject32( hMemDC, desktopPtr->hbitmapWallPaper );
SelectObject( hMemDC, desktopPtr->hbitmapWallPaper );
if (desktopPtr->fTileWallPaper)
{
for (y = 0; y < rect.bottom; y += desktopPtr->bitmapSize.cy)
for (x = 0; x < rect.right; x += desktopPtr->bitmapSize.cx)
BitBlt32( hdc, x, y, desktopPtr->bitmapSize.cx,
BitBlt( hdc, x, y, desktopPtr->bitmapSize.cx,
desktopPtr->bitmapSize.cy, hMemDC, 0, 0, SRCCOPY );
}
else
@ -155,10 +155,10 @@ static LRESULT DESKTOP_DoEraseBkgnd( HWND32 hwnd, HDC32 hdc,
y = (rect.top + rect.bottom - desktopPtr->bitmapSize.cy) / 2;
if (x < 0) x = 0;
if (y < 0) y = 0;
BitBlt32( hdc, x, y, desktopPtr->bitmapSize.cx,
BitBlt( hdc, x, y, desktopPtr->bitmapSize.cx,
desktopPtr->bitmapSize.cy, hMemDC, 0, 0, SRCCOPY );
}
DeleteDC32( hMemDC );
DeleteDC( hMemDC );
}
return 1;
@ -170,8 +170,8 @@ static LRESULT DESKTOP_DoEraseBkgnd( HWND32 hwnd, HDC32 hdc,
*
* Window procedure for the desktop window.
*/
LRESULT WINAPI DesktopWndProc( HWND32 hwnd, UINT32 message,
WPARAM32 wParam, LPARAM lParam )
LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam )
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
DESKTOP *desktopPtr = (DESKTOP *)wndPtr->wExtra;
@ -186,14 +186,14 @@ LRESULT WINAPI DesktopWndProc( HWND32 hwnd, UINT32 message,
desktopPtr->hbrushPattern = 0;
desktopPtr->hbitmapWallPaper = 0;
SetDeskPattern();
SetDeskWallPaper32( (LPSTR)-1 );
SetDeskWallPaper( (LPSTR)-1 );
return 1;
case WM_ERASEBKGND:
if (X11DRV_WND_GetXRootWindow(wndPtr) ==
DefaultRootWindow(display))
return 1;
return DESKTOP_DoEraseBkgnd( hwnd, (HDC32)wParam, desktopPtr );
return DESKTOP_DoEraseBkgnd( hwnd, (HDC)wParam, desktopPtr );
case WM_SYSCOMMAND:
if ((wParam & 0xfff0) != SC_CLOSE) return 0;
@ -210,9 +210,9 @@ LRESULT WINAPI DesktopWndProc( HWND32 hwnd, UINT32 message,
* PaintDesktop (USER32.415)
*
*/
BOOL32 WINAPI PaintDesktop(HDC32 hdc)
BOOL WINAPI PaintDesktop(HDC hdc)
{
HWND32 hwnd = GetDesktopWindow32();
HWND hwnd = GetDesktopWindow();
WND *wndPtr = WIN_FindWndPtr( hwnd );
DESKTOP *desktopPtr = (DESKTOP *)wndPtr->wExtra;
@ -225,7 +225,7 @@ BOOL32 WINAPI PaintDesktop(HDC32 hdc)
BOOL16 WINAPI SetDeskPattern(void)
{
char buffer[100];
GetProfileString32A( "desktop", "Pattern", "(None)", buffer, 100 );
GetProfileStringA( "desktop", "Pattern", "(None)", buffer, 100 );
return DESKTOP_SetPattern( buffer );
}
@ -235,7 +235,7 @@ BOOL16 WINAPI SetDeskPattern(void)
*/
BOOL16 WINAPI SetDeskWallPaper16( LPCSTR filename )
{
return SetDeskWallPaper32( filename );
return SetDeskWallPaper( filename );
}
@ -244,29 +244,29 @@ BOOL16 WINAPI SetDeskWallPaper16( LPCSTR filename )
*
* FIXME: is there a unicode version?
*/
BOOL32 WINAPI SetDeskWallPaper32( LPCSTR filename )
BOOL WINAPI SetDeskWallPaper( LPCSTR filename )
{
HBITMAP32 hbitmap;
HDC32 hdc;
HBITMAP hbitmap;
HDC hdc;
char buffer[256];
WND *wndPtr = WIN_GetDesktop();
DESKTOP *desktopPtr = (DESKTOP *)wndPtr->wExtra;
if (filename == (LPSTR)-1)
{
GetProfileString32A( "desktop", "WallPaper", "(None)", buffer, 256 );
GetProfileStringA( "desktop", "WallPaper", "(None)", buffer, 256 );
filename = buffer;
}
hdc = GetDC32( 0 );
hdc = GetDC( 0 );
hbitmap = DESKTOP_LoadBitmap( hdc, filename );
ReleaseDC32( 0, hdc );
if (desktopPtr->hbitmapWallPaper) DeleteObject32( desktopPtr->hbitmapWallPaper );
ReleaseDC( 0, hdc );
if (desktopPtr->hbitmapWallPaper) DeleteObject( desktopPtr->hbitmapWallPaper );
desktopPtr->hbitmapWallPaper = hbitmap;
desktopPtr->fTileWallPaper = GetProfileInt32A( "desktop", "TileWallPaper", 0 );
desktopPtr->fTileWallPaper = GetProfileIntA( "desktop", "TileWallPaper", 0 );
if (hbitmap)
{
BITMAP32 bmp;
GetObject32A( hbitmap, sizeof(bmp), &bmp );
BITMAP bmp;
GetObjectA( hbitmap, sizeof(bmp), &bmp );
desktopPtr->bitmapSize.cx = (bmp.bmWidth != 0) ? bmp.bmWidth : 1;
desktopPtr->bitmapSize.cy = (bmp.bmHeight != 0) ? bmp.bmHeight : 1;
}
@ -279,28 +279,28 @@ BOOL32 WINAPI SetDeskWallPaper32( LPCSTR filename )
*
* Set the desktop pattern.
*/
BOOL32 DESKTOP_SetPattern( LPCSTR pattern )
BOOL DESKTOP_SetPattern( LPCSTR pattern )
{
WND *wndPtr = WIN_GetDesktop();
DESKTOP *desktopPtr = (DESKTOP *)wndPtr->wExtra;
int pat[8];
if (desktopPtr->hbrushPattern) DeleteObject32( desktopPtr->hbrushPattern );
if (desktopPtr->hbrushPattern) DeleteObject( desktopPtr->hbrushPattern );
memset( pat, 0, sizeof(pat) );
if (pattern && sscanf( pattern, " %d %d %d %d %d %d %d %d",
&pat[0], &pat[1], &pat[2], &pat[3],
&pat[4], &pat[5], &pat[6], &pat[7] ))
{
WORD pattern[8];
HBITMAP32 hbitmap;
HBITMAP hbitmap;
int i;
for (i = 0; i < 8; i++) pattern[i] = pat[i] & 0xffff;
hbitmap = CreateBitmap32( 8, 8, 1, 1, (LPSTR)pattern );
desktopPtr->hbrushPattern = CreatePatternBrush32( hbitmap );
DeleteObject32( hbitmap );
hbitmap = CreateBitmap( 8, 8, 1, 1, (LPSTR)pattern );
desktopPtr->hbrushPattern = CreatePatternBrush( hbitmap );
DeleteObject( hbitmap );
}
else desktopPtr->hbrushPattern = CreateSolidBrush32( GetSysColor32(COLOR_BACKGROUND) );
else desktopPtr->hbrushPattern = CreateSolidBrush( GetSysColor(COLOR_BACKGROUND) );
return TRUE;
}

File diff suppressed because it is too large Load Diff

View File

@ -16,36 +16,36 @@
static LPCSTR emptyTitleText = "<...>";
BOOL32 bMultiLineTitle;
HFONT32 hIconTitleFont;
BOOL bMultiLineTitle;
HFONT hIconTitleFont;
/***********************************************************************
* ICONTITLE_Init
*/
BOOL32 ICONTITLE_Init(void)
BOOL ICONTITLE_Init(void)
{
LOGFONT32A logFont;
LOGFONTA logFont;
SystemParametersInfo32A( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 );
SystemParametersInfo32A( SPI_GETICONTITLEWRAP, 0, &bMultiLineTitle, 0 );
hIconTitleFont = CreateFontIndirect32A( &logFont );
SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 );
SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0, &bMultiLineTitle, 0 );
hIconTitleFont = CreateFontIndirectA( &logFont );
return (hIconTitleFont) ? TRUE : FALSE;
}
/***********************************************************************
* ICONTITLE_Create
*/
HWND32 ICONTITLE_Create( WND* wnd )
HWND ICONTITLE_Create( WND* wnd )
{
WND* wndPtr;
HWND32 hWnd;
HWND hWnd;
if( wnd->dwStyle & WS_CHILD )
hWnd = CreateWindowEx32A( 0, ICONTITLE_CLASS_ATOM, NULL,
hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL,
WS_CHILD | WS_CLIPSIBLINGS, 0, 0, 1, 1,
wnd->parent->hwndSelf, 0, wnd->hInstance, NULL );
else
hWnd = CreateWindowEx32A( 0, ICONTITLE_CLASS_ATOM, NULL,
hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL,
WS_CLIPSIBLINGS, 0, 0, 1, 1,
wnd->hwndSelf, 0, wnd->hInstance, NULL );
wndPtr = WIN_FindWndPtr( hWnd );
@ -62,15 +62,15 @@ HWND32 ICONTITLE_Create( WND* wnd )
/***********************************************************************
* ICONTITLE_GetTitlePos
*/
static BOOL32 ICONTITLE_GetTitlePos( WND* wnd, LPRECT32 lpRect )
static BOOL ICONTITLE_GetTitlePos( WND* wnd, LPRECT lpRect )
{
LPSTR str;
int length = lstrlen32A( wnd->owner->text );
int length = lstrlenA( wnd->owner->text );
if( length )
{
str = HeapAlloc( GetProcessHeap(), 0, length + 1 );
lstrcpy32A( str, wnd->owner->text );
lstrcpyA( str, wnd->owner->text );
while( str[length - 1] == ' ' ) /* remove trailing spaces */
{
str[--length] = '\0';
@ -84,25 +84,25 @@ static BOOL32 ICONTITLE_GetTitlePos( WND* wnd, LPRECT32 lpRect )
if( !length )
{
str = (LPSTR)emptyTitleText;
length = lstrlen32A( str );
length = lstrlenA( str );
}
if( str )
{
HDC32 hDC = GetDC32( wnd->hwndSelf );
HDC hDC = GetDC( wnd->hwndSelf );
if( hDC )
{
HFONT32 hPrevFont = SelectObject32( hDC, hIconTitleFont );
HFONT hPrevFont = SelectObject( hDC, hIconTitleFont );
SetRect32( lpRect, 0, 0, sysMetrics[SM_CXICONSPACING] -
SetRect( lpRect, 0, 0, sysMetrics[SM_CXICONSPACING] -
SYSMETRICS_CXBORDER * 2, SYSMETRICS_CYBORDER * 2 );
DrawText32A( hDC, str, length, lpRect, DT_CALCRECT |
DrawTextA( hDC, str, length, lpRect, DT_CALCRECT |
DT_CENTER | DT_NOPREFIX | DT_WORDBREAK |
(( bMultiLineTitle ) ? 0 : DT_SINGLELINE) );
SelectObject32( hDC, hPrevFont );
ReleaseDC32( wnd->hwndSelf, hDC );
SelectObject( hDC, hPrevFont );
ReleaseDC( wnd->hwndSelf, hDC );
lpRect->right += 4 * SYSMETRICS_CXBORDER - lpRect->left;
lpRect->left = wnd->owner->rectWindow.left + SYSMETRICS_CXICON / 2 -
@ -119,16 +119,16 @@ static BOOL32 ICONTITLE_GetTitlePos( WND* wnd, LPRECT32 lpRect )
/***********************************************************************
* ICONTITLE_Paint
*/
static BOOL32 ICONTITLE_Paint( WND* wnd, HDC32 hDC, BOOL32 bActive )
static BOOL ICONTITLE_Paint( WND* wnd, HDC hDC, BOOL bActive )
{
HFONT32 hPrevFont;
HBRUSH32 hBrush = 0;
HFONT hPrevFont;
HBRUSH hBrush = 0;
COLORREF textColor = 0;
if( bActive )
{
hBrush = GetSysColorBrush32(COLOR_ACTIVECAPTION);
textColor = GetSysColor32(COLOR_CAPTIONTEXT);
hBrush = GetSysColorBrush(COLOR_ACTIVECAPTION);
textColor = GetSysColor(COLOR_CAPTIONTEXT);
}
else
{
@ -137,9 +137,9 @@ static BOOL32 ICONTITLE_Paint( WND* wnd, HDC32 hDC, BOOL32 bActive )
hBrush = wnd->parent->class->hbrBackground;
if( hBrush )
{
INT32 level;
LOGBRUSH32 logBrush;
GetObject32A( hBrush, sizeof(logBrush), &logBrush );
INT level;
LOGBRUSH logBrush;
GetObjectA( hBrush, sizeof(logBrush), &logBrush );
level = GetRValue(logBrush.lbColor) +
GetGValue(logBrush.lbColor) +
GetBValue(logBrush.lbColor);
@ -147,36 +147,36 @@ static BOOL32 ICONTITLE_Paint( WND* wnd, HDC32 hDC, BOOL32 bActive )
textColor = RGB( 0xFF, 0xFF, 0xFF );
}
else
hBrush = GetStockObject32( WHITE_BRUSH );
hBrush = GetStockObject( WHITE_BRUSH );
}
else
{
hBrush = GetStockObject32( BLACK_BRUSH );
hBrush = GetStockObject( BLACK_BRUSH );
textColor = RGB( 0xFF, 0xFF, 0xFF );
}
}
FillWindow( wnd->parent->hwndSelf, wnd->hwndSelf, hDC, hBrush );
FillWindow16( wnd->parent->hwndSelf, wnd->hwndSelf, hDC, hBrush );
hPrevFont = SelectObject32( hDC, hIconTitleFont );
hPrevFont = SelectObject( hDC, hIconTitleFont );
if( hPrevFont )
{
RECT32 rect;
INT32 length;
RECT rect;
INT length;
char buffer[80];
rect.left = rect.top = 0;
rect.right = wnd->rectWindow.right - wnd->rectWindow.left;
rect.bottom = wnd->rectWindow.bottom - wnd->rectWindow.top;
length = GetWindowText32A( wnd->owner->hwndSelf, buffer, 80 );
SetTextColor32( hDC, textColor );
SetBkMode32( hDC, TRANSPARENT );
length = GetWindowTextA( wnd->owner->hwndSelf, buffer, 80 );
SetTextColor( hDC, textColor );
SetBkMode( hDC, TRANSPARENT );
DrawText32A( hDC, buffer, length, &rect, DT_CENTER | DT_NOPREFIX |
DrawTextA( hDC, buffer, length, &rect, DT_CENTER | DT_NOPREFIX |
DT_WORDBREAK | ((bMultiLineTitle) ? 0 : DT_SINGLELINE) );
SelectObject32( hDC, hPrevFont );
SelectObject( hDC, hPrevFont );
}
return ( hPrevFont ) ? TRUE : FALSE;
}
@ -184,8 +184,8 @@ static BOOL32 ICONTITLE_Paint( WND* wnd, HDC32 hDC, BOOL32 bActive )
/***********************************************************************
* IconTitleWndProc
*/
LRESULT WINAPI IconTitleWndProc( HWND32 hWnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam )
LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
WPARAM wParam, LPARAM lParam )
{
WND *wnd = WIN_FindWndPtr( hWnd );
@ -196,10 +196,10 @@ LRESULT WINAPI IconTitleWndProc( HWND32 hWnd, UINT32 msg,
case WM_NCMOUSEMOVE:
case WM_NCLBUTTONDBLCLK:
return SendMessage32A( wnd->owner->hwndSelf, msg, wParam, lParam );
return SendMessageA( wnd->owner->hwndSelf, msg, wParam, lParam );
case WM_ACTIVATE:
if( wParam ) SetActiveWindow32( wnd->owner->hwndSelf );
if( wParam ) SetActiveWindow( wnd->owner->hwndSelf );
/* fall through */
case WM_CLOSE:
@ -208,15 +208,15 @@ LRESULT WINAPI IconTitleWndProc( HWND32 hWnd, UINT32 msg,
case WM_SHOWWINDOW:
if( wnd && wParam )
{
RECT32 titleRect;
RECT titleRect;
ICONTITLE_GetTitlePos( wnd, &titleRect );
if( wnd->owner->next != wnd ) /* keep icon title behind the owner */
SetWindowPos32( hWnd, wnd->owner->hwndSelf,
SetWindowPos( hWnd, wnd->owner->hwndSelf,
titleRect.left, titleRect.top,
titleRect.right, titleRect.bottom, SWP_NOACTIVATE );
else
SetWindowPos32( hWnd, 0, titleRect.left, titleRect.top,
SetWindowPos( hWnd, 0, titleRect.left, titleRect.top,
titleRect.right, titleRect.bottom,
SWP_NOACTIVATE | SWP_NOZORDER );
}
@ -228,17 +228,17 @@ LRESULT WINAPI IconTitleWndProc( HWND32 hWnd, UINT32 msg,
WND* iconWnd = wnd->owner;
if( iconWnd->dwStyle & WS_CHILD )
lParam = SendMessage32A( iconWnd->hwndSelf, WM_ISACTIVEICON, 0, 0 );
lParam = SendMessageA( iconWnd->hwndSelf, WM_ISACTIVEICON, 0, 0 );
else
lParam = (iconWnd->hwndSelf == GetActiveWindow16());
if( ICONTITLE_Paint( wnd, (HDC32)wParam, (BOOL32)lParam ) )
ValidateRect32( hWnd, NULL );
if( ICONTITLE_Paint( wnd, (HDC)wParam, (BOOL)lParam ) )
ValidateRect( hWnd, NULL );
return 1;
}
}
return DefWindowProc32A( hWnd, msg, wParam, lParam );
return DefWindowProcA( hWnd, msg, wParam, lParam );
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -13,18 +13,18 @@
#include "debug.h"
static HBITMAP32 hUpArrow = 0;
static HBITMAP32 hDnArrow = 0;
static HBITMAP32 hLfArrow = 0;
static HBITMAP32 hRgArrow = 0;
static HBITMAP32 hUpArrowD = 0;
static HBITMAP32 hDnArrowD = 0;
static HBITMAP32 hLfArrowD = 0;
static HBITMAP32 hRgArrowD = 0;
static HBITMAP32 hUpArrowI = 0;
static HBITMAP32 hDnArrowI = 0;
static HBITMAP32 hLfArrowI = 0;
static HBITMAP32 hRgArrowI = 0;
static HBITMAP hUpArrow = 0;
static HBITMAP hDnArrow = 0;
static HBITMAP hLfArrow = 0;
static HBITMAP hRgArrow = 0;
static HBITMAP hUpArrowD = 0;
static HBITMAP hDnArrowD = 0;
static HBITMAP hLfArrowD = 0;
static HBITMAP hRgArrowD = 0;
static HBITMAP hUpArrowI = 0;
static HBITMAP hDnArrowI = 0;
static HBITMAP hLfArrowI = 0;
static HBITMAP hRgArrowI = 0;
#define TOP_ARROW(flags,pressed) \
(((flags)&ESB_DISABLE_UP) ? hUpArrowI : ((pressed) ? hUpArrowD:hUpArrow))
@ -72,47 +72,47 @@ enum SCROLL_HITTEST
#define SA_SSI_REPAINT_ARROWS 0x0008
/* Thumb-tracking info */
static HWND32 SCROLL_TrackingWin = 0;
static INT32 SCROLL_TrackingBar = 0;
static INT32 SCROLL_TrackingPos = 0;
static INT32 SCROLL_TrackingVal = 0;
static HWND SCROLL_TrackingWin = 0;
static INT SCROLL_TrackingBar = 0;
static INT SCROLL_TrackingPos = 0;
static INT SCROLL_TrackingVal = 0;
/* Hit test code of the last button-down event */
static enum SCROLL_HITTEST SCROLL_trackHitTest;
static BOOL32 SCROLL_trackVertical;
static BOOL SCROLL_trackVertical;
/* Is the moving thumb being displayed? */
static BOOL32 SCROLL_MovingThumb = FALSE;
static BOOL SCROLL_MovingThumb = FALSE;
/* Local functions */
static BOOL32 SCROLL_ShowScrollBar( HWND32 hwnd, INT32 nBar,
BOOL32 fShowH, BOOL32 fShowV );
static INT32 SCROLL_SetScrollInfo( HWND32 hwnd, INT32 nBar,
const SCROLLINFO *info, INT32 *action );
static BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar,
BOOL fShowH, BOOL fShowV );
static INT SCROLL_SetScrollInfo( HWND hwnd, INT nBar,
const SCROLLINFO *info, INT *action );
/***********************************************************************
* SCROLL_LoadBitmaps
*/
static void SCROLL_LoadBitmaps(void)
{
hUpArrow = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_UPARROW) );
hDnArrow = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_DNARROW) );
hLfArrow = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_LFARROW) );
hRgArrow = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_RGARROW) );
hUpArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_UPARROWD) );
hDnArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_DNARROWD) );
hLfArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_LFARROWD) );
hRgArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_RGARROWD) );
hUpArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_UPARROWI) );
hDnArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_DNARROWI) );
hLfArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_LFARROWI) );
hRgArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE32A(OBM_RGARROWI) );
hUpArrow = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_UPARROW) );
hDnArrow = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_DNARROW) );
hLfArrow = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_LFARROW) );
hRgArrow = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_RGARROW) );
hUpArrowD = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_UPARROWD) );
hDnArrowD = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_DNARROWD) );
hLfArrowD = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_LFARROWD) );
hRgArrowD = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_RGARROWD) );
hUpArrowI = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_UPARROWI) );
hDnArrowI = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_DNARROWI) );
hLfArrowI = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_LFARROWI) );
hRgArrowI = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_RGARROWI) );
}
/***********************************************************************
* SCROLL_GetPtrScrollInfo
*/
static SCROLLBAR_INFO *SCROLL_GetPtrScrollInfo( WND* wndPtr, INT32 nBar )
static SCROLLBAR_INFO *SCROLL_GetPtrScrollInfo( WND* wndPtr, INT nBar )
{
SCROLLBAR_INFO *infoPtr;
@ -144,7 +144,7 @@ static SCROLLBAR_INFO *SCROLL_GetPtrScrollInfo( WND* wndPtr, INT32 nBar )
/***********************************************************************
* SCROLL_GetScrollInfo
*/
static SCROLLBAR_INFO *SCROLL_GetScrollInfo( HWND32 hwnd, INT32 nBar )
static SCROLLBAR_INFO *SCROLL_GetScrollInfo( HWND hwnd, INT nBar )
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
return SCROLL_GetPtrScrollInfo( wndPtr, nBar );
@ -162,12 +162,12 @@ static SCROLLBAR_INFO *SCROLL_GetScrollInfo( HWND32 hwnd, INT32 nBar )
* relative to the left or to the top.
* Return TRUE if the scrollbar is vertical, FALSE if horizontal.
*/
static BOOL32 SCROLL_GetScrollBarRect( HWND32 hwnd, INT32 nBar, RECT32 *lprect,
INT32 *arrowSize, INT32 *thumbSize,
INT32 *thumbPos )
static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
INT *arrowSize, INT *thumbSize,
INT *thumbPos )
{
INT32 pixels;
BOOL32 vertical;
INT pixels;
BOOL vertical;
WND *wndPtr = WIN_FindWndPtr( hwnd );
switch(nBar)
@ -199,7 +199,7 @@ static BOOL32 SCROLL_GetScrollBarRect( HWND32 hwnd, INT32 nBar, RECT32 *lprect,
break;
case SB_CTL:
GetClientRect32( hwnd, lprect );
GetClientRect( hwnd, lprect );
vertical = ((wndPtr->dwStyle & SBS_VERT) != 0);
break;
@ -240,7 +240,7 @@ static BOOL32 SCROLL_GetScrollBarRect( HWND32 hwnd, INT32 nBar, RECT32 *lprect,
}
else
{
INT32 max = info->MaxVal - MAX( info->Page-1, 0 );
INT max = info->MaxVal - MAX( info->Page-1, 0 );
if (info->MinVal >= max)
*thumbPos = *arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
else
@ -258,11 +258,11 @@ static BOOL32 SCROLL_GetScrollBarRect( HWND32 hwnd, INT32 nBar, RECT32 *lprect,
* Compute the current scroll position based on the thumb position in pixels
* from the top of the scroll-bar.
*/
static UINT32 SCROLL_GetThumbVal( SCROLLBAR_INFO *infoPtr, RECT32 *rect,
BOOL32 vertical, INT32 pos )
static UINT SCROLL_GetThumbVal( SCROLLBAR_INFO *infoPtr, RECT *rect,
BOOL vertical, INT pos )
{
INT32 thumbSize;
INT32 pixels = vertical ? rect->bottom-rect->top : rect->right-rect->left;
INT thumbSize;
INT pixels = vertical ? rect->bottom-rect->top : rect->right-rect->left;
if ((pixels -= 2*(SYSMETRICS_CXVSCROLL - SCROLL_ARROW_THUMB_OVERLAP)) <= 0)
return infoPtr->MinVal;
@ -287,9 +287,9 @@ static UINT32 SCROLL_GetThumbVal( SCROLLBAR_INFO *infoPtr, RECT32 *rect,
/***********************************************************************
* SCROLL_PtInRectEx
*/
static BOOL32 SCROLL_PtInRectEx( LPRECT32 lpRect, POINT32 pt, BOOL32 vertical )
static BOOL SCROLL_PtInRectEx( LPRECT lpRect, POINT pt, BOOL vertical )
{
RECT32 rect = *lpRect;
RECT rect = *lpRect;
if (vertical)
{
@ -301,13 +301,13 @@ static BOOL32 SCROLL_PtInRectEx( LPRECT32 lpRect, POINT32 pt, BOOL32 vertical )
rect.top -= lpRect->bottom - lpRect->top;
rect.bottom += lpRect->bottom - lpRect->top;
}
return PtInRect32( &rect, pt );
return PtInRect( &rect, pt );
}
/***********************************************************************
* SCROLL_ClipPos
*/
static POINT32 SCROLL_ClipPos( LPRECT32 lpRect, POINT32 pt )
static POINT SCROLL_ClipPos( LPRECT lpRect, POINT pt )
{
if( pt.x < lpRect->left )
pt.x = lpRect->left;
@ -330,17 +330,17 @@ static POINT32 SCROLL_ClipPos( LPRECT32 lpRect, POINT32 pt )
*
* Scroll-bar hit testing (don't confuse this with WM_NCHITTEST!).
*/
static enum SCROLL_HITTEST SCROLL_HitTest( HWND32 hwnd, INT32 nBar,
POINT32 pt, BOOL32 bDragging )
static enum SCROLL_HITTEST SCROLL_HitTest( HWND hwnd, INT nBar,
POINT pt, BOOL bDragging )
{
INT32 arrowSize, thumbSize, thumbPos;
RECT32 rect;
INT arrowSize, thumbSize, thumbPos;
RECT rect;
BOOL32 vertical = SCROLL_GetScrollBarRect( hwnd, nBar, &rect,
BOOL vertical = SCROLL_GetScrollBarRect( hwnd, nBar, &rect,
&arrowSize, &thumbSize, &thumbPos );
if ( (bDragging && !SCROLL_PtInRectEx( &rect, pt, vertical )) ||
(!PtInRect32( &rect, pt )) ) return SCROLL_NOWHERE;
(!PtInRect( &rect, pt )) ) return SCROLL_NOWHERE;
if (vertical)
{
@ -369,40 +369,40 @@ static enum SCROLL_HITTEST SCROLL_HitTest( HWND32 hwnd, INT32 nBar,
*
* Draw the scroll bar arrows.
*/
static void SCROLL_DrawArrows( HDC32 hdc, SCROLLBAR_INFO *infoPtr,
RECT32 *rect, INT32 arrowSize, BOOL32 vertical,
BOOL32 top_pressed, BOOL32 bottom_pressed )
static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr,
RECT *rect, INT arrowSize, BOOL vertical,
BOOL top_pressed, BOOL bottom_pressed )
{
HDC32 hdcMem = CreateCompatibleDC32( hdc );
HBITMAP32 hbmpPrev = SelectObject32( hdcMem, vertical ?
HDC hdcMem = CreateCompatibleDC( hdc );
HBITMAP hbmpPrev = SelectObject( hdcMem, vertical ?
TOP_ARROW(infoPtr->flags, top_pressed)
: LEFT_ARROW(infoPtr->flags, top_pressed));
SetStretchBltMode32( hdc, STRETCH_DELETESCANS );
StretchBlt32( hdc, rect->left, rect->top,
SetStretchBltMode( hdc, STRETCH_DELETESCANS );
StretchBlt( hdc, rect->left, rect->top,
vertical ? rect->right-rect->left : arrowSize,
vertical ? arrowSize : rect->bottom-rect->top,
hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL,
SRCCOPY );
SelectObject32( hdcMem, vertical ?
SelectObject( hdcMem, vertical ?
BOTTOM_ARROW( infoPtr->flags, bottom_pressed )
: RIGHT_ARROW( infoPtr->flags, bottom_pressed ) );
if (vertical)
StretchBlt32( hdc, rect->left, rect->bottom - arrowSize,
StretchBlt( hdc, rect->left, rect->bottom - arrowSize,
rect->right - rect->left, arrowSize,
hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL,
SRCCOPY );
else
StretchBlt32( hdc, rect->right - arrowSize, rect->top,
StretchBlt( hdc, rect->right - arrowSize, rect->top,
arrowSize, rect->bottom - rect->top,
hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL,
SRCCOPY );
SelectObject32( hdcMem, hbmpPrev );
DeleteDC32( hdcMem );
SelectObject( hdcMem, hbmpPrev );
DeleteDC( hdcMem );
}
@ -411,10 +411,10 @@ static void SCROLL_DrawArrows( HDC32 hdc, SCROLLBAR_INFO *infoPtr,
*
* Draw the moving thumb rectangle.
*/
static void SCROLL_DrawMovingThumb( HDC32 hdc, RECT32 *rect, BOOL32 vertical,
INT32 arrowSize, INT32 thumbSize )
static void SCROLL_DrawMovingThumb( HDC hdc, RECT *rect, BOOL vertical,
INT arrowSize, INT thumbSize )
{
RECT32 r = *rect;
RECT r = *rect;
if (vertical)
{
r.top += SCROLL_TrackingPos;
@ -437,7 +437,7 @@ static void SCROLL_DrawMovingThumb( HDC32 hdc, RECT32 *rect, BOOL32 vertical,
- thumbSize;
r.right = r.left + thumbSize;
}
DrawFocusRect32( hdc, &r );
DrawFocusRect( hdc, &r );
SCROLL_MovingThumb = !SCROLL_MovingThumb;
}
@ -447,31 +447,31 @@ static void SCROLL_DrawMovingThumb( HDC32 hdc, RECT32 *rect, BOOL32 vertical,
*
* Draw the scroll bar interior (everything except the arrows).
*/
static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
RECT32 *rect, INT32 arrowSize,
INT32 thumbSize, INT32 thumbPos,
UINT32 flags, BOOL32 vertical,
BOOL32 top_selected, BOOL32 bottom_selected )
static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
RECT *rect, INT arrowSize,
INT thumbSize, INT thumbPos,
UINT flags, BOOL vertical,
BOOL top_selected, BOOL bottom_selected )
{
RECT32 r;
RECT r;
/* Select the correct brush and pen */
SelectObject32( hdc, GetSysColorPen32(COLOR_WINDOWFRAME) );
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
if ((flags & ESB_DISABLE_BOTH) == ESB_DISABLE_BOTH)
{
/* This ought to be the color of the parent window */
SelectObject32( hdc, GetSysColorBrush32(COLOR_WINDOW) );
SelectObject( hdc, GetSysColorBrush(COLOR_WINDOW) );
}
else
{
if (nBar == SB_CTL) /* Only scrollbar controls send WM_CTLCOLOR */
{
HBRUSH32 hbrush = SendMessage32A(GetParent32(hwnd),
HBRUSH hbrush = SendMessageA(GetParent(hwnd),
WM_CTLCOLORSCROLLBAR, hdc, hwnd );
SelectObject32( hdc, hbrush );
SelectObject( hdc, hbrush );
}
else SelectObject32( hdc, GetSysColorBrush32(COLOR_SCROLLBAR) );
else SelectObject( hdc, GetSysColorBrush(COLOR_SCROLLBAR) );
}
/* Calculate the scroll rectangle */
@ -490,25 +490,25 @@ static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
/* Draw the scroll bar frame */
Rectangle32( hdc, r.left, r.top, r.right, r.bottom );
Rectangle( hdc, r.left, r.top, r.right, r.bottom );
/* Draw the scroll rectangles and thumb */
if (!thumbPos) /* No thumb to draw */
{
PatBlt32( hdc, r.left+1, r.top+1, r.right - r.left - 2,
PatBlt( hdc, r.left+1, r.top+1, r.right - r.left - 2,
r.bottom - r.top - 2, PATCOPY );
return;
}
if (vertical)
{
PatBlt32( hdc, r.left + 1, r.top + 1,
PatBlt( hdc, r.left + 1, r.top + 1,
r.right - r.left - 2,
thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP) - 1,
top_selected ? 0x0f0000 : PATCOPY );
r.top += thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
PatBlt32( hdc, r.left + 1, r.top + thumbSize,
PatBlt( hdc, r.left + 1, r.top + thumbSize,
r.right - r.left - 2,
r.bottom - r.top - thumbSize - 1,
bottom_selected ? 0x0f0000 : PATCOPY );
@ -516,12 +516,12 @@ static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
}
else /* horizontal */
{
PatBlt32( hdc, r.left + 1, r.top + 1,
PatBlt( hdc, r.left + 1, r.top + 1,
thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP) - 1,
r.bottom - r.top - 2,
top_selected ? 0x0f0000 : PATCOPY );
r.left += thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
PatBlt32( hdc, r.left + thumbSize, r.top + 1,
PatBlt( hdc, r.left + thumbSize, r.top + 1,
r.right - r.left - thumbSize - 1,
r.bottom - r.top - 2,
bottom_selected ? 0x0f0000 : PATCOPY );
@ -530,10 +530,10 @@ static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
/* Draw the thumb */
SelectObject32( hdc, GetSysColorBrush32(COLOR_BTNFACE) );
Rectangle32( hdc, r.left, r.top, r.right, r.bottom );
SelectObject( hdc, GetSysColorBrush(COLOR_BTNFACE) );
Rectangle( hdc, r.left, r.top, r.right, r.bottom );
r.top++, r.left++;
DrawEdge32( hdc, &r, EDGE_RAISED, BF_RECT );
DrawEdge( hdc, &r, EDGE_RAISED, BF_RECT );
if (SCROLL_MovingThumb &&
(SCROLL_TrackingWin == hwnd) &&
(SCROLL_TrackingBar == nBar))
@ -549,12 +549,12 @@ static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
*
* Redraw the whole scrollbar.
*/
void SCROLL_DrawScrollBar( HWND32 hwnd, HDC32 hdc, INT32 nBar,
BOOL32 arrows, BOOL32 interior )
void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar,
BOOL arrows, BOOL interior )
{
INT32 arrowSize, thumbSize, thumbPos;
RECT32 rect;
BOOL32 vertical;
INT arrowSize, thumbSize, thumbPos;
RECT rect;
BOOL vertical;
WND *wndPtr = WIN_FindWndPtr( hwnd );
SCROLLBAR_INFO *infoPtr = SCROLL_GetPtrScrollInfo( wndPtr, nBar );
@ -570,7 +570,7 @@ void SCROLL_DrawScrollBar( HWND32 hwnd, HDC32 hdc, INT32 nBar,
if (arrows && arrowSize)
{
if( vertical == SCROLL_trackVertical && GetCapture32() == hwnd )
if( vertical == SCROLL_trackVertical && GetCapture() == hwnd )
SCROLL_DrawArrows( hdc, infoPtr, &rect, arrowSize, vertical,
(SCROLL_trackHitTest == SCROLL_TOP_ARROW),
(SCROLL_trackHitTest == SCROLL_BOTTOM_ARROW) );
@ -590,15 +590,15 @@ void SCROLL_DrawScrollBar( HWND32 hwnd, HDC32 hdc, INT32 nBar,
* Repaint the scroll bar interior after a SetScrollRange() or
* SetScrollPos() call.
*/
static void SCROLL_RefreshScrollBar( HWND32 hwnd, INT32 nBar,
BOOL32 arrows, BOOL32 interior )
static void SCROLL_RefreshScrollBar( HWND hwnd, INT nBar,
BOOL arrows, BOOL interior )
{
HDC32 hdc = GetDCEx32( hwnd, 0,
HDC hdc = GetDCEx( hwnd, 0,
DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW) );
if (!hdc) return;
SCROLL_DrawScrollBar( hwnd, hdc, nBar, arrows, interior );
ReleaseDC32( hwnd, hdc );
ReleaseDC( hwnd, hdc );
}
@ -607,10 +607,10 @@ static void SCROLL_RefreshScrollBar( HWND32 hwnd, INT32 nBar,
*
* Handle a keyboard event (only for SB_CTL scrollbars).
*/
static void SCROLL_HandleKbdEvent( HWND32 hwnd, WPARAM32 wParam )
static void SCROLL_HandleKbdEvent( HWND hwnd, WPARAM wParam )
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
WPARAM32 msg;
WPARAM msg;
switch(wParam)
{
@ -623,7 +623,7 @@ static void SCROLL_HandleKbdEvent( HWND32 hwnd, WPARAM32 wParam )
default:
return;
}
SendMessage32A( GetParent32(hwnd),
SendMessageA( GetParent(hwnd),
(wndPtr->dwStyle & SBS_VERT) ? WM_VSCROLL : WM_HSCROLL,
msg, hwnd );
}
@ -636,33 +636,33 @@ static void SCROLL_HandleKbdEvent( HWND32 hwnd, WPARAM32 wParam )
* 'pt' is the location of the mouse event in client (for SB_CTL) or
* windows coordinates.
*/
void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
{
/* Previous mouse position for timer events */
static POINT32 prevPt;
static POINT prevPt;
/* Thumb position when tracking started. */
static UINT32 trackThumbPos;
static UINT trackThumbPos;
/* Position in the scroll-bar of the last button-down event. */
static INT32 lastClickPos;
static INT lastClickPos;
/* Position in the scroll-bar of the last mouse event. */
static INT32 lastMousePos;
static INT lastMousePos;
enum SCROLL_HITTEST hittest;
HWND32 hwndOwner, hwndCtl;
BOOL32 vertical;
INT32 arrowSize, thumbSize, thumbPos;
RECT32 rect;
HDC32 hdc;
HWND hwndOwner, hwndCtl;
BOOL vertical;
INT arrowSize, thumbSize, thumbPos;
RECT rect;
HDC hdc;
SCROLLBAR_INFO *infoPtr = SCROLL_GetScrollInfo( hwnd, nBar );
if (!infoPtr) return;
if ((SCROLL_trackHitTest == SCROLL_NOWHERE) && (msg != WM_LBUTTONDOWN))
return;
hdc = GetDCEx32( hwnd, 0, DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW));
hdc = GetDCEx( hwnd, 0, DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW));
vertical = SCROLL_GetScrollBarRect( hwnd, nBar, &rect,
&arrowSize, &thumbSize, &thumbPos );
hwndOwner = (nBar == SB_CTL) ? GetParent32(hwnd) : hwnd;
hwndOwner = (nBar == SB_CTL) ? GetParent(hwnd) : hwnd;
hwndCtl = (nBar == SB_CTL) ? hwnd : 0;
switch(msg)
@ -674,8 +674,8 @@ void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
lastMousePos = lastClickPos;
trackThumbPos = thumbPos;
prevPt = pt;
SetCapture32( hwnd );
if (nBar == SB_CTL) SetFocus32( hwnd );
SetCapture( hwnd );
if (nBar == SB_CTL) SetFocus( hwnd );
break;
case WM_MOUSEMOVE:
@ -712,14 +712,14 @@ void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
{
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SendMessage32A( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_LINEUP, hwndCtl );
SetSystemTimer32( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(TIMERPROC32)0 );
(TIMERPROC)0 );
}
}
else KillSystemTimer32( hwnd, SCROLL_TIMER );
else KillSystemTimer( hwnd, SCROLL_TIMER );
break;
case SCROLL_TOP_RECT:
@ -730,14 +730,14 @@ void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
{
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SendMessage32A( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_PAGEUP, hwndCtl );
SetSystemTimer32( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(TIMERPROC32)0 );
(TIMERPROC)0 );
}
}
else KillSystemTimer32( hwnd, SCROLL_TIMER );
else KillSystemTimer( hwnd, SCROLL_TIMER );
break;
case SCROLL_THUMB:
@ -758,7 +758,7 @@ void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
}
else /* WM_MOUSEMOVE */
{
UINT32 pos;
UINT pos;
if (!SCROLL_PtInRectEx( &rect, pt, vertical )) pos = lastClickPos;
else
@ -775,7 +775,7 @@ void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
SCROLL_TrackingVal = SCROLL_GetThumbVal( infoPtr, &rect,
vertical,
SCROLL_TrackingPos );
SendMessage32A( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
MAKEWPARAM( SB_THUMBTRACK, SCROLL_TrackingVal),
hwndCtl );
SCROLL_DrawMovingThumb( hdc, &rect, vertical,
@ -792,14 +792,14 @@ void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
{
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SendMessage32A( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_PAGEDOWN, hwndCtl );
SetSystemTimer32( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(TIMERPROC32)0 );
(TIMERPROC)0 );
}
}
else KillSystemTimer32( hwnd, SCROLL_TIMER );
else KillSystemTimer( hwnd, SCROLL_TIMER );
break;
case SCROLL_BOTTOM_ARROW:
@ -809,14 +809,14 @@ void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
{
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SendMessage32A( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_LINEDOWN, hwndCtl );
SetSystemTimer32( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(TIMERPROC32)0 );
(TIMERPROC)0 );
}
}
else KillSystemTimer32( hwnd, SCROLL_TIMER );
else KillSystemTimer( hwnd, SCROLL_TIMER );
break;
}
@ -827,31 +827,31 @@ void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
if (hittest == SCROLL_THUMB)
{
UINT32 val = SCROLL_GetThumbVal( infoPtr, &rect, vertical,
UINT val = SCROLL_GetThumbVal( infoPtr, &rect, vertical,
trackThumbPos + lastMousePos - lastClickPos );
SendMessage32A( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
MAKEWPARAM( SB_THUMBPOSITION, val ), hwndCtl );
}
else
SendMessage32A( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_ENDSCROLL, hwndCtl );
}
ReleaseDC32( hwnd, hdc );
ReleaseDC( hwnd, hdc );
}
/***********************************************************************
* ScrollBarWndProc
*/
LRESULT WINAPI ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam )
{
switch(message)
{
case WM_CREATE:
{
CREATESTRUCT32A *lpCreat = (CREATESTRUCT32A *)lParam;
CREATESTRUCTA *lpCreat = (CREATESTRUCTA *)lParam;
if (lpCreat->style & SBS_SIZEBOX)
{
FIXME(scroll, "Unimplemented style SBS_SIZEBOX.\n" );
@ -861,10 +861,10 @@ LRESULT WINAPI ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
if (lpCreat->style & SBS_VERT)
{
if (lpCreat->style & SBS_LEFTALIGN)
MoveWindow32( hwnd, lpCreat->x, lpCreat->y,
MoveWindow( hwnd, lpCreat->x, lpCreat->y,
SYSMETRICS_CXVSCROLL+1, lpCreat->cy, FALSE );
else if (lpCreat->style & SBS_RIGHTALIGN)
MoveWindow32( hwnd,
MoveWindow( hwnd,
lpCreat->x+lpCreat->cx-SYSMETRICS_CXVSCROLL-1,
lpCreat->y,
SYSMETRICS_CXVSCROLL+1, lpCreat->cy, FALSE );
@ -872,10 +872,10 @@ LRESULT WINAPI ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
else /* SBS_HORZ */
{
if (lpCreat->style & SBS_TOPALIGN)
MoveWindow32( hwnd, lpCreat->x, lpCreat->y,
MoveWindow( hwnd, lpCreat->x, lpCreat->y,
lpCreat->cx, SYSMETRICS_CYHSCROLL+1, FALSE );
else if (lpCreat->style & SBS_BOTTOMALIGN)
MoveWindow32( hwnd,
MoveWindow( hwnd,
lpCreat->x,
lpCreat->y+lpCreat->cy-SYSMETRICS_CYHSCROLL-1,
lpCreat->cx, SYSMETRICS_CYHSCROLL+1, FALSE );
@ -890,7 +890,7 @@ LRESULT WINAPI ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
case WM_MOUSEMOVE:
case WM_SYSTIMER:
{
POINT32 pt;
POINT pt;
CONV_POINT16TO32( (POINT16 *)&lParam, &pt );
SCROLL_HandleScrollEvent( hwnd, SB_CTL, message, pt );
}
@ -908,51 +908,51 @@ LRESULT WINAPI ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
case WM_PAINT:
{
PAINTSTRUCT32 ps;
HDC32 hdc = BeginPaint32( hwnd, &ps );
PAINTSTRUCT ps;
HDC hdc = BeginPaint( hwnd, &ps );
SCROLL_DrawScrollBar( hwnd, hdc, SB_CTL, TRUE, TRUE );
EndPaint32( hwnd, &ps );
EndPaint( hwnd, &ps );
}
break;
case SBM_SETPOS16:
case SBM_SETPOS32:
return SetScrollPos32( hwnd, SB_CTL, wParam, (BOOL32)lParam );
case SBM_SETPOS:
return SetScrollPos( hwnd, SB_CTL, wParam, (BOOL)lParam );
case SBM_GETPOS16:
case SBM_GETPOS32:
return GetScrollPos32( hwnd, SB_CTL );
case SBM_GETPOS:
return GetScrollPos( hwnd, SB_CTL );
case SBM_SETRANGE16:
SetScrollRange32( hwnd, SB_CTL, LOWORD(lParam), HIWORD(lParam),
SetScrollRange( hwnd, SB_CTL, LOWORD(lParam), HIWORD(lParam),
wParam /* FIXME: Is this correct? */ );
return 0;
case SBM_SETRANGE32:
SetScrollRange32( hwnd, SB_CTL, wParam, lParam, FALSE );
case SBM_SETRANGE:
SetScrollRange( hwnd, SB_CTL, wParam, lParam, FALSE );
return 0; /* FIXME: return previous position */
case SBM_GETRANGE16:
FIXME(scroll, "don't know how to handle SBM_GETRANGE16 (wp=%04x,lp=%08lx)\n", wParam, lParam );
return 0;
case SBM_GETRANGE32:
GetScrollRange32( hwnd, SB_CTL, (LPINT32)wParam, (LPINT32)lParam );
case SBM_GETRANGE:
GetScrollRange( hwnd, SB_CTL, (LPINT)wParam, (LPINT)lParam );
return 0;
case SBM_ENABLE_ARROWS16:
case SBM_ENABLE_ARROWS32:
return EnableScrollBar32( hwnd, SB_CTL, wParam );
case SBM_ENABLE_ARROWS:
return EnableScrollBar( hwnd, SB_CTL, wParam );
case SBM_SETRANGEREDRAW32:
SetScrollRange32( hwnd, SB_CTL, wParam, lParam, TRUE );
case SBM_SETRANGEREDRAW:
SetScrollRange( hwnd, SB_CTL, wParam, lParam, TRUE );
return 0; /* FIXME: return previous position */
case SBM_SETSCROLLINFO32:
return SetScrollInfo32( hwnd, SB_CTL, (SCROLLINFO *)lParam, wParam );
case SBM_SETSCROLLINFO:
return SetScrollInfo( hwnd, SB_CTL, (SCROLLINFO *)lParam, wParam );
case SBM_GETSCROLLINFO32:
return GetScrollInfo32( hwnd, SB_CTL, (SCROLLINFO *)lParam );
case SBM_GETSCROLLINFO:
return GetScrollInfo( hwnd, SB_CTL, (SCROLLINFO *)lParam );
case 0x00e5:
case 0x00e7:
@ -970,7 +970,7 @@ LRESULT WINAPI ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
if (message >= WM_USER)
WARN(scroll, "unknown msg %04x wp=%04x lp=%08lx\n",
message, wParam, lParam );
return DefWindowProc32A( hwnd, message, wParam, lParam );
return DefWindowProcA( hwnd, message, wParam, lParam );
}
return 0;
}
@ -982,7 +982,7 @@ LRESULT WINAPI ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
INT16 WINAPI SetScrollInfo16( HWND16 hwnd, INT16 nBar, const SCROLLINFO *info,
BOOL16 bRedraw )
{
return (INT16)SetScrollInfo32( hwnd, nBar, info, bRedraw );
return (INT16)SetScrollInfo( hwnd, nBar, info, bRedraw );
}
@ -1000,14 +1000,14 @@ INT16 WINAPI SetScrollInfo16( HWND16 hwnd, INT16 nBar, const SCROLLINFO *info,
* (corresponding to the 76 different positions of the window on
* the text), and info->nPage=25.
*/
INT32 WINAPI SetScrollInfo32(
HWND32 hwnd /* [I] Handle of window whose scrollbar will be affected */,
INT32 nBar /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */,
INT WINAPI SetScrollInfo(
HWND hwnd /* [I] Handle of window whose scrollbar will be affected */,
INT nBar /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */,
const SCROLLINFO *info /* [I] Specifies what to change and new values */,
BOOL32 bRedraw /* [I] Should scrollbar be redrawn afterwards ? */)
BOOL bRedraw /* [I] Should scrollbar be redrawn afterwards ? */)
{
INT32 action;
INT32 retVal = SCROLL_SetScrollInfo( hwnd, nBar, info, &action );
INT action;
INT retVal = SCROLL_SetScrollInfo( hwnd, nBar, info, &action );
if( action & SA_SSI_HIDE )
SCROLL_ShowScrollBar( hwnd, nBar, FALSE, FALSE );
@ -1025,14 +1025,14 @@ BOOL32 bRedraw /* [I] Should scrollbar be redrawn afterwards ? */)
return retVal;
}
INT32 SCROLL_SetScrollInfo( HWND32 hwnd, INT32 nBar,
const SCROLLINFO *info, INT32 *action )
INT SCROLL_SetScrollInfo( HWND hwnd, INT nBar,
const SCROLLINFO *info, INT *action )
{
/* Update the scrollbar state and set action flags according to
* what has to be done graphics wise. */
SCROLLBAR_INFO *infoPtr;
UINT32 new_flags;
UINT new_flags;
dbg_decl_str(scroll, 256);
@ -1075,7 +1075,7 @@ INT32 SCROLL_SetScrollInfo( HWND32 hwnd, INT32 nBar,
/* Invalid range -> range is set to (0,0) */
if ((info->nMin > info->nMax) ||
((UINT32)(info->nMax - info->nMin) >= 0x80000000))
((UINT)(info->nMax - info->nMin) >= 0x80000000))
{
infoPtr->MinVal = 0;
infoPtr->MaxVal = 0;
@ -1157,7 +1157,7 @@ done:
*/
BOOL16 WINAPI GetScrollInfo16( HWND16 hwnd, INT16 nBar, LPSCROLLINFO info )
{
return GetScrollInfo32( hwnd, nBar, info );
return GetScrollInfo( hwnd, nBar, info );
}
@ -1168,9 +1168,9 @@ BOOL16 WINAPI GetScrollInfo16( HWND16 hwnd, INT16 nBar, LPSCROLLINFO info )
*
* RETURNS STD
*/
BOOL32 WINAPI GetScrollInfo32(
HWND32 hwnd /* [I] Handle of window */ ,
INT32 nBar /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */,
BOOL WINAPI GetScrollInfo(
HWND hwnd /* [I] Handle of window */ ,
INT nBar /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */,
LPSCROLLINFO info /* [IO] (info.fMask [I] specifies which values are to retrieve) */)
{
SCROLLBAR_INFO *infoPtr;
@ -1199,7 +1199,7 @@ BOOL32 WINAPI GetScrollInfo32(
INT16 WINAPI SetScrollPos16( HWND16 hwnd, INT16 nBar, INT16 nPos,
BOOL16 bRedraw )
{
return (INT16)SetScrollPos32( hwnd, nBar, nPos, bRedraw );
return (INT16)SetScrollPos( hwnd, nBar, nPos, bRedraw );
}
@ -1214,22 +1214,22 @@ INT16 WINAPI SetScrollPos16( HWND16 hwnd, INT16 nBar, INT16 nPos,
* Note the ambiguity when 0 is returned. Use GetLastError
* to make sure there was an error (and to know which one).
*/
INT32 WINAPI SetScrollPos32(
HWND32 hwnd /* [I] Handle of window whose scrollbar will be affected */,
INT32 nBar /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */,
INT32 nPos /* [I] New value */,
BOOL32 bRedraw /* [I] Should scrollbar be redrawn afterwards ? */ )
INT WINAPI SetScrollPos(
HWND hwnd /* [I] Handle of window whose scrollbar will be affected */,
INT nBar /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */,
INT nPos /* [I] New value */,
BOOL bRedraw /* [I] Should scrollbar be redrawn afterwards ? */ )
{
SCROLLINFO info;
SCROLLBAR_INFO *infoPtr;
INT32 oldPos;
INT oldPos;
if (!(infoPtr = SCROLL_GetScrollInfo( hwnd, nBar ))) return 0;
oldPos = infoPtr->CurVal;
info.cbSize = sizeof(info);
info.nPos = nPos;
info.fMask = SIF_POS;
SetScrollInfo32( hwnd, nBar, &info, bRedraw );
SetScrollInfo( hwnd, nBar, &info, bRedraw );
return oldPos;
}
@ -1239,7 +1239,7 @@ BOOL32 bRedraw /* [I] Should scrollbar be redrawn afterwards ? */ )
*/
INT16 WINAPI GetScrollPos16( HWND16 hwnd, INT16 nBar )
{
return (INT16)GetScrollPos32( hwnd, nBar );
return (INT16)GetScrollPos( hwnd, nBar );
}
@ -1254,9 +1254,9 @@ INT16 WINAPI GetScrollPos16( HWND16 hwnd, INT16 nBar )
* Note the ambiguity when 0 is returned. Use GetLastError
* to make sure there was an error (and to know which one).
*/
INT32 WINAPI GetScrollPos32(
HWND32 hwnd, /* [I] Handle of window */
INT32 nBar /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */)
INT WINAPI GetScrollPos(
HWND hwnd, /* [I] Handle of window */
INT nBar /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */)
{
SCROLLBAR_INFO *infoPtr;
@ -1272,8 +1272,8 @@ void WINAPI SetScrollRange16( HWND16 hwnd, INT16 nBar,
INT16 MinVal, INT16 MaxVal, BOOL16 bRedraw )
{
/* Invalid range -> range is set to (0,0) */
if ((INT32)MaxVal - (INT32)MinVal > 0x7fff) MinVal = MaxVal = 0;
SetScrollRange32( hwnd, nBar, MinVal, MaxVal, bRedraw );
if ((INT)MaxVal - (INT)MinVal > 0x7fff) MinVal = MaxVal = 0;
SetScrollRange( hwnd, nBar, MinVal, MaxVal, bRedraw );
}
@ -1282,12 +1282,12 @@ void WINAPI SetScrollRange16( HWND16 hwnd, INT16 nBar,
*
* RETURNS STD
*/
BOOL32 WINAPI SetScrollRange32(
HWND32 hwnd, /* [I] Handle of window whose scrollbar will be affected */
INT32 nBar, /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */
INT32 MinVal, /* [I] New minimum value */
INT32 MaxVal, /* [I] New maximum value */
BOOL32 bRedraw /* [I] Should scrollbar be redrawn afterwards ? */)
BOOL WINAPI SetScrollRange(
HWND hwnd, /* [I] Handle of window whose scrollbar will be affected */
INT nBar, /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */
INT MinVal, /* [I] New minimum value */
INT MaxVal, /* [I] New maximum value */
BOOL bRedraw /* [I] Should scrollbar be redrawn afterwards ? */)
{
SCROLLINFO info;
@ -1295,7 +1295,7 @@ BOOL32 bRedraw /* [I] Should scrollbar be redrawn afterwards ? */)
info.nMin = MinVal;
info.nMax = MaxVal;
info.fMask = SIF_RANGE;
SetScrollInfo32( hwnd, nBar, &info, bRedraw );
SetScrollInfo( hwnd, nBar, &info, bRedraw );
return TRUE;
}
@ -1305,10 +1305,10 @@ BOOL32 bRedraw /* [I] Should scrollbar be redrawn afterwards ? */)
*
* Updates both scrollbars at the same time. Used by MDI CalcChildScroll().
*/
INT32 SCROLL_SetNCSbState(WND* wndPtr, int vMin, int vMax, int vPos,
INT SCROLL_SetNCSbState(WND* wndPtr, int vMin, int vMax, int vPos,
int hMin, int hMax, int hPos)
{
INT32 vA, hA;
INT vA, hA;
SCROLLINFO vInfo, hInfo;
vInfo.cbSize = hInfo.cbSize = sizeof(SCROLLINFO);
@ -1340,8 +1340,8 @@ INT32 SCROLL_SetNCSbState(WND* wndPtr, int vMin, int vMax, int vPos,
BOOL16 WINAPI GetScrollRange16( HWND16 hwnd, INT16 nBar,
LPINT16 lpMin, LPINT16 lpMax)
{
INT32 min, max;
BOOL16 ret = GetScrollRange32( hwnd, nBar, &min, &max );
INT min, max;
BOOL16 ret = GetScrollRange( hwnd, nBar, &min, &max );
if (lpMin) *lpMin = min;
if (lpMax) *lpMax = max;
return ret;
@ -1353,11 +1353,11 @@ BOOL16 WINAPI GetScrollRange16( HWND16 hwnd, INT16 nBar,
*
* RETURNS STD
*/
BOOL32 WINAPI GetScrollRange32(
HWND32 hwnd, /* [I] Handle of window */
INT32 nBar, /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */
LPINT32 lpMin, /* [O] Where to store minimum value */
LPINT32 lpMax /* [O] Where to store maximum value */)
BOOL WINAPI GetScrollRange(
HWND hwnd, /* [I] Handle of window */
INT nBar, /* [I] One of SB_HORZ, SB_VERT, or SB_CTL */
LPINT lpMin, /* [O] Where to store minimum value */
LPINT lpMax /* [O] Where to store maximum value */)
{
SCROLLBAR_INFO *infoPtr;
@ -1379,8 +1379,8 @@ LPINT32 lpMax /* [O] Where to store maximum value */)
* Back-end for ShowScrollBar(). Returns FALSE if no action was taken.
* NOTE: fShowV/fShowH must be zero when nBar is SB_HORZ/SB_VERT.
*/
BOOL32 SCROLL_ShowScrollBar( HWND32 hwnd, INT32 nBar,
BOOL32 fShowH, BOOL32 fShowV )
BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar,
BOOL fShowH, BOOL fShowV )
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
@ -1391,7 +1391,7 @@ BOOL32 SCROLL_ShowScrollBar( HWND32 hwnd, INT32 nBar,
switch(nBar)
{
case SB_CTL:
ShowWindow32( hwnd, fShowH ? SW_SHOW : SW_HIDE );
ShowWindow( hwnd, fShowH ? SW_SHOW : SW_HIDE );
return TRUE;
case SB_BOTH:
@ -1428,7 +1428,7 @@ BOOL32 SCROLL_ShowScrollBar( HWND32 hwnd, INT32 nBar,
if( fShowH || fShowV ) /* frame has been changed, let the window redraw itself */
{
SetWindowPos32( hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE
SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE
| SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
return TRUE;
}
@ -1452,10 +1452,10 @@ void WINAPI ShowScrollBar16( HWND16 hwnd, INT16 nBar, BOOL16 fShow )
*
* RETURNS STD
*/
BOOL32 WINAPI ShowScrollBar32(
HWND32 hwnd, /* [I] Handle of window whose scrollbar(s) will be affected */
INT32 nBar, /* [I] One of SB_HORZ, SB_VERT, SB_BOTH or SB_CTL */
BOOL32 fShow /* [I] TRUE = show, FALSE = hide */)
BOOL WINAPI ShowScrollBar(
HWND hwnd, /* [I] Handle of window whose scrollbar(s) will be affected */
INT nBar, /* [I] One of SB_HORZ, SB_VERT, SB_BOTH or SB_CTL */
BOOL fShow /* [I] TRUE = show, FALSE = hide */)
{
SCROLL_ShowScrollBar( hwnd, nBar, (nBar == SB_VERT) ? 0 : fShow,
(nBar == SB_HORZ) ? 0 : fShow );
@ -1468,16 +1468,16 @@ BOOL32 fShow /* [I] TRUE = show, FALSE = hide */)
*/
BOOL16 WINAPI EnableScrollBar16( HWND16 hwnd, INT16 nBar, UINT16 flags )
{
return EnableScrollBar32( hwnd, nBar, flags );
return EnableScrollBar( hwnd, nBar, flags );
}
/*************************************************************************
* EnableScrollBar32 (USER32.171)
*/
BOOL32 WINAPI EnableScrollBar32( HWND32 hwnd, INT32 nBar, UINT32 flags )
BOOL WINAPI EnableScrollBar( HWND hwnd, INT nBar, UINT flags )
{
BOOL32 bFineWithMe;
BOOL bFineWithMe;
SCROLLBAR_INFO *infoPtr;
TRACE(scroll, "%04x %d %d\n", hwnd, nBar, flags );

View File

@ -14,16 +14,16 @@
#include "debug.h"
#include "tweak.h"
static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintIconfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintBitmapfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintEtchedfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintBitmapfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintEtchedfn( WND *wndPtr, HDC hdc );
static COLORREF color_windowframe, color_background, color_window;
typedef void (*pfPaint)( WND *, HDC32 );
typedef void (*pfPaint)( WND *, HDC );
static pfPaint staticPaintFunc[SS_TYPEMASK+1] =
{
@ -69,7 +69,7 @@ static HICON16 STATIC_SetIcon( WND *wndPtr, HICON16 hicon )
infoPtr->hIcon = hicon;
if (hicon)
{
SetWindowPos32( wndPtr->hwndSelf, 0, 0, 0, info->nWidth, info->nHeight,
SetWindowPos( wndPtr->hwndSelf, 0, 0, 0, info->nWidth, info->nHeight,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
GlobalUnlock16( hicon );
}
@ -96,7 +96,7 @@ static HICON16 STATIC_SetBitmap( WND *wndPtr, HICON16 hicon )
infoPtr->hIcon = hicon;
if (hicon)
{
SetWindowPos32( wndPtr->hwndSelf, 0, 0, 0, info->bitmap.bmWidth, info->bitmap.bmHeight,
SetWindowPos( wndPtr->hwndSelf, 0, 0, 0, info->bitmap.bmWidth, info->bitmap.bmHeight,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
}
GDI_HEAP_UNLOCK( hicon );
@ -120,7 +120,7 @@ static HICON16 STATIC_LoadIcon( WND *wndPtr, LPCSTR name )
hicon = LoadIcon16( wndPtr->hInstance, SEGPTR_GET(segname) );
SEGPTR_FREE(segname);
} else
hicon = LoadIcon32A( wndPtr->hInstance, name );
hicon = LoadIconA( wndPtr->hInstance, name );
} else {
LPSTR segname = SEGPTR_STRDUP(name);
@ -130,7 +130,7 @@ static HICON16 STATIC_LoadIcon( WND *wndPtr, LPCSTR name )
SEGPTR_FREE(segname);
}
if (!hicon)
hicon = LoadIcon32A( 0, name );
hicon = LoadIconA( 0, name );
return hicon;
}
@ -145,16 +145,16 @@ static HBITMAP16 STATIC_LoadBitmap( WND *wndPtr, LPCSTR name )
if (wndPtr->flags & WIN_ISWIN32)
{
hbitmap = LoadBitmap32A( wndPtr->hInstance, name );
hbitmap = LoadBitmapA( wndPtr->hInstance, name );
if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */
hbitmap = LoadBitmap32A( 0, name );
hbitmap = LoadBitmapA( 0, name );
}
else
{
LPSTR segname = SEGPTR_STRDUP(name);
hbitmap = LoadBitmap16( wndPtr->hInstance, SEGPTR_GET(segname) );
if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */
hbitmap = LoadBitmap32A( 0, segname );
hbitmap = LoadBitmapA( 0, segname );
SEGPTR_FREE(segname);
}
return hbitmap;
@ -164,7 +164,7 @@ static HBITMAP16 STATIC_LoadBitmap( WND *wndPtr, LPCSTR name )
/***********************************************************************
* StaticWndProc
*/
LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
LRESULT WINAPI StaticWndProc( HWND hWnd, UINT uMsg, WPARAM wParam,
LPARAM lParam )
{
LRESULT lResult = 0;
@ -175,7 +175,7 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
switch (uMsg)
{
case WM_NCCREATE: {
CREATESTRUCT32A *cs = (CREATESTRUCT32A *)lParam;
CREATESTRUCTA *cs = (CREATESTRUCTA *)lParam;
if ((TWEAK_WineLook > WIN31_LOOK) && (wndPtr->dwStyle & SS_SUNKEN))
wndPtr->dwExStyle |= WS_EX_STATICEDGE;
@ -204,7 +204,7 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
);
return 1;
}
return DefWindowProc32A( hWnd, uMsg, wParam, lParam );
return DefWindowProcA( hWnd, uMsg, wParam, lParam );
}
case WM_CREATE:
if (style < 0L || style > SS_TYPEMASK)
@ -214,9 +214,9 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
break;
}
/* initialise colours */
color_windowframe = GetSysColor32(COLOR_WINDOWFRAME);
color_background = GetSysColor32(COLOR_BACKGROUND);
color_window = GetSysColor32(COLOR_WINDOW);
color_windowframe = GetSysColor(COLOR_WINDOWFRAME);
color_background = GetSysColor(COLOR_BACKGROUND);
color_window = GetSysColor(COLOR_WINDOW);
break;
case WM_NCDESTROY:
@ -230,29 +230,29 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
* GlobalFree16 the handle.
*/
} else {
lResult = DefWindowProc32A( hWnd, uMsg, wParam, lParam );
lResult = DefWindowProcA( hWnd, uMsg, wParam, lParam );
}
break;
case WM_PAINT:
{
PAINTSTRUCT32 ps;
BeginPaint32( hWnd, &ps );
PAINTSTRUCT ps;
BeginPaint( hWnd, &ps );
if (staticPaintFunc[style])
(staticPaintFunc[style])( wndPtr, ps.hdc );
EndPaint32( hWnd, &ps );
EndPaint( hWnd, &ps );
}
break;
case WM_ENABLE:
InvalidateRect32( hWnd, NULL, FALSE );
InvalidateRect( hWnd, NULL, FALSE );
break;
case WM_SYSCOLORCHANGE:
color_windowframe = GetSysColor32(COLOR_WINDOWFRAME);
color_background = GetSysColor32(COLOR_BACKGROUND);
color_window = GetSysColor32(COLOR_WINDOW);
InvalidateRect32( hWnd, NULL, TRUE );
color_windowframe = GetSysColor(COLOR_WINDOWFRAME);
color_background = GetSysColor(COLOR_BACKGROUND);
color_window = GetSysColor(COLOR_WINDOW);
InvalidateRect( hWnd, NULL, TRUE );
break;
case WM_SETTEXT:
@ -263,8 +263,8 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
STATIC_SetBitmap(wndPtr,STATIC_LoadBitmap(wndPtr,(LPCSTR)lParam ));
else
DEFWND_SetText( wndPtr, (LPCSTR)lParam );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
InvalidateRect( hWnd, NULL, FALSE );
UpdateWindow( hWnd );
break;
case WM_SETFONT:
@ -273,8 +273,8 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
infoPtr->hFont = (HFONT16)wParam;
if (LOWORD(lParam))
{
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
InvalidateRect( hWnd, NULL, FALSE );
UpdateWindow( hWnd );
}
break;
@ -289,25 +289,25 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
case STM_GETIMAGE:
case STM_GETICON16:
case STM_GETICON32:
case STM_GETICON:
return infoPtr->hIcon;
case STM_SETIMAGE:
/* FIXME: handle wParam */
lResult = STATIC_SetBitmap( wndPtr, (HBITMAP32)lParam );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
lResult = STATIC_SetBitmap( wndPtr, (HBITMAP)lParam );
InvalidateRect( hWnd, NULL, FALSE );
UpdateWindow( hWnd );
break;
case STM_SETICON16:
case STM_SETICON32:
case STM_SETICON:
lResult = STATIC_SetIcon( wndPtr, (HICON16)wParam );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
InvalidateRect( hWnd, NULL, FALSE );
UpdateWindow( hWnd );
break;
default:
lResult = DefWindowProc32A(hWnd, uMsg, wParam, lParam);
lResult = DefWindowProcA(hWnd, uMsg, wParam, lParam);
break;
}
@ -315,16 +315,16 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
}
static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc )
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
{
RECT32 rc;
HBRUSH32 hBrush;
RECT rc;
HBRUSH hBrush;
WORD wFormat;
LONG style = wndPtr->dwStyle;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
GetClientRect32( wndPtr->hwndSelf, &rc);
GetClientRect( wndPtr->hwndSelf, &rc);
switch (style & SS_TYPEMASK)
{
@ -355,133 +355,133 @@ static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc )
if (style & SS_NOPREFIX)
wFormat |= DT_NOPREFIX;
if (infoPtr->hFont) SelectObject32( hdc, infoPtr->hFont );
hBrush = SendMessage32A( GetParent32(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
if (infoPtr->hFont) SelectObject( hdc, infoPtr->hFont );
hBrush = SendMessageA( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
hdc, wndPtr->hwndSelf );
if (!hBrush) hBrush = GetStockObject32(WHITE_BRUSH);
FillRect32( hdc, &rc, hBrush );
if (wndPtr->text) DrawText32A( hdc, wndPtr->text, -1, &rc, wFormat );
if (!hBrush) hBrush = GetStockObject(WHITE_BRUSH);
FillRect( hdc, &rc, hBrush );
if (wndPtr->text) DrawTextA( hdc, wndPtr->text, -1, &rc, wFormat );
}
static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc )
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
{
RECT32 rc;
HBRUSH32 hBrush;
RECT rc;
HBRUSH hBrush;
GetClientRect32( wndPtr->hwndSelf, &rc);
GetClientRect( wndPtr->hwndSelf, &rc);
switch (wndPtr->dwStyle & SS_TYPEMASK)
{
case SS_BLACKRECT:
hBrush = CreateSolidBrush32(color_windowframe);
FillRect32( hdc, &rc, hBrush );
hBrush = CreateSolidBrush(color_windowframe);
FillRect( hdc, &rc, hBrush );
break;
case SS_GRAYRECT:
hBrush = CreateSolidBrush32(color_background);
FillRect32( hdc, &rc, hBrush );
hBrush = CreateSolidBrush(color_background);
FillRect( hdc, &rc, hBrush );
break;
case SS_WHITERECT:
hBrush = CreateSolidBrush32(color_window);
FillRect32( hdc, &rc, hBrush );
hBrush = CreateSolidBrush(color_window);
FillRect( hdc, &rc, hBrush );
break;
case SS_BLACKFRAME:
hBrush = CreateSolidBrush32(color_windowframe);
FrameRect32( hdc, &rc, hBrush );
hBrush = CreateSolidBrush(color_windowframe);
FrameRect( hdc, &rc, hBrush );
break;
case SS_GRAYFRAME:
hBrush = CreateSolidBrush32(color_background);
FrameRect32( hdc, &rc, hBrush );
hBrush = CreateSolidBrush(color_background);
FrameRect( hdc, &rc, hBrush );
break;
case SS_WHITEFRAME:
hBrush = CreateSolidBrush32(color_window);
FrameRect32( hdc, &rc, hBrush );
hBrush = CreateSolidBrush(color_window);
FrameRect( hdc, &rc, hBrush );
break;
default:
return;
}
DeleteObject32( hBrush );
DeleteObject( hBrush );
}
static void STATIC_PaintIconfn( WND *wndPtr, HDC32 hdc )
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc )
{
RECT32 rc;
HBRUSH32 hbrush;
RECT rc;
HBRUSH hbrush;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
GetClientRect32( wndPtr->hwndSelf, &rc );
hbrush = SendMessage32A( GetParent32(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
GetClientRect( wndPtr->hwndSelf, &rc );
hbrush = SendMessageA( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
hdc, wndPtr->hwndSelf );
FillRect32( hdc, &rc, hbrush );
if (infoPtr->hIcon) DrawIcon32( hdc, rc.left, rc.top, infoPtr->hIcon );
FillRect( hdc, &rc, hbrush );
if (infoPtr->hIcon) DrawIcon( hdc, rc.left, rc.top, infoPtr->hIcon );
}
static void STATIC_PaintBitmapfn(WND *wndPtr, HDC32 hdc )
static void STATIC_PaintBitmapfn(WND *wndPtr, HDC hdc )
{
RECT32 rc;
HBRUSH32 hbrush;
RECT rc;
HBRUSH hbrush;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
HDC32 hMemDC;
HBITMAP32 oldbitmap;
HDC hMemDC;
HBITMAP oldbitmap;
GetClientRect32( wndPtr->hwndSelf, &rc );
hbrush = SendMessage32A( GetParent32(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
GetClientRect( wndPtr->hwndSelf, &rc );
hbrush = SendMessageA( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
hdc, wndPtr->hwndSelf );
FillRect32( hdc, &rc, hbrush );
FillRect( hdc, &rc, hbrush );
if (infoPtr->hIcon) {
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_HEAP_LOCK( infoPtr->hIcon );
if (!bmp) return;
if (!(hMemDC = CreateCompatibleDC32( hdc ))) return;
if (!(hMemDC = CreateCompatibleDC( hdc ))) return;
oldbitmap = SelectObject32(hMemDC,infoPtr->hIcon);
BitBlt32(hdc,bmp->size.cx,bmp->size.cy,bmp->bitmap.bmWidth,bmp->bitmap.bmHeight,hMemDC,0,0,SRCCOPY);
DeleteDC32(hMemDC);
oldbitmap = SelectObject(hMemDC,infoPtr->hIcon);
BitBlt(hdc,bmp->size.cx,bmp->size.cy,bmp->bitmap.bmWidth,bmp->bitmap.bmHeight,hMemDC,0,0,SRCCOPY);
DeleteDC(hMemDC);
GDI_HEAP_UNLOCK(infoPtr->hIcon);
}
}
static void STATIC_PaintEtchedfn( WND *wndPtr, HDC32 hdc )
static void STATIC_PaintEtchedfn( WND *wndPtr, HDC hdc )
{
RECT32 rc;
HBRUSH32 hbrush;
HPEN32 hpen;
RECT rc;
HBRUSH hbrush;
HPEN hpen;
if (TWEAK_WineLook == WIN31_LOOK)
return;
GetClientRect32( wndPtr->hwndSelf, &rc );
hbrush = SendMessage32A( GetParent32(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
GetClientRect( wndPtr->hwndSelf, &rc );
hbrush = SendMessageA( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
hdc, wndPtr->hwndSelf );
FillRect32( hdc, &rc, hbrush );
FillRect( hdc, &rc, hbrush );
switch (wndPtr->dwStyle & SS_TYPEMASK)
{
case SS_ETCHEDHORZ:
hpen = SelectObject32 (hdc, GetSysColorPen32 (COLOR_3DSHADOW));
MoveToEx32 (hdc, rc.left, rc.bottom / 2 - 1, NULL);
LineTo32 (hdc, rc.right - 1, rc.bottom / 2 - 1);
SelectObject32 (hdc, GetSysColorPen32 (COLOR_3DHIGHLIGHT));
MoveToEx32 (hdc, rc.left, rc.bottom / 2, NULL);
LineTo32 (hdc, rc.right, rc.bottom / 2);
LineTo32 (hdc, rc.right, rc.bottom / 2 - 1);
SelectObject32 (hdc, hpen);
hpen = SelectObject (hdc, GetSysColorPen (COLOR_3DSHADOW));
MoveToEx (hdc, rc.left, rc.bottom / 2 - 1, NULL);
LineTo (hdc, rc.right - 1, rc.bottom / 2 - 1);
SelectObject (hdc, GetSysColorPen (COLOR_3DHIGHLIGHT));
MoveToEx (hdc, rc.left, rc.bottom / 2, NULL);
LineTo (hdc, rc.right, rc.bottom / 2);
LineTo (hdc, rc.right, rc.bottom / 2 - 1);
SelectObject (hdc, hpen);
break;
case SS_ETCHEDVERT:
hpen = SelectObject32 (hdc, GetSysColorPen32 (COLOR_3DSHADOW));
MoveToEx32 (hdc, rc.right / 2 - 1, rc.top, NULL);
LineTo32 (hdc, rc.right / 2 - 1, rc.bottom - 1);
SelectObject32 (hdc, GetSysColorPen32 (COLOR_3DHIGHLIGHT));
MoveToEx32 (hdc, rc.right / 2, rc.top, NULL);
LineTo32 (hdc, rc.right / 2, rc.bottom);
LineTo32 (hdc, rc.right / 2 -1 , rc.bottom);
SelectObject32 (hdc, hpen);
hpen = SelectObject (hdc, GetSysColorPen (COLOR_3DSHADOW));
MoveToEx (hdc, rc.right / 2 - 1, rc.top, NULL);
LineTo (hdc, rc.right / 2 - 1, rc.bottom - 1);
SelectObject (hdc, GetSysColorPen (COLOR_3DHIGHLIGHT));
MoveToEx (hdc, rc.right / 2, rc.top, NULL);
LineTo (hdc, rc.right / 2, rc.bottom);
LineTo (hdc, rc.right / 2 -1 , rc.bottom);
SelectObject (hdc, hpen);
break;
case SS_ETCHEDFRAME:
DrawEdge32 (hdc, &rc, EDGE_ETCHED, BF_RECT);
DrawEdge (hdc, &rc, EDGE_ETCHED, BF_RECT);
break;
}
}

View File

@ -97,28 +97,28 @@ static const char LTRBInnerFlat[] = {
*
* See also comments with UITOOLS_DrawRectEdge()
*/
static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
UINT32 uType, UINT32 uFlags)
static BOOL UITOOLS95_DrawDiagEdge(HDC hdc, LPRECT rc,
UINT uType, UINT uFlags)
{
POINT32 Points[4];
POINT Points[4];
char InnerI, OuterI;
HPEN32 InnerPen, OuterPen;
POINT32 SavePoint;
HPEN32 SavePen;
HPEN InnerPen, OuterPen;
POINT SavePoint;
HPEN SavePen;
int spx, spy;
int epx, epy;
int Width = rc->right - rc->left;
int Height= rc->bottom - rc->top;
int SmallDiam = Width > Height ? Height : Width;
BOOL32 retval = !( ((uType & BDR_INNER) == BDR_INNER
BOOL retval = !( ((uType & BDR_INNER) == BDR_INNER
|| (uType & BDR_OUTER) == BDR_OUTER)
&& !(uFlags & (BF_FLAT|BF_MONO)) );
int add = (LTRBInnerMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0)
+ (LTRBOuterMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0);
/* Init some vars */
OuterPen = InnerPen = (HPEN32)GetStockObject32(NULL_PEN);
SavePen = (HPEN32)SelectObject32(hdc, InnerPen);
OuterPen = InnerPen = (HPEN)GetStockObject(NULL_PEN);
SavePen = (HPEN)SelectObject(hdc, InnerPen);
spx = spy = epx = epy = 0; /* Satisfy the compiler... */
/* Determine the colors of the edges */
@ -159,10 +159,10 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
}
}
if(InnerI != -1) InnerPen = GetSysColorPen32(InnerI);
if(OuterI != -1) OuterPen = GetSysColorPen32(OuterI);
if(InnerI != -1) InnerPen = GetSysColorPen(InnerI);
if(OuterI != -1) OuterPen = GetSysColorPen(OuterI);
MoveToEx32(hdc, 0, 0, &SavePoint);
MoveToEx(hdc, 0, 0, &SavePoint);
/* Don't ask me why, but this is what is visible... */
/* This must be possible to do much simpler, but I fail to */
@ -210,11 +210,11 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
break;
}
MoveToEx32(hdc, spx, spy, NULL);
SelectObject32(hdc, OuterPen);
LineTo32(hdc, epx, epy);
MoveToEx(hdc, spx, spy, NULL);
SelectObject(hdc, OuterPen);
LineTo(hdc, epx, epy);
SelectObject32(hdc, InnerPen);
SelectObject(hdc, InnerPen);
switch(uFlags & (BF_RECT|BF_DIAGONAL))
{
@ -222,8 +222,8 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
case (BF_DIAGONAL|BF_BOTTOM):
case BF_DIAGONAL:
case (BF_DIAGONAL|BF_LEFT):
MoveToEx32(hdc, spx-1, spy, NULL);
LineTo32(hdc, epx, epy-1);
MoveToEx(hdc, spx-1, spy, NULL);
LineTo(hdc, epx, epy-1);
Points[0].x = spx-add;
Points[0].y = spy;
Points[1].x = rc->left;
@ -234,8 +234,8 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
break;
case BF_DIAGONAL_ENDBOTTOMRIGHT:
MoveToEx32(hdc, spx-1, spy, NULL);
LineTo32(hdc, epx, epy+1);
MoveToEx(hdc, spx-1, spy, NULL);
LineTo(hdc, epx, epy+1);
Points[0].x = spx-add;
Points[0].y = spy;
Points[1].x = rc->left;
@ -249,8 +249,8 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
case (BF_DIAGONAL|BF_BOTTOM|BF_RIGHT|BF_TOP|BF_LEFT):
case BF_DIAGONAL_ENDTOPRIGHT:
case (BF_DIAGONAL|BF_RIGHT|BF_TOP|BF_LEFT):
MoveToEx32(hdc, spx+1, spy, NULL);
LineTo32(hdc, epx, epy+1);
MoveToEx(hdc, spx+1, spy, NULL);
LineTo(hdc, epx, epy+1);
Points[0].x = epx-1;
Points[0].y = epy+1+add;
Points[1].x = rc->right-1;
@ -262,8 +262,8 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
break;
case BF_DIAGONAL_ENDTOPLEFT:
MoveToEx32(hdc, spx, spy-1, NULL);
LineTo32(hdc, epx+1, epy);
MoveToEx(hdc, spx, spy-1, NULL);
LineTo(hdc, epx+1, epy);
Points[0].x = epx+1+add;
Points[0].y = epy+1;
Points[1].x = rc->right-1;
@ -277,8 +277,8 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
case (BF_DIAGONAL|BF_TOP):
case (BF_DIAGONAL|BF_BOTTOM|BF_TOP):
case (BF_DIAGONAL|BF_BOTTOM|BF_TOP|BF_LEFT):
MoveToEx32(hdc, spx+1, spy-1, NULL);
LineTo32(hdc, epx, epy);
MoveToEx(hdc, spx+1, spy-1, NULL);
LineTo(hdc, epx, epy);
Points[0].x = epx-1;
Points[0].y = epy+1;
Points[1].x = rc->right-1;
@ -292,8 +292,8 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
case (BF_DIAGONAL|BF_RIGHT):
case (BF_DIAGONAL|BF_RIGHT|BF_LEFT):
case (BF_DIAGONAL|BF_RIGHT|BF_LEFT|BF_BOTTOM):
MoveToEx32(hdc, spx, spy, NULL);
LineTo32(hdc, epx-1, epy+1);
MoveToEx(hdc, spx, spy, NULL);
LineTo(hdc, epx-1, epy+1);
Points[0].x = spx;
Points[0].y = spy;
Points[1].x = rc->left;
@ -307,17 +307,17 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
/* Fill the interior if asked */
if((uFlags & BF_MIDDLE) && retval)
{
HBRUSH32 hbsave;
HBRUSH32 hb = GetSysColorBrush32(uFlags & BF_MONO ? COLOR_WINDOW
HBRUSH hbsave;
HBRUSH hb = GetSysColorBrush(uFlags & BF_MONO ? COLOR_WINDOW
:COLOR_BTNFACE);
HPEN32 hpsave;
HPEN32 hp = GetSysColorPen32(uFlags & BF_MONO ? COLOR_WINDOW
HPEN hpsave;
HPEN hp = GetSysColorPen(uFlags & BF_MONO ? COLOR_WINDOW
: COLOR_BTNFACE);
hbsave = (HBRUSH32)SelectObject32(hdc, hb);
hpsave = (HPEN32)SelectObject32(hdc, hp);
Polygon32(hdc, Points, 4);
SelectObject32(hdc, hbsave);
SelectObject32(hdc, hpsave);
hbsave = (HBRUSH)SelectObject(hdc, hb);
hpsave = (HPEN)SelectObject(hdc, hp);
Polygon(hdc, Points, 4);
SelectObject(hdc, hbsave);
SelectObject(hdc, hpsave);
}
/* Adjust rectangle if asked */
@ -330,8 +330,8 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
}
/* Cleanup */
SelectObject32(hdc, SavePen);
MoveToEx32(hdc, SavePoint.x, SavePoint.y, NULL);
SelectObject(hdc, SavePen);
MoveToEx(hdc, SavePoint.x, SavePoint.y, NULL);
return retval;
}
@ -410,27 +410,27 @@ static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
*/
static BOOL32 UITOOLS95_DrawRectEdge(HDC32 hdc, LPRECT32 rc,
UINT32 uType, UINT32 uFlags)
static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
UINT uType, UINT uFlags)
{
char LTInnerI, LTOuterI;
char RBInnerI, RBOuterI;
HPEN32 LTInnerPen, LTOuterPen;
HPEN32 RBInnerPen, RBOuterPen;
RECT32 InnerRect = *rc;
POINT32 SavePoint;
HPEN32 SavePen;
HPEN LTInnerPen, LTOuterPen;
HPEN RBInnerPen, RBOuterPen;
RECT InnerRect = *rc;
POINT SavePoint;
HPEN SavePen;
int LBpenplus = 0;
int LTpenplus = 0;
int RTpenplus = 0;
int RBpenplus = 0;
BOOL32 retval = !( ((uType & BDR_INNER) == BDR_INNER
BOOL retval = !( ((uType & BDR_INNER) == BDR_INNER
|| (uType & BDR_OUTER) == BDR_OUTER)
&& !(uFlags & (BF_FLAT|BF_MONO)) );
/* Init some vars */
LTInnerPen = LTOuterPen = RBInnerPen = RBOuterPen = (HPEN32)GetStockObject32(NULL_PEN);
SavePen = (HPEN32)SelectObject32(hdc, LTInnerPen);
LTInnerPen = LTOuterPen = RBInnerPen = RBOuterPen = (HPEN)GetStockObject(NULL_PEN);
SavePen = (HPEN)SelectObject(hdc, LTInnerPen);
/* Determine the colors of the edges */
if(uFlags & BF_MONO)
@ -463,65 +463,65 @@ static BOOL32 UITOOLS95_DrawRectEdge(HDC32 hdc, LPRECT32 rc,
if((uFlags & BF_BOTTOMRIGHT) == BF_BOTTOMRIGHT) RBpenplus = 1;
if((uFlags & BF_TOPLEFT) == BF_TOPLEFT) LTpenplus = 1;
if(LTInnerI != -1) LTInnerPen = GetSysColorPen32(LTInnerI);
if(LTOuterI != -1) LTOuterPen = GetSysColorPen32(LTOuterI);
if(RBInnerI != -1) RBInnerPen = GetSysColorPen32(RBInnerI);
if(RBOuterI != -1) RBOuterPen = GetSysColorPen32(RBOuterI);
if(LTInnerI != -1) LTInnerPen = GetSysColorPen(LTInnerI);
if(LTOuterI != -1) LTOuterPen = GetSysColorPen(LTOuterI);
if(RBInnerI != -1) RBInnerPen = GetSysColorPen(RBInnerI);
if(RBOuterI != -1) RBOuterPen = GetSysColorPen(RBOuterI);
if((uFlags & BF_MIDDLE) && retval)
{
FillRect32(hdc, &InnerRect, GetSysColorBrush32(uFlags & BF_MONO ?
FillRect(hdc, &InnerRect, GetSysColorBrush(uFlags & BF_MONO ?
COLOR_WINDOW : COLOR_BTNFACE));
}
MoveToEx32(hdc, 0, 0, &SavePoint);
MoveToEx(hdc, 0, 0, &SavePoint);
/* Draw the outer edge */
SelectObject32(hdc, LTOuterPen);
SelectObject(hdc, LTOuterPen);
if(uFlags & BF_TOP)
{
MoveToEx32(hdc, InnerRect.left, InnerRect.top, NULL);
LineTo32(hdc, InnerRect.right, InnerRect.top);
MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
LineTo(hdc, InnerRect.right, InnerRect.top);
}
if(uFlags & BF_LEFT)
{
MoveToEx32(hdc, InnerRect.left, InnerRect.top, NULL);
LineTo32(hdc, InnerRect.left, InnerRect.bottom);
MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
LineTo(hdc, InnerRect.left, InnerRect.bottom);
}
SelectObject32(hdc, RBOuterPen);
SelectObject(hdc, RBOuterPen);
if(uFlags & BF_BOTTOM)
{
MoveToEx32(hdc, InnerRect.right-1, InnerRect.bottom-1, NULL);
LineTo32(hdc, InnerRect.left-1, InnerRect.bottom-1);
MoveToEx(hdc, InnerRect.right-1, InnerRect.bottom-1, NULL);
LineTo(hdc, InnerRect.left-1, InnerRect.bottom-1);
}
if(uFlags & BF_RIGHT)
{
MoveToEx32(hdc, InnerRect.right-1, InnerRect.bottom-1, NULL);
LineTo32(hdc, InnerRect.right-1, InnerRect.top-1);
MoveToEx(hdc, InnerRect.right-1, InnerRect.bottom-1, NULL);
LineTo(hdc, InnerRect.right-1, InnerRect.top-1);
}
/* Draw the inner edge */
SelectObject32(hdc, LTInnerPen);
SelectObject(hdc, LTInnerPen);
if(uFlags & BF_TOP)
{
MoveToEx32(hdc, InnerRect.left+LTpenplus, InnerRect.top+1, NULL);
LineTo32(hdc, InnerRect.right-RTpenplus, InnerRect.top+1);
MoveToEx(hdc, InnerRect.left+LTpenplus, InnerRect.top+1, NULL);
LineTo(hdc, InnerRect.right-RTpenplus, InnerRect.top+1);
}
if(uFlags & BF_LEFT)
{
MoveToEx32(hdc, InnerRect.left+1, InnerRect.top+LTpenplus, NULL);
LineTo32(hdc, InnerRect.left+1, InnerRect.bottom-LBpenplus);
MoveToEx(hdc, InnerRect.left+1, InnerRect.top+LTpenplus, NULL);
LineTo(hdc, InnerRect.left+1, InnerRect.bottom-LBpenplus);
}
SelectObject32(hdc, RBInnerPen);
SelectObject(hdc, RBInnerPen);
if(uFlags & BF_BOTTOM)
{
MoveToEx32(hdc, InnerRect.right-1-RBpenplus, InnerRect.bottom-2, NULL);
LineTo32(hdc, InnerRect.left-1+LBpenplus, InnerRect.bottom-2);
MoveToEx(hdc, InnerRect.right-1-RBpenplus, InnerRect.bottom-2, NULL);
LineTo(hdc, InnerRect.left-1+LBpenplus, InnerRect.bottom-2);
}
if(uFlags & BF_RIGHT)
{
MoveToEx32(hdc, InnerRect.right-2, InnerRect.bottom-1-RBpenplus, NULL);
LineTo32(hdc, InnerRect.right-2, InnerRect.top-1+RTpenplus);
MoveToEx(hdc, InnerRect.right-2, InnerRect.bottom-1-RBpenplus, NULL);
LineTo(hdc, InnerRect.right-2, InnerRect.top-1+RTpenplus);
}
/* Adjust rectangle if asked */
@ -536,8 +536,8 @@ static BOOL32 UITOOLS95_DrawRectEdge(HDC32 hdc, LPRECT32 rc,
}
/* Cleanup */
SelectObject32(hdc, SavePen);
MoveToEx32(hdc, SavePoint.x, SavePoint.y, NULL);
SelectObject(hdc, SavePen);
MoveToEx(hdc, SavePoint.x, SavePoint.y, NULL);
return retval;
}
@ -547,11 +547,11 @@ static BOOL32 UITOOLS95_DrawRectEdge(HDC32 hdc, LPRECT32 rc,
*/
BOOL16 WINAPI DrawEdge16( HDC16 hdc, LPRECT16 rc, UINT16 edge, UINT16 flags )
{
RECT32 rect32;
BOOL32 ret;
RECT rect32;
BOOL ret;
CONV_RECT16TO32( rc, &rect32 );
ret = DrawEdge32( hdc, &rect32, edge, flags );
ret = DrawEdge( hdc, &rect32, edge, flags );
CONV_RECT32TO16( &rect32, rc );
return ret;
}
@ -559,7 +559,7 @@ BOOL16 WINAPI DrawEdge16( HDC16 hdc, LPRECT16 rc, UINT16 edge, UINT16 flags )
/**********************************************************************
* DrawEdge32 (USER32.155)
*/
BOOL32 WINAPI DrawEdge32( HDC32 hdc, LPRECT32 rc, UINT32 edge, UINT32 flags )
BOOL WINAPI DrawEdge( HDC hdc, LPRECT rc, UINT edge, UINT flags )
{
TRACE(graphics, "%04x %d,%d-%d,%d %04x %04x\n",
hdc, rc->left, rc->top, rc->right, rc->bottom, edge, flags );
@ -576,7 +576,7 @@ BOOL32 WINAPI DrawEdge32( HDC32 hdc, LPRECT32 rc, UINT32 edge, UINT32 flags )
*
* Utility to create a square rectangle and returning the width
*/
static int UITOOLS_MakeSquareRect(LPRECT32 src, LPRECT32 dst)
static int UITOOLS_MakeSquareRect(LPRECT src, LPRECT dst)
{
int Width = src->right - src->left;
int Height = src->bottom - src->top;
@ -609,10 +609,10 @@ static int UITOOLS_MakeSquareRect(LPRECT32 src, LPRECT32 dst)
* however there because MS uses a TrueType font (Marlett) to draw
* the buttons.
*/
static BOOL32 UITOOLS95_DFC_ButtonPush(HDC32 dc, LPRECT32 r, UINT32 uFlags)
static BOOL UITOOLS95_DFC_ButtonPush(HDC dc, LPRECT r, UINT uFlags)
{
UINT32 edge;
RECT32 myr = *r;
UINT edge;
RECT myr = *r;
if(uFlags & (DFCS_PUSHED | DFCS_CHECKED | DFCS_FLAT))
edge = EDGE_SUNKEN;
@ -626,22 +626,22 @@ static BOOL32 UITOOLS95_DFC_ButtonPush(HDC32 dc, LPRECT32 r, UINT32 uFlags)
else
UITOOLS95_DrawRectEdge(dc, &myr, edge, (uFlags&DFCS_FLAT)|BF_RECT|BF_SOFT|BF_ADJUST);
if(GetSysColor32(COLOR_BTNHIGHLIGHT) == RGB(255, 255, 255))
if(GetSysColor(COLOR_BTNHIGHLIGHT) == RGB(255, 255, 255))
{
HBITMAP32 hbm = CreateBitmap32(8, 8, 1, 1, wPattern_AA55);
HBRUSH32 hbsave;
HBRUSH32 hb = CreatePatternBrush32(hbm);
HBITMAP hbm = CreateBitmap(8, 8, 1, 1, wPattern_AA55);
HBRUSH hbsave;
HBRUSH hb = CreatePatternBrush(hbm);
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_BTNFACE));
hbsave = (HBRUSH32)SelectObject32(dc, hb);
PatBlt32(dc, myr.left, myr.top, myr.right-myr.left, myr.bottom-myr.top, 0x00FA0089);
SelectObject32(dc, hbsave);
DeleteObject32(hb);
DeleteObject32(hbm);
FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNFACE));
hbsave = (HBRUSH)SelectObject(dc, hb);
PatBlt(dc, myr.left, myr.top, myr.right-myr.left, myr.bottom-myr.top, 0x00FA0089);
SelectObject(dc, hbsave);
DeleteObject(hb);
DeleteObject(hbm);
}
else
{
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_BTNHIGHLIGHT));
FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNHIGHLIGHT));
}
}
else
@ -649,7 +649,7 @@ static BOOL32 UITOOLS95_DFC_ButtonPush(HDC32 dc, LPRECT32 r, UINT32 uFlags)
if(uFlags & DFCS_MONO)
{
UITOOLS95_DrawRectEdge(dc, &myr, edge, BF_MONO|BF_RECT|BF_ADJUST);
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_BTNFACE));
FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNFACE));
}
else
{
@ -681,9 +681,9 @@ static BOOL32 UITOOLS95_DFC_ButtonPush(HDC32 dc, LPRECT32 r, UINT32 uFlags)
*/
#define DFC_CHECKPOINTSMAX 6
static BOOL32 UITOOLS95_DFC_ButtonCheck(HDC32 dc, LPRECT32 r, UINT32 uFlags)
static BOOL UITOOLS95_DFC_ButtonCheck(HDC dc, LPRECT r, UINT uFlags)
{
RECT32 myr;
RECT myr;
int SmallDiam = UITOOLS_MakeSquareRect(r, &myr);
int BorderShrink = SmallDiam / 16;
@ -694,7 +694,7 @@ static BOOL32 UITOOLS95_DFC_ButtonCheck(HDC32 dc, LPRECT32 r, UINT32 uFlags)
/* 100% equivalent. */
if(uFlags & (DFCS_FLAT|DFCS_MONO))
{
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_WINDOWFRAME));
FillRect(dc, &myr, GetSysColorBrush(COLOR_WINDOWFRAME));
myr.left += 2 * BorderShrink;
myr.right -= 2 * BorderShrink;
myr.top += 2 * BorderShrink;
@ -702,55 +702,55 @@ static BOOL32 UITOOLS95_DFC_ButtonCheck(HDC32 dc, LPRECT32 r, UINT32 uFlags)
}
else
{
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_BTNHIGHLIGHT));
FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNHIGHLIGHT));
myr.right -= BorderShrink;
myr.bottom -= BorderShrink;
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_BTNSHADOW));
FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNSHADOW));
myr.left += BorderShrink;
myr.top += BorderShrink;
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_3DLIGHT));
FillRect(dc, &myr, GetSysColorBrush(COLOR_3DLIGHT));
myr.right -= BorderShrink;
myr.bottom -= BorderShrink;
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_3DDKSHADOW));
FillRect(dc, &myr, GetSysColorBrush(COLOR_3DDKSHADOW));
myr.left += BorderShrink;
myr.top += BorderShrink;
}
if(uFlags & (DFCS_INACTIVE|DFCS_PUSHED))
{
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_BTNFACE));
FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNFACE));
}
else if(uFlags & DFCS_CHECKED)
{
if(GetSysColor32(COLOR_BTNHIGHLIGHT) == RGB(255, 255, 255))
if(GetSysColor(COLOR_BTNHIGHLIGHT) == RGB(255, 255, 255))
{
HBITMAP32 hbm = CreateBitmap32(8, 8, 1, 1, wPattern_AA55);
HBRUSH32 hbsave;
HBRUSH32 hb = CreatePatternBrush32(hbm);
HBITMAP hbm = CreateBitmap(8, 8, 1, 1, wPattern_AA55);
HBRUSH hbsave;
HBRUSH hb = CreatePatternBrush(hbm);
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_BTNFACE));
hbsave = (HBRUSH32)SelectObject32(dc, hb);
PatBlt32(dc, myr.left, myr.top, myr.right-myr.left, myr.bottom-myr.top, 0x00FA0089);
SelectObject32(dc, hbsave);
DeleteObject32(hb);
DeleteObject32(hbm);
FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNFACE));
hbsave = (HBRUSH)SelectObject(dc, hb);
PatBlt(dc, myr.left, myr.top, myr.right-myr.left, myr.bottom-myr.top, 0x00FA0089);
SelectObject(dc, hbsave);
DeleteObject(hb);
DeleteObject(hbm);
}
else
{
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_BTNHIGHLIGHT));
FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNHIGHLIGHT));
}
}
else
{
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_WINDOW));
FillRect(dc, &myr, GetSysColorBrush(COLOR_WINDOW));
}
if(uFlags & DFCS_CHECKED)
{
POINT32 CheckPoints[DFC_CHECKPOINTSMAX];
POINT CheckPoints[DFC_CHECKPOINTSMAX];
int i;
HBRUSH32 hbsave;
HPEN32 hpsave;
HBRUSH hbsave;
HPEN hpsave;
/* FIXME: This comes very close to M$'s checkmark, but not */
/* exactly... When small or large there is a few pixels */
@ -770,11 +770,11 @@ static BOOL32 UITOOLS95_DFC_ButtonCheck(HDC32 dc, LPRECT32 r, UINT32 uFlags)
CheckPoints[5].y = CheckPoints[0].y + 3*SmallDiam/16;
i = (uFlags & DFCS_INACTIVE) || (uFlags & 0xff) == DFCS_BUTTON3STATE ? COLOR_BTNSHADOW : COLOR_WINDOWTEXT;
hbsave = (HBRUSH32)SelectObject32(dc, GetSysColorBrush32(i));
hpsave = (HPEN32)SelectObject32(dc, GetSysColorPen32(i));
Polygon32(dc, CheckPoints, DFC_CHECKPOINTSMAX);
SelectObject32(dc, hpsave);
SelectObject32(dc, hbsave);
hbsave = (HBRUSH)SelectObject(dc, GetSysColorBrush(i));
hpsave = (HPEN)SelectObject(dc, GetSysColorPen(i));
Polygon(dc, CheckPoints, DFC_CHECKPOINTSMAX);
SelectObject(dc, hpsave);
SelectObject(dc, hbsave);
}
return TRUE;
}
@ -789,14 +789,14 @@ static BOOL32 UITOOLS95_DFC_ButtonCheck(HDC32 dc, LPRECT32 r, UINT32 uFlags)
* however there because MS uses a TrueType font (Marlett) to draw
* the buttons.
*/
static BOOL32 UITOOLS95_DFC_ButtonRadio(HDC32 dc, LPRECT32 r, UINT32 uFlags)
static BOOL UITOOLS95_DFC_ButtonRadio(HDC dc, LPRECT r, UINT uFlags)
{
RECT32 myr;
RECT myr;
int i;
int SmallDiam = UITOOLS_MakeSquareRect(r, &myr);
int BorderShrink = SmallDiam / 16;
HPEN32 hpsave;
HBRUSH32 hbsave;
HPEN hpsave;
HBRUSH hbsave;
int xe, ye;
int xc, yc;
@ -804,7 +804,7 @@ static BOOL32 UITOOLS95_DFC_ButtonRadio(HDC32 dc, LPRECT32 r, UINT32 uFlags)
if((uFlags & 0xff) == DFCS_BUTTONRADIOIMAGE)
{
FillRect32(dc, r, (HBRUSH32)GetStockObject32(BLACK_BRUSH));
FillRect(dc, r, (HBRUSH)GetStockObject(BLACK_BRUSH));
}
xe = myr.left;
@ -822,44 +822,44 @@ static BOOL32 UITOOLS95_DFC_ButtonRadio(HDC32 dc, LPRECT32 r, UINT32 uFlags)
if((uFlags & 0xff) == DFCS_BUTTONRADIOMASK)
{
hbsave = (HBRUSH32)SelectObject32(dc, GetStockObject32(BLACK_BRUSH));
Pie32(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
SelectObject32(dc, hbsave);
hbsave = (HBRUSH)SelectObject(dc, GetStockObject(BLACK_BRUSH));
Pie(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
SelectObject(dc, hbsave);
}
else
{
if(uFlags & (DFCS_FLAT|DFCS_MONO))
{
hpsave = (HPEN32)SelectObject32(dc, GetSysColorPen32(COLOR_WINDOWFRAME));
hbsave = (HBRUSH32)SelectObject32(dc, GetSysColorBrush32(COLOR_WINDOWFRAME));
Pie32(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
SelectObject32(dc, hbsave);
SelectObject32(dc, hpsave);
hpsave = (HPEN)SelectObject(dc, GetSysColorPen(COLOR_WINDOWFRAME));
hbsave = (HBRUSH)SelectObject(dc, GetSysColorBrush(COLOR_WINDOWFRAME));
Pie(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
SelectObject(dc, hbsave);
SelectObject(dc, hpsave);
}
else
{
hpsave = (HPEN32)SelectObject32(dc, GetSysColorPen32(COLOR_BTNHIGHLIGHT));
hbsave = (HBRUSH32)SelectObject32(dc, GetSysColorBrush32(COLOR_BTNHIGHLIGHT));
Pie32(dc, myr.left, myr.top, myr.right, myr.bottom, myr.left-1, myr.bottom, myr.right-1, myr.top);
hpsave = (HPEN)SelectObject(dc, GetSysColorPen(COLOR_BTNHIGHLIGHT));
hbsave = (HBRUSH)SelectObject(dc, GetSysColorBrush(COLOR_BTNHIGHLIGHT));
Pie(dc, myr.left, myr.top, myr.right, myr.bottom, myr.left-1, myr.bottom, myr.right-1, myr.top);
SelectObject32(dc, GetSysColorPen32(COLOR_BTNSHADOW));
SelectObject32(dc, GetSysColorBrush32(COLOR_BTNSHADOW));
Pie32(dc, myr.left, myr.top, myr.right, myr.bottom, myr.right+1, myr.top, myr.left+1, myr.bottom);
SelectObject(dc, GetSysColorPen(COLOR_BTNSHADOW));
SelectObject(dc, GetSysColorBrush(COLOR_BTNSHADOW));
Pie(dc, myr.left, myr.top, myr.right, myr.bottom, myr.right+1, myr.top, myr.left+1, myr.bottom);
myr.left += BorderShrink;
myr.right -= BorderShrink;
myr.top += BorderShrink;
myr.bottom -= BorderShrink;
SelectObject32(dc, GetSysColorPen32(COLOR_3DLIGHT));
SelectObject32(dc, GetSysColorBrush32(COLOR_3DLIGHT));
Pie32(dc, myr.left, myr.top, myr.right, myr.bottom, myr.left-1, myr.bottom, myr.right-1, myr.top);
SelectObject(dc, GetSysColorPen(COLOR_3DLIGHT));
SelectObject(dc, GetSysColorBrush(COLOR_3DLIGHT));
Pie(dc, myr.left, myr.top, myr.right, myr.bottom, myr.left-1, myr.bottom, myr.right-1, myr.top);
SelectObject32(dc, GetSysColorPen32(COLOR_3DDKSHADOW));
SelectObject32(dc, GetSysColorBrush32(COLOR_3DDKSHADOW));
Pie32(dc, myr.left, myr.top, myr.right, myr.bottom, myr.right+1, myr.top, myr.left+1, myr.bottom);
SelectObject32(dc, hbsave);
SelectObject32(dc, hpsave);
SelectObject(dc, GetSysColorPen(COLOR_3DDKSHADOW));
SelectObject(dc, GetSysColorBrush(COLOR_3DDKSHADOW));
Pie(dc, myr.left, myr.top, myr.right, myr.bottom, myr.right+1, myr.top, myr.left+1, myr.bottom);
SelectObject(dc, hbsave);
SelectObject(dc, hpsave);
}
i = 10*SmallDiam/16;
@ -868,11 +868,11 @@ static BOOL32 UITOOLS95_DFC_ButtonRadio(HDC32 dc, LPRECT32 r, UINT32 uFlags)
myr.top = yc - i+i/2;
myr.bottom = yc + i/2;
i= !(uFlags & (DFCS_INACTIVE|DFCS_PUSHED)) ? COLOR_WINDOW : COLOR_BTNFACE;
hpsave = (HPEN32)SelectObject32(dc, GetSysColorPen32(i));
hbsave = (HBRUSH32)SelectObject32(dc, GetSysColorBrush32(i));
Pie32(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
SelectObject32(dc, hbsave);
SelectObject32(dc, hpsave);
hpsave = (HPEN)SelectObject(dc, GetSysColorPen(i));
hbsave = (HBRUSH)SelectObject(dc, GetSysColorBrush(i));
Pie(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
SelectObject(dc, hbsave);
SelectObject(dc, hpsave);
}
if(uFlags & DFCS_CHECKED)
@ -885,11 +885,11 @@ static BOOL32 UITOOLS95_DFC_ButtonRadio(HDC32 dc, LPRECT32 r, UINT32 uFlags)
myr.bottom = yc + i/2;
i = uFlags & DFCS_INACTIVE ? COLOR_BTNSHADOW : COLOR_WINDOWTEXT;
hbsave = (HBRUSH32)SelectObject32(dc, GetSysColorBrush32(i));
hpsave = (HPEN32)SelectObject32(dc, GetSysColorPen32(i));
Pie32(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
SelectObject32(dc, hpsave);
SelectObject32(dc, hbsave);
hbsave = (HBRUSH)SelectObject(dc, GetSysColorBrush(i));
hpsave = (HPEN)SelectObject(dc, GetSysColorPen(i));
Pie(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
SelectObject(dc, hpsave);
SelectObject(dc, hbsave);
}
/* FIXME: M$ has a polygon in the center at relative points: */
@ -910,7 +910,7 @@ static BOOL32 UITOOLS95_DFC_ButtonRadio(HDC32 dc, LPRECT32 r, UINT32 uFlags)
/***********************************************************************
* UITOOLS_DrawFrameButton
*/
static BOOL32 UITOOLS95_DrawFrameButton(HDC32 hdc, LPRECT32 rc, UINT32 uState)
static BOOL UITOOLS95_DrawFrameButton(HDC hdc, LPRECT rc, UINT uState)
{
switch(uState & 0xff)
{
@ -939,26 +939,26 @@ static BOOL32 UITOOLS95_DrawFrameButton(HDC32 hdc, LPRECT32 rc, UINT32 uState)
* Draw caption buttons (win95), coming from DrawFrameControl()
*/
static BOOL32 UITOOLS95_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
static BOOL UITOOLS95_DrawFrameCaption(HDC dc, LPRECT r, UINT uFlags)
{
POINT32 Line1[10];
POINT32 Line2[10];
POINT Line1[10];
POINT Line2[10];
int Line1N;
int Line2N;
RECT32 myr;
RECT myr;
int SmallDiam = UITOOLS_MakeSquareRect(r, &myr)-2;
int i;
HBRUSH32 hbsave;
HPEN32 hpsave;
HFONT32 hfsave, hf;
HBRUSH hbsave;
HPEN hpsave;
HFONT hfsave, hf;
int xc = (myr.left+myr.right)/2;
int yc = (myr.top+myr.bottom)/2;
int edge, move;
char str[2] = "?";
UINT32 alignsave;
UINT alignsave;
int bksave;
COLORREF clrsave;
SIZE32 size;
SIZE size;
UITOOLS95_DFC_ButtonPush(dc, r, uFlags & 0xff00);
@ -983,28 +983,28 @@ static BOOL32 UITOOLS95_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
/* This one breaks the flow */
/* FIXME: We need the Marlett font in order to get this right. */
hf = CreateFont32A(-SmallDiam, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE,
hf = CreateFontA(-SmallDiam, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE,
ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "System");
alignsave = SetTextAlign32(dc, TA_TOP|TA_LEFT);
bksave = SetBkMode32(dc, TRANSPARENT);
clrsave = GetTextColor32(dc);
hfsave = (HFONT32)SelectObject32(dc, hf);
alignsave = SetTextAlign(dc, TA_TOP|TA_LEFT);
bksave = SetBkMode(dc, TRANSPARENT);
clrsave = GetTextColor(dc);
hfsave = (HFONT)SelectObject(dc, hf);
GetTextExtentPoint32A(dc, str, 1, &size);
if(uFlags & DFCS_INACTIVE)
{
SetTextColor32(dc, GetSysColor32(COLOR_BTNHIGHLIGHT));
TextOut32A(dc, xc-size.cx/2+1, yc-size.cy/2+1, str, 1);
SetTextColor(dc, GetSysColor(COLOR_BTNHIGHLIGHT));
TextOutA(dc, xc-size.cx/2+1, yc-size.cy/2+1, str, 1);
}
SetTextColor32(dc, GetSysColor32(uFlags & DFCS_INACTIVE ? COLOR_BTNSHADOW : COLOR_BTNTEXT));
TextOut32A(dc, xc-size.cx/2, yc-size.cy/2, str, 1);
SetTextColor(dc, GetSysColor(uFlags & DFCS_INACTIVE ? COLOR_BTNSHADOW : COLOR_BTNTEXT));
TextOutA(dc, xc-size.cx/2, yc-size.cy/2, str, 1);
SelectObject32(dc, hfsave);
SetTextColor32(dc, clrsave);
SetBkMode32(dc, bksave);
SetTextAlign32(dc, alignsave);
DeleteObject32(hf);
SelectObject(dc, hfsave);
SetTextColor(dc, clrsave);
SetBkMode(dc, bksave);
SetTextAlign(dc, alignsave);
DeleteObject(hf);
return TRUE;
case DFCS_CAPTIONMIN:
@ -1071,13 +1071,13 @@ static BOOL32 UITOOLS95_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
if(uFlags & DFCS_INACTIVE)
{
/* If we have an inactive button, then you see a shadow */
hbsave = (HBRUSH32)SelectObject32(dc, GetSysColorBrush32(COLOR_BTNHIGHLIGHT));
hpsave = (HPEN32)SelectObject32(dc, GetSysColorPen32(COLOR_BTNHIGHLIGHT));
Polygon32(dc, Line1, Line1N);
hbsave = (HBRUSH)SelectObject(dc, GetSysColorBrush(COLOR_BTNHIGHLIGHT));
hpsave = (HPEN)SelectObject(dc, GetSysColorPen(COLOR_BTNHIGHLIGHT));
Polygon(dc, Line1, Line1N);
if(Line2N > 0)
Polygon32(dc, Line2, Line2N);
SelectObject32(dc, hpsave);
SelectObject32(dc, hbsave);
Polygon(dc, Line2, Line2N);
SelectObject(dc, hpsave);
SelectObject(dc, hbsave);
}
/* Correct for the shadow shift */
@ -1094,14 +1094,14 @@ static BOOL32 UITOOLS95_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
/* Make the final picture */
i = uFlags & DFCS_INACTIVE ? COLOR_BTNSHADOW : COLOR_BTNTEXT;
hbsave = (HBRUSH32)SelectObject32(dc, GetSysColorBrush32(i));
hpsave = (HPEN32)SelectObject32(dc, GetSysColorPen32(i));
hbsave = (HBRUSH)SelectObject(dc, GetSysColorBrush(i));
hpsave = (HPEN)SelectObject(dc, GetSysColorPen(i));
Polygon32(dc, Line1, Line1N);
Polygon(dc, Line1, Line1N);
if(Line2N > 0)
Polygon32(dc, Line2, Line2N);
SelectObject32(dc, hpsave);
SelectObject32(dc, hbsave);
Polygon(dc, Line2, Line2N);
SelectObject(dc, hpsave);
SelectObject(dc, hbsave);
return TRUE;
}
@ -1112,14 +1112,14 @@ static BOOL32 UITOOLS95_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
*
* Draw a scroll-bar control coming from DrawFrameControl()
*/
static BOOL32 UITOOLS95_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
{
POINT32 Line[4];
RECT32 myr;
POINT Line[4];
RECT myr;
int SmallDiam = UITOOLS_MakeSquareRect(r, &myr) - 2;
int i;
HBRUSH32 hbsave, hb, hb2;
HPEN32 hpsave, hp, hp2;
HBRUSH hbsave, hb, hb2;
HPEN hpsave, hp, hp2;
int tri = 310*SmallDiam/1000;
int d46, d93;
@ -1161,19 +1161,19 @@ static BOOL32 UITOOLS95_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
case DFCS_SCROLLSIZEGRIP:
/* This one breaks the flow... */
UITOOLS95_DrawRectEdge(dc, r, EDGE_BUMP, BF_MIDDLE | ((uFlags&(DFCS_MONO|DFCS_FLAT)) ? BF_MONO : 0));
hpsave = (HPEN32)SelectObject32(dc, GetStockObject32(NULL_PEN));
hbsave = (HBRUSH32)SelectObject32(dc, GetStockObject32(NULL_BRUSH));
hpsave = (HPEN)SelectObject(dc, GetStockObject(NULL_PEN));
hbsave = (HBRUSH)SelectObject(dc, GetStockObject(NULL_BRUSH));
if(uFlags & (DFCS_MONO|DFCS_FLAT))
{
hp = hp2 = GetSysColorPen32(COLOR_WINDOWFRAME);
hb = hb2 = GetSysColorBrush32(COLOR_WINDOWFRAME);
hp = hp2 = GetSysColorPen(COLOR_WINDOWFRAME);
hb = hb2 = GetSysColorBrush(COLOR_WINDOWFRAME);
}
else
{
hp = GetSysColorPen32(COLOR_BTNHIGHLIGHT);
hp2 = GetSysColorPen32(COLOR_BTNSHADOW);
hb = GetSysColorBrush32(COLOR_BTNHIGHLIGHT);
hb2 = GetSysColorBrush32(COLOR_BTNSHADOW);
hp = GetSysColorPen(COLOR_BTNHIGHLIGHT);
hp2 = GetSysColorPen(COLOR_BTNSHADOW);
hb = GetSysColorBrush(COLOR_BTNHIGHLIGHT);
hb2 = GetSysColorBrush(COLOR_BTNSHADOW);
}
Line[0].x = Line[1].x = r->right-1;
Line[2].y = Line[3].y = r->bottom-1;
@ -1185,51 +1185,51 @@ static BOOL32 UITOOLS95_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
Line[3].x = r->right - i - 1;
Line[1].y = Line[0].y + d46;
Line[2].x = Line[3].x + d46;
SelectObject32(dc, hb);
SelectObject32(dc, hp);
Polygon32(dc, Line, 4);
SelectObject(dc, hb);
SelectObject(dc, hp);
Polygon(dc, Line, 4);
Line[1].y++; Line[2].x++;
Line[0].y = Line[1].y + d93;
Line[3].x = Line[2].x + d93;
SelectObject32(dc, hb2);
SelectObject32(dc, hp2);
Polygon32(dc, Line, 4);
SelectObject(dc, hb2);
SelectObject(dc, hp2);
Polygon(dc, Line, 4);
i = 398*SmallDiam/750;
Line[0].y = r->bottom - i - 1;
Line[3].x = r->right - i - 1;
Line[1].y = Line[0].y + d46;
Line[2].x = Line[3].x + d46;
SelectObject32(dc, hb);
SelectObject32(dc, hp);
Polygon32(dc, Line, 4);
SelectObject(dc, hb);
SelectObject(dc, hp);
Polygon(dc, Line, 4);
Line[1].y++; Line[2].x++;
Line[0].y = Line[1].y + d93;
Line[3].x = Line[2].x + d93;
SelectObject32(dc, hb2);
SelectObject32(dc, hp2);
Polygon32(dc, Line, 4);
SelectObject(dc, hb2);
SelectObject(dc, hp2);
Polygon(dc, Line, 4);
i = 210*SmallDiam/750;
Line[0].y = r->bottom - i - 1;
Line[3].x = r->right - i - 1;
Line[1].y = Line[0].y + d46;
Line[2].x = Line[3].x + d46;
SelectObject32(dc, hb);
SelectObject32(dc, hp);
Polygon32(dc, Line, 4);
SelectObject(dc, hb);
SelectObject(dc, hp);
Polygon(dc, Line, 4);
Line[1].y++; Line[2].x++;
Line[0].y = Line[1].y + d93;
Line[3].x = Line[2].x + d93;
SelectObject32(dc, hb2);
SelectObject32(dc, hp2);
Polygon32(dc, Line, 4);
SelectObject(dc, hb2);
SelectObject(dc, hp2);
Polygon(dc, Line, 4);
SelectObject32(dc, hpsave);
SelectObject32(dc, hbsave);
SelectObject(dc, hpsave);
SelectObject(dc, hbsave);
return TRUE;
default:
@ -1242,11 +1242,11 @@ static BOOL32 UITOOLS95_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
if(uFlags & DFCS_INACTIVE)
{
hbsave = (HBRUSH32)SelectObject32(dc, GetSysColorBrush32(COLOR_BTNHIGHLIGHT));
hpsave = (HPEN32)SelectObject32(dc, GetSysColorPen32(COLOR_BTNHIGHLIGHT));
Polygon32(dc, Line, 3);
SelectObject32(dc, hpsave);
SelectObject32(dc, hbsave);
hbsave = (HBRUSH)SelectObject(dc, GetSysColorBrush(COLOR_BTNHIGHLIGHT));
hpsave = (HPEN)SelectObject(dc, GetSysColorPen(COLOR_BTNHIGHLIGHT));
Polygon(dc, Line, 3);
SelectObject(dc, hpsave);
SelectObject(dc, hbsave);
}
for(i = 0; i < 3; i++)
@ -1256,11 +1256,11 @@ static BOOL32 UITOOLS95_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
}
i = uFlags & DFCS_INACTIVE ? COLOR_BTNSHADOW : COLOR_BTNTEXT;
hbsave = (HBRUSH32)SelectObject32(dc, GetSysColorBrush32(i));
hpsave = (HPEN32)SelectObject32(dc, GetSysColorPen32(i));
Polygon32(dc, Line, 3);
SelectObject32(dc, hpsave);
SelectObject32(dc, hbsave);
hbsave = (HBRUSH)SelectObject(dc, GetSysColorBrush(i));
hpsave = (HPEN)SelectObject(dc, GetSysColorPen(i));
Polygon(dc, Line, 3);
SelectObject(dc, hpsave);
SelectObject(dc, hbsave);
return TRUE;
}
@ -1270,27 +1270,27 @@ static BOOL32 UITOOLS95_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
*
* Draw a menu control coming from DrawFrameControl()
*/
static BOOL32 UITOOLS95_DrawFrameMenu(HDC32 dc, LPRECT32 r, UINT32 uFlags)
static BOOL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
{
POINT32 Points[6];
RECT32 myr;
POINT Points[6];
RECT myr;
int SmallDiam = UITOOLS_MakeSquareRect(r, &myr);
int i;
HBRUSH32 hbsave;
HPEN32 hpsave;
HBRUSH hbsave;
HPEN hpsave;
int xe, ye;
int xc, yc;
BOOL32 retval = TRUE;
BOOL retval = TRUE;
/* Using black and white seems to be utterly wrong, but win95 doesn't */
/* use anything else. I think I tried all sys-colors to change things */
/* without luck. It seems as if this behavior is inherited from the */
/* win31 DFC() implementation... (you remember, B/W menus). */
FillRect32(dc, r, (HBRUSH32)GetStockObject32(WHITE_BRUSH));
FillRect(dc, r, (HBRUSH)GetStockObject(WHITE_BRUSH));
hbsave = (HBRUSH32)SelectObject32(dc, GetStockObject32(BLACK_BRUSH));
hpsave = (HPEN32)SelectObject32(dc, GetStockObject32(BLACK_PEN));
hbsave = (HBRUSH)SelectObject(dc, GetStockObject(BLACK_BRUSH));
hpsave = (HPEN)SelectObject(dc, GetStockObject(BLACK_PEN));
switch(uFlags & 0xff)
{
@ -1301,7 +1301,7 @@ static BOOL32 UITOOLS95_DrawFrameMenu(HDC32 dc, LPRECT32 r, UINT32 uFlags)
Points[0].y = Points[2].y - i;
Points[1].y = Points[2].y + i;
Points[0].x = Points[1].x = Points[2].x - i;
Polygon32(dc, Points, 3);
Polygon(dc, Points, 3);
break;
case DFCS_MENUBULLET:
@ -1315,7 +1315,7 @@ static BOOL32 UITOOLS95_DrawFrameMenu(HDC32 dc, LPRECT32 r, UINT32 uFlags)
myr.right = xc + i/2;
myr.top = yc - i+i/2;
myr.bottom = yc + i/2;
Pie32(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
Pie(dc, myr.left, myr.top, myr.right, myr.bottom, xe, ye, xe, ye);
break;
case DFCS_MENUCHECK:
@ -1331,7 +1331,7 @@ static BOOL32 UITOOLS95_DrawFrameMenu(HDC32 dc, LPRECT32 r, UINT32 uFlags)
Points[4].y = Points[1].y + 3*SmallDiam/16;
Points[5].x = Points[0].x;
Points[5].y = Points[0].y + 3*SmallDiam/16;
Polygon32(dc, Points, 6);
Polygon(dc, Points, 6);
break;
default:
@ -1340,8 +1340,8 @@ static BOOL32 UITOOLS95_DrawFrameMenu(HDC32 dc, LPRECT32 r, UINT32 uFlags)
break;
}
SelectObject32(dc, hpsave);
SelectObject32(dc, hbsave);
SelectObject(dc, hpsave);
SelectObject(dc, hbsave);
return retval;
}
@ -1352,11 +1352,11 @@ static BOOL32 UITOOLS95_DrawFrameMenu(HDC32 dc, LPRECT32 r, UINT32 uFlags)
BOOL16 WINAPI DrawFrameControl16( HDC16 hdc, LPRECT16 rc, UINT16 uType,
UINT16 uState )
{
RECT32 rect32;
BOOL32 ret;
RECT rect32;
BOOL ret;
CONV_RECT16TO32( rc, &rect32 );
ret = DrawFrameControl32( hdc, &rect32, uType, uState );
ret = DrawFrameControl( hdc, &rect32, uType, uState );
CONV_RECT32TO16( &rect32, rc );
return ret;
}
@ -1365,11 +1365,11 @@ BOOL16 WINAPI DrawFrameControl16( HDC16 hdc, LPRECT16 rc, UINT16 uType,
/**********************************************************************
* DrawFrameControl32 (USER32.158)
*/
BOOL32 WINAPI DrawFrameControl32( HDC32 hdc, LPRECT32 rc, UINT32 uType,
UINT32 uState )
BOOL WINAPI DrawFrameControl( HDC hdc, LPRECT rc, UINT uType,
UINT uState )
{
/* Win95 doesn't support drawing in other mapping modes */
if(GetMapMode32(hdc) != MM_TEXT)
if(GetMapMode(hdc) != MM_TEXT)
return FALSE;
switch(uType)

View File

@ -19,64 +19,64 @@
/* Window procedures */
extern LRESULT WINAPI EditWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI ComboWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI ComboLBWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI ListBoxWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI PopupMenuWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI IconTitleWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam );
extern LRESULT WINAPI ComboWndProc( HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam );
extern LRESULT WINAPI ComboLBWndProc( HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam );
extern LRESULT WINAPI ListBoxWndProc( HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam );
extern LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam );
extern LRESULT WINAPI IconTitleWndProc( HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam );
/* Built-in classes */
static WNDCLASS32A WIDGETS_BuiltinClasses[BIC32_NB_CLASSES] =
static WNDCLASSA WIDGETS_BuiltinClasses[BIC32_NB_CLASSES] =
{
/* BIC32_BUTTON */
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
ButtonWndProc, 0, sizeof(BUTTONINFO), 0, 0,
(HCURSOR32)IDC_ARROW32A, 0, 0, "Button" },
(HCURSOR)IDC_ARROWA, 0, 0, "Button" },
/* BIC32_EDIT */
{ CS_GLOBALCLASS | CS_DBLCLKS /*| CS_PARENTDC*/,
EditWndProc, 0, sizeof(void *), 0, 0,
(HCURSOR32)IDC_IBEAM32A, 0, 0, "Edit" },
(HCURSOR)IDC_IBEAMA, 0, 0, "Edit" },
/* BIC32_LISTBOX */
{ CS_GLOBALCLASS | CS_DBLCLKS /*| CS_PARENTDC*/,
ListBoxWndProc, 0, sizeof(void *), 0, 0,
(HCURSOR32)IDC_ARROW32A, 0, 0, "ListBox" },
(HCURSOR)IDC_ARROWA, 0, 0, "ListBox" },
/* BIC32_COMBO */
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
ComboWndProc, 0, sizeof(void *), 0, 0,
(HCURSOR32)IDC_ARROW32A, 0, 0, "ComboBox" },
(HCURSOR)IDC_ARROWA, 0, 0, "ComboBox" },
/* BIC32_COMBOLB */
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS, ComboLBWndProc,
0, sizeof(void *), 0, 0, (HCURSOR32)IDC_ARROW32A, 0, 0, "ComboLBox" },
0, sizeof(void *), 0, 0, (HCURSOR)IDC_ARROWA, 0, 0, "ComboLBox" },
/* BIC32_POPUPMENU */
{ CS_GLOBALCLASS | CS_SAVEBITS, PopupMenuWndProc, 0, sizeof(HMENU32),
0, 0, (HCURSOR32)IDC_ARROW32A, NULL_BRUSH, 0, POPUPMENU_CLASS_NAME },
{ CS_GLOBALCLASS | CS_SAVEBITS, PopupMenuWndProc, 0, sizeof(HMENU),
0, 0, (HCURSOR)IDC_ARROWA, NULL_BRUSH, 0, POPUPMENU_CLASS_NAME },
/* BIC32_STATIC */
{ CS_GLOBALCLASS | CS_PARENTDC, StaticWndProc,
0, sizeof(STATICINFO), 0, 0, (HCURSOR32)IDC_ARROW32A, 0, 0, "Static" },
0, sizeof(STATICINFO), 0, 0, (HCURSOR)IDC_ARROWA, 0, 0, "Static" },
/* BIC32_SCROLL */
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
ScrollBarWndProc, 0, sizeof(SCROLLBAR_INFO), 0, 0,
(HCURSOR32)IDC_ARROW32A, 0, 0, "ScrollBar"},
(HCURSOR)IDC_ARROWA, 0, 0, "ScrollBar"},
/* BIC32_MDICLIENT */
{ CS_GLOBALCLASS, MDIClientWndProc,
0, sizeof(MDICLIENTINFO), 0, 0, 0, STOCK_LTGRAY_BRUSH, 0, "MDIClient" },
/* BIC32_DESKTOP */
{ CS_GLOBALCLASS, DesktopWndProc, 0, sizeof(DESKTOP),
0, 0, (HCURSOR32)IDC_ARROW32A, 0, 0, DESKTOP_CLASS_NAME },
0, 0, (HCURSOR)IDC_ARROWA, 0, 0, DESKTOP_CLASS_NAME },
/* BIC32_DIALOG */
{ CS_GLOBALCLASS | CS_SAVEBITS, DefDlgProc32A, 0, DLGWINDOWEXTRA,
0, 0, (HCURSOR32)IDC_ARROW32A, 0, 0, DIALOG_CLASS_NAME },
{ CS_GLOBALCLASS | CS_SAVEBITS, DefDlgProcA, 0, DLGWINDOWEXTRA,
0, 0, (HCURSOR)IDC_ARROWA, 0, 0, DIALOG_CLASS_NAME },
/* BIC32_ICONTITLE */
{ CS_GLOBALCLASS, IconTitleWndProc, 0, 0,
0, 0, (HCURSOR32)IDC_ARROW32A, 0, 0, ICONTITLE_CLASS_NAME }
0, 0, (HCURSOR)IDC_ARROWA, 0, 0, ICONTITLE_CLASS_NAME }
};
static ATOM bicAtomTable[BIC32_NB_CLASSES];
@ -86,10 +86,10 @@ static ATOM bicAtomTable[BIC32_NB_CLASSES];
*
* Initialize the built-in window classes.
*/
BOOL32 WIDGETS_Init(void)
BOOL WIDGETS_Init(void)
{
int i;
WNDCLASS32A *cls = WIDGETS_BuiltinClasses;
WNDCLASSA *cls = WIDGETS_BuiltinClasses;
/* Create builtin classes */
@ -99,8 +99,8 @@ BOOL32 WIDGETS_Init(void)
/* Just to make sure the string is > 0x10000 */
strcpy( name, (char *)cls->lpszClassName );
cls->lpszClassName = name;
cls->hCursor = LoadCursor32A( 0, (LPCSTR)cls->hCursor );
if (!(bicAtomTable[i] = RegisterClass32A( cls ))) return FALSE;
cls->hCursor = LoadCursorA( 0, (LPCSTR)cls->hCursor );
if (!(bicAtomTable[i] = RegisterClassA( cls ))) return FALSE;
}
return TRUE;
@ -112,7 +112,7 @@ BOOL32 WIDGETS_Init(void)
*
* Check whether pWnd is a built-in control or not.
*/
BOOL32 WIDGETS_IsControl32( WND* pWnd, BUILTIN_CLASS32 cls )
BOOL WIDGETS_IsControl( WND* pWnd, BUILTIN_CLASS32 cls )
{
assert( cls < BIC32_NB_CLASSES );
return (pWnd->class->atomName == bicAtomTable[cls]);

View File

@ -71,7 +71,7 @@ static void DEBUG_SetOpcode( const DBG_ADDR *addr, BYTE op )
* Determine if the instruction at CS:EIP is an instruction that
* we need to step over (like a call or a repetitive string move).
*/
static BOOL32 DEBUG_IsStepOverInstr()
static BOOL DEBUG_IsStepOverInstr()
{
BYTE *instr = (BYTE *)CTX_SEG_OFF_TO_LIN( &DEBUG_context,
CS_reg(&DEBUG_context),
@ -139,7 +139,7 @@ static BOOL32 DEBUG_IsStepOverInstr()
* Determine if the instruction at CS:EIP is an instruction that
* is a function return.
*/
BOOL32 DEBUG_IsFctReturn(void)
BOOL DEBUG_IsFctReturn(void)
{
BYTE *instr = (BYTE *)CTX_SEG_OFF_TO_LIN( &DEBUG_context,
CS_reg(&DEBUG_context),
@ -164,7 +164,7 @@ BOOL32 DEBUG_IsFctReturn(void)
*
* Set or remove all the breakpoints.
*/
void DEBUG_SetBreakpoints( BOOL32 set )
void DEBUG_SetBreakpoints( BOOL set )
{
int i;
@ -291,7 +291,7 @@ void DEBUG_DelBreakpoint( int num )
*
* Enable or disable a break point.
*/
void DEBUG_EnableBreakpoint( int num, BOOL32 enable )
void DEBUG_EnableBreakpoint( int num, BOOL enable )
{
if ((num <= 0) || (num >= next_bp) || !breakpoints[num].in_use)
{
@ -357,7 +357,7 @@ void DEBUG_AddTaskEntryBreakpoint( HTASK16 hTask )
if (!(pModule->flags & NE_FFLAGS_WIN32)) /* NE module */
{
addr.seg =
GlobalHandleToSel(NE_SEG_TABLE(pModule)[pModule->cs-1].hSeg);
GlobalHandleToSel16(NE_SEG_TABLE(pModule)[pModule->cs-1].hSeg);
addr.off = pModule->ip;
fprintf( stderr, "Win16 task '%s': ", NE_MODULE_NAME( pModule ) );
DEBUG_AddBreakpoint( &addr );
@ -382,7 +382,7 @@ void DEBUG_AddTaskEntryBreakpoint( HTASK16 hTask )
* Determine if we should continue execution after a SIGTRAP signal when
* executing in the given mode.
*/
BOOL32 DEBUG_ShouldContinue( enum exec_mode mode, int * count )
BOOL DEBUG_ShouldContinue( enum exec_mode mode, int * count )
{
DBG_ADDR addr;
DBG_ADDR cond_addr;

View File

@ -68,14 +68,14 @@
/*
* Switch to disassemble 16-bit code.
*/
static BOOL32 db_disasm_16 = FALSE;
static BOOL db_disasm_16 = FALSE;
/*
* Flag to indicate whether we need to display instruction,
* or whether we just need to know the address of the next
* instruction.
*/
static BOOL32 db_display = FALSE;
static BOOL db_display = FALSE;
/*
* Size attributes
@ -1152,7 +1152,7 @@ void DEBUG_Disasm( DBG_ADDR *addr, int display )
int i_size;
int i_mode;
int regmodrm = 0;
BOOL32 first;
BOOL first;
int displ;
int prefix;
int imm;

View File

@ -415,10 +415,10 @@ void mode_command(int newmode)
static void DEBUG_Main( int signal )
{
static int loaded_symbols = 0;
static BOOL32 in_debugger = FALSE;
static BOOL in_debugger = FALSE;
char SymbolTableFile[256];
int newmode;
BOOL32 ret_ok;
BOOL ret_ok;
#ifdef YYDEBUG
yydebug = 0;
#endif
@ -573,10 +573,10 @@ static void DEBUG_Main( int signal )
/***********************************************************************
* DebugBreak (KERNEL.203) (KERNEL32.181)
*/
void DebugBreak( CONTEXT *regs )
void DebugBreak16( CONTEXT *regs )
{
char module[10];
if (!GetModuleName( GetCurrentTask(), module, sizeof(module) ))
if (!GetModuleName16( GetCurrentTask(), module, sizeof(module) ))
strcpy( module, "???" );
fprintf( stderr, "%s called DebugBreak\n", module );
DEBUG_context = *regs;

View File

@ -66,7 +66,7 @@ void QUEUE_DumpQueue( HQUEUE16 hQueue )
exit(0);
}
void WIN_DumpWindow( HWND32 hwnd )
void WIN_DumpWindow( HWND hwnd )
{
exit(0);
}
@ -87,7 +87,7 @@ void QUEUE_WalkQueues()
exit(0);
}
void WIN_WalkWindows( HWND32 hwnd, int indent )
void WIN_WalkWindows( HWND hwnd, int indent )
{
exit(0);
}
@ -112,12 +112,12 @@ LPVOID GlobalLock16(HGLOBAL16 h)
exit(0);
}
BOOL16 ModuleFirst(MODULEENTRY *lpModule)
BOOL16 ModuleFirst16(MODULEENTRY *lpModule)
{
return 0;
}
BOOL16 ModuleNext(MODULEENTRY *lpModule)
BOOL16 ModuleNext16(MODULEENTRY *lpModule)
{
return 0;
}
@ -127,7 +127,7 @@ BOOL16 IsBadReadPtr16(SEGPTR s,UINT16 o)
exit(0);
}
BOOL32 IsBadReadPtr32(LPCVOID s,UINT32 o)
BOOL IsBadReadPtr(LPCVOID s,UINT o)
{
exit(0);
}

View File

@ -58,7 +58,7 @@ struct name_hash
};
static BOOL32 DEBUG_GetStackSymbolValue( const char * name, DBG_ADDR *addr );
static BOOL DEBUG_GetStackSymbolValue( const char * name, DBG_ADDR *addr );
static int sortlist_valid = FALSE;
static int sorttab_nsym;
@ -285,7 +285,7 @@ DEBUG_AddSymbol( const char * name, const DBG_ADDR *addr, const char * source,
return new;
}
BOOL32 DEBUG_Normalize(struct name_hash * nh )
BOOL DEBUG_Normalize(struct name_hash * nh )
{
/*
@ -319,7 +319,7 @@ BOOL32 DEBUG_Normalize(struct name_hash * nh )
*
* Get the address of a named symbol.
*/
BOOL32 DEBUG_GetSymbolValue( const char * name, const int lineno,
BOOL DEBUG_GetSymbolValue( const char * name, const int lineno,
DBG_ADDR *addr, int bp_flag )
{
char buffer[256];
@ -368,7 +368,7 @@ BOOL32 DEBUG_GetSymbolValue( const char * name, const int lineno,
*
* Get the address of a named symbol.
*/
BOOL32 DEBUG_GetLineNumberAddr( struct name_hash * nh, const int lineno,
BOOL DEBUG_GetLineNumberAddr( struct name_hash * nh, const int lineno,
DBG_ADDR *addr, int bp_flag )
{
int i;
@ -416,7 +416,7 @@ BOOL32 DEBUG_GetLineNumberAddr( struct name_hash * nh, const int lineno,
*
* Set the address of a named symbol.
*/
BOOL32 DEBUG_SetSymbolValue( const char * name, const DBG_ADDR *addr )
BOOL DEBUG_SetSymbolValue( const char * name, const DBG_ADDR *addr )
{
char buffer[256];
struct name_hash *nh;
@ -795,7 +795,7 @@ static void DEBUG_LoadEntryPoints16( HMODULE16 hModule, NE_MODULE *pModule,
*
* Load the entry points of a Win32 module into the hash table.
*/
static void DEBUG_LoadEntryPoints32( HMODULE32 hModule, const char *name )
static void DEBUG_LoadEntryPoints32( HMODULE hModule, const char *name )
{
#define RVA(x) (hModule+(DWORD)(x))
@ -879,12 +879,12 @@ void DEBUG_LoadEntryPoints(void)
{
MODULEENTRY entry;
NE_MODULE *pModule;
BOOL32 ok;
BOOL ok;
WINE_MODREF *wm;
int rowcount = 3;
fprintf( stderr, " " );
for (ok = ModuleFirst(&entry); ok; ok = ModuleNext(&entry))
for (ok = ModuleFirst16(&entry); ok; ok = ModuleNext16(&entry))
{
if (!(pModule = NE_GetPtr( entry.hModule ))) continue;
if (!(pModule->flags & NE_FFLAGS_WIN32)) /* NE module */
@ -1237,7 +1237,7 @@ DEBUG_GetFuncInfo( struct list_id * ret, const char * filename,
* Get the address of a named symbol from the current stack frame.
*/
static
BOOL32 DEBUG_GetStackSymbolValue( const char * name, DBG_ADDR *addr )
BOOL DEBUG_GetStackSymbolValue( const char * name, DBG_ADDR *addr )
{
struct name_hash * curr_func;
unsigned int ebp;

View File

@ -21,7 +21,7 @@
************************************************************/
#if defined(linux) || defined(__FreeBSD__) || defined(__OpenBSD__)
BOOL32 DEBUG_checkmap_bad( const char *addr, size_t size, int rwflag)
BOOL DEBUG_checkmap_bad( const char *addr, size_t size, int rwflag)
{
FILE *fp;
char buf[80]; /* temporary line buffer */
@ -86,7 +86,7 @@ BOOL32 DEBUG_checkmap_bad( const char *addr, size_t size, int rwflag)
}
#else /* linux || FreeBSD */
/* FIXME: code needed for BSD et al. */
BOOL32 DEBUG_checkmap_bad(char *addr, size_t size, int rwflag)
BOOL DEBUG_checkmap_bad(char *addr, size_t size, int rwflag)
{
return FALSE;
}
@ -98,7 +98,7 @@ BOOL32 DEBUG_checkmap_bad(char *addr, size_t size, int rwflag)
*
* Check if we are allowed to read memory at 'address'.
*/
BOOL32 DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size )
BOOL DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size )
{
if (!IS_SELECTOR_V86(address->seg))
if (address->seg) /* segmented addr */
@ -116,7 +116,7 @@ BOOL32 DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size )
*
* Check if we are allowed to write memory at 'address'.
*/
BOOL32 DEBUG_IsBadWritePtr( const DBG_ADDR *address, int size )
BOOL DEBUG_IsBadWritePtr( const DBG_ADDR *address, int size )
{
if (!IS_SELECTOR_V86(address->seg))
if (address->seg) /* segmented addr */

View File

@ -47,13 +47,13 @@ static void LocateDebugInfoFile(char *filename, char *dbg_filename)
file = strrchr(filename, '\\');
if( file == NULL ) file = filename; else file++;
if (GetEnvironmentVariable32A("_NT_SYMBOL_PATH", str1, sizeof(str1)))
if (SearchPath32A(str1, file, NULL, sizeof(str2), str2, &name_part))
if (GetEnvironmentVariableA("_NT_SYMBOL_PATH", str1, sizeof(str1)))
if (SearchPathA(str1, file, NULL, sizeof(str2), str2, &name_part))
goto ok;
if (GetEnvironmentVariable32A("_NT_ALT_SYMBOL_PATH", str1, sizeof(str1)))
if (SearchPath32A(str1, file, NULL, sizeof(str2), str2, &name_part))
if (GetEnvironmentVariableA("_NT_ALT_SYMBOL_PATH", str1, sizeof(str1)))
if (SearchPathA(str1, file, NULL, sizeof(str2), str2, &name_part))
goto ok;
if (SearchPath32A(NULL, file, NULL, sizeof(str2), str2, &name_part))
if (SearchPathA(NULL, file, NULL, sizeof(str2), str2, &name_part))
goto ok;
else
{
@ -270,16 +270,16 @@ union codeview_type
};
#define S_BPREL32 0x200
#define S_LDATA32 0x201
#define S_GDATA32 0x202
#define S_PUB32 0x203
#define S_LPROC32 0x204
#define S_GPROC32 0x205
#define S_THUNK32 0x206
#define S_BLOCK32 0x207
#define S_WITH32 0x208
#define S_LABEL32 0x209
#define S_BPREL 0x200
#define S_LDATA 0x201
#define S_GDATA 0x202
#define S_PUB 0x203
#define S_LPROC 0x204
#define S_GPROC 0x205
#define S_THUNK 0x206
#define S_BLOCK 0x207
#define S_WITH 0x208
#define S_LABEL 0x209
#define S_PROCREF 0x400
#define S_DATAREF 0x401
@ -546,7 +546,7 @@ struct deferred_debug_info
char * module_name;
char * dbg_info;
int dbg_size;
HMODULE32 module;
HMODULE module;
PIMAGE_DEBUG_DIRECTORY dbgdir;
PIMAGE_SECTION_HEADER sectp;
int nsect;
@ -918,7 +918,7 @@ DEBUG_InitCVDataTypes()
* We don't fully process it here for performance reasons.
*/
int
DEBUG_RegisterDebugInfo( HMODULE32 hModule, const char *module_name)
DEBUG_RegisterDebugInfo( HMODULE hModule, const char *module_name)
{
int has_codeview = FALSE;
int rtn = FALSE;
@ -1001,7 +1001,7 @@ DEBUG_RegisterDebugInfo( HMODULE32 hModule, const char *module_name)
* debug information. (Note the DataDirectory is mapped, not its content)
*/
if (GetModuleFileName32A(hModule, fn, sizeof(fn)) > 0 &&
if (GetModuleFileNameA(hModule, fn, sizeof(fn)) > 0 &&
DOSFS_GetFullName(fn, TRUE, &full_name) &&
(fd = open(full_name.long_name, O_RDONLY)) > 0)
{
@ -1675,9 +1675,9 @@ DEBUG_SnarfCodeView( struct deferred_debug_info * deefer,
memset(symname, 0, sizeof(symname));
switch(sym->generic.id)
{
case S_GDATA32:
case S_LDATA32:
case S_PUB32:
case S_GDATA:
case S_LDATA:
case S_PUB:
/*
* First, a couple of sanity checks.
*/
@ -1704,7 +1704,7 @@ DEBUG_SnarfCodeView( struct deferred_debug_info * deefer,
sym->data.offset;
DEBUG_AddSymbol( symname, &new_addr, NULL, SYM_WIN32 | SYM_DATA );
break;
case S_THUNK32:
case S_THUNK:
/*
* Sort of like a global function, but it just points
* to a thunk, which is a stupid name for what amounts to
@ -1720,8 +1720,8 @@ DEBUG_SnarfCodeView( struct deferred_debug_info * deefer,
SYM_WIN32 | SYM_FUNC);
DEBUG_SetSymbolSize(thunk_sym, sym->thunk.thunk_len);
break;
case S_GPROC32:
case S_LPROC32:
case S_GPROC:
case S_LPROC:
/*
* Global and static functions.
*/
@ -1785,7 +1785,7 @@ DEBUG_SnarfCodeView( struct deferred_debug_info * deefer,
DEBUG_SetSymbolBPOff(curr_func, sym->proc.debug_start);
DEBUG_SetSymbolSize(curr_func, sym->proc.proc_len);
break;
case S_BPREL32:
case S_BPREL:
/*
* Function parameters and stack variables.
*/

View File

@ -297,7 +297,7 @@ void DEBUG_InfoRegisters(void)
* Make sure all registers have a correct value for returning from
* the signal handler.
*/
BOOL32 DEBUG_ValidateRegisters(void)
BOOL DEBUG_ValidateRegisters(void)
{
WORD cs, ds;

View File

@ -18,8 +18,8 @@
/******************************************************************************
* GetUserName32A [ADVAPI32.67]
*/
BOOL32 WINAPI
GetUserName32A( LPSTR lpszName, LPDWORD lpSize )
BOOL WINAPI
GetUserNameA( LPSTR lpszName, LPDWORD lpSize )
{
size_t len;
char *name;
@ -46,12 +46,12 @@ GetUserName32A( LPSTR lpszName, LPDWORD lpSize )
* lpszName []
* lpSize []
*/
BOOL32 WINAPI
GetUserName32W( LPWSTR lpszName, LPDWORD lpSize )
BOOL WINAPI
GetUserNameW( LPWSTR lpszName, LPDWORD lpSize )
{
LPSTR name = (LPSTR)HeapAlloc( GetProcessHeap(), 0, *lpSize );
DWORD size = *lpSize;
BOOL32 res = GetUserName32A(name,lpSize);
BOOL res = GetUserNameA(name,lpSize);
lstrcpynAtoW(lpszName,name,size);
HeapFree( GetProcessHeap(), 0, name );

View File

@ -20,7 +20,7 @@
* RETURNS TRUE on success, FALSE on failure.
*/
BOOL32 WINAPI
BOOL WINAPI
CryptAcquireContextA( HCRYPTPROV *phProv, LPCSTR pszContainer,
LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
{

View File

@ -14,7 +14,7 @@
/******************************************************************************
* BackupEventLog32A [ADVAPI32.15]
*/
BOOL32 WINAPI BackupEventLog32A( HANDLE32 hEventLog, LPCSTR lpBackupFileName )
BOOL WINAPI BackupEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -27,8 +27,8 @@ BOOL32 WINAPI BackupEventLog32A( HANDLE32 hEventLog, LPCSTR lpBackupFileName )
* hEventLog []
* lpBackupFileName []
*/
BOOL32 WINAPI
BackupEventLog32W( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
BOOL WINAPI
BackupEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -37,7 +37,7 @@ BackupEventLog32W( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
/******************************************************************************
* ClearEventLog32A [ADVAPI32.19]
*/
BOOL32 WINAPI ClearEventLog32A ( HANDLE32 hEventLog, LPCSTR lpBackupFileName )
BOOL WINAPI ClearEventLogA ( HANDLE hEventLog, LPCSTR lpBackupFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -46,7 +46,7 @@ BOOL32 WINAPI ClearEventLog32A ( HANDLE32 hEventLog, LPCSTR lpBackupFileName )
/******************************************************************************
* ClearEventLog32W [ADVAPI32.20]
*/
BOOL32 WINAPI ClearEventLog32W ( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
BOOL WINAPI ClearEventLogW ( HANDLE hEventLog, LPCWSTR lpBackupFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -55,7 +55,7 @@ BOOL32 WINAPI ClearEventLog32W ( HANDLE32 hEventLog, LPCWSTR lpBackupFileName )
/******************************************************************************
* CloseEventLog32 [ADVAPI32.21]
*/
BOOL32 WINAPI CloseEventLog32 ( HANDLE32 hEventLog )
BOOL WINAPI CloseEventLog ( HANDLE hEventLog )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -70,7 +70,7 @@ BOOL32 WINAPI CloseEventLog32 ( HANDLE32 hEventLog )
*
* RETURNS STD
*/
BOOL32 WINAPI DeregisterEventSource32( HANDLE32 hEventLog )
BOOL WINAPI DeregisterEventSource( HANDLE hEventLog )
{
FIXME(advapi, "(%d): stub\n",hEventLog);
return TRUE;
@ -83,8 +83,8 @@ BOOL32 WINAPI DeregisterEventSource32( HANDLE32 hEventLog )
* hEventLog []
* NumberOfRecords []
*/
BOOL32 WINAPI
GetNumberOfEventLogRecords32( HANDLE32 hEventLog, PDWORD NumberOfRecords )
BOOL WINAPI
GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -97,8 +97,8 @@ GetNumberOfEventLogRecords32( HANDLE32 hEventLog, PDWORD NumberOfRecords )
* hEventLog []
* OldestRecord []
*/
BOOL32 WINAPI
GetOldestEventLogRecord32( HANDLE32 hEventLog, PDWORD OldestRecord )
BOOL WINAPI
GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
{
FIXME(advapi,":stub\n");
return TRUE;
@ -111,7 +111,7 @@ GetOldestEventLogRecord32( HANDLE32 hEventLog, PDWORD OldestRecord )
* hEventLog []
* hEvent []
*/
BOOL32 WINAPI NotifyChangeEventLog32( HANDLE32 hEventLog, HANDLE32 hEvent )
BOOL WINAPI NotifyChangeEventLog( HANDLE hEventLog, HANDLE hEvent )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -120,8 +120,8 @@ BOOL32 WINAPI NotifyChangeEventLog32( HANDLE32 hEventLog, HANDLE32 hEvent )
/******************************************************************************
* OpenBackupEventLog32A [ADVAPI32.105]
*/
HANDLE32 WINAPI
OpenBackupEventLog32A( LPCSTR lpUNCServerName, LPCSTR lpFileName )
HANDLE WINAPI
OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -134,8 +134,8 @@ OpenBackupEventLog32A( LPCSTR lpUNCServerName, LPCSTR lpFileName )
* lpUNCServerName []
* lpFileName []
*/
HANDLE32 WINAPI
OpenBackupEventLog32W( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
HANDLE WINAPI
OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -144,7 +144,7 @@ OpenBackupEventLog32W( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
/******************************************************************************
* OpenEventLog32A [ADVAPI32.107]
*/
HANDLE32 WINAPI OpenEventLog32A(LPCSTR uncname,LPCSTR source)
HANDLE WINAPI OpenEventLogA(LPCSTR uncname,LPCSTR source)
{
FIXME(advapi,"(%s,%s),stub!\n",uncname,source);
return 0xcafe4242;
@ -157,8 +157,8 @@ HANDLE32 WINAPI OpenEventLog32A(LPCSTR uncname,LPCSTR source)
* uncname []
* source []
*/
HANDLE32 WINAPI
OpenEventLog32W( LPCWSTR uncname, LPCWSTR source )
HANDLE WINAPI
OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
{
FIXME(advapi,"stub\n");
return TRUE;
@ -167,7 +167,7 @@ OpenEventLog32W( LPCWSTR uncname, LPCWSTR source )
/******************************************************************************
* ReadEventLog32A [ADVAPI32.124]
*/
BOOL32 WINAPI ReadEventLog32A( HANDLE32 hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
{
FIXME(advapi,"stub\n");
@ -186,8 +186,8 @@ BOOL32 WINAPI ReadEventLog32A( HANDLE32 hEventLog, DWORD dwReadFlags, DWORD dwRe
* pnBytesRead []
* pnMinNumberOfBytesNeeded []
*/
BOOL32 WINAPI
ReadEventLog32W( HANDLE32 hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
BOOL WINAPI
ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
{
@ -198,11 +198,11 @@ ReadEventLog32W( HANDLE32 hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
/******************************************************************************
* RegisterEventSource32A [ADVAPI32.174]
*/
HANDLE32 WINAPI RegisterEventSource32A( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
HANDLE WINAPI RegisterEventSourceA( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
{
LPWSTR lpUNCServerNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpUNCServerName);
LPWSTR lpSourceNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpSourceName);
HANDLE32 ret = RegisterEventSource32W(lpUNCServerNameW,lpSourceNameW);
HANDLE ret = RegisterEventSourceW(lpUNCServerNameW,lpSourceNameW);
HeapFree(GetProcessHeap(),0,lpSourceNameW);
HeapFree(GetProcessHeap(),0,lpUNCServerNameW);
return ret;
@ -220,8 +220,8 @@ HANDLE32 WINAPI RegisterEventSource32A( LPCSTR lpUNCServerName, LPCSTR lpSourceN
* Success: Handle
* Failure: NULL
*/
HANDLE32 WINAPI
RegisterEventSource32W( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
HANDLE WINAPI
RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
{
FIXME(advapi, "(%s,%s): stub\n", debugstr_w(lpUNCServerName),
debugstr_w(lpSourceName));
@ -231,7 +231,7 @@ RegisterEventSource32W( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
/******************************************************************************
* ReportEvent32A [ADVAPI32.178]
*/
BOOL32 WINAPI ReportEvent32A ( HANDLE32 hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
{
FIXME(advapi,"stub\n");
@ -252,8 +252,8 @@ BOOL32 WINAPI ReportEvent32A ( HANDLE32 hEventLog, WORD wType, WORD wCategory, D
* lpStrings []
* lpRawData []
*/
BOOL32 WINAPI
ReportEvent32W( HANDLE32 hEventLog, WORD wType, WORD wCategory,
BOOL WINAPI
ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory,
DWORD dwEventID, PSID lpUserSid, WORD wNumStrings,
DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )
{

View File

@ -21,18 +21,18 @@
}
/* FIXME: move it to a header */
BOOL32 WINAPI IsValidSid (PSID pSid);
BOOL32 WINAPI EqualSid (PSID pSid1, PSID pSid2);
BOOL32 WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2);
BOOL WINAPI IsValidSid (PSID pSid);
BOOL WINAPI EqualSid (PSID pSid1, PSID pSid2);
BOOL WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2);
DWORD WINAPI GetSidLengthRequired (BYTE nSubAuthorityCount);
BOOL32 WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid);
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid);
VOID* WINAPI FreeSid(PSID pSid);
BOOL32 WINAPI InitializeSid (PSID pSid, PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount);
BOOL WINAPI InitializeSid (PSID pSid, PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount);
PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID pSid);
DWORD* WINAPI GetSidSubAuthority(PSID pSid, DWORD nSubAuthority);
BYTE* WINAPI GetSidSubAuthorityCount(PSID pSid);
DWORD WINAPI GetLengthSid(PSID pSid);
BOOL32 WINAPI CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid);
BOOL WINAPI CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid);
/* ##############################
###### TOKEN FUNCTIONS ######
@ -50,9 +50,9 @@ BOOL32 WINAPI CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pS
*
* RETURNS STD
*/
BOOL32 WINAPI
OpenProcessToken( HANDLE32 ProcessHandle, DWORD DesiredAccess,
HANDLE32 *TokenHandle )
BOOL WINAPI
OpenProcessToken( HANDLE ProcessHandle, DWORD DesiredAccess,
HANDLE *TokenHandle )
{
FIXME(advapi,"(%08x,%08lx,%p): stub\n",ProcessHandle,DesiredAccess, TokenHandle);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -70,8 +70,8 @@ OpenProcessToken( HANDLE32 ProcessHandle, DWORD DesiredAccess,
* PreviousState []
* ReturnLength []
*/
BOOL32 WINAPI
AdjustTokenPrivileges( HANDLE32 TokenHandle, BOOL32 DisableAllPrivileges,
BOOL WINAPI
AdjustTokenPrivileges( HANDLE TokenHandle, BOOL DisableAllPrivileges,
LPVOID NewState, DWORD BufferLength,
LPVOID PreviousState, LPDWORD ReturnLength )
{ FIXME(advapi, "stub\n");
@ -88,9 +88,9 @@ AdjustTokenPrivileges( HANDLE32 TokenHandle, BOOL32 DisableAllPrivileges,
* openasself []
* thandle []
*/
BOOL32 WINAPI
OpenThreadToken( HANDLE32 thread, DWORD desiredaccess, BOOL32 openasself,
HANDLE32 *thandle )
BOOL WINAPI
OpenThreadToken( HANDLE thread, DWORD desiredaccess, BOOL openasself,
HANDLE *thandle )
{
FIXME(advapi,"(%08x,%08lx,%d,%p): stub!\n",
thread,desiredaccess,openasself,thandle);
@ -111,8 +111,8 @@ OpenThreadToken( HANDLE32 thread, DWORD desiredaccess, BOOL32 openasself,
* FIXME
* tokeninfoclas should be TOKEN_INFORMATION_CLASS
*/
BOOL32 WINAPI
GetTokenInformation( HANDLE32 token, DWORD tokeninfoclass, LPVOID tokeninfo,
BOOL WINAPI
GetTokenInformation( HANDLE token, DWORD tokeninfoclass, LPVOID tokeninfo,
DWORD tokeninfolength, LPDWORD retlen )
{
FIXME(advapi,"(%08x,%ld,%p,%ld,%p): stub\n",
@ -141,7 +141,7 @@ GetTokenInformation( HANDLE32 token, DWORD tokeninfoclass, LPVOID tokeninfo,
* nSubAuthority7 []
* pSid []
*/
BOOL32 WINAPI
BOOL WINAPI
AllocateAndInitializeSid( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount,
DWORD nSubAuthority0, DWORD nSubAuthority1,
@ -200,7 +200,7 @@ FreeSid( PSID pSid )
* pDestinationSid []
* pSourceSid []
*/
BOOL32 WINAPI
BOOL WINAPI
CopySid( DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid )
{
@ -221,7 +221,7 @@ CopySid( DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid )
* PARAMS
* pSid []
*/
BOOL32 WINAPI
BOOL WINAPI
IsValidSid( PSID pSid )
{
if (!pSid || pSid->Revision != SID_REVISION)
@ -237,7 +237,7 @@ IsValidSid( PSID pSid )
* pSid1 []
* pSid2 []
*/
BOOL32 WINAPI
BOOL WINAPI
EqualSid( PSID pSid1, PSID pSid2 )
{
if (!IsValidSid(pSid1) || !IsValidSid(pSid2))
@ -255,7 +255,7 @@ EqualSid( PSID pSid1, PSID pSid2 )
/******************************************************************************
* EqualPrefixSid [ADVAPI32.39]
*/
BOOL32 WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2) {
BOOL WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2) {
if (!IsValidSid(pSid1) || !IsValidSid(pSid2))
return FALSE;
@ -287,7 +287,7 @@ GetSidLengthRequired( BYTE nSubAuthorityCount )
* PARAMS
* pIdentifierAuthority []
*/
BOOL32 WINAPI
BOOL WINAPI
InitializeSid (PSID pSid, PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount)
{
@ -366,7 +366,7 @@ GetLengthSid (PSID pSid)
* pDescr []
* revision []
*/
BOOL32 WINAPI
BOOL WINAPI
InitializeSecurityDescriptor( SECURITY_DESCRIPTOR *pDescr, DWORD revision )
{
CallWin32ToNt (RtlCreateSecurityDescriptor(pDescr, revision ));
@ -387,9 +387,9 @@ DWORD WINAPI GetSecurityDescriptorLength( SECURITY_DESCRIPTOR *pDescr)
* pOwner []
* lpbOwnerDefaulted []
*/
BOOL32 WINAPI
BOOL WINAPI
GetSecurityDescriptorOwner( SECURITY_DESCRIPTOR *pDescr, PSID *pOwner,
LPBOOL32 lpbOwnerDefaulted )
LPBOOL lpbOwnerDefaulted )
{
CallWin32ToNt (RtlGetOwnerSecurityDescriptor( pDescr, pOwner, (PBOOLEAN)lpbOwnerDefaulted ));
}
@ -399,26 +399,26 @@ GetSecurityDescriptorOwner( SECURITY_DESCRIPTOR *pDescr, PSID *pOwner,
*
* PARAMS
*/
BOOL32 SetSecurityDescriptorOwner( PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID pOwner, BOOL32 bOwnerDefaulted)
BOOL SetSecurityDescriptorOwner( PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID pOwner, BOOL bOwnerDefaulted)
{
CallWin32ToNt (RtlSetOwnerSecurityDescriptor(pSecurityDescriptor, pOwner, bOwnerDefaulted));
}
/******************************************************************************
* GetSecurityDescriptorGroup [ADVAPI32.54]
*/
BOOL32 WINAPI GetSecurityDescriptorGroup(
BOOL WINAPI GetSecurityDescriptorGroup(
PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID *Group,
LPBOOL32 GroupDefaulted)
LPBOOL GroupDefaulted)
{
CallWin32ToNt (RtlGetGroupSecurityDescriptor(SecurityDescriptor, Group, (PBOOLEAN)GroupDefaulted));
}
/******************************************************************************
* SetSecurityDescriptorGroup
*/
BOOL32 WINAPI SetSecurityDescriptorGroup ( PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID Group, BOOL32 GroupDefaulted)
BOOL WINAPI SetSecurityDescriptorGroup ( PSECURITY_DESCRIPTOR SecurityDescriptor,
PSID Group, BOOL GroupDefaulted)
{
CallWin32ToNt (RtlSetGroupSecurityDescriptor( SecurityDescriptor, Group, GroupDefaulted));
}
@ -429,7 +429,7 @@ BOOL32 WINAPI SetSecurityDescriptorGroup ( PSECURITY_DESCRIPTOR SecurityDescript
* PARAMS
* lpsecdesc []
*/
BOOL32 WINAPI
BOOL WINAPI
IsValidSecurityDescriptor( PSECURITY_DESCRIPTOR SecurityDescriptor )
{
CallWin32ToNt (RtlValidSecurityDescriptor(SecurityDescriptor));
@ -438,11 +438,11 @@ IsValidSecurityDescriptor( PSECURITY_DESCRIPTOR SecurityDescriptor )
/******************************************************************************
* GetSecurityDescriptorDacl [ADVAPI.91]
*/
BOOL32 WINAPI GetSecurityDescriptorDacl(
BOOL WINAPI GetSecurityDescriptorDacl(
IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
OUT LPBOOL32 lpbDaclPresent,
OUT LPBOOL lpbDaclPresent,
OUT PACL *pDacl,
OUT LPBOOL32 lpbDaclDefaulted)
OUT LPBOOL lpbDaclDefaulted)
{
CallWin32ToNt (RtlGetDaclSecurityDescriptor(pSecurityDescriptor, (PBOOLEAN)lpbDaclPresent,
pDacl, (PBOOLEAN)lpbDaclDefaulted));
@ -451,20 +451,20 @@ BOOL32 WINAPI GetSecurityDescriptorDacl(
/******************************************************************************
* SetSecurityDescriptorDacl [ADVAPI.224]
*/
BOOL32 WINAPI
SetSecurityDescriptorDacl ( PSECURITY_DESCRIPTOR lpsd, BOOL32 daclpresent,
PACL dacl, BOOL32 dacldefaulted )
BOOL WINAPI
SetSecurityDescriptorDacl ( PSECURITY_DESCRIPTOR lpsd, BOOL daclpresent,
PACL dacl, BOOL dacldefaulted )
{
CallWin32ToNt (RtlSetDaclSecurityDescriptor (lpsd, daclpresent, dacl, dacldefaulted ));
}
/**************************************************************************
* SetSecurityDescriptorSacl [NTDLL.488]
*/
BOOL32 WINAPI SetSecurityDescriptorSacl (
BOOL WINAPI SetSecurityDescriptorSacl (
PSECURITY_DESCRIPTOR lpsd,
BOOL32 saclpresent,
BOOL saclpresent,
PACL sacl,
BOOL32 sacldefaulted)
BOOL sacldefaulted)
{
CallWin32ToNt (RtlSetSaclSecurityDescriptor(lpsd, saclpresent, sacl, sacldefaulted));
}
@ -476,7 +476,7 @@ BOOL32 WINAPI SetSecurityDescriptorSacl (
* lpselfsecdesc []
* lpbuflen []
*/
BOOL32 WINAPI
BOOL WINAPI
MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen )
{
@ -488,7 +488,7 @@ MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
* GetSecurityDescriptorControl32 [ADVAPI32]
*/
BOOL32 GetSecurityDescriptorControl32 ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
BOOL GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
/* fixme: PSECURITY_DESCRIPTOR_CONTROL*/ LPVOID pControl, LPDWORD lpdwRevision)
{ FIXME(advapi,"(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision);
return 1;
@ -513,8 +513,8 @@ BOOL32 GetSecurityDescriptorControl32 ( PSECURITY_DESCRIPTOR pSecurityDescripto
*
* RETURNS STD
*/
BOOL32 WINAPI
LookupPrivilegeValue32W( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
BOOL WINAPI
LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
{
FIXME(advapi,"(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
debugstr_w(lpName), lpLuid);
@ -524,12 +524,12 @@ LookupPrivilegeValue32W( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
/******************************************************************************
* LookupPrivilegeValue32A [ADVAPI32.92]
*/
BOOL32 WINAPI
LookupPrivilegeValue32A( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
BOOL WINAPI
LookupPrivilegeValueA( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
{
LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
BOOL32 ret = LookupPrivilegeValue32W( lpSystemNameW, lpNameW, lpLuid);
BOOL ret = LookupPrivilegeValueW( lpSystemNameW, lpNameW, lpLuid);
HeapFree(GetProcessHeap(), 0, lpNameW);
HeapFree(GetProcessHeap(), 0, lpSystemNameW);
return ret;
@ -542,8 +542,8 @@ LookupPrivilegeValue32A( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
* The information obtained is constrained by the callers access rights and
* privileges
*/
BOOL32 WINAPI
GetFileSecurity32A( LPCSTR lpFileName,
BOOL WINAPI
GetFileSecurityA( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded )
@ -566,8 +566,8 @@ GetFileSecurity32A( LPCSTR lpFileName,
* nLength []
* lpnLengthNeeded []
*/
BOOL32 WINAPI
GetFileSecurity32W( LPCWSTR lpFileName,
BOOL WINAPI
GetFileSecurityW( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded )
@ -580,8 +580,8 @@ GetFileSecurity32W( LPCWSTR lpFileName,
/******************************************************************************
* LookupAccountSid32A [ADVAPI32.86]
*/
BOOL32 WINAPI
LookupAccountSid32A( LPCSTR system, PSID sid, LPCSTR account,
BOOL WINAPI
LookupAccountSidA( LPCSTR system, PSID sid, LPCSTR account,
LPDWORD accountSize, LPCSTR domain, LPDWORD domainSize,
PSID_NAME_USE name_use )
{
@ -603,8 +603,8 @@ LookupAccountSid32A( LPCSTR system, PSID sid, LPCSTR account,
* domainSize []
* name_use []
*/
BOOL32 WINAPI
LookupAccountSid32W( LPCWSTR system, PSID sid, LPCWSTR account,
BOOL WINAPI
LookupAccountSidW( LPCWSTR system, PSID sid, LPCWSTR account,
LPDWORD accountSize, LPCWSTR domain, LPDWORD domainSize,
PSID_NAME_USE name_use )
{
@ -618,7 +618,7 @@ LookupAccountSid32W( LPCWSTR system, PSID sid, LPCWSTR account,
* SetFileSecurity32A [ADVAPI32.182]
* Sets the security of a file or directory
*/
BOOL32 WINAPI SetFileSecurity32A( LPCSTR lpFileName,
BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor)
{
@ -635,8 +635,8 @@ BOOL32 WINAPI SetFileSecurity32A( LPCSTR lpFileName,
* RequestedInformation []
* pSecurityDescriptor []
*/
BOOL32 WINAPI
SetFileSecurity32W( LPCWSTR lpFileName,
BOOL WINAPI
SetFileSecurityW( LPCWSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor )
{
@ -650,7 +650,7 @@ SetFileSecurity32W( LPCWSTR lpFileName,
* PARAMS
* x1 []
*/
BOOL32 WINAPI
BOOL WINAPI
QueryWindows31FilesMigration( DWORD x1 )
{
FIXME(advapi,"(%ld):stub\n",x1);
@ -666,7 +666,7 @@ QueryWindows31FilesMigration( DWORD x1 )
* x3 []
* x4 []
*/
BOOL32 WINAPI
BOOL WINAPI
SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
DWORD x4 )
{
@ -683,7 +683,7 @@ SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
* x3 []
* x4 []
*/
BOOL32 WINAPI
BOOL WINAPI
LsaOpenPolicy( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
{
FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
@ -696,7 +696,7 @@ LsaOpenPolicy( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
* PARAMS
* x1 []
*/
BOOL32 WINAPI
BOOL WINAPI
NotifyBootConfigStatus( DWORD x1 )
{
FIXME(advapi,"(0x%08lx):stub\n",x1);
@ -709,7 +709,7 @@ NotifyBootConfigStatus( DWORD x1 )
* PARAMS
* void []
*/
BOOL32 WINAPI
BOOL WINAPI
RevertToSelf( void )
{
FIXME(advapi,"(), stub\n");
@ -719,8 +719,8 @@ RevertToSelf( void )
/******************************************************************************
* ImpersonateSelf [ADVAPI32.71]
*/
BOOL32 WINAPI
ImpersonateSelf32(DWORD/*SECURITY_IMPERSONATION_LEVEL*/ ImpersonationLevel)
BOOL WINAPI
ImpersonateSelf(DWORD/*SECURITY_IMPERSONATION_LEVEL*/ ImpersonationLevel)
{
FIXME(advapi, "(%08lx), stub\n", ImpersonationLevel);
return TRUE;
@ -729,8 +729,8 @@ ImpersonateSelf32(DWORD/*SECURITY_IMPERSONATION_LEVEL*/ ImpersonationLevel)
/******************************************************************************
* AccessCheck32 [ADVAPI32.71]
*/
BOOL32 WINAPI
AccessCheck32(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE32 ClientToken, DWORD DesiredAccess, LPVOID/*LPGENERIC_MAPPING*/ GenericMapping, LPVOID/*LPPRIVILEGE_SET*/ PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL32 AccessStatus)
BOOL WINAPI
AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, LPVOID/*LPGENERIC_MAPPING*/ GenericMapping, LPVOID/*LPPRIVILEGE_SET*/ PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL AccessStatus)
{
FIXME(advapi, "(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n", pSecurityDescriptor, ClientToken, DesiredAccess, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus);
*AccessStatus = TRUE;

View File

@ -19,8 +19,8 @@ typedef VOID (WINAPI *LPHANDLER_FUNCTION)( DWORD dwControl);
/******************************************************************************
* EnumServicesStatus32A [ADVAPI32.38]
*/
BOOL32 WINAPI
EnumServicesStatus32A( HANDLE32 hSCManager, DWORD dwServiceType,
BOOL WINAPI
EnumServicesStatusA( HANDLE hSCManager, DWORD dwServiceType,
DWORD dwServiceState, LPVOID lpServices,
DWORD cbBufSize, LPDWORD pcbBytesNeeded,
LPDWORD lpServicesReturned, LPDWORD lpResumeHandle )
@ -34,9 +34,9 @@ EnumServicesStatus32A( HANDLE32 hSCManager, DWORD dwServiceType,
/******************************************************************************
* StartServiceCtrlDispatcher32A [ADVAPI32.196]
*/
BOOL32 WINAPI
StartServiceCtrlDispatcher32A( LPSERVICE_TABLE_ENTRY32A servent )
{ LPSERVICE_TABLE_ENTRY32A ptr = servent;
BOOL WINAPI
StartServiceCtrlDispatcherA( LPSERVICE_TABLE_ENTRYA servent )
{ LPSERVICE_TABLE_ENTRYA ptr = servent;
while (ptr->lpServiceName)
{ FIXME(advapi,"%s at %p\n", ptr->lpServiceName, ptr);
@ -51,10 +51,10 @@ StartServiceCtrlDispatcher32A( LPSERVICE_TABLE_ENTRY32A servent )
* PARAMS
* servent []
*/
BOOL32 WINAPI
StartServiceCtrlDispatcher32W( LPSERVICE_TABLE_ENTRY32W servent )
{ LPSERVICE_TABLE_ENTRY32W ptr = servent;
LPSERVICE_MAIN_FUNCTION32W fpMain;
BOOL WINAPI
StartServiceCtrlDispatcherW( LPSERVICE_TABLE_ENTRYW servent )
{ LPSERVICE_TABLE_ENTRYW ptr = servent;
LPSERVICE_MAIN_FUNCTIONW fpMain;
while (ptr->lpServiceName)
{ FIXME(advapi,"%s at %p): STUB.\n", debugstr_w(ptr->lpServiceName),ptr);
@ -96,7 +96,7 @@ RegisterServiceCtrlHandlerW( LPWSTR lpServiceName,
* hService []
* lpStatus []
*/
BOOL32 WINAPI
BOOL WINAPI
SetServiceStatus( SERVICE_STATUS_HANDLE hService, LPSERVICE_STATUS lpStatus )
{ FIXME(advapi,"%lx %p\n",hService, lpStatus);
TRACE(advapi,"\tType:%lx\n",lpStatus->dwServiceType);
@ -112,13 +112,13 @@ SetServiceStatus( SERVICE_STATUS_HANDLE hService, LPSERVICE_STATUS lpStatus )
/******************************************************************************
* OpenSCManager32A [ADVAPI32.110]
*/
HANDLE32 WINAPI
OpenSCManager32A( LPCSTR lpMachineName, LPCSTR lpDatabaseName,
HANDLE WINAPI
OpenSCManagerA( LPCSTR lpMachineName, LPCSTR lpDatabaseName,
DWORD dwDesiredAccess )
{
LPWSTR lpMachineNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpMachineName);
LPWSTR lpDatabaseNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpDatabaseName);
DWORD ret = OpenSCManager32W(lpMachineNameW,lpDatabaseNameW,
DWORD ret = OpenSCManagerW(lpMachineNameW,lpDatabaseNameW,
dwDesiredAccess);
HeapFree(GetProcessHeap(),0,lpDatabaseNameW);
HeapFree(GetProcessHeap(),0,lpMachineNameW);
@ -141,8 +141,8 @@ OpenSCManager32A( LPCSTR lpMachineName, LPCSTR lpDatabaseName,
* Success: Handle to service control manager database
* Failure: NULL
*/
HANDLE32 WINAPI
OpenSCManager32W( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName,
HANDLE WINAPI
OpenSCManagerW( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName,
DWORD dwDesiredAccess )
{
FIXME(advapi,"(%s,%s,0x%08lx): stub\n", debugstr_w(lpMachineName),
@ -157,7 +157,7 @@ OpenSCManager32W( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName,
* PARAMS
* lpluid []
*/
BOOL32 WINAPI
BOOL WINAPI
AllocateLocallyUniqueId( PLUID lpluid )
{
lpluid->LowPart = time(NULL);
@ -180,8 +180,8 @@ AllocateLocallyUniqueId( PLUID lpluid )
*
* RETURNS STD
*/
BOOL32 WINAPI
ControlService( HANDLE32 hService, DWORD dwControl,
BOOL WINAPI
ControlService( HANDLE hService, DWORD dwControl,
LPSERVICE_STATUS lpServiceStatus )
{
FIXME(advapi, "(%d,%ld,%p): stub\n",hService,dwControl,lpServiceStatus);
@ -201,8 +201,8 @@ ControlService( HANDLE32 hService, DWORD dwControl,
*
* RETURNS STD
*/
BOOL32 WINAPI
CloseServiceHandle( HANDLE32 hSCObject )
BOOL WINAPI
CloseServiceHandle( HANDLE hSCObject )
{
FIXME(advapi, "(%d): stub\n", hSCObject);
return TRUE;
@ -212,12 +212,12 @@ CloseServiceHandle( HANDLE32 hSCObject )
/******************************************************************************
* OpenService32A [ADVAPI32.112]
*/
HANDLE32 WINAPI
OpenService32A( HANDLE32 hSCManager, LPCSTR lpServiceName,
HANDLE WINAPI
OpenServiceA( HANDLE hSCManager, LPCSTR lpServiceName,
DWORD dwDesiredAccess )
{
LPWSTR lpServiceNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpServiceName);
DWORD ret = OpenService32W( hSCManager, lpServiceNameW, dwDesiredAccess);
DWORD ret = OpenServiceW( hSCManager, lpServiceNameW, dwDesiredAccess);
HeapFree(GetProcessHeap(),0,lpServiceNameW);
return ret;
}
@ -240,8 +240,8 @@ OpenService32A( HANDLE32 hSCManager, LPCSTR lpServiceName,
* Success: Handle to the service
* Failure: NULL
*/
HANDLE32 WINAPI
OpenService32W(HANDLE32 hSCManager, LPCWSTR lpServiceName,
HANDLE WINAPI
OpenServiceW(HANDLE hSCManager, LPCWSTR lpServiceName,
DWORD dwDesiredAccess)
{
FIXME(advapi, "(%d,%p,%ld): stub\n",hSCManager, lpServiceName,
@ -254,7 +254,7 @@ OpenService32W(HANDLE32 hSCManager, LPCWSTR lpServiceName,
* CreateService32A [ADVAPI32.29]
*/
DWORD WINAPI
CreateService32A( DWORD hSCManager, LPCSTR lpServiceName,
CreateServiceA( DWORD hSCManager, LPCSTR lpServiceName,
LPCSTR lpDisplayName, DWORD dwDesiredAccess,
DWORD dwServiceType, DWORD dwStartType,
DWORD dwErrorControl, LPCSTR lpBinaryPathName,
@ -279,8 +279,8 @@ CreateService32A( DWORD hSCManager, LPCSTR lpServiceName,
* NOTES
* hService should be SC_HANDLE
*/
BOOL32 WINAPI
DeleteService( HANDLE32 hService )
BOOL WINAPI
DeleteService( HANDLE hService )
{
FIXME(advapi, "(%d): stub\n",hService);
return TRUE;
@ -293,8 +293,8 @@ DeleteService( HANDLE32 hService )
* NOTES
* How do we convert lpServiceArgVectors to use the 32W version?
*/
BOOL32 WINAPI
StartService32A( HANDLE32 hService, DWORD dwNumServiceArgs,
BOOL WINAPI
StartServiceA( HANDLE hService, DWORD dwNumServiceArgs,
LPCSTR *lpServiceArgVectors )
{
FIXME(advapi, "(%d,%ld,%p): stub\n",hService,dwNumServiceArgs,lpServiceArgVectors);
@ -316,8 +316,8 @@ StartService32A( HANDLE32 hService, DWORD dwNumServiceArgs,
* NOTES
* hService should be SC_HANDLE
*/
BOOL32 WINAPI
StartService32W( HANDLE32 hService, DWORD dwNumServiceArgs,
BOOL WINAPI
StartServiceW( HANDLE hService, DWORD dwNumServiceArgs,
LPCWSTR *lpServiceArgVectors )
{
FIXME(advapi, "(%d,%ld,%p): stub\n",hService,dwNumServiceArgs,
@ -336,8 +336,8 @@ StartService32W( HANDLE32 hService, DWORD dwNumServiceArgs,
* hService should be SC_HANDLE
* lpservicestatus should be LPSERVICE_STATUS
*/
BOOL32 WINAPI
QueryServiceStatus( HANDLE32 hService, LPVOID lpservicestatus )
BOOL WINAPI
QueryServiceStatus( HANDLE hService, LPVOID lpservicestatus )
{
FIXME(advapi,"(%d,%p),stub!\n",hService,lpservicestatus);
return TRUE;

View File

@ -22,21 +22,21 @@
#define ANIMATE_GetInfoPtr(wndPtr) ((ANIMATE_INFO *)wndPtr->wExtra[0])
static BOOL32
ANIMATE_LoadRes32A (ANIMATE_INFO *infoPtr, HINSTANCE32 hInst, LPSTR lpName)
static BOOL
ANIMATE_LoadResA (ANIMATE_INFO *infoPtr, HINSTANCE hInst, LPSTR lpName)
{
HRSRC32 hrsrc;
HGLOBAL32 handle;
HRSRC hrsrc;
HGLOBAL handle;
hrsrc = FindResource32A (hInst, lpName, "AVI");
hrsrc = FindResourceA (hInst, lpName, "AVI");
if (!hrsrc)
return FALSE;
handle = LoadResource32 (hInst, hrsrc);
handle = LoadResource (hInst, hrsrc);
if (!handle)
return FALSE;
infoPtr->lpAvi = LockResource32 (handle);
infoPtr->lpAvi = LockResource (handle);
if (!infoPtr->lpAvi)
return FALSE;
@ -44,19 +44,19 @@ ANIMATE_LoadRes32A (ANIMATE_INFO *infoPtr, HINSTANCE32 hInst, LPSTR lpName)
}
static BOOL32
ANIMATE_LoadFile32A (ANIMATE_INFO *infoPtr, LPSTR lpName)
static BOOL
ANIMATE_LoadFileA (ANIMATE_INFO *infoPtr, LPSTR lpName)
{
HANDLE32 handle;
HANDLE handle;
infoPtr->hFile =
CreateFile32A (lpName, GENERIC_READ, 0, NULL, OPEN_EXISTING,
CreateFileA (lpName, GENERIC_READ, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, 0);
if (!infoPtr->hFile)
return FALSE;
handle =
CreateFileMapping32A (infoPtr->hFile, NULL, PAGE_READONLY | SEC_COMMIT,
CreateFileMappingA (infoPtr->hFile, NULL, PAGE_READONLY | SEC_COMMIT,
0, 0, NULL);
if (!handle) {
CloseHandle (infoPtr->hFile);
@ -84,7 +84,7 @@ ANIMATE_Free (ANIMATE_INFO *infoPtr)
infoPtr->lpAvi = NULL;
}
else {
GlobalFree32 ((HGLOBAL32)infoPtr->lpAvi);
GlobalFree ((HGLOBAL)infoPtr->lpAvi);
infoPtr->lpAvi = NULL;
}
}
@ -99,10 +99,10 @@ ANIMATE_GetAviInfo (infoPtr)
static LRESULT
ANIMATE_Open32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
ANIMATE_OpenA (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(wndPtr);
HINSTANCE32 hInstance = (HINSTANCE32)wParam;
HINSTANCE hInstance = (HINSTANCE)wParam;
ANIMATE_Free (infoPtr);
@ -114,14 +114,14 @@ ANIMATE_Open32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
if (HIWORD(lParam)) {
FIXME (animate, "(\"%s\") empty stub!\n", (LPSTR)lParam);
if (ANIMATE_LoadRes32A (infoPtr, hInstance, (LPSTR)lParam)) {
if (ANIMATE_LoadResA (infoPtr, hInstance, (LPSTR)lParam)) {
FIXME (animate, "AVI resource found!\n");
}
else {
FIXME (animate, "No AVI resource found!\n");
if (ANIMATE_LoadFile32A (infoPtr, (LPSTR)lParam)) {
if (ANIMATE_LoadFileA (infoPtr, (LPSTR)lParam)) {
FIXME (animate, "AVI file found!\n");
}
else {
@ -133,8 +133,8 @@ ANIMATE_Open32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
else {
FIXME (animate, "(%u) empty stub!\n", (WORD)LOWORD(lParam));
if (ANIMATE_LoadRes32A (infoPtr, hInstance,
MAKEINTRESOURCE32A((INT32)lParam))) {
if (ANIMATE_LoadResA (infoPtr, hInstance,
MAKEINTRESOURCEA((INT)lParam))) {
FIXME (animate, "AVI resource found!\n");
}
else {
@ -153,12 +153,12 @@ ANIMATE_Open32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
ANIMATE_Play (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
ANIMATE_Play (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(wndPtr); */
INT32 nFrom = (INT32)LOWORD(lParam);
INT32 nTo = (INT32)HIWORD(lParam);
INT32 nRepeat = (INT32)wParam;
INT nFrom = (INT)LOWORD(lParam);
INT nTo = (INT)HIWORD(lParam);
INT nRepeat = (INT)wParam;
#if 0
/* nothing opened */
@ -185,7 +185,7 @@ ANIMATE_Play (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
ANIMATE_Stop (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
ANIMATE_Stop (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(wndPtr); */
@ -201,7 +201,7 @@ ANIMATE_Stop (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
ANIMATE_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
ANIMATE_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
ANIMATE_INFO *infoPtr;
@ -227,7 +227,7 @@ ANIMATE_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
ANIMATE_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
ANIMATE_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(wndPtr);
@ -244,7 +244,7 @@ ANIMATE_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
#if 0
static LRESULT
ANIMATE_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
ANIMATE_EraseBackground (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(wndPtr);
/*
@ -262,14 +262,14 @@ ANIMATE_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI
ANIMATE_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
ANIMATE_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
switch (uMsg)
{
case ACM_OPEN32A:
return ANIMATE_Open32A (wndPtr, wParam, lParam);
case ACM_OPENA:
return ANIMATE_OpenA (wndPtr, wParam, lParam);
/* case ACM_OPEN32W: */
/* return ANIMATE_Open32W (wndPtr, wParam, lParam); */
@ -301,7 +301,7 @@ ANIMATE_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (animate, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -310,27 +310,27 @@ ANIMATE_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
ANIMATE_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (ANIMATE_CLASS32A)) return;
if (GlobalFindAtomA (ANIMATE_CLASSA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS;
wndClass.lpfnWndProc = (WNDPROC32)ANIMATE_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)ANIMATE_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(ANIMATE_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hbrBackground = (HBRUSH32)(COLOR_BTNFACE + 1);
wndClass.lpszClassName = ANIMATE_CLASS32A;
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
wndClass.lpszClassName = ANIMATE_CLASSA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
ANIMATE_Unregister (VOID)
{
if (GlobalFindAtom32A (ANIMATE_CLASS32A))
UnregisterClass32A (ANIMATE_CLASS32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (ANIMATE_CLASSA))
UnregisterClassA (ANIMATE_CLASSA, (HINSTANCE)NULL);
}

View File

@ -30,7 +30,7 @@
__inline__ static LRESULT
COMBOEX_GetComboControl (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_GetComboControl (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr);
@ -41,21 +41,21 @@ COMBOEX_GetComboControl (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
__inline__ static LRESULT
COMBOEX_GetEditControl (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_GetEditControl (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr);
if ((wndPtr->dwStyle & CBS_DROPDOWNLIST) != CBS_DROPDOWN)
return 0;
TRACE (comboex, "-- 0x%x\n", GetDlgItem32 (infoPtr->hwndCombo, ID_CB_EDIT));
TRACE (comboex, "-- 0x%x\n", GetDlgItem (infoPtr->hwndCombo, ID_CB_EDIT));
return (LRESULT)GetDlgItem32 (infoPtr->hwndCombo, ID_CB_EDIT);
return (LRESULT)GetDlgItem (infoPtr->hwndCombo, ID_CB_EDIT);
}
__inline__ static LRESULT
COMBOEX_GetExtendedStyle (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_GetExtendedStyle (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr);
@ -64,7 +64,7 @@ COMBOEX_GetExtendedStyle (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
__inline__ static LRESULT
COMBOEX_GetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_GetImageList (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr);
@ -77,7 +77,7 @@ COMBOEX_GetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
COMBOEX_InsertItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_InsertItemA (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr); */
@ -89,7 +89,7 @@ COMBOEX_InsertItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
COMBOEX_SetExtendedStyle (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_SetExtendedStyle (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr);
DWORD dwTemp;
@ -111,7 +111,7 @@ COMBOEX_SetExtendedStyle (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
__inline__ static LRESULT
COMBOEX_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_SetImageList (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr);
HIMAGELIST himlTemp;
@ -126,7 +126,7 @@ COMBOEX_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
COMBOEX_SetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_SetItemA (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr); */
@ -140,21 +140,21 @@ COMBOEX_SetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
__inline__ static LRESULT
COMBOEX_Forward (WND *wndPtr, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
COMBOEX_Forward (WND *wndPtr, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr);
FIXME (comboex, "(0x%x 0x%x 0x%lx): stub\n", uMsg, wParam, lParam);
if (infoPtr->hwndCombo)
return SendMessage32A (infoPtr->hwndCombo, uMsg, wParam, lParam);
return SendMessageA (infoPtr->hwndCombo, uMsg, wParam, lParam);
return 0;
}
static LRESULT
COMBOEX_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr;
DWORD dwComboStyle;
@ -182,9 +182,9 @@ COMBOEX_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
wndPtr->dwStyle & (CBS_SIMPLE|CBS_DROPDOWN|CBS_DROPDOWNLIST|WS_CHILD);
infoPtr->hwndCombo =
CreateWindow32A ("ComboBox", "",
CreateWindowA ("ComboBox", "",
WS_CHILD | WS_VISIBLE | CBS_OWNERDRAWFIXED | dwComboStyle,
0, 0, 0, 0, wndPtr->hwndSelf, (HMENU32)1,
0, 0, 0, 0, wndPtr->hwndSelf, (HMENU)1,
wndPtr->hInstance, NULL);
@ -193,13 +193,13 @@ COMBOEX_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
COMBOEX_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr);
if (infoPtr->hwndCombo)
DestroyWindow32 (infoPtr->hwndCombo);
DestroyWindow (infoPtr->hwndCombo);
@ -212,14 +212,14 @@ COMBOEX_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
COMBOEX_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
COMBOEX_Size (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr(wndPtr);
RECT32 rect;
RECT rect;
GetClientRect32 (wndPtr->hwndSelf, &rect);
GetClientRect (wndPtr->hwndSelf, &rect);
MoveWindow32 (infoPtr->hwndCombo, 0, 0, rect.right -rect.left,
MoveWindow (infoPtr->hwndCombo, 0, 0, rect.right -rect.left,
rect.bottom - rect.top, TRUE);
return 0;
@ -227,7 +227,7 @@ COMBOEX_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI
COMBOEX_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -253,8 +253,8 @@ COMBOEX_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case CBEM_HASEDITCHANGED:
*/
case CBEM_INSERTITEM32A:
return COMBOEX_InsertItem32A (wndPtr, wParam, lParam);
case CBEM_INSERTITEMA:
return COMBOEX_InsertItemA (wndPtr, wParam, lParam);
/* case CBEM_INSERTITEM32W: */
@ -264,33 +264,33 @@ COMBOEX_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case CBEM_SETIMAGELIST:
return COMBOEX_SetImageList (wndPtr, wParam, lParam);
case CBEM_SETITEM32A:
return COMBOEX_SetItem32A (wndPtr, wParam, lParam);
case CBEM_SETITEMA:
return COMBOEX_SetItemA (wndPtr, wParam, lParam);
/* case CBEM_SETITEM32W:
case CBEM_SETUNICODEFORMAT:
*/
case CB_DELETESTRING32:
case CB_FINDSTRINGEXACT32:
case CB_GETCOUNT32:
case CB_GETCURSEL32:
case CB_GETDROPPEDCONTROLRECT32:
case CB_GETDROPPEDSTATE32:
case CB_GETITEMDATA32:
case CB_GETITEMHEIGHT32:
case CB_GETLBTEXT32:
case CB_GETLBTEXTLEN32:
case CB_GETEXTENDEDUI32:
case CB_LIMITTEXT32:
case CB_RESETCONTENT32:
case CB_SELECTSTRING32:
case CB_SETCURSEL32:
case CB_SETDROPPEDWIDTH32:
case CB_SETEXTENDEDUI32:
case CB_SETITEMDATA32:
case CB_SETITEMHEIGHT32:
case CB_SHOWDROPDOWN32:
case CB_DELETESTRING:
case CB_FINDSTRINGEXACT:
case CB_GETCOUNT:
case CB_GETCURSEL:
case CB_GETDROPPEDCONTROLRECT:
case CB_GETDROPPEDSTATE:
case CB_GETITEMDATA:
case CB_GETITEMHEIGHT:
case CB_GETLBTEXT:
case CB_GETLBTEXTLEN:
case CB_GETEXTENDEDUI:
case CB_LIMITTEXT:
case CB_RESETCONTENT:
case CB_SELECTSTRING:
case CB_SETCURSEL:
case CB_SETDROPPEDWIDTH:
case CB_SETEXTENDEDUI:
case CB_SETITEMDATA:
case CB_SETITEMHEIGHT:
case CB_SHOWDROPDOWN:
return COMBOEX_Forward (wndPtr, uMsg, wParam, lParam);
@ -307,7 +307,7 @@ COMBOEX_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (comboex, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -316,27 +316,27 @@ COMBOEX_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
COMBOEX_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (WC_COMBOBOXEX32A)) return;
if (GlobalFindAtomA (WC_COMBOBOXEXA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS;
wndClass.lpfnWndProc = (WNDPROC32)COMBOEX_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)COMBOEX_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(COMBOEX_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hbrBackground = (HBRUSH32)(COLOR_WINDOW + 1);
wndClass.lpszClassName = WC_COMBOBOXEX32A;
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wndClass.lpszClassName = WC_COMBOBOXEXA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
COMBOEX_Unregister (VOID)
{
if (GlobalFindAtom32A (WC_COMBOBOXEX32A))
UnregisterClass32A (WC_COMBOBOXEX32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (WC_COMBOBOXEXA))
UnregisterClassA (WC_COMBOBOXEXA, (HINSTANCE)NULL);
}

View File

@ -23,7 +23,7 @@
#include "debug.h"
extern HANDLE32 COMCTL32_hHeap; /* handle to the private heap */
extern HANDLE COMCTL32_hHeap; /* handle to the private heap */
/*
* We put some function prototypes here that don't seem to belong in
@ -50,26 +50,26 @@ extern LPWSTR WINAPI strstrw(LPCWSTR, LPCWSTR);
* No more information available yet!
*/
BOOL32 WINAPI
BOOL WINAPI
DPA_Merge (const HDPA hdpa1, const HDPA hdpa2, DWORD dwFlags,
PFNDPACOMPARE pfnCompare, LPVOID pfnParam5, LPARAM lParam)
{
/* LPVOID *pWork1, *pWork2; */
INT32 nCount1, nCount2;
INT nCount1, nCount2;
TRACE (commctrl, "(%p %p %08lx %p %p %08lx): stub!\n",
hdpa1, hdpa2, dwFlags, pfnCompare, pfnParam5, lParam);
if (IsBadWritePtr32 (hdpa1, sizeof(DPA)))
if (IsBadWritePtr (hdpa1, sizeof(DPA)))
return FALSE;
if (IsBadWritePtr32 (hdpa2, sizeof(DPA)))
if (IsBadWritePtr (hdpa2, sizeof(DPA)))
return FALSE;
if (IsBadCodePtr32 ((FARPROC32)pfnCompare))
if (IsBadCodePtr ((FARPROC)pfnCompare))
return FALSE;
if (IsBadCodePtr32 ((FARPROC32)pfnParam5))
if (IsBadCodePtr ((FARPROC)pfnParam5))
return FALSE;
if (dwFlags & DPAM_SORT) {
@ -190,7 +190,7 @@ COMCTL32_ReAlloc (LPVOID lpSrc, DWORD dwSize)
* Failure: FALSE
*/
BOOL32 WINAPI
BOOL WINAPI
COMCTL32_Free (LPVOID lpMem)
{
TRACE (commctrl, "(%p)\n", lpMem);
@ -251,7 +251,7 @@ typedef struct tagMRU
} MRU, *HMRU;
LPVOID WINAPI
CreateMRUListLazy32A (LPMRUINFO lpmi, DWORD dwParam2,
CreateMRUListLazyA (LPMRUINFO lpmi, DWORD dwParam2,
DWORD dwParam3, DWORD dwParam4);
@ -265,26 +265,26 @@ CreateMRUListLazy32A (LPMRUINFO lpmi, DWORD dwParam2,
*/
LPVOID WINAPI
CreateMRUList32A (LPMRUINFO lpmi)
CreateMRUListA (LPMRUINFO lpmi)
{
return CreateMRUListLazy32A (lpmi, 0, 0, 0);
return CreateMRUListLazyA (lpmi, 0, 0, 0);
}
DWORD WINAPI
FreeMRUList32A (HMRU hmru)
FreeMRUListA (HMRU hmru)
{
FIXME (commctrl, "(%p) empty stub!\n", hmru);
#if 0
if (!(hmru->dwParam1 & 1001)) {
RegSetValueEx32A (hmru->hKeyMRU, "MRUList", 0, REG_SZ,
RegSetValueExA (hmru->hKeyMRU, "MRUList", 0, REG_SZ,
hmru->lpszMRUString,
lstrlen32A (hmru->lpszMRUString));
lstrlenA (hmru->lpszMRUString));
}
RegClosKey32 (hmru->hkeyMRU
RegClosKey (hmru->hkeyMRU
COMCTL32_Free32 (hmru->lpszMRUString);
#endif
@ -316,7 +316,7 @@ FindMRUData (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3, DWORD dwParam4)
LPVOID WINAPI
CreateMRUListLazy32A (LPMRUINFO lpmi, DWORD dwParam2, DWORD dwParam3, DWORD dwParam4)
CreateMRUListLazyA (LPMRUINFO lpmi, DWORD dwParam2, DWORD dwParam3, DWORD dwParam4)
{
/* DWORD dwLocal1; *
* HKEY hkeyResult; *
@ -360,15 +360,15 @@ CreateMRUListLazy32A (LPMRUINFO lpmi, DWORD dwParam2, DWORD dwParam3, DWORD dwPa
* RETURNS
*/
INT32 WINAPI
Str_GetPtr32A (LPCSTR lpSrc, LPSTR lpDest, INT32 nMaxLen)
INT WINAPI
Str_GetPtrA (LPCSTR lpSrc, LPSTR lpDest, INT nMaxLen)
{
INT32 len;
INT len;
TRACE (commctrl, "(%p %p %d)\n", lpSrc, lpDest, nMaxLen);
if (!lpDest && lpSrc)
return lstrlen32A (lpSrc);
return lstrlenA (lpSrc);
if (nMaxLen == 0)
return 0;
@ -378,7 +378,7 @@ Str_GetPtr32A (LPCSTR lpSrc, LPSTR lpDest, INT32 nMaxLen)
return 0;
}
len = lstrlen32A (lpSrc);
len = lstrlenA (lpSrc);
if (len >= nMaxLen)
len = nMaxLen - 1;
@ -399,16 +399,16 @@ Str_GetPtr32A (LPCSTR lpSrc, LPSTR lpDest, INT32 nMaxLen)
* RETURNS
*/
BOOL32 WINAPI
Str_SetPtr32A (LPSTR *lppDest, LPCSTR lpSrc)
BOOL WINAPI
Str_SetPtrA (LPSTR *lppDest, LPCSTR lpSrc)
{
TRACE (commctrl, "(%p %p)\n", lppDest, lpSrc);
if (lpSrc) {
LPSTR ptr = COMCTL32_ReAlloc (*lppDest, lstrlen32A (lpSrc) + 1);
LPSTR ptr = COMCTL32_ReAlloc (*lppDest, lstrlenA (lpSrc) + 1);
if (!ptr)
return FALSE;
lstrcpy32A (ptr, lpSrc);
lstrcpyA (ptr, lpSrc);
*lppDest = ptr;
}
else {
@ -433,15 +433,15 @@ Str_SetPtr32A (LPSTR *lppDest, LPCSTR lpSrc)
* RETURNS
*/
INT32 WINAPI
Str_GetPtr32W (LPCWSTR lpSrc, LPWSTR lpDest, INT32 nMaxLen)
INT WINAPI
Str_GetPtrW (LPCWSTR lpSrc, LPWSTR lpDest, INT nMaxLen)
{
INT32 len;
INT len;
TRACE (commctrl, "(%p %p %d)\n", lpSrc, lpDest, nMaxLen);
if (!lpDest && lpSrc)
return lstrlen32W (lpSrc);
return lstrlenW (lpSrc);
if (nMaxLen == 0)
return 0;
@ -451,7 +451,7 @@ Str_GetPtr32W (LPCWSTR lpSrc, LPWSTR lpDest, INT32 nMaxLen)
return 0;
}
len = lstrlen32W (lpSrc);
len = lstrlenW (lpSrc);
if (len >= nMaxLen)
len = nMaxLen - 1;
@ -472,17 +472,17 @@ Str_GetPtr32W (LPCWSTR lpSrc, LPWSTR lpDest, INT32 nMaxLen)
* RETURNS
*/
BOOL32 WINAPI
Str_SetPtr32W (LPWSTR *lppDest, LPCWSTR lpSrc)
BOOL WINAPI
Str_SetPtrW (LPWSTR *lppDest, LPCWSTR lpSrc)
{
TRACE (commctrl, "(%p %p)\n", lppDest, lpSrc);
if (lpSrc) {
INT32 len = lstrlen32W (lpSrc) + 1;
INT len = lstrlenW (lpSrc) + 1;
LPWSTR ptr = COMCTL32_ReAlloc (*lppDest, len * sizeof(WCHAR));
if (!ptr)
return FALSE;
lstrcpy32W (ptr, lpSrc);
lstrcpyW (ptr, lpSrc);
*lppDest = ptr;
}
else {
@ -515,7 +515,7 @@ Str_SetPtr32W (LPWSTR *lppDest, LPCWSTR lpSrc)
*/
HDSA WINAPI
DSA_Create (INT32 nSize, INT32 nGrow)
DSA_Create (INT nSize, INT nGrow)
{
HDSA hdsa;
@ -546,7 +546,7 @@ DSA_Create (INT32 nSize, INT32 nGrow)
* Failure: FALSE
*/
BOOL32 WINAPI
BOOL WINAPI
DSA_Destroy (const HDSA hdsa)
{
TRACE (commctrl, "(%p)\n", hdsa);
@ -574,8 +574,8 @@ DSA_Destroy (const HDSA hdsa)
* Failure: FALSE
*/
BOOL32 WINAPI
DSA_GetItem (const HDSA hdsa, INT32 nIndex, LPVOID pDest)
BOOL WINAPI
DSA_GetItem (const HDSA hdsa, INT nIndex, LPVOID pDest)
{
LPVOID pSrc;
@ -608,7 +608,7 @@ DSA_GetItem (const HDSA hdsa, INT32 nIndex, LPVOID pDest)
*/
LPVOID WINAPI
DSA_GetItemPtr (const HDSA hdsa, INT32 nIndex)
DSA_GetItemPtr (const HDSA hdsa, INT nIndex)
{
LPVOID pSrc;
@ -642,10 +642,10 @@ DSA_GetItemPtr (const HDSA hdsa, INT32 nIndex)
* Failure: FALSE
*/
BOOL32 WINAPI
DSA_SetItem (const HDSA hdsa, INT32 nIndex, LPVOID pSrc)
BOOL WINAPI
DSA_SetItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
{
INT32 nSize, nNewItems;
INT nSize, nNewItems;
LPVOID pDest, lpTemp;
TRACE (commctrl, "(%p %d %p)\n", hdsa, nIndex, pSrc);
@ -662,7 +662,7 @@ DSA_SetItem (const HDSA hdsa, INT32 nIndex, LPVOID pSrc)
else {
/* resize the block of memory */
nNewItems =
hdsa->nGrow * ((INT32)((nIndex - 1) / hdsa->nGrow) + 1);
hdsa->nGrow * ((INT)((nIndex - 1) / hdsa->nGrow) + 1);
nSize = hdsa->nItemSize * nNewItems;
lpTemp = (LPVOID)COMCTL32_ReAlloc (hdsa->pData, nSize);
@ -697,10 +697,10 @@ DSA_SetItem (const HDSA hdsa, INT32 nIndex, LPVOID pSrc)
* Failure: -1
*/
INT32 WINAPI
DSA_InsertItem (const HDSA hdsa, INT32 nIndex, LPVOID pSrc)
INT WINAPI
DSA_InsertItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
{
INT32 nNewItems, nSize, i;
INT nNewItems, nSize, i;
LPVOID lpTemp, lpDest;
LPDWORD p;
@ -711,7 +711,7 @@ DSA_InsertItem (const HDSA hdsa, INT32 nIndex, LPVOID pSrc)
for (i = 0; i < hdsa->nItemSize; i += 4) {
p = *(DWORD**)(pSrc + i);
if (IsBadStringPtr32A ((char*)p, 256))
if (IsBadStringPtrA ((char*)p, 256))
TRACE (commctrl, "-- %d=%p\n", i, (DWORD*)p);
else
TRACE (commctrl, "-- %d=%p [%s]\n", i, p, debugstr_a((char*)p));
@ -767,11 +767,11 @@ DSA_InsertItem (const HDSA hdsa, INT32 nIndex, LPVOID pSrc)
* Failure: -1
*/
INT32 WINAPI
DSA_DeleteItem (const HDSA hdsa, INT32 nIndex)
INT WINAPI
DSA_DeleteItem (const HDSA hdsa, INT nIndex)
{
LPVOID lpDest,lpSrc;
INT32 nSize;
INT nSize;
TRACE (commctrl, "(%p %d)\n", hdsa, nIndex);
@ -821,7 +821,7 @@ DSA_DeleteItem (const HDSA hdsa, INT32 nIndex)
* Failure: FALSE
*/
BOOL32 WINAPI
BOOL WINAPI
DSA_DeleteAllItems (const HDSA hdsa)
{
TRACE (commctrl, "(%p)\n", hdsa);
@ -856,7 +856,7 @@ DSA_DeleteAllItems (const HDSA hdsa)
*/
HDPA WINAPI
DPA_Create (INT32 nGrow)
DPA_Create (INT nGrow)
{
HDPA hdpa;
@ -888,7 +888,7 @@ DPA_Create (INT32 nGrow)
* Failure: FALSE
*/
BOOL32 WINAPI
BOOL WINAPI
DPA_Destroy (const HDPA hdpa)
{
TRACE (commctrl, "(%p)\n", hdpa);
@ -917,8 +917,8 @@ DPA_Destroy (const HDPA hdpa)
* Failure: FALSE
*/
BOOL32 WINAPI
DPA_Grow (const HDPA hdpa, INT32 nGrow)
BOOL WINAPI
DPA_Grow (const HDPA hdpa, INT nGrow)
{
TRACE (commctrl, "(%p %d)\n", hdpa, nGrow);
@ -954,7 +954,7 @@ DPA_Grow (const HDPA hdpa, INT32 nGrow)
HDPA WINAPI
DPA_Clone (const HDPA hdpa, const HDPA hdpaNew)
{
INT32 nNewItems, nSize;
INT nNewItems, nSize;
HDPA hdpaTemp;
if (!hdpa)
@ -982,7 +982,7 @@ DPA_Clone (const HDPA hdpa, const HDPA hdpaNew)
/* create a new pointer array */
nNewItems = hdpaTemp->nGrow *
((INT32)((hdpa->nItemCount - 1) / hdpaTemp->nGrow) + 1);
((INT)((hdpa->nItemCount - 1) / hdpaTemp->nGrow) + 1);
nSize = nNewItems * sizeof(LPVOID);
hdpaTemp->ptrs =
(LPVOID*)HeapAlloc (hdpaTemp->hHeap, HEAP_ZERO_MEMORY, nSize);
@ -1012,7 +1012,7 @@ DPA_Clone (const HDPA hdpa, const HDPA hdpaNew)
*/
LPVOID WINAPI
DPA_GetPtr (const HDPA hdpa, INT32 i)
DPA_GetPtr (const HDPA hdpa, INT i)
{
TRACE (commctrl, "(%p %d)\n", hdpa, i);
@ -1043,10 +1043,10 @@ DPA_GetPtr (const HDPA hdpa, INT32 i)
* Failure: -1
*/
INT32 WINAPI
INT WINAPI
DPA_GetPtrIndex (const HDPA hdpa, LPVOID p)
{
INT32 i;
INT i;
if (!hdpa->ptrs)
return -1;
@ -1075,10 +1075,10 @@ DPA_GetPtrIndex (const HDPA hdpa, LPVOID p)
* Failure: -1
*/
INT32 WINAPI
DPA_InsertPtr (const HDPA hdpa, INT32 i, LPVOID p)
INT WINAPI
DPA_InsertPtr (const HDPA hdpa, INT i, LPVOID p)
{
INT32 nNewItems, nSize, nIndex = 0;
INT nNewItems, nSize, nIndex = 0;
LPVOID *lpTemp, *lpDest;
TRACE (commctrl, "(%p %d %p)\n", hdpa, i, p);
@ -1148,8 +1148,8 @@ DPA_InsertPtr (const HDPA hdpa, INT32 i, LPVOID p)
* Failure: FALSE
*/
BOOL32 WINAPI
DPA_SetPtr (const HDPA hdpa, INT32 i, LPVOID p)
BOOL WINAPI
DPA_SetPtr (const HDPA hdpa, INT i, LPVOID p)
{
LPVOID *lpTemp;
@ -1166,9 +1166,9 @@ DPA_SetPtr (const HDPA hdpa, INT32 i, LPVOID p)
}
else {
/* resize the block of memory */
INT32 nNewItems =
hdpa->nGrow * ((INT32)((i - 1) / hdpa->nGrow) + 1);
INT32 nSize = nNewItems * sizeof(LPVOID);
INT nNewItems =
hdpa->nGrow * ((INT)((i - 1) / hdpa->nGrow) + 1);
INT nSize = nNewItems * sizeof(LPVOID);
lpTemp = (LPVOID*)HeapReAlloc (hdpa->hHeap, HEAP_ZERO_MEMORY,
hdpa->ptrs, nSize);
@ -1202,10 +1202,10 @@ DPA_SetPtr (const HDPA hdpa, INT32 i, LPVOID p)
*/
LPVOID WINAPI
DPA_DeletePtr (const HDPA hdpa, INT32 i)
DPA_DeletePtr (const HDPA hdpa, INT i)
{
LPVOID *lpDest, *lpSrc, lpTemp = NULL;
INT32 nSize;
INT nSize;
TRACE (commctrl, "(%p %d)\n", hdpa, i);
@ -1228,7 +1228,7 @@ DPA_DeletePtr (const HDPA hdpa, INT32 i)
/* free memory ?*/
if ((hdpa->nMaxCount - hdpa->nItemCount) >= hdpa->nGrow) {
INT32 nNewItems = MIN(hdpa->nGrow * 2, hdpa->nItemCount);
INT nNewItems = MIN(hdpa->nGrow * 2, hdpa->nItemCount);
nSize = nNewItems * sizeof(LPVOID);
lpDest = (LPVOID)HeapReAlloc (hdpa->hHeap, HEAP_ZERO_MEMORY,
hdpa->ptrs, nSize);
@ -1256,7 +1256,7 @@ DPA_DeletePtr (const HDPA hdpa, INT32 i)
* Failure: FALSE
*/
BOOL32 WINAPI
BOOL WINAPI
DPA_DeleteAllPtrs (const HDPA hdpa)
{
TRACE (commctrl, "(%p)\n", hdpa);
@ -1293,11 +1293,11 @@ DPA_DeleteAllPtrs (const HDPA hdpa)
*/
static VOID
DPA_QuickSort (LPVOID *lpPtrs, INT32 l, INT32 r,
DPA_QuickSort (LPVOID *lpPtrs, INT l, INT r,
PFNDPACOMPARE pfnCompare, LPARAM lParam)
{
LPVOID t, v;
INT32 i, j;
INT i, j;
TRACE (commctrl, "l=%i r=%i\n", l, r);
@ -1334,7 +1334,7 @@ DPA_QuickSort (LPVOID *lpPtrs, INT32 l, INT32 r,
* Failure: FALSE
*/
BOOL32 WINAPI
BOOL WINAPI
DPA_Sort (const HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
{
if (!hdpa || !pfnCompare)
@ -1373,9 +1373,9 @@ DPA_Sort (const HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
* If something goes wrong, blame HIM not ME! (Eric Kohl)
*/
INT32 WINAPI
DPA_Search (const HDPA hdpa, LPVOID pFind, INT32 nStart,
PFNDPACOMPARE pfnCompare, LPARAM lParam, UINT32 uOptions)
INT WINAPI
DPA_Search (const HDPA hdpa, LPVOID pFind, INT nStart,
PFNDPACOMPARE pfnCompare, LPARAM lParam, UINT uOptions)
{
if (!hdpa || !pfnCompare || !pFind)
return -1;
@ -1385,7 +1385,7 @@ DPA_Search (const HDPA hdpa, LPVOID pFind, INT32 nStart,
if (uOptions & DPAS_SORTED) {
/* array is sorted --> use binary search */
INT32 l, r, x, n;
INT l, r, x, n;
LPVOID *lpPtr;
TRACE (commctrl, "binary search\n");
@ -1419,7 +1419,7 @@ DPA_Search (const HDPA hdpa, LPVOID pFind, INT32 nStart,
else {
/* array is not sorted --> use linear search */
LPVOID *lpPtr;
INT32 nIndex;
INT nIndex;
TRACE (commctrl, "linear search\n");
@ -1453,7 +1453,7 @@ DPA_Search (const HDPA hdpa, LPVOID pFind, INT32 nStart,
*/
HDPA WINAPI
DPA_CreateEx (INT32 nGrow, HANDLE32 hHeap)
DPA_CreateEx (INT nGrow, HANDLE hHeap)
{
HDPA hdpa;
@ -1485,8 +1485,8 @@ DPA_CreateEx (INT32 nGrow, HANDLE32 hHeap)
typedef struct tagNOTIFYDATA
{
HWND32 hwndFrom;
HWND32 hwndTo;
HWND hwndFrom;
HWND hwndTo;
DWORD dwParam3;
DWORD dwParam4;
DWORD dwParam5;
@ -1499,11 +1499,11 @@ typedef struct tagNOTIFYDATA
*/
static LRESULT
DoNotify (LPNOTIFYDATA lpNotify, UINT32 uCode, LPNMHDR lpHdr)
DoNotify (LPNOTIFYDATA lpNotify, UINT uCode, LPNMHDR lpHdr)
{
NMHDR nmhdr;
LPNMHDR lpNmh = NULL;
UINT32 idFrom = 0;
UINT idFrom = 0;
TRACE (commctrl, "(0x%04x 0x%04x %d %p 0x%08lx)\n",
lpNotify->hwndFrom, lpNotify->hwndTo, uCode, lpHdr,
@ -1518,11 +1518,11 @@ DoNotify (LPNOTIFYDATA lpNotify, UINT32 uCode, LPNMHDR lpHdr)
}
else {
if (lpNotify->hwndFrom) {
HWND32 hwndParent = GetParent32 (lpNotify->hwndFrom);
HWND hwndParent = GetParent (lpNotify->hwndFrom);
if (hwndParent) {
hwndParent = GetWindow32 (lpNotify->hwndFrom, GW_OWNER);
hwndParent = GetWindow (lpNotify->hwndFrom, GW_OWNER);
if (hwndParent)
idFrom = GetDlgCtrlID32 (lpNotify->hwndFrom);
idFrom = GetDlgCtrlID (lpNotify->hwndFrom);
}
}
@ -1533,7 +1533,7 @@ DoNotify (LPNOTIFYDATA lpNotify, UINT32 uCode, LPNMHDR lpHdr)
lpNmh->code = uCode;
}
return SendMessage32A (lpNotify->hwndTo, WM_NOTIFY, idFrom, (LPARAM)lpNmh);
return SendMessageA (lpNotify->hwndTo, WM_NOTIFY, idFrom, (LPARAM)lpNmh);
}
@ -1552,8 +1552,8 @@ DoNotify (LPNOTIFYDATA lpNotify, UINT32 uCode, LPNMHDR lpHdr)
*/
LRESULT WINAPI
COMCTL32_SendNotify (HWND32 hwndFrom, HWND32 hwndTo,
UINT32 uCode, LPNMHDR lpHdr)
COMCTL32_SendNotify (HWND hwndFrom, HWND hwndTo,
UINT uCode, LPNMHDR lpHdr)
{
NOTIFYDATA notify;
@ -1585,19 +1585,19 @@ COMCTL32_SendNotify (HWND32 hwndFrom, HWND32 hwndTo,
*/
LRESULT WINAPI
COMCTL32_SendNotifyEx (HWND32 hwndTo, HWND32 hwndFrom, UINT32 uCode,
COMCTL32_SendNotifyEx (HWND hwndTo, HWND hwndFrom, UINT uCode,
LPNMHDR lpHdr, DWORD dwParam5)
{
NOTIFYDATA notify;
HWND32 hwndNotify;
HWND hwndNotify;
TRACE (commctrl, "(0x%04x 0x%04x %d %p 0x%08lx)\n",
hwndFrom, hwndTo, uCode, lpHdr, dwParam5);
hwndNotify = hwndTo;
if (!hwndTo) {
if (IsWindow32 (hwndFrom)) {
hwndNotify = GetParent32 (hwndFrom);
if (IsWindow (hwndFrom)) {
hwndNotify = GetParent (hwndFrom);
if (!hwndNotify)
return 0;
}
@ -1631,7 +1631,7 @@ COMCTL32_StrChrA (LPCSTR lpString, CHAR cChar)
LPSTR WINAPI
COMCTL32_StrStrIA (LPCSTR lpStr1, LPCSTR lpStr2)
{
INT32 len1, len2, i;
INT len1, len2, i;
CHAR first;
if (*lpStr2 == 0)
@ -1661,7 +1661,7 @@ COMCTL32_StrStrIA (LPCSTR lpStr1, LPCSTR lpStr2)
* StrToIntA [COMCTL32.357] Converts a string to a signed integer.
*/
INT32 WINAPI
INT WINAPI
COMCTL32_StrToIntA (LPSTR lpString)
{
return atoi(lpString);
@ -1685,7 +1685,7 @@ COMCTL32_StrToIntA (LPSTR lpString)
VOID WINAPI
DPA_EnumCallback (const HDPA hdpa, DPAENUMPROC enumProc, LPARAM lParam)
{
INT32 i;
INT i;
TRACE (commctrl, "(%p %p %08lx)\n", hdpa, enumProc, lParam);
@ -1718,7 +1718,7 @@ DPA_EnumCallback (const HDPA hdpa, DPAENUMPROC enumProc, LPARAM lParam)
* Failure: FALSE
*/
BOOL32 WINAPI
BOOL WINAPI
DPA_DestroyCallback (const HDPA hdpa, DPAENUMPROC enumProc, LPARAM lParam)
{
TRACE (commctrl, "(%p %p %08lx)\n", hdpa, enumProc, lParam);
@ -1746,7 +1746,7 @@ DPA_DestroyCallback (const HDPA hdpa, DPAENUMPROC enumProc, LPARAM lParam)
VOID WINAPI
DSA_EnumCallback (const HDSA hdsa, DSAENUMPROC enumProc, LPARAM lParam)
{
INT32 i;
INT i;
TRACE (commctrl, "(%p %p %08lx)\n", hdsa, enumProc, lParam);
@ -1780,7 +1780,7 @@ DSA_EnumCallback (const HDSA hdsa, DSAENUMPROC enumProc, LPARAM lParam)
* Failure: FALSE
*/
BOOL32 WINAPI
BOOL WINAPI
DSA_DestroyCallback (const HDSA hdsa, DSAENUMPROC enumProc, LPARAM lParam)
{
TRACE (commctrl, "(%p %p %08lx)\n", hdsa, enumProc, lParam);
@ -1794,7 +1794,7 @@ DSA_DestroyCallback (const HDSA hdsa, DSAENUMPROC enumProc, LPARAM lParam)
* StrCSpnA [COMCTL32.356]
*
*/
INT32 WINAPI COMCTL32_StrCSpnA( LPCSTR lpStr, LPCSTR lpSet) {
INT WINAPI COMCTL32_StrCSpnA( LPCSTR lpStr, LPCSTR lpSet) {
return strcspn(lpStr, lpSet);
}
@ -1810,16 +1810,16 @@ LPWSTR WINAPI COMCTL32_StrChrW( LPCWSTR lpStart, WORD wMatch) {
* StrCmpNA [COMCTL32.352]
*
*/
INT32 WINAPI COMCTL32_StrCmpNA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar) {
return lstrncmp32A(lpStr1, lpStr2, nChar);
INT WINAPI COMCTL32_StrCmpNA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar) {
return lstrncmpA(lpStr1, lpStr2, nChar);
}
/**************************************************************************
* StrCmpNW [COMCTL32.360]
*
*/
INT32 WINAPI COMCTL32_StrCmpNW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar) {
return lstrncmp32W(lpStr1, lpStr2, nChar);
INT WINAPI COMCTL32_StrCmpNW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar) {
return lstrncmpW(lpStr1, lpStr2, nChar);
}
/**************************************************************************
@ -1858,7 +1858,7 @@ LPWSTR WINAPI COMCTL32_StrStrW( LPCWSTR lpFirst, LPCWSTR lpSrch) {
* StrSpnW [COMCTL32.364]
*
*/
INT32 WINAPI COMCTL32_StrSpnW( LPWSTR lpStr, LPWSTR lpSet) {
INT WINAPI COMCTL32_StrSpnW( LPWSTR lpStr, LPWSTR lpSet) {
LPWSTR lpLoop = lpStr;
/* validate ptr */
@ -1868,9 +1868,9 @@ INT32 WINAPI COMCTL32_StrSpnW( LPWSTR lpStr, LPWSTR lpSet) {
for(; (*lpLoop != 0); lpLoop++)
if( CRTDLL_wcschr(lpSet, *(WORD*)lpLoop))
return (INT32)(lpLoop-lpStr);
return (INT)(lpLoop-lpStr);
return (INT32)(lpLoop-lpStr);
return (INT)(lpLoop-lpStr);
}

View File

@ -34,7 +34,7 @@
#include "winerror.h"
HANDLE32 COMCTL32_hHeap = (HANDLE32)NULL;
HANDLE COMCTL32_hHeap = (HANDLE)NULL;
DWORD COMCTL32_dwProcessesAttached = 0;
LPSTR COMCTL32_aSubclass = (LPSTR)NULL;
@ -52,8 +52,8 @@ LPSTR COMCTL32_aSubclass = (LPSTR)NULL;
* Failure: FALSE
*/
BOOL32 WINAPI
COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
BOOL WINAPI
COMCTL32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE (commctrl, "%x,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
@ -65,7 +65,7 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
TRACE (commctrl, "Heap created: 0x%x\n", COMCTL32_hHeap);
/* add global subclassing atom (used by 'tooltip' and 'updown') */
COMCTL32_aSubclass = (LPSTR)(DWORD)GlobalAddAtom32A ("CC32SubclassInfo");
COMCTL32_aSubclass = (LPSTR)(DWORD)GlobalAddAtomA ("CC32SubclassInfo");
TRACE (commctrl, "Subclassing atom added: %p\n",
COMCTL32_aSubclass);
@ -123,7 +123,7 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
/* destroy private heap */
HeapDestroy (COMCTL32_hHeap);
TRACE (commctrl, "Heap destroyed: 0x%x\n", COMCTL32_hHeap);
COMCTL32_hHeap = (HANDLE32)NULL;
COMCTL32_hHeap = (HANDLE)NULL;
}
break;
}
@ -160,12 +160,12 @@ COMCTL32_LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
*/
VOID WINAPI
MenuHelp (UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, HMENU32 hMainMenu,
HINSTANCE32 hInst, HWND32 hwndStatus, LPUINT32 lpwIDs)
MenuHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu,
HINSTANCE hInst, HWND hwndStatus, LPUINT lpwIDs)
{
UINT32 uMenuID = 0;
UINT uMenuID = 0;
if (!IsWindow32 (hwndStatus))
if (!IsWindow (hwndStatus))
return;
switch (uMsg) {
@ -176,25 +176,25 @@ MenuHelp (UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, HMENU32 hMainMenu,
if ((HIWORD(wParam) == 0xFFFF) && (lParam == 0)) {
/* menu was closed */
TRACE (commctrl, "menu was closed!\n");
SendMessage32A (hwndStatus, SB_SIMPLE, FALSE, 0);
SendMessageA (hwndStatus, SB_SIMPLE, FALSE, 0);
}
else {
/* menu item was selected */
if (HIWORD(wParam) & MF_POPUP)
uMenuID = (UINT32)*(lpwIDs+1);
uMenuID = (UINT)*(lpwIDs+1);
else
uMenuID = (UINT32)LOWORD(wParam);
uMenuID = (UINT)LOWORD(wParam);
TRACE (commctrl, "uMenuID = %u\n", uMenuID);
if (uMenuID) {
CHAR szText[256];
if (!LoadString32A (hInst, uMenuID, szText, 256))
if (!LoadStringA (hInst, uMenuID, szText, 256))
szText[0] = '\0';
SendMessage32A (hwndStatus, SB_SETTEXT32A,
SendMessageA (hwndStatus, SB_SETTEXTA,
255 | SBT_NOBORDERS, (LPARAM)szText);
SendMessage32A (hwndStatus, SB_SIMPLE, TRUE, 0);
SendMessageA (hwndStatus, SB_SIMPLE, TRUE, 0);
}
}
break;
@ -236,10 +236,10 @@ MenuHelp (UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, HMENU32 hMainMenu,
* Each subsequent pair consists of a menu id and control id.
*/
BOOL32 WINAPI
ShowHideMenuCtl (HWND32 hwnd, UINT32 uFlags, LPINT32 lpInfo)
BOOL WINAPI
ShowHideMenuCtl (HWND hwnd, UINT uFlags, LPINT lpInfo)
{
LPINT32 lpMenuId;
LPINT lpMenuId;
TRACE (commctrl, "%x, %x, %p\n", hwnd, uFlags, lpInfo);
@ -254,22 +254,22 @@ ShowHideMenuCtl (HWND32 hwnd, UINT32 uFlags, LPINT32 lpInfo)
while (*lpMenuId != uFlags)
lpMenuId += 2;
if (GetMenuState32 (lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) {
if (GetMenuState (lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) {
/* uncheck menu item */
CheckMenuItem32 (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
CheckMenuItem (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
/* hide control */
lpMenuId++;
SetWindowPos32 (GetDlgItem32 (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
SWP_HIDEWINDOW);
}
else {
/* check menu item */
CheckMenuItem32 (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
CheckMenuItem (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
/* show control */
lpMenuId++;
SetWindowPos32 (GetDlgItem32 (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
SWP_SHOWWINDOW);
}
@ -297,16 +297,16 @@ ShowHideMenuCtl (HWND32 hwnd, UINT32 uFlags, LPINT32 lpInfo)
*/
VOID WINAPI
GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo)
GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, LPINT lpInfo)
{
RECT32 rcCtrl;
INT32 *lpRun;
HWND32 hwndCtrl;
RECT rcCtrl;
INT *lpRun;
HWND hwndCtrl;
TRACE (commctrl, "(0x%08lx 0x%08lx 0x%08lx)\n",
(DWORD)hwnd, (DWORD)lpRect, (DWORD)lpInfo);
GetClientRect32 (hwnd, lpRect);
GetClientRect (hwnd, lpRect);
lpRun = lpInfo;
do {
@ -314,12 +314,12 @@ GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo)
if (*lpRun == 0)
return;
lpRun++;
hwndCtrl = GetDlgItem32 (hwnd, *lpRun);
if (GetWindowLong32A (hwndCtrl, GWL_STYLE) & WS_VISIBLE) {
hwndCtrl = GetDlgItem (hwnd, *lpRun);
if (GetWindowLongA (hwndCtrl, GWL_STYLE) & WS_VISIBLE) {
TRACE (commctrl, "control id 0x%x\n", *lpRun);
GetWindowRect32 (hwndCtrl, &rcCtrl);
MapWindowPoints32 ((HWND32)0, hwnd, (LPPOINT32)&rcCtrl, 2);
SubtractRect32 (lpRect, lpRect, &rcCtrl);
GetWindowRect (hwndCtrl, &rcCtrl);
MapWindowPoints ((HWND)0, hwnd, (LPPOINT)&rcCtrl, 2);
SubtractRect (lpRect, lpRect, &rcCtrl);
}
lpRun++;
} while (*lpRun);
@ -346,26 +346,26 @@ GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo)
*/
VOID WINAPI
DrawStatusText32A (HDC32 hdc, LPRECT32 lprc, LPCSTR text, UINT32 style)
DrawStatusTextA (HDC hdc, LPRECT lprc, LPCSTR text, UINT style)
{
RECT32 r = *lprc;
UINT32 border = BDR_SUNKENOUTER;
RECT r = *lprc;
UINT border = BDR_SUNKENOUTER;
if (style == SBT_POPOUT)
border = BDR_RAISEDOUTER;
else if (style == SBT_NOBORDERS)
border = 0;
DrawEdge32 (hdc, &r, border, BF_RECT|BF_ADJUST|BF_MIDDLE);
DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST|BF_MIDDLE);
/* now draw text */
if (text) {
int oldbkmode = SetBkMode32 (hdc, TRANSPARENT);
int oldbkmode = SetBkMode (hdc, TRANSPARENT);
r.left += 3;
DrawText32A (hdc, text, lstrlen32A(text),
DrawTextA (hdc, text, lstrlenA(text),
&r, DT_LEFT|DT_VCENTER|DT_SINGLELINE);
if (oldbkmode != TRANSPARENT)
SetBkMode32(hdc, oldbkmode);
SetBkMode(hdc, oldbkmode);
}
}
@ -386,10 +386,10 @@ DrawStatusText32A (HDC32 hdc, LPRECT32 lprc, LPCSTR text, UINT32 style)
*/
VOID WINAPI
DrawStatusText32W (HDC32 hdc, LPRECT32 lprc, LPCWSTR text, UINT32 style)
DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style)
{
LPSTR p = HEAP_strdupWtoA (GetProcessHeap (), 0, text);
DrawStatusText32A (hdc, lprc, p, style);
DrawStatusTextA (hdc, lprc, p, style);
HeapFree (GetProcessHeap (), 0, p );
}
@ -410,12 +410,12 @@ DrawStatusText32W (HDC32 hdc, LPRECT32 lprc, LPCWSTR text, UINT32 style)
* Failure: 0
*/
HWND32 WINAPI
CreateStatusWindow32A (INT32 style, LPCSTR text, HWND32 parent, UINT32 wid)
HWND WINAPI
CreateStatusWindowA (INT style, LPCSTR text, HWND parent, UINT wid)
{
return CreateWindow32A(STATUSCLASSNAME32A, text, style,
CW_USEDEFAULT32, CW_USEDEFAULT32,
CW_USEDEFAULT32, CW_USEDEFAULT32,
return CreateWindowA(STATUSCLASSNAMEA, text, style,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
parent, wid, 0, 0);
}
@ -434,12 +434,12 @@ CreateStatusWindow32A (INT32 style, LPCSTR text, HWND32 parent, UINT32 wid)
* Failure: 0
*/
HWND32 WINAPI
CreateStatusWindow32W (INT32 style, LPCWSTR text, HWND32 parent, UINT32 wid)
HWND WINAPI
CreateStatusWindowW (INT style, LPCWSTR text, HWND parent, UINT wid)
{
return CreateWindow32W(STATUSCLASSNAME32W, text, style,
CW_USEDEFAULT32, CW_USEDEFAULT32,
CW_USEDEFAULT32, CW_USEDEFAULT32,
return CreateWindowW(STATUSCLASSNAMEW, text, style,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
parent, wid, 0, 0);
}
@ -466,18 +466,18 @@ CreateStatusWindow32W (INT32 style, LPCWSTR text, HWND32 parent, UINT32 wid)
* Failure: 0
*/
HWND32 WINAPI
CreateUpDownControl (DWORD style, INT32 x, INT32 y, INT32 cx, INT32 cy,
HWND32 parent, INT32 id, HINSTANCE32 inst,
HWND32 buddy, INT32 maxVal, INT32 minVal, INT32 curVal)
HWND WINAPI
CreateUpDownControl (DWORD style, INT x, INT y, INT cx, INT cy,
HWND parent, INT id, HINSTANCE inst,
HWND buddy, INT maxVal, INT minVal, INT curVal)
{
HWND32 hUD =
CreateWindow32A (UPDOWN_CLASS32A, 0, style, x, y, cx, cy,
HWND hUD =
CreateWindowA (UPDOWN_CLASSA, 0, style, x, y, cx, cy,
parent, id, inst, 0);
if (hUD) {
SendMessage32A (hUD, UDM_SETBUDDY, buddy, 0);
SendMessage32A (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
SendMessage32A (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
SendMessageA (hUD, UDM_SETBUDDY, buddy, 0);
SendMessageA (hUD, UDM_SETRANGE16, 0, MAKELONG(maxVal, minVal));
SendMessageA (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
}
return hUD;
@ -524,10 +524,10 @@ InitCommonControls (VOID)
* The Win95 controls are registered at the DLL's initialization.
*/
BOOL32 WINAPI
BOOL WINAPI
InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
{
INT32 cCount;
INT cCount;
DWORD dwMask;
if (!lpInitCtrls)
@ -613,52 +613,52 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
* Failure: 0
*/
HWND32 WINAPI
CreateToolbarEx (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
HINSTANCE32 hBMInst, UINT32 wBMID, LPCTBBUTTON lpButtons,
INT32 iNumButtons, INT32 dxButton, INT32 dyButton,
INT32 dxBitmap, INT32 dyBitmap, UINT32 uStructSize)
HWND WINAPI
CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
HINSTANCE hBMInst, UINT wBMID, LPCTBBUTTON lpButtons,
INT iNumButtons, INT dxButton, INT dyButton,
INT dxBitmap, INT dyBitmap, UINT uStructSize)
{
HWND32 hwndTB =
CreateWindowEx32A (0, TOOLBARCLASSNAME32A, "", style, 0, 0, 0, 0,
hwnd, (HMENU32)wID, 0, NULL);
HWND hwndTB =
CreateWindowExA (0, TOOLBARCLASSNAMEA, "", style, 0, 0, 0, 0,
hwnd, (HMENU)wID, 0, NULL);
if(hwndTB) {
TBADDBITMAP tbab;
SendMessage32A (hwndTB, TB_BUTTONSTRUCTSIZE,
(WPARAM32)uStructSize, 0);
SendMessageA (hwndTB, TB_BUTTONSTRUCTSIZE,
(WPARAM)uStructSize, 0);
/* set bitmap and button size */
if (hBMInst == HINST_COMMCTRL) {
if (wBMID & 1) {
SendMessage32A (hwndTB, TB_SETBITMAPSIZE, 0,
SendMessageA (hwndTB, TB_SETBITMAPSIZE, 0,
MAKELPARAM(26, 25));
SendMessage32A (hwndTB, TB_SETBUTTONSIZE, 0,
SendMessageA (hwndTB, TB_SETBUTTONSIZE, 0,
MAKELPARAM(33, 32));
}
else {
SendMessage32A (hwndTB, TB_SETBITMAPSIZE, 0,
SendMessageA (hwndTB, TB_SETBITMAPSIZE, 0,
MAKELPARAM(16, 15));
SendMessage32A (hwndTB, TB_SETBUTTONSIZE, 0,
SendMessageA (hwndTB, TB_SETBUTTONSIZE, 0,
MAKELPARAM(23, 22));
}
}
else {
SendMessage32A (hwndTB, TB_SETBITMAPSIZE, 0,
SendMessageA (hwndTB, TB_SETBITMAPSIZE, 0,
MAKELPARAM((WORD)dyBitmap, (WORD)dxBitmap));
SendMessage32A (hwndTB, TB_SETBUTTONSIZE, 0,
SendMessageA (hwndTB, TB_SETBUTTONSIZE, 0,
MAKELPARAM((WORD)dyButton, (WORD)dxButton));
}
/* add bitmaps */
tbab.hInst = hBMInst;
tbab.nID = wBMID;
SendMessage32A (hwndTB, TB_ADDBITMAP,
(WPARAM32)nBitmaps, (LPARAM)&tbab);
SendMessageA (hwndTB, TB_ADDBITMAP,
(WPARAM)nBitmaps, (LPARAM)&tbab);
/* add buttons */
SendMessage32A (hwndTB, TB_ADDBUTTONS32A,
(WPARAM32)iNumButtons, (LPARAM)lpButtons);
SendMessageA (hwndTB, TB_ADDBUTTONSA,
(WPARAM)iNumButtons, (LPARAM)lpButtons);
}
return hwndTB;
@ -680,18 +680,18 @@ CreateToolbarEx (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
* Failure: 0
*/
HBITMAP32 WINAPI
CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags,
LPCOLORMAP lpColorMap, INT32 iNumMaps)
HBITMAP WINAPI
CreateMappedBitmap (HINSTANCE hInstance, INT idBitmap, UINT wFlags,
LPCOLORMAP lpColorMap, INT iNumMaps)
{
HGLOBAL32 hglb;
HRSRC32 hRsrc;
HGLOBAL hglb;
HRSRC hRsrc;
LPBITMAPINFOHEADER lpBitmap, lpBitmapInfo;
UINT32 nSize, nColorTableSize;
UINT nSize, nColorTableSize;
DWORD *pColorTable;
INT32 iColor, i, iMaps, nWidth, nHeight;
HDC32 hdcScreen;
HBITMAP32 hbm;
INT iColor, i, iMaps, nWidth, nHeight;
HDC hdcScreen;
HBITMAP hbm;
LPCOLORMAP sysColorMap;
COLORMAP internalColorMap[4] =
{{0x000000, 0}, {0x808080, 0}, {0xC0C0C0, 0}, {0xFFFFFF, 0}};
@ -702,32 +702,32 @@ CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags,
sysColorMap = lpColorMap;
}
else {
internalColorMap[0].to = GetSysColor32 (COLOR_BTNTEXT);
internalColorMap[1].to = GetSysColor32 (COLOR_BTNSHADOW);
internalColorMap[2].to = GetSysColor32 (COLOR_BTNFACE);
internalColorMap[3].to = GetSysColor32 (COLOR_BTNHIGHLIGHT);
internalColorMap[0].to = GetSysColor (COLOR_BTNTEXT);
internalColorMap[1].to = GetSysColor (COLOR_BTNSHADOW);
internalColorMap[2].to = GetSysColor (COLOR_BTNFACE);
internalColorMap[3].to = GetSysColor (COLOR_BTNHIGHLIGHT);
iMaps = 4;
sysColorMap = (LPCOLORMAP)internalColorMap;
}
hRsrc = FindResource32A (hInstance, (LPSTR)idBitmap, RT_BITMAP32A);
hRsrc = FindResourceA (hInstance, (LPSTR)idBitmap, RT_BITMAPA);
if (hRsrc == 0)
return 0;
hglb = LoadResource32 (hInstance, hRsrc);
hglb = LoadResource (hInstance, hRsrc);
if (hglb == 0)
return 0;
lpBitmap = (LPBITMAPINFOHEADER)LockResource32 (hglb);
lpBitmap = (LPBITMAPINFOHEADER)LockResource (hglb);
if (lpBitmap == NULL)
return 0;
nColorTableSize = (1 << lpBitmap->biBitCount);
nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD);
lpBitmapInfo = (LPBITMAPINFOHEADER)GlobalAlloc32 (GMEM_FIXED, nSize);
lpBitmapInfo = (LPBITMAPINFOHEADER)GlobalAlloc (GMEM_FIXED, nSize);
if (lpBitmapInfo == NULL)
return 0;
RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
pColorTable = (DWORD*)(((LPBYTE)lpBitmapInfo)+(UINT32)lpBitmapInfo->biSize);
pColorTable = (DWORD*)(((LPBYTE)lpBitmapInfo)+(UINT)lpBitmapInfo->biSize);
for (iColor = 0; iColor < nColorTableSize; iColor++) {
for (i = 0; i < iMaps; i++) {
@ -745,24 +745,24 @@ CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags,
}
}
nWidth = (INT32)lpBitmapInfo->biWidth;
nHeight = (INT32)lpBitmapInfo->biHeight;
hdcScreen = GetDC32 ((HWND32)0);
hbm = CreateCompatibleBitmap32 (hdcScreen, nWidth, nHeight);
nWidth = (INT)lpBitmapInfo->biWidth;
nHeight = (INT)lpBitmapInfo->biHeight;
hdcScreen = GetDC ((HWND)0);
hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight);
if (hbm) {
HDC32 hdcDst = CreateCompatibleDC32 (hdcScreen);
HBITMAP32 hbmOld = SelectObject32 (hdcDst, hbm);
HDC hdcDst = CreateCompatibleDC (hdcScreen);
HBITMAP hbmOld = SelectObject (hdcDst, hbm);
LPBYTE lpBits = (LPBYTE)(lpBitmap + 1);
lpBits += (1 << (lpBitmapInfo->biBitCount)) * sizeof(RGBQUAD);
StretchDIBits32 (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
SRCCOPY);
SelectObject32 (hdcDst, hbmOld);
DeleteDC32 (hdcDst);
SelectObject (hdcDst, hbmOld);
DeleteDC (hdcDst);
}
ReleaseDC32 ((HWND32)0, hdcScreen);
GlobalFree32 ((HGLOBAL32)lpBitmapInfo);
FreeResource32 (hglb);
ReleaseDC ((HWND)0, hdcScreen);
GlobalFree ((HGLOBAL)lpBitmapInfo);
FreeResource (hglb);
return hbm;
}
@ -789,10 +789,10 @@ CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags,
* Do not use this functions anymore. Use CreateToolbarEx instead.
*/
HWND32 WINAPI
CreateToolbar (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
HINSTANCE32 hBMInst, UINT32 wBMID,
LPCOLDTBBUTTON lpButtons,INT32 iNumButtons)
HWND WINAPI
CreateToolbar (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
HINSTANCE hBMInst, UINT wBMID,
LPCOLDTBBUTTON lpButtons,INT iNumButtons)
{
return CreateToolbarEx (hwnd, style | CCS_NODIVIDER, wID, nBitmaps,
hBMInst, wBMID, (LPCTBBUTTON)lpButtons,

View File

@ -28,7 +28,7 @@
static LRESULT
DATETIME_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
DATETIME_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
DATETIME_INFO *infoPtr;
@ -55,7 +55,7 @@ DATETIME_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
DATETIME_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
DATETIME_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr(wndPtr);
@ -69,7 +69,7 @@ DATETIME_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI
DATETIME_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -92,11 +92,11 @@ DATETIME_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
FIXME (datetime, "Unimplemented msg DTM_SETRANGE\n");
return 1;
case DTM_SETFORMAT32A:
case DTM_SETFORMATA:
FIXME (datetime, "Unimplemented msg DTM_SETFORMAT32A\n");
return 1;
case DTM_SETFORMAT32W:
case DTM_SETFORMATW:
FIXME (datetime, "Unimplemented msg DTM_SETFORMAT32W\n");
return 1;
@ -130,7 +130,7 @@ DATETIME_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (datetime, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -139,27 +139,27 @@ DATETIME_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
DATETIME_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (DATETIMEPICK_CLASS32A)) return;
if (GlobalFindAtomA (DATETIMEPICK_CLASSA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS;
wndClass.lpfnWndProc = (WNDPROC32)DATETIME_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)DATETIME_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(DATETIME_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hbrBackground = (HBRUSH32)(COLOR_WINDOW + 1);
wndClass.lpszClassName = DATETIMEPICK_CLASS32A;
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wndClass.lpszClassName = DATETIMEPICK_CLASSA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
DATETIME_Unregister (VOID)
{
if (GlobalFindAtom32A (DATETIMEPICK_CLASS32A))
UnregisterClass32A (DATETIMEPICK_CLASS32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (DATETIMEPICK_CLASSA))
UnregisterClassA (DATETIMEPICK_CLASSA, (HINSTANCE)NULL);
}

View File

@ -16,7 +16,7 @@
#include "debug.h"
BOOL32 WINAPI MakeDragList (HWND32 hwndLB)
BOOL WINAPI MakeDragList (HWND hwndLB)
{
FIXME (commctrl, "(0x%x)\n", hwndLB);
@ -25,7 +25,7 @@ BOOL32 WINAPI MakeDragList (HWND32 hwndLB)
}
VOID WINAPI DrawInsert (HWND32 hwndParent, HWND32 hwndLB, INT32 nItem)
VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
{
FIXME (commctrl, "(0x%x 0x%x %d)\n", hwndParent, hwndLB, nItem);
@ -33,7 +33,7 @@ VOID WINAPI DrawInsert (HWND32 hwndParent, HWND32 hwndLB, INT32 nItem)
}
INT32 WINAPI LBItemFromPt (HWND32 hwndLB, POINT32 pt, BOOL32 bAutoScroll)
INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
{
FIXME (commctrl, "(0x%x %ld x %ld %s)\n",
hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE");

View File

@ -24,85 +24,85 @@
#define FlatSB_GetInfoPtr(wndPtr) ((FLATSB_INFO*)wndPtr->wExtra[0])
BOOL32 WINAPI
FlatSB_EnableScrollBar(HWND32 hwnd, INT32 dummy, UINT32 dummy2)
BOOL WINAPI
FlatSB_EnableScrollBar(HWND hwnd, INT dummy, UINT dummy2)
{
FIXME(commctrl,"stub\n");
return 0;
}
BOOL32 WINAPI
FlatSB_ShowScrollBar(HWND32 hwnd, INT32 code, BOOL32 flag)
BOOL WINAPI
FlatSB_ShowScrollBar(HWND hwnd, INT code, BOOL flag)
{
FIXME(commctrl,"stub\n");
return 0;
}
BOOL32 WINAPI
FlatSB_GetScrollRange(HWND32 hwnd, INT32 code, LPINT32 min, LPINT32 max)
BOOL WINAPI
FlatSB_GetScrollRange(HWND hwnd, INT code, LPINT min, LPINT max)
{
FIXME(commctrl,"stub\n");
return 0;
}
BOOL32 WINAPI
FlatSB_GetScrollInfo(HWND32 hwnd, INT32 code, LPSCROLLINFO info)
BOOL WINAPI
FlatSB_GetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info)
{
FIXME(commctrl,"stub\n");
return 0;
}
INT32 WINAPI
FlatSB_GetScrollPos(HWND32 hwnd, INT32 code)
INT WINAPI
FlatSB_GetScrollPos(HWND hwnd, INT code)
{
FIXME(commctrl,"stub\n");
return 0;
}
BOOL32 WINAPI
FlatSB_GetScrollProp(HWND32 hwnd, INT32 propIndex, LPINT32 prop)
BOOL WINAPI
FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
{
FIXME(commctrl,"stub\n");
return 0;
}
INT32 WINAPI
FlatSB_SetScrollPos(HWND32 hwnd, INT32 code, INT32 pos, BOOL32 fRedraw)
INT WINAPI
FlatSB_SetScrollPos(HWND hwnd, INT code, INT pos, BOOL fRedraw)
{
FIXME(commctrl,"stub\n");
return 0;
}
INT32 WINAPI
FlatSB_SetScrollInfo(HWND32 hwnd, INT32 code, LPSCROLLINFO info, BOOL32 fRedraw)
INT WINAPI
FlatSB_SetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info, BOOL fRedraw)
{
FIXME(commctrl,"stub\n");
return 0;
}
INT32 WINAPI
FlatSB_SetScrollRange(HWND32 hwnd, INT32 code, INT32 min, INT32 max, BOOL32 fRedraw)
INT WINAPI
FlatSB_SetScrollRange(HWND hwnd, INT code, INT min, INT max, BOOL fRedraw)
{
FIXME(commctrl,"stub\n");
return 0;
}
BOOL32 WINAPI
FlatSB_SetScrollProp(HWND32 hwnd, UINT32 index, INT32 newValue, BOOL32 flag)
BOOL WINAPI
FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag)
{
FIXME(commctrl,"stub\n");
return 0;
}
BOOL32 WINAPI InitializeFlatSB(HWND32 hwnd)
BOOL WINAPI InitializeFlatSB(HWND hwnd)
{
FIXME(commctrl,"stub\n");
return 0;
}
HRESULT WINAPI UninitializeFlatSB(HWND32 hwnd)
HRESULT WINAPI UninitializeFlatSB(HWND hwnd)
{
FIXME(commctrl,"stub\n");
return 0;
@ -111,14 +111,14 @@ HRESULT WINAPI UninitializeFlatSB(HWND32 hwnd)
static LRESULT
FlatSB_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
FlatSB_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
return 0;
}
static LRESULT
FlatSB_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
FlatSB_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
return 0;
}
@ -127,7 +127,7 @@ FlatSB_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI
FlatSB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -144,7 +144,7 @@ FlatSB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (datetime, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -153,27 +153,27 @@ FlatSB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
FLATSB_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (FLATSB_CLASS32A)) return;
if (GlobalFindAtomA (FLATSB_CLASSA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS;
wndClass.lpfnWndProc = (WNDPROC32)FlatSB_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)FlatSB_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(FLATSB_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hbrBackground = (HBRUSH32)(COLOR_WINDOW + 1);
wndClass.lpszClassName = FLATSB_CLASS32A;
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wndClass.lpszClassName = FLATSB_CLASSA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
FLATSB_Unregister (VOID)
{
if (GlobalFindAtom32A (FLATSB_CLASS32A))
UnregisterClass32A (FLATSB_CLASS32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (FLATSB_CLASSA))
UnregisterClassA (FLATSB_CLASSA, (HINSTANCE)NULL);
}

File diff suppressed because it is too large Load Diff

View File

@ -32,11 +32,11 @@
static LRESULT
HOTKEY_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
HOTKEY_INFO *infoPtr;
TEXTMETRIC32A tm;
HDC32 hdc;
TEXTMETRICA tm;
HDC hdc;
/* allocate memory for info structure */
infoPtr = (HOTKEY_INFO *)COMCTL32_Alloc (sizeof(HOTKEY_INFO));
@ -56,17 +56,17 @@ HOTKEY_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
/* initialize info structure */
/* get default font height */
hdc = GetDC32 (wndPtr->hwndSelf);
GetTextMetrics32A (hdc, &tm);
hdc = GetDC (wndPtr->hwndSelf);
GetTextMetricsA (hdc, &tm);
infoPtr->nHeight = tm.tmHeight;
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
return 0;
}
static LRESULT
HOTKEY_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr);
@ -80,27 +80,27 @@ HOTKEY_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
HOTKEY_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_EraseBackground (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr); */
HBRUSH32 hBrush;
RECT32 rc;
HBRUSH hBrush;
RECT rc;
hBrush =
(HBRUSH32)SendMessage32A (wndPtr->parent->hwndSelf, WM_CTLCOLOREDIT,
(HBRUSH)SendMessageA (wndPtr->parent->hwndSelf, WM_CTLCOLOREDIT,
wParam, (LPARAM)wndPtr->hwndSelf);
if (hBrush)
hBrush = (HBRUSH32)GetStockObject32 (WHITE_BRUSH);
GetClientRect32 (wndPtr->hwndSelf, &rc);
hBrush = (HBRUSH)GetStockObject (WHITE_BRUSH);
GetClientRect (wndPtr->hwndSelf, &rc);
FillRect32 ((HDC32)wParam, &rc, hBrush);
FillRect ((HDC)wParam, &rc, hBrush);
return -1;
}
__inline__ static LRESULT
HOTKEY_GetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_GetFont (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr);
@ -109,7 +109,7 @@ HOTKEY_GetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
HOTKEY_KeyDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_KeyDown (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr); */
@ -120,7 +120,7 @@ HOTKEY_KeyDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
case VK_DELETE:
case VK_ESCAPE:
case VK_BACK:
return DefWindowProc32A (wndPtr->hwndSelf, WM_KEYDOWN, wParam, lParam);
return DefWindowProcA (wndPtr->hwndSelf, WM_KEYDOWN, wParam, lParam);
case VK_SHIFT:
case VK_CONTROL:
@ -138,7 +138,7 @@ HOTKEY_KeyDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
HOTKEY_KeyUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_KeyUp (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr); */
@ -149,34 +149,34 @@ HOTKEY_KeyUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
HOTKEY_KillFocus (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_KillFocus (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr);
infoPtr->bFocus = FALSE;
DestroyCaret32 ();
DestroyCaret ();
return 0;
}
static LRESULT
HOTKEY_LButtonDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_LButtonDown (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr); */
SetFocus32 (wndPtr->hwndSelf);
SetFocus (wndPtr->hwndSelf);
return 0;
}
__inline__ static LRESULT
HOTKEY_NCCreate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_NCCreate (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
wndPtr->dwExStyle |= WS_EX_CLIENTEDGE;
return DefWindowProc32A (wndPtr->hwndSelf, WM_NCCREATE, wParam, lParam);
return DefWindowProcA (wndPtr->hwndSelf, WM_NCCREATE, wParam, lParam);
}
@ -184,18 +184,18 @@ HOTKEY_NCCreate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
HOTKEY_SetFocus (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_SetFocus (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr);
infoPtr->bFocus = TRUE;
CreateCaret32 (wndPtr->hwndSelf, (HBITMAP32)0, 1, infoPtr->nHeight);
CreateCaret (wndPtr->hwndSelf, (HBITMAP)0, 1, infoPtr->nHeight);
SetCaretPos32 (1, 1);
SetCaretPos (1, 1);
ShowCaret32 (wndPtr->hwndSelf);
ShowCaret (wndPtr->hwndSelf);
return 0;
@ -203,25 +203,25 @@ HOTKEY_SetFocus (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
__inline__ static LRESULT
HOTKEY_SetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_SetFont (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr);
TEXTMETRIC32A tm;
HDC32 hdc;
HFONT32 hOldFont = 0;
TEXTMETRICA tm;
HDC hdc;
HFONT hOldFont = 0;
infoPtr->hFont = (HFONT32)wParam;
infoPtr->hFont = (HFONT)wParam;
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
if (infoPtr->hFont)
hOldFont = SelectObject32 (hdc, infoPtr->hFont);
hOldFont = SelectObject (hdc, infoPtr->hFont);
GetTextMetrics32A (hdc, &tm);
GetTextMetricsA (hdc, &tm);
infoPtr->nHeight = tm.tmHeight;
if (infoPtr->hFont)
SelectObject32 (hdc, hOldFont);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
SelectObject (hdc, hOldFont);
ReleaseDC (wndPtr->hwndSelf, hdc);
if (LOWORD(lParam)) {
@ -234,7 +234,7 @@ HOTKEY_SetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
HOTKEY_SysKeyDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_SysKeyDown (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr); */
@ -245,7 +245,7 @@ HOTKEY_SysKeyDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
case VK_DELETE:
case VK_ESCAPE:
case VK_BACK:
return DefWindowProc32A (wndPtr->hwndSelf, WM_SYSKEYDOWN, wParam, lParam);
return DefWindowProcA (wndPtr->hwndSelf, WM_SYSKEYDOWN, wParam, lParam);
case VK_SHIFT:
case VK_CONTROL:
@ -263,7 +263,7 @@ HOTKEY_SysKeyDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
HOTKEY_SysKeyUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
HOTKEY_SysKeyUp (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr(wndPtr); */
@ -275,7 +275,7 @@ HOTKEY_SysKeyUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI
HOTKEY_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -333,7 +333,7 @@ HOTKEY_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (hotkey, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -342,27 +342,27 @@ HOTKEY_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
HOTKEY_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (HOTKEY_CLASS32A)) return;
if (GlobalFindAtomA (HOTKEY_CLASSA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS;
wndClass.lpfnWndProc = (WNDPROC32)HOTKEY_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)HOTKEY_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(HOTKEY_INFO *);
wndClass.hCursor = 0;
wndClass.hbrBackground = 0;
wndClass.lpszClassName = HOTKEY_CLASS32A;
wndClass.lpszClassName = HOTKEY_CLASSA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
HOTKEY_Unregister (VOID)
{
if (GlobalFindAtom32A (HOTKEY_CLASS32A))
UnregisterClass32A (HOTKEY_CLASS32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (HOTKEY_CLASSA))
UnregisterClassA (HOTKEY_CLASSA, (HINSTANCE)NULL);
}

File diff suppressed because it is too large Load Diff

View File

@ -32,10 +32,10 @@
#define IPADDRESS_GetInfoPtr(wndPtr) ((IPADDRESS_INFO *)wndPtr->wExtra[0])
static BOOL32
IPADDRESS_SendNotify (WND *wndPtr, UINT32 command);
static BOOL32
IPADDRESS_SendIPAddressNotify (WND *wndPtr, UINT32 field, BYTE newValue);
static BOOL
IPADDRESS_SendNotify (WND *wndPtr, UINT command);
static BOOL
IPADDRESS_SendIPAddressNotify (WND *wndPtr, UINT field, BYTE newValue);
/* property name of tooltip window handle */
@ -43,34 +43,34 @@ IPADDRESS_SendIPAddressNotify (WND *wndPtr, UINT32 field, BYTE newValue);
static LRESULT CALLBACK
IPADDRESS_SubclassProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam);
IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
static VOID
IPADDRESS_Refresh (WND *wndPtr, HDC32 hdc)
IPADDRESS_Refresh (WND *wndPtr, HDC hdc)
{
RECT32 rcClient;
HBRUSH32 hbr;
COLORREF clr=GetSysColor32 (COLOR_3DDKSHADOW);
RECT rcClient;
HBRUSH hbr;
COLORREF clr=GetSysColor (COLOR_3DDKSHADOW);
int i,x,fieldsize;
GetClientRect32 (wndPtr->hwndSelf, &rcClient);
hbr = CreateSolidBrush32 (RGB(255,255,255));
DrawEdge32 (hdc, &rcClient, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
FillRect32 (hdc, &rcClient, hbr);
DeleteObject32 (hbr);
GetClientRect (wndPtr->hwndSelf, &rcClient);
hbr = CreateSolidBrush (RGB(255,255,255));
DrawEdge (hdc, &rcClient, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
FillRect (hdc, &rcClient, hbr);
DeleteObject (hbr);
x=rcClient.left;
fieldsize=(rcClient.right-rcClient.left) /4;
for (i=0; i<3; i++) { /* Should draw text "." here */
x+=fieldsize;
SetPixel32 (hdc, x, 13, clr);
SetPixel32 (hdc, x, 14, clr);
SetPixel32 (hdc, x+1, 13, clr);
SetPixel32 (hdc, x+1, 14, clr);
SetPixel (hdc, x, 13, clr);
SetPixel (hdc, x, 14, clr);
SetPixel (hdc, x+1, 13, clr);
SetPixel (hdc, x+1, 14, clr);
}
@ -81,10 +81,10 @@ IPADDRESS_Refresh (WND *wndPtr, HDC32 hdc)
static LRESULT
IPADDRESS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
IPADDRESS_INFO *infoPtr;
RECT32 rcClient, edit;
RECT rcClient, edit;
int i,fieldsize;
LPIP_SUBCLASS_INFO lpipsi;
@ -97,7 +97,7 @@ IPADDRESS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
return 0;
}
GetClientRect32 (wndPtr->hwndSelf, &rcClient);
GetClientRect (wndPtr->hwndSelf, &rcClient);
fieldsize=(rcClient.right-rcClient.left) /4;
@ -105,13 +105,13 @@ IPADDRESS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
edit.bottom=rcClient.bottom-2;
lpipsi=(LPIP_SUBCLASS_INFO)
GetProp32A ((HWND32)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
GetPropA ((HWND)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
if (lpipsi == NULL) {
lpipsi= (LPIP_SUBCLASS_INFO) COMCTL32_Alloc (sizeof(IP_SUBCLASS_INFO));
lpipsi->wndPtr=wndPtr;
lpipsi->uRefCount++;
SetProp32A ((HWND32)wndPtr->hwndSelf, IP_SUBCLASS_PROP,
(HANDLE32)lpipsi);
SetPropA ((HWND)wndPtr->hwndSelf, IP_SUBCLASS_PROP,
(HANDLE)lpipsi);
/* infoPtr->lpipsi= lpipsi; */
} else
WARN (ipaddress,"IP-create called twice\n");
@ -121,15 +121,15 @@ IPADDRESS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
infoPtr->UpperLimit[i]=255;
edit.left=rcClient.left+i*fieldsize+3;
edit.right=rcClient.left+(i+1)*fieldsize-2;
lpipsi->hwndIP[i]= CreateWindow32A ("edit", NULL,
lpipsi->hwndIP[i]= CreateWindowA ("edit", NULL,
WS_CHILD | WS_VISIBLE | ES_LEFT,
edit.left, edit.top, edit.right-edit.left, edit.bottom-edit.top,
wndPtr->hwndSelf, (HMENU32) 1, wndPtr->hInstance, NULL);
lpipsi->wpOrigProc[i]= (WNDPROC32)
SetWindowLong32A (lpipsi->hwndIP[i],GWL_WNDPROC, (LONG)
wndPtr->hwndSelf, (HMENU) 1, wndPtr->hInstance, NULL);
lpipsi->wpOrigProc[i]= (WNDPROC)
SetWindowLongA (lpipsi->hwndIP[i],GWL_WNDPROC, (LONG)
IPADDRESS_SubclassProc);
SetProp32A ((HWND32)lpipsi->hwndIP[i], IP_SUBCLASS_PROP,
(HANDLE32)lpipsi);
SetPropA ((HWND)lpipsi->hwndIP[i], IP_SUBCLASS_PROP,
(HANDLE)lpipsi);
}
lpipsi->infoPtr= infoPtr;
@ -139,15 +139,15 @@ IPADDRESS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
IPADDRESS_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
int i;
IPADDRESS_INFO *infoPtr = IPADDRESS_GetInfoPtr(wndPtr);
LPIP_SUBCLASS_INFO lpipsi=(LPIP_SUBCLASS_INFO)
GetProp32A ((HWND32)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
GetPropA ((HWND)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
for (i=0; i<=3; i++) {
SetWindowLong32A ((HWND32)lpipsi->hwndIP[i], GWL_WNDPROC,
SetWindowLongA ((HWND)lpipsi->hwndIP[i], GWL_WNDPROC,
(LONG)lpipsi->wpOrigProc[i]);
}
@ -157,54 +157,54 @@ IPADDRESS_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
IPADDRESS_KillFocus (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_KillFocus (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
HDC32 hdc;
HDC hdc;
TRACE (ipaddress,"\n");
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
IPADDRESS_Refresh (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
IPADDRESS_SendIPAddressNotify (wndPtr, 0, 0); /* FIXME: should use -1 */
IPADDRESS_SendNotify (wndPtr, EN_KILLFOCUS);
InvalidateRect32 (wndPtr->hwndSelf, NULL, TRUE);
InvalidateRect (wndPtr->hwndSelf, NULL, TRUE);
return 0;
}
static LRESULT
IPADDRESS_Paint (WND *wndPtr, WPARAM32 wParam)
IPADDRESS_Paint (WND *wndPtr, WPARAM wParam)
{
HDC32 hdc;
PAINTSTRUCT32 ps;
HDC hdc;
PAINTSTRUCT ps;
hdc = wParam==0 ? BeginPaint32 (wndPtr->hwndSelf, &ps) : (HDC32)wParam;
hdc = wParam==0 ? BeginPaint (wndPtr->hwndSelf, &ps) : (HDC)wParam;
IPADDRESS_Refresh (wndPtr, hdc);
if(!wParam)
EndPaint32 (wndPtr->hwndSelf, &ps);
EndPaint (wndPtr->hwndSelf, &ps);
return 0;
}
static LRESULT
IPADDRESS_SetFocus (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_SetFocus (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
HDC32 hdc;
HDC hdc;
TRACE (ipaddress,"\n");
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
IPADDRESS_Refresh (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
return 0;
}
static LRESULT
IPADDRESS_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_Size (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* IPADDRESS_INFO *infoPtr = IPADDRESS_GetInfoPtr(wndPtr); */
TRACE (ipaddress,"\n");
@ -212,18 +212,18 @@ IPADDRESS_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static BOOL32
IPADDRESS_SendNotify (WND *wndPtr, UINT32 command)
static BOOL
IPADDRESS_SendNotify (WND *wndPtr, UINT command)
{
TRACE (ipaddress, "%x\n",command);
return (BOOL32)SendMessage32A (GetParent32 (wndPtr->hwndSelf), WM_COMMAND,
return (BOOL)SendMessageA (GetParent (wndPtr->hwndSelf), WM_COMMAND,
MAKEWPARAM (wndPtr->wIDmenu,command), (LPARAM) wndPtr->hwndSelf);
}
static BOOL32
IPADDRESS_SendIPAddressNotify (WND *wndPtr, UINT32 field, BYTE newValue)
static BOOL
IPADDRESS_SendIPAddressNotify (WND *wndPtr, UINT field, BYTE newValue)
{
NMIPADDRESS nmip;
@ -236,46 +236,46 @@ IPADDRESS_SendIPAddressNotify (WND *wndPtr, UINT32 field, BYTE newValue)
nmip.iField=field;
nmip.iValue=newValue;
return (BOOL32)SendMessage32A (GetParent32 (wndPtr->hwndSelf), WM_NOTIFY,
(WPARAM32)wndPtr->wIDmenu, (LPARAM)&nmip);
return (BOOL)SendMessageA (GetParent (wndPtr->hwndSelf), WM_NOTIFY,
(WPARAM)wndPtr->wIDmenu, (LPARAM)&nmip);
}
static LRESULT
IPADDRESS_ClearAddress (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_ClearAddress (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
int i;
HDC32 hdc;
HDC hdc;
char buf[1];
LPIP_SUBCLASS_INFO lpipsi=(LPIP_SUBCLASS_INFO)
GetProp32A ((HWND32)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
GetPropA ((HWND)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
TRACE (ipaddress,"\n");
buf[0]=0;
for (i=0; i<=3; i++)
SetWindowText32A (lpipsi->hwndIP[i],buf);
SetWindowTextA (lpipsi->hwndIP[i],buf);
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
IPADDRESS_Refresh (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
return 0;
}
static LRESULT
IPADDRESS_IsBlank (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_IsBlank (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
int i;
char buf[20];
LPIP_SUBCLASS_INFO lpipsi=(LPIP_SUBCLASS_INFO)
GetProp32A ((HWND32)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
GetPropA ((HWND)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
TRACE (ipaddress,"\n");
for (i=0; i<=3; i++) {
GetWindowText32A (lpipsi->hwndIP[i],buf,5);
GetWindowTextA (lpipsi->hwndIP[i],buf,5);
if (buf[0]) return 0;
}
@ -283,21 +283,21 @@ IPADDRESS_IsBlank (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
IPADDRESS_GetAddress (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_GetAddress (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
char field[20];
int i,valid,fieldvalue;
DWORD ip_addr;
IPADDRESS_INFO *infoPtr = IPADDRESS_GetInfoPtr(wndPtr);
LPIP_SUBCLASS_INFO lpipsi=(LPIP_SUBCLASS_INFO)
GetProp32A ((HWND32)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
GetPropA ((HWND)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
TRACE (ipaddress,"\n");
valid=0;
ip_addr=0;
for (i=0; i<=3; i++) {
GetWindowText32A (lpipsi->hwndIP[i],field,4);
GetWindowTextA (lpipsi->hwndIP[i],field,4);
ip_addr*=256;
if (field[0]) {
field[3]=0;
@ -317,15 +317,15 @@ IPADDRESS_GetAddress (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
IPADDRESS_SetRange (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_SetRange (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
IPADDRESS_INFO *infoPtr = IPADDRESS_GetInfoPtr(wndPtr);
INT32 index;
INT index;
TRACE (ipaddress,"\n");
index=(INT32) wParam;
index=(INT) wParam;
if ((index<0) || (index>3)) return 0;
infoPtr->LowerLimit[index]=lParam & 0xff;
@ -334,12 +334,12 @@ IPADDRESS_SetRange (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
IPADDRESS_SetAddress (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_SetAddress (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
HDC32 hdc;
HDC hdc;
IPADDRESS_INFO *infoPtr = IPADDRESS_GetInfoPtr(wndPtr);
LPIP_SUBCLASS_INFO lpipsi=(LPIP_SUBCLASS_INFO)
GetProp32A ((HWND32)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
GetPropA ((HWND)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
int i,ip_address,value;
char buf[20];
@ -351,15 +351,15 @@ IPADDRESS_SetAddress (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
if ((value>=infoPtr->LowerLimit[i]) && (value<=infoPtr->UpperLimit[i]))
{
sprintf (buf,"%d",value);
SetWindowText32A (lpipsi->hwndIP[i],buf);
SetWindowTextA (lpipsi->hwndIP[i],buf);
IPADDRESS_SendNotify (wndPtr, EN_CHANGE);
}
ip_address/=256;
}
hdc = GetDC32 (wndPtr->hwndSelf); /* & send notifications */
hdc = GetDC (wndPtr->hwndSelf); /* & send notifications */
IPADDRESS_Refresh (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
return TRUE;
}
@ -368,29 +368,29 @@ IPADDRESS_SetAddress (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
IPADDRESS_SetFocusToField (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_SetFocusToField (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* IPADDRESS_INFO *infoPtr = IPADDRESS_GetInfoPtr(wndPtr); */
LPIP_SUBCLASS_INFO lpipsi=(LPIP_SUBCLASS_INFO)
GetProp32A ((HWND32)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
INT32 index;
GetPropA ((HWND)wndPtr->hwndSelf,IP_SUBCLASS_PROP);
INT index;
index=(INT32) wParam;
index=(INT) wParam;
TRACE (ipaddress," %d\n", index);
if ((index<0) || (index>3)) return 0;
SetFocus32 (lpipsi->hwndIP[index]);
SetFocus (lpipsi->hwndIP[index]);
return 1;
}
static LRESULT
IPADDRESS_LButtonDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_LButtonDown (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TRACE (ipaddress, "\n");
SetFocus32 (wndPtr->hwndSelf);
SetFocus (wndPtr->hwndSelf);
IPADDRESS_SendNotify (wndPtr, EN_SETFOCUS);
IPADDRESS_SetFocusToField (wndPtr, 0, 0);
@ -416,7 +416,7 @@ IPADDRESS_GotoNextField (LPIP_SUBCLASS_INFO lpipsi, int currentfield)
IPADDRESS_INFO *infoPtr=lpipsi->infoPtr;
TRACE (ipaddress,"\n");
GetWindowText32A (lpipsi->hwndIP[currentfield],field,4);
GetWindowTextA (lpipsi->hwndIP[currentfield],field,4);
if (field[0]) {
field[3]=0;
newField=-1;
@ -427,24 +427,24 @@ IPADDRESS_GotoNextField (LPIP_SUBCLASS_INFO lpipsi, int currentfield)
newField=infoPtr->UpperLimit[currentfield];
if (newField>=0) {
sprintf (field,"%d",newField);
SetWindowText32A (lpipsi->hwndIP[currentfield], field);
SetWindowTextA (lpipsi->hwndIP[currentfield], field);
return 1;
}
}
if (currentfield<3)
SetFocus32 (lpipsi->hwndIP[currentfield+1]);
SetFocus (lpipsi->hwndIP[currentfield+1]);
return 0;
}
LRESULT CALLBACK
IPADDRESS_SubclassProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
int i,l,index;
IPADDRESS_INFO *infoPtr;
LPIP_SUBCLASS_INFO lpipsi=(LPIP_SUBCLASS_INFO)
GetProp32A ((HWND32)hwnd,IP_SUBCLASS_PROP);
GetPropA ((HWND)hwnd,IP_SUBCLASS_PROP);
infoPtr = lpipsi->infoPtr;
index=0; /* FIXME */
@ -456,14 +456,14 @@ IPADDRESS_SubclassProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam
case WM_KEYDOWN: {
char c=(char) wParam;
if (c==VK_TAB) {
HWND32 pwnd;
HWND pwnd;
int shift;
shift = GetKeyState32(VK_SHIFT) & 0x8000;
shift = GetKeyState(VK_SHIFT) & 0x8000;
if (shift)
pwnd=GetNextDlgTabItem32 (GetParent32 (hwnd), 0, TRUE);
pwnd=GetNextDlgTabItem (GetParent (hwnd), 0, TRUE);
else
pwnd=GetNextDlgTabItem32 (GetParent32 (hwnd), 0, FALSE);
if (pwnd) SetFocus32 (pwnd);
pwnd=GetNextDlgTabItem (GetParent (hwnd), 0, FALSE);
if (pwnd) SetFocus (pwnd);
break;
}
@ -479,7 +479,7 @@ IPADDRESS_SubclassProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam
if (c==VK_RETURN) {
}
if (((c>='0') && (c<='9')) || (iscntrl(c))) {
l=GetWindowTextLength32A (lpipsi->hwndIP[index]);
l=GetWindowTextLengthA (lpipsi->hwndIP[index]);
if (l==3)
if (IPADDRESS_GotoNextField (lpipsi,index)) {
wParam=0;
@ -494,11 +494,11 @@ IPADDRESS_SubclassProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam
}
}
return CallWindowProc32A (lpipsi->wpOrigProc[index], hwnd, uMsg, wParam, lParam);
return CallWindowProcA (lpipsi->wpOrigProc[index], hwnd, uMsg, wParam, lParam);
}
LRESULT WINAPI
IPADDRESS_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -550,7 +550,7 @@ IPADDRESS_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (ipaddress, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -559,26 +559,26 @@ IPADDRESS_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
void
IPADDRESS_Register (void)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (WC_IPADDRESS32A)) return;
if (GlobalFindAtomA (WC_IPADDRESSA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS;
wndClass.lpfnWndProc = (WNDPROC32)IPADDRESS_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)IPADDRESS_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(IPADDRESS_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hbrBackground = (HBRUSH32)(COLOR_3DFACE + 1);
wndClass.lpszClassName = WC_IPADDRESS32A;
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
wndClass.lpszClassName = WC_IPADDRESSA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
IPADDRESS_Unregister (VOID)
{
if (GlobalFindAtom32A (WC_IPADDRESS32A))
UnregisterClass32A (WC_IPADDRESS32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (WC_IPADDRESSA))
UnregisterClassA (WC_IPADDRESSA, (HINSTANCE)NULL);
}

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@
static LRESULT
MONTHCAL_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
MONTHCAL_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
MONTHCAL_INFO *infoPtr;
@ -55,7 +55,7 @@ MONTHCAL_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
MONTHCAL_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
MONTHCAL_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(wndPtr);
@ -74,7 +74,7 @@ MONTHCAL_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI
MONTHCAL_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
MONTHCAL_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -92,7 +92,7 @@ MONTHCAL_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (monthcal, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -101,27 +101,27 @@ MONTHCAL_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
MONTHCAL_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (MONTHCAL_CLASS32A)) return;
if (GlobalFindAtomA (MONTHCAL_CLASSA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS;
wndClass.lpfnWndProc = (WNDPROC32)MONTHCAL_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)MONTHCAL_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(MONTHCAL_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hbrBackground = (HBRUSH32)(COLOR_WINDOW + 1);
wndClass.lpszClassName = MONTHCAL_CLASS32A;
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wndClass.lpszClassName = MONTHCAL_CLASSA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
MONTHCAL_Unregister (VOID)
{
if (GlobalFindAtom32A (MONTHCAL_CLASS32A))
UnregisterClass32A (MONTHCAL_CLASS32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (MONTHCAL_CLASSA))
UnregisterClassA (MONTHCAL_CLASSA, (HINSTANCE)NULL);
}

View File

@ -25,7 +25,7 @@
static LRESULT
NATIVEFONT_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
NATIVEFONT_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
NATIVEFONT_INFO *infoPtr;
@ -51,7 +51,7 @@ NATIVEFONT_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
NATIVEFONT_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
NATIVEFONT_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
NATIVEFONT_INFO *infoPtr = NATIVEFONT_GetInfoPtr(wndPtr);
@ -67,7 +67,7 @@ NATIVEFONT_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI
NATIVEFONT_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
NATIVEFONT_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -83,7 +83,7 @@ NATIVEFONT_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
default:
ERR (nativefont, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -92,27 +92,27 @@ NATIVEFONT_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
NATIVEFONT_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (WC_NATIVEFONTCTL32A)) return;
if (GlobalFindAtomA (WC_NATIVEFONTCTLA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS;
wndClass.lpfnWndProc = (WNDPROC32)NATIVEFONT_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)NATIVEFONT_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(NATIVEFONT_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hbrBackground = (HBRUSH32)(COLOR_WINDOW + 1);
wndClass.lpszClassName = WC_NATIVEFONTCTL32A;
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wndClass.lpszClassName = WC_NATIVEFONTCTLA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
NATIVEFONT_Unregister (VOID)
{
if (GlobalFindAtom32A (WC_NATIVEFONTCTL32A))
UnregisterClass32A (WC_NATIVEFONTCTL32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (WC_NATIVEFONTCTLA))
UnregisterClassA (WC_NATIVEFONTCTLA, (HINSTANCE)NULL);
}

View File

@ -23,18 +23,18 @@
static __inline__ LRESULT
PAGER_ForwardMouse (WND *wndPtr, WPARAM32 wParam)
PAGER_ForwardMouse (WND *wndPtr, WPARAM wParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
infoPtr->bForward = (BOOL32)wParam;
infoPtr->bForward = (BOOL)wParam;
return 0;
}
static __inline__ LRESULT
PAGER_GetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_GetBkColor (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
@ -43,7 +43,7 @@ PAGER_GetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static __inline__ LRESULT
PAGER_GetBorder (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_GetBorder (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
@ -52,7 +52,7 @@ PAGER_GetBorder (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static __inline__ LRESULT
PAGER_GetButtonSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_GetButtonSize (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
@ -61,7 +61,7 @@ PAGER_GetButtonSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
PAGER_GetButtonState (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_GetButtonState (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); */
@ -75,7 +75,7 @@ PAGER_GetButtonState (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static __inline__ LRESULT
PAGER_GetPos (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_GetPos (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
@ -84,7 +84,7 @@ PAGER_GetPos (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
PAGER_RecalcSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_RecalcSize (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
NMPGCALCSIZE nmpgcs;
@ -96,8 +96,8 @@ PAGER_RecalcSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
nmpgcs.hdr.code = PGN_CALCSIZE;
nmpgcs.dwFlag =
(wndPtr->dwStyle & PGS_HORZ) ? PGF_CALCWIDTH : PGF_CALCHEIGHT;
SendMessage32A (GetParent32 (wndPtr->hwndSelf), WM_NOTIFY,
(WPARAM32)wndPtr->wIDmenu, (LPARAM)&nmpgcs);
SendMessageA (GetParent (wndPtr->hwndSelf), WM_NOTIFY,
(WPARAM)wndPtr->wIDmenu, (LPARAM)&nmpgcs);
infoPtr->nChildSize =
(wndPtr->dwStyle & PGS_HORZ) ? nmpgcs.iWidth : nmpgcs.iHeight;
@ -113,7 +113,7 @@ PAGER_RecalcSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static __inline__ LRESULT
PAGER_SetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_SetBkColor (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
COLORREF clrTemp = infoPtr->clrBk;
@ -127,12 +127,12 @@ PAGER_SetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static __inline__ LRESULT
PAGER_SetBorder (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_SetBorder (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
INT32 nTemp = infoPtr->nBorder;
INT nTemp = infoPtr->nBorder;
infoPtr->nBorder = (INT32)lParam;
infoPtr->nBorder = (INT)lParam;
/* FIXME: redraw */
@ -141,12 +141,12 @@ PAGER_SetBorder (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static __inline__ LRESULT
PAGER_SetButtonSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_SetButtonSize (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
INT32 nTemp = infoPtr->nButtonSize;
INT nTemp = infoPtr->nButtonSize;
infoPtr->nButtonSize = (INT32)lParam;
infoPtr->nButtonSize = (INT)lParam;
FIXME (pager, "size=%d\n", infoPtr->nButtonSize);
@ -157,18 +157,18 @@ PAGER_SetButtonSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static __inline__ LRESULT
PAGER_SetChild (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_SetChild (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
infoPtr->hwndChild = IsWindow32 ((HWND32)lParam) ? (HWND32)lParam : 0;
infoPtr->hwndChild = IsWindow ((HWND)lParam) ? (HWND)lParam : 0;
FIXME (pager, "hwnd=%x\n", infoPtr->hwndChild);
/* FIXME: redraw */
if (infoPtr->hwndChild) {
SetParent32 (infoPtr->hwndChild, wndPtr->hwndSelf);
SetWindowPos32 (infoPtr->hwndChild, HWND_TOP,
SetParent (infoPtr->hwndChild, wndPtr->hwndSelf);
SetWindowPos (infoPtr->hwndChild, HWND_TOP,
0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE);
}
@ -177,16 +177,16 @@ PAGER_SetChild (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static __inline__ LRESULT
PAGER_SetPos (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_SetPos (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
infoPtr->nPos = (INT32)lParam;
infoPtr->nPos = (INT)lParam;
FIXME (pager, "pos=%d\n", infoPtr->nPos);
/* FIXME: redraw */
SetWindowPos32 (infoPtr->hwndChild, HWND_TOP,
SetWindowPos (infoPtr->hwndChild, HWND_TOP,
0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE);
return 0;
@ -194,7 +194,7 @@ PAGER_SetPos (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
PAGER_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr;
@ -213,8 +213,8 @@ PAGER_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
/* set default settings */
infoPtr->hwndChild = (HWND32)NULL;
infoPtr->clrBk = GetSysColor32 (COLOR_BTNFACE);
infoPtr->hwndChild = (HWND)NULL;
infoPtr->clrBk = GetSysColor (COLOR_BTNFACE);
infoPtr->nBorder = 0;
infoPtr->nButtonSize = 0;
infoPtr->nPos = 0;
@ -225,7 +225,7 @@ PAGER_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
PAGER_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
@ -240,15 +240,15 @@ PAGER_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
PAGER_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_EraseBackground (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
HBRUSH32 hBrush = CreateSolidBrush32 (infoPtr->clrBk);
RECT32 rect;
HBRUSH hBrush = CreateSolidBrush (infoPtr->clrBk);
RECT rect;
GetClientRect32 (wndPtr->hwndSelf, &rect);
FillRect32 ((HDC32)wParam, &rect, hBrush);
DeleteObject32 (hBrush);
GetClientRect (wndPtr->hwndSelf, &rect);
FillRect ((HDC)wParam, &rect, hBrush);
DeleteObject (hBrush);
/* return TRUE; */
return FALSE;
@ -256,7 +256,7 @@ PAGER_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
PAGER_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_MouseMove (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
/* PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); */
@ -270,14 +270,14 @@ PAGER_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
PAGER_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
PAGER_Size (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr);
RECT32 rect;
RECT rect;
GetClientRect32 (wndPtr->hwndSelf, &rect);
GetClientRect (wndPtr->hwndSelf, &rect);
if (infoPtr->hwndChild) {
SetWindowPos32 (infoPtr->hwndChild, HWND_TOP, rect.left, rect.top,
SetWindowPos (infoPtr->hwndChild, HWND_TOP, rect.left, rect.top,
rect.right - rect.left, rect.bottom - rect.top,
SWP_SHOWWINDOW);
/* MoveWindow32 (infoPtr->hwndChild, 1, 1, rect.right - 2, rect.bottom-2, TRUE); */
@ -292,7 +292,7 @@ PAGER_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI
PAGER_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -350,7 +350,7 @@ PAGER_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case WM_NOTIFY:
case WM_COMMAND:
return SendMessage32A (wndPtr->parent->hwndSelf, uMsg, wParam, lParam);
return SendMessageA (wndPtr->parent->hwndSelf, uMsg, wParam, lParam);
/* case WM_PAINT: */
/* return PAGER_Paint (wndPtr, wParam); */
@ -362,7 +362,7 @@ PAGER_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (pager, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -371,27 +371,27 @@ PAGER_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
PAGER_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (WC_PAGESCROLLER32A)) return;
if (GlobalFindAtomA (WC_PAGESCROLLERA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS;
wndClass.lpfnWndProc = (WNDPROC32)PAGER_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)PAGER_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(PAGER_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = 0;
wndClass.lpszClassName = WC_PAGESCROLLER32A;
wndClass.lpszClassName = WC_PAGESCROLLERA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
PAGER_Unregister (VOID)
{
if (GlobalFindAtom32A (WC_PAGESCROLLER32A))
UnregisterClass32A (WC_PAGESCROLLER32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (WC_PAGESCROLLERA))
UnregisterClassA (WC_PAGESCROLLERA, (HINSTANCE)NULL);
}

View File

@ -29,33 +29,33 @@
* Draws the progress bar.
*/
static void
PROGRESS_Draw (WND *wndPtr, HDC32 hdc)
PROGRESS_Draw (WND *wndPtr, HDC hdc)
{
PROGRESS_INFO *infoPtr = PROGRESS_GetInfoPtr(wndPtr);
HBRUSH32 hbrBar, hbrBk;
HBRUSH hbrBar, hbrBk;
int rightBar, rightMost, ledWidth;
RECT32 rect;
RECT rect;
TRACE(progress, "refresh pos=%d min=%d, max=%d\n",
infoPtr->CurVal, infoPtr->MinVal, infoPtr->MaxVal);
/* get the required bar brush */
if (infoPtr->ColorBar == CLR_DEFAULT)
hbrBar = GetSysColorBrush32(COLOR_HIGHLIGHT);
hbrBar = GetSysColorBrush(COLOR_HIGHLIGHT);
else
hbrBar = CreateSolidBrush32 (infoPtr->ColorBar);
hbrBar = CreateSolidBrush (infoPtr->ColorBar);
/* get the required background brush */
if (infoPtr->ColorBk == CLR_DEFAULT)
hbrBk = GetSysColorBrush32 (COLOR_3DFACE);
hbrBk = GetSysColorBrush (COLOR_3DFACE);
else
hbrBk = CreateSolidBrush32 (infoPtr->ColorBk);
hbrBk = CreateSolidBrush (infoPtr->ColorBk);
/* get client rectangle */
GetClientRect32 (wndPtr->hwndSelf, &rect);
GetClientRect (wndPtr->hwndSelf, &rect);
/* draw the background */
FillRect32(hdc, &rect, hbrBk);
FillRect(hdc, &rect, hbrBk);
rect.left++; rect.right--; rect.top++; rect.bottom--;
@ -63,19 +63,19 @@ PROGRESS_Draw (WND *wndPtr, HDC32 hdc)
if (wndPtr->dwStyle & PBS_VERTICAL)
{
rightBar = rect.bottom -
MulDiv32(infoPtr->CurVal-infoPtr->MinVal,
MulDiv(infoPtr->CurVal-infoPtr->MinVal,
rect.bottom - rect.top,
infoPtr->MaxVal-infoPtr->MinVal);
ledWidth = MulDiv32 ((rect.right - rect.left), 2, 3);
ledWidth = MulDiv ((rect.right - rect.left), 2, 3);
rightMost = rect.top;
}
else
{
rightBar = rect.left +
MulDiv32(infoPtr->CurVal-infoPtr->MinVal,
MulDiv(infoPtr->CurVal-infoPtr->MinVal,
rect.right - rect.left,
infoPtr->MaxVal-infoPtr->MinVal);
ledWidth = MulDiv32 ((rect.bottom - rect.top), 2, 3);
ledWidth = MulDiv ((rect.bottom - rect.top), 2, 3);
rightMost = rect.right;
}
@ -86,7 +86,7 @@ PROGRESS_Draw (WND *wndPtr, HDC32 hdc)
rect.top = rightBar;
else
rect.right = rightBar;
FillRect32(hdc, &rect, hbrBar);
FillRect(hdc, &rect, hbrBar);
}
else
{
@ -95,7 +95,7 @@ PROGRESS_Draw (WND *wndPtr, HDC32 hdc)
rect.top = rect.bottom-ledWidth;
if (rect.top < rightMost)
rect.top = rightMost;
FillRect32(hdc, &rect, hbrBar);
FillRect(hdc, &rect, hbrBar);
rect.bottom = rect.top-LED_GAP;
}
else
@ -103,18 +103,18 @@ PROGRESS_Draw (WND *wndPtr, HDC32 hdc)
rect.right = rect.left+ledWidth;
if (rect.right > rightMost)
rect.right = rightMost;
FillRect32(hdc, &rect, hbrBar);
FillRect(hdc, &rect, hbrBar);
rect.left = rect.right+LED_GAP;
}
}
/* delete bar brush */
if (infoPtr->ColorBar != CLR_DEFAULT)
DeleteObject32 (hbrBar);
DeleteObject (hbrBar);
/* delete background brush */
if (infoPtr->ColorBk != CLR_DEFAULT)
DeleteObject32 (hbrBk);
DeleteObject (hbrBk);
}
/***********************************************************************
@ -124,11 +124,11 @@ PROGRESS_Draw (WND *wndPtr, HDC32 hdc)
static void
PROGRESS_Refresh (WND *wndPtr)
{
HDC32 hdc;
HDC hdc;
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
PROGRESS_Draw (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
}
/***********************************************************************
@ -139,12 +139,12 @@ PROGRESS_Refresh (WND *wndPtr)
static void
PROGRESS_Paint (WND *wndPtr)
{
PAINTSTRUCT32 ps;
HDC32 hdc;
PAINTSTRUCT ps;
HDC hdc;
hdc = BeginPaint32 (wndPtr->hwndSelf, &ps);
hdc = BeginPaint (wndPtr->hwndSelf, &ps);
PROGRESS_Draw (wndPtr, hdc);
EndPaint32 (wndPtr->hwndSelf, &ps);
EndPaint (wndPtr->hwndSelf, &ps);
}
@ -167,13 +167,13 @@ static void PROGRESS_CoercePos(WND *wndPtr)
* PROGRESS_SetFont
* Set new Font for progress bar
*/
static HFONT32
PROGRESS_SetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static HFONT
PROGRESS_SetFont (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
PROGRESS_INFO *infoPtr = PROGRESS_GetInfoPtr(wndPtr);
HFONT32 hOldFont = infoPtr->hFont;
HFONT hOldFont = infoPtr->hFont;
infoPtr->hFont = (HFONT32)wParam;
infoPtr->hFont = (HFONT)wParam;
if (LOWORD(lParam))
PROGRESS_Refresh (wndPtr);
return hOldFont;
@ -183,12 +183,12 @@ PROGRESS_SetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
/***********************************************************************
* ProgressWindowProc
*/
LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
PROGRESS_INFO *infoPtr = PROGRESS_GetInfoPtr(wndPtr);
UINT32 temp;
UINT temp;
switch(message)
{
@ -209,7 +209,7 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
infoPtr->Step=10;
infoPtr->ColorBar=CLR_DEFAULT;
infoPtr->ColorBk=CLR_DEFAULT;
infoPtr->hFont=(HANDLE32)NULL;
infoPtr->hFont=(HANDLE)NULL;
TRACE(progress, "Progress Ctrl creation, hwnd=%04x\n", hwnd);
break;
@ -256,9 +256,9 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
}
return temp;
case PBM_SETRANGE:
case PBM_SETRANGE16:
if (wParam)
UNKNOWN_PARAM(PBM_SETRANGE, wParam, lParam);
UNKNOWN_PARAM(PBM_SETRANGE16, wParam, lParam);
temp = MAKELONG(infoPtr->MinVal, infoPtr->MaxVal);
if(temp != lParam){
infoPtr->MinVal = LOWORD(lParam);
@ -288,12 +288,12 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
PROGRESS_Refresh (wndPtr);
return temp;
case PBM_SETRANGE32:
case PBM_SETRANGE:
temp = MAKELONG(infoPtr->MinVal, infoPtr->MaxVal);
if((infoPtr->MinVal != (INT32)wParam) ||
(infoPtr->MaxVal != (INT32)lParam)) {
infoPtr->MinVal = (INT32)wParam;
infoPtr->MaxVal = (INT32)lParam;
if((infoPtr->MinVal != (INT)wParam) ||
(infoPtr->MaxVal != (INT)lParam)) {
infoPtr->MinVal = (INT)wParam;
infoPtr->MaxVal = (INT)lParam;
if(infoPtr->MaxVal <= infoPtr->MinVal)
infoPtr->MaxVal = infoPtr->MinVal+1;
PROGRESS_CoercePos(wndPtr);
@ -331,7 +331,7 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
if (message >= WM_USER)
ERR(progress, "unknown msg %04x wp=%04x lp=%08lx\n",
message, wParam, lParam );
return DefWindowProc32A( hwnd, message, wParam, lParam );
return DefWindowProcA( hwnd, message, wParam, lParam );
}
return 0;
@ -347,19 +347,19 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
VOID
PROGRESS_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (PROGRESS_CLASS32A)) return;
if (GlobalFindAtomA (PROGRESS_CLASSA)) return;
ZeroMemory (&wndClass, sizeof( WNDCLASS32A));
ZeroMemory (&wndClass, sizeof( WNDCLASSA));
wndClass.style = CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW;
wndClass.lpfnWndProc = (WNDPROC32)ProgressWindowProc;
wndClass.lpfnWndProc = (WNDPROC)ProgressWindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof (PROGRESS_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.lpszClassName = PROGRESS_CLASS32A;
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.lpszClassName = PROGRESS_CLASSA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
@ -372,7 +372,7 @@ PROGRESS_Register (VOID)
VOID
PROGRESS_Unregister (VOID)
{
if (GlobalFindAtom32A (PROGRESS_CLASS32A))
UnregisterClass32A (PROGRESS_CLASS32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (PROGRESS_CLASSA))
UnregisterClassA (PROGRESS_CLASSA, (HINSTANCE)NULL);
}

View File

@ -16,7 +16,7 @@
LRESULT WINAPI
PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam);
PROPSHEET_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
@ -27,20 +27,20 @@ PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam);
/*****************************************************************
* PropertySheet32A (COMCTL32.84)(COMCTL32.83)
*/
INT32 WINAPI PropertySheet32A(LPCPROPSHEETHEADER32A lppsh)
INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
{
HWND32 hwnd;
HWND hwnd;
FIXME(propsheet, "(%p): stub\n", lppsh);
if (lppsh->dwFlags & PSH_MODELESS) {
hwnd = CreateDialogParam32A ( lppsh->hInstance, WC_PROPSHEET32A,
lppsh->hwndParent, (DLGPROC32)PROPSHEET_WindowProc,
hwnd = CreateDialogParamA ( lppsh->hInstance, WC_PROPSHEETA,
lppsh->hwndParent, (DLGPROC)PROPSHEET_WindowProc,
(LPARAM) lppsh );
ShowWindow32 (hwnd, TRUE);
ShowWindow (hwnd, TRUE);
} else {
hwnd = DialogBoxParam32A ( lppsh->hInstance, WC_PROPSHEET32A,
lppsh->hwndParent, (DLGPROC32)PROPSHEET_WindowProc,
hwnd = DialogBoxParamA ( lppsh->hInstance, WC_PROPSHEETA,
lppsh->hwndParent, (DLGPROC)PROPSHEET_WindowProc,
(LPARAM) lppsh );
}
return hwnd;
@ -49,7 +49,7 @@ INT32 WINAPI PropertySheet32A(LPCPROPSHEETHEADER32A lppsh)
/*****************************************************************
* PropertySheet32W (COMCTL32.85)
*/
INT32 WINAPI PropertySheet32W(LPCPROPSHEETHEADER32W propertySheetHeader)
INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW propertySheetHeader)
{
FIXME(propsheet, "(%p): stub\n", propertySheetHeader);
@ -63,7 +63,7 @@ INT32 WINAPI PropertySheet32W(LPCPROPSHEETHEADER32W propertySheetHeader)
/*****************************************************************
* CreatePropertySheetPage32A (COMCTL32.19)(COMCTL32.18)
*/
HPROPSHEETPAGE WINAPI CreatePropertySheetPage32A(LPCPROPSHEETPAGE32A lpPropSheetPage)
HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA lpPropSheetPage)
{
FIXME(propsheet, "(%p): stub\n", lpPropSheetPage);
@ -73,7 +73,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPage32A(LPCPROPSHEETPAGE32A lpPropSheet
/*****************************************************************
* CreatePropertySheetPage32W (COMCTL32.20)
*/
HPROPSHEETPAGE WINAPI CreatePropertySheetPage32W(LPCPROPSHEETPAGE32W lpPropSheetPage)
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
{
FIXME(propsheet, "(%p): stub\n", lpPropSheetPage);
@ -83,7 +83,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPage32W(LPCPROPSHEETPAGE32W lpPropSheet
/*****************************************************************
* DestroyPropertySheetPage32 (COMCTL32.24)
*/
BOOL32 WINAPI DestroyPropertySheetPage32(HPROPSHEETPAGE hPropPage)
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
{
FIXME(propsheet, "(0x%08lx): stub\n", (DWORD)hPropPage);
return FALSE;
@ -92,7 +92,7 @@ BOOL32 WINAPI DestroyPropertySheetPage32(HPROPSHEETPAGE hPropPage)
LRESULT WINAPI
PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
PROPSHEET_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
/* WND *wndPtr = WIN_FindWndPtr(hwnd); */
@ -127,10 +127,10 @@ PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case PSM_APPLY:
FIXME (propsheet, "Unimplemented msg PSM_APPLY\n");
return 0;
case PSM_SETTITLE32A:
case PSM_SETTITLEA:
FIXME (propsheet, "Unimplemented msg PSM_SETTITLE32A\n");
return 0;
case PSM_SETTITLE32W:
case PSM_SETTITLEW:
FIXME (propsheet, "Unimplemented msg PSM_SETTITLE32W\n");
return 0;
case PSM_SETWIZBUTTONS:
@ -142,10 +142,10 @@ PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case PSM_SETCURSELID:
FIXME (propsheet, "Unimplemented msg PSM_SETCURSELID\n");
return 0;
case PSM_SETFINISHTEXT32A:
case PSM_SETFINISHTEXTA:
FIXME (propsheet, "Unimplemented msg PSM_SETFINISHTEXT32A\n");
return 0;
case PSM_SETFINISHTEXT32W:
case PSM_SETFINISHTEXTW:
FIXME (propsheet, "Unimplemented msg PSM_SETFINISHTEXT32W\n");
return 0;
case PSM_GETTABCONTROL:
@ -162,7 +162,7 @@ PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (propsheet, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
}
@ -170,26 +170,26 @@ PROPSHEET_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
PROPSHEET_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (WC_PROPSHEET32A)) return;
if (GlobalFindAtomA (WC_PROPSHEETA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS;
wndClass.lpfnWndProc = (WNDPROC32)PROPSHEET_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)PROPSHEET_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(PROPSHEET_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = 0;
wndClass.lpszClassName = WC_PROPSHEET32A;
wndClass.lpszClassName = WC_PROPSHEETA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
PROPSHEET_UnRegister (VOID)
{
if (GlobalFindAtom32A (WC_PROPSHEET32A))
UnregisterClass32A (WC_PROPSHEET32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (WC_PROPSHEETA))
UnregisterClassA (WC_PROPSHEETA, (HINSTANCE)NULL);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -26,11 +26,11 @@
static void TAB_Refresh (WND *wndPtr, HDC32 hdc);
static void TAB_Refresh (WND *wndPtr, HDC hdc);
static BOOL32
TAB_SendSimpleNotify (WND *wndPtr, UINT32 code)
static BOOL
TAB_SendSimpleNotify (WND *wndPtr, UINT code)
{
NMHDR nmhdr;
@ -38,16 +38,16 @@ TAB_SendSimpleNotify (WND *wndPtr, UINT32 code)
nmhdr.idFrom = wndPtr->wIDmenu;
nmhdr.code = code;
return (BOOL32) SendMessage32A (GetParent32 (wndPtr->hwndSelf), WM_NOTIFY,
(WPARAM32) nmhdr.idFrom, (LPARAM) &nmhdr);
return (BOOL) SendMessageA (GetParent (wndPtr->hwndSelf), WM_NOTIFY,
(WPARAM) nmhdr.idFrom, (LPARAM) &nmhdr);
}
static VOID
TAB_RelayEvent (HWND32 hwndTip, HWND32 hwndMsg, UINT32 uMsg,
WPARAM32 wParam, LPARAM lParam)
TAB_RelayEvent (HWND hwndTip, HWND hwndMsg, UINT uMsg,
WPARAM wParam, LPARAM lParam)
{
MSG32 msg;
MSG msg;
msg.hwnd = hwndMsg;
msg.message = uMsg;
@ -57,7 +57,7 @@ TAB_RelayEvent (HWND32 hwndTip, HWND32 hwndMsg, UINT32 uMsg,
msg.pt.x = LOWORD(GetMessagePos ());
msg.pt.y = HIWORD(GetMessagePos ());
SendMessage32A (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
SendMessageA (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
}
@ -79,7 +79,7 @@ TAB_GetCurFocus (WND *wndPtr)
}
static LRESULT
TAB_GetToolTips (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_GetToolTips (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
@ -89,11 +89,11 @@ TAB_GetToolTips (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
TAB_SetCurSel (WND *wndPtr,WPARAM32 wParam)
TAB_SetCurSel (WND *wndPtr,WPARAM wParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
INT32 iItem=(INT32) wParam;
INT32 prevItem;
INT iItem=(INT) wParam;
INT prevItem;
prevItem=-1;
if ((iItem >= 0) && (iItem < infoPtr->uNumItem)) {
@ -104,11 +104,11 @@ TAB_SetCurSel (WND *wndPtr,WPARAM32 wParam)
}
static LRESULT
TAB_SetCurFocus (WND *wndPtr,WPARAM32 wParam)
TAB_SetCurFocus (WND *wndPtr,WPARAM wParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
INT32 iItem=(INT32) wParam;
HDC32 hdc;
INT iItem=(INT) wParam;
HDC hdc;
if ((iItem < 0) || (iItem > infoPtr->uNumItem)) return 0;
@ -120,9 +120,9 @@ TAB_SetCurFocus (WND *wndPtr,WPARAM32 wParam)
if (TAB_SendSimpleNotify(wndPtr, TCN_SELCHANGING)!=TRUE) {
infoPtr->iSelected = iItem;
TAB_SendSimpleNotify(wndPtr, TCN_SELCHANGE);
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
TAB_Refresh (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
}
}
}
@ -130,33 +130,33 @@ TAB_SetCurFocus (WND *wndPtr,WPARAM32 wParam)
}
static LRESULT
TAB_SetToolTips (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_SetToolTips (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
if (infoPtr == NULL) return 0;
infoPtr->hwndToolTip = (HWND32)wParam;
infoPtr->hwndToolTip = (HWND)wParam;
return 0;
}
static HWND32 TAB_InternalHitTest (TAB_INFO *infoPtr, POINT32 pt,
UINT32 *flags)
static HWND TAB_InternalHitTest (TAB_INFO *infoPtr, POINT pt,
UINT *flags)
{
RECT32 rect;
RECT rect;
int iCount;
for (iCount = 0; iCount < infoPtr->uNumItem; iCount++) {
rect = infoPtr->items[iCount].rect;
if (PtInRect32 (&rect, pt)) return iCount;
if (PtInRect (&rect, pt)) return iCount;
}
*flags=TCHT_NOWHERE;
return -1;
}
static LRESULT
TAB_HitTest (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_HitTest (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
LPTCHITTESTINFO lptest=(LPTCHITTESTINFO) lParam;
@ -166,7 +166,7 @@ TAB_HitTest (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
TAB_LButtonDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_LButtonDown (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
@ -175,25 +175,25 @@ TAB_LButtonDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
WM_LBUTTONDOWN, wParam, lParam);
if (wndPtr->dwStyle & TCS_FOCUSONBUTTONDOWN ) {
SetFocus32 (wndPtr->hwndSelf);
SetFocus (wndPtr->hwndSelf);
}
return 0;
}
static LRESULT
TAB_LButtonUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_LButtonUp (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
POINT32 pt;
INT32 newItem,dummy;
HDC32 hdc;
POINT pt;
INT newItem,dummy;
HDC hdc;
if (infoPtr->hwndToolTip)
TAB_RelayEvent (infoPtr->hwndToolTip, wndPtr->hwndSelf,
WM_LBUTTONDOWN, wParam, lParam);
pt.x = (INT32)LOWORD(lParam);
pt.y = (INT32)HIWORD(lParam);
pt.x = (INT)LOWORD(lParam);
pt.y = (INT)HIWORD(lParam);
newItem=TAB_InternalHitTest (infoPtr,pt,&dummy);
if (!newItem) return 0;
@ -203,9 +203,9 @@ TAB_LButtonUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
if (TAB_SendSimpleNotify(wndPtr, TCN_SELCHANGING)!=TRUE) {
infoPtr->iSelected = newItem;
TAB_SendSimpleNotify(wndPtr, TCN_SELCHANGE);
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
TAB_Refresh (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
}
}
TAB_SendSimpleNotify(wndPtr, NM_CLICK);
@ -214,14 +214,14 @@ TAB_LButtonUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
TAB_RButtonDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_RButtonDown (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_SendSimpleNotify(wndPtr, NM_RCLICK);
return 0;
}
static LRESULT
TAB_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_MouseMove (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
@ -232,7 +232,7 @@ TAB_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
TAB_AdjustRect (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_AdjustRect (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
if (wParam==TRUE) {
@ -248,20 +248,20 @@ static void
TAB_SetItemBounds (WND *wndPtr)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
RECT32 rect;
HFONT32 hFont, hOldFont;
INT32 i, left;
SIZE32 size;
HDC32 hdc;
RECT rect;
HFONT hFont, hOldFont;
INT i, left;
SIZE size;
HDC hdc;
/* FIXME: Is this needed? */
GetClientRect32 (wndPtr->hwndSelf, &rect);
GetClientRect (wndPtr->hwndSelf, &rect);
left += (size.cx + 11);
hdc = GetDC32(wndPtr->hwndSelf);
hdc = GetDC(wndPtr->hwndSelf);
hFont = infoPtr->hFont ? infoPtr->hFont : GetStockObject32 (SYSTEM_FONT);
hOldFont = SelectObject32 (hdc, hFont);
hFont = infoPtr->hFont ? infoPtr->hFont : GetStockObject (SYSTEM_FONT);
hOldFont = SelectObject (hdc, hFont);
left = rect.left;
@ -278,7 +278,7 @@ TAB_SetItemBounds (WND *wndPtr)
GetTextExtentPoint32A(hdc,
infoPtr->items[i].pszText,
lstrlen32A(infoPtr->items[i].pszText), &size);
lstrlenA(infoPtr->items[i].pszText), &size);
infoPtr->items[i].rect.right = left + size.cx+2*5;
TRACE(tab, "TextSize: %i\n ", size.cx);
TRACE(tab, "Rect: T %i, L %i, B %i, R %i\n",
@ -289,61 +289,61 @@ TAB_SetItemBounds (WND *wndPtr)
left += (size.cx + 11);
}
SelectObject32 (hdc, hOldFont);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
SelectObject (hdc, hOldFont);
ReleaseDC (wndPtr->hwndSelf, hdc);
}
static void
TAB_DrawItem (WND *wndPtr, HDC32 hdc, INT32 iItem)
TAB_DrawItem (WND *wndPtr, HDC hdc, INT iItem)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
TAB_ITEM *pti = &infoPtr->items[iItem];
RECT32 r;
INT32 oldBkMode,cx,cy;
HBRUSH32 hbr = CreateSolidBrush32 (COLOR_BACKGROUND);
RECT r;
INT oldBkMode,cx,cy;
HBRUSH hbr = CreateSolidBrush (COLOR_BACKGROUND);
HPEN32 hwPen = GetSysColorPen32 (COLOR_3DHILIGHT);
HPEN32 hbPen = GetSysColorPen32 (COLOR_BTNSHADOW);
HPEN32 hsdPen = GetSysColorPen32 (COLOR_BTNTEXT);
HPEN32 htmpPen = (HPEN32)NULL;
HPEN hwPen = GetSysColorPen (COLOR_3DHILIGHT);
HPEN hbPen = GetSysColorPen (COLOR_BTNSHADOW);
HPEN hsdPen = GetSysColorPen (COLOR_BTNTEXT);
HPEN htmpPen = (HPEN)NULL;
CopyRect32(&r, &pti->rect);
CopyRect(&r, &pti->rect);
/* demo */
FillRect32(hdc, &r, hbr);
FillRect(hdc, &r, hbr);
htmpPen = hwPen;
htmpPen = SelectObject32 (hdc, htmpPen);
htmpPen = SelectObject (hdc, htmpPen);
if (wndPtr->dwStyle & TCS_BOTTOM) {
MoveToEx32 (hdc, r.left, r.top, NULL);
LineTo32 (hdc, r.left, r.bottom - 2);
LineTo32 (hdc, r.left +2, r.bottom);
LineTo32 (hdc, r.right -1, r.bottom);
htmpPen = SelectObject32 (hdc, hbPen);
MoveToEx32 (hdc, r.right-1, r.top, NULL);
LineTo32 (hdc,r.right-1, r.bottom-1);
hbPen = SelectObject32 (hdc, hsdPen);
MoveToEx32 (hdc, r.right, r.top+1, NULL);
LineTo32(hdc, r.right,r.bottom);
MoveToEx (hdc, r.left, r.top, NULL);
LineTo (hdc, r.left, r.bottom - 2);
LineTo (hdc, r.left +2, r.bottom);
LineTo (hdc, r.right -1, r.bottom);
htmpPen = SelectObject (hdc, hbPen);
MoveToEx (hdc, r.right-1, r.top, NULL);
LineTo (hdc,r.right-1, r.bottom-1);
hbPen = SelectObject (hdc, hsdPen);
MoveToEx (hdc, r.right, r.top+1, NULL);
LineTo(hdc, r.right,r.bottom);
} else {
MoveToEx32 (hdc, r.left, r.bottom, NULL);
LineTo32 (hdc, r.left, r.top + 2);
LineTo32 (hdc, r.left +2, r.top);
LineTo32 (hdc, r.right -1, r.top);
htmpPen = SelectObject32 (hdc, hbPen);
MoveToEx32 (hdc, r.right-1, r.bottom, NULL);
LineTo32 (hdc,r.right-1, r.top+1);
hbPen = SelectObject32 (hdc, hsdPen);
MoveToEx32 (hdc, r.right, r.bottom-1, NULL);
LineTo32(hdc, r.right,r.top);
MoveToEx (hdc, r.left, r.bottom, NULL);
LineTo (hdc, r.left, r.top + 2);
LineTo (hdc, r.left +2, r.top);
LineTo (hdc, r.right -1, r.top);
htmpPen = SelectObject (hdc, hbPen);
MoveToEx (hdc, r.right-1, r.bottom, NULL);
LineTo (hdc,r.right-1, r.top+1);
hbPen = SelectObject (hdc, hsdPen);
MoveToEx (hdc, r.right, r.bottom-1, NULL);
LineTo(hdc, r.right,r.top);
}
hsdPen = SelectObject32(hdc,htmpPen);
hsdPen = SelectObject(hdc,htmpPen);
oldBkMode = SetBkMode32(hdc, TRANSPARENT);
oldBkMode = SetBkMode(hdc, TRANSPARENT);
r.left += 3;
r.right -= 3;
@ -353,98 +353,98 @@ TAB_DrawItem (WND *wndPtr, HDC32 hdc, INT32 iItem)
ImageList_GetIconSize (infoPtr->himl, &cx, &cy);
r.left+=cx+3;
}
SetTextColor32 (hdc, COLOR_BTNTEXT);
DrawText32A(hdc, pti->pszText, lstrlen32A(pti->pszText),
SetTextColor (hdc, COLOR_BTNTEXT);
DrawTextA(hdc, pti->pszText, lstrlenA(pti->pszText),
&r, DT_LEFT|DT_SINGLELINE|DT_VCENTER);
if (oldBkMode != TRANSPARENT)
SetBkMode32(hdc, oldBkMode);
SetBkMode(hdc, oldBkMode);
}
static void
TAB_DrawBorder (WND *wndPtr, HDC32 hdc)
TAB_DrawBorder (WND *wndPtr, HDC hdc)
{
HPEN32 htmPen;
HPEN32 hwPen = GetSysColorPen32 (COLOR_3DHILIGHT);
HPEN32 hbPen = GetSysColorPen32 (COLOR_3DDKSHADOW);
HPEN32 hShade = GetSysColorPen32 (COLOR_BTNSHADOW);
HPEN htmPen;
HPEN hwPen = GetSysColorPen (COLOR_3DHILIGHT);
HPEN hbPen = GetSysColorPen (COLOR_3DDKSHADOW);
HPEN hShade = GetSysColorPen (COLOR_BTNSHADOW);
RECT32 rect;
RECT rect;
htmPen = SelectObject32 (hdc, hwPen);
GetClientRect32 (wndPtr->hwndSelf, &rect);
htmPen = SelectObject (hdc, hwPen);
GetClientRect (wndPtr->hwndSelf, &rect);
MoveToEx32 (hdc, rect.left, rect.bottom, NULL);
LineTo32 (hdc, rect.left, rect.top+20);
MoveToEx (hdc, rect.left, rect.bottom, NULL);
LineTo (hdc, rect.left, rect.top+20);
LineTo32 (hdc, rect.right, rect.top+20);
LineTo (hdc, rect.right, rect.top+20);
hwPen = SelectObject32 (hdc, htmPen);
LineTo32 (hdc, rect.right, rect.bottom );
LineTo32 (hdc, rect.left, rect.bottom);
hbPen = SelectObject32 (hdc, hShade );
MoveToEx32 (hdc, rect.right-1, rect.top+20, NULL);
LineTo32 (hdc, rect.right-1, rect.bottom-1);
LineTo32 (hdc, rect.left, rect.bottom-1);
hShade = SelectObject32(hdc, hShade);
hwPen = SelectObject (hdc, htmPen);
LineTo (hdc, rect.right, rect.bottom );
LineTo (hdc, rect.left, rect.bottom);
hbPen = SelectObject (hdc, hShade );
MoveToEx (hdc, rect.right-1, rect.top+20, NULL);
LineTo (hdc, rect.right-1, rect.bottom-1);
LineTo (hdc, rect.left, rect.bottom-1);
hShade = SelectObject(hdc, hShade);
}
static void
TAB_Refresh (WND *wndPtr, HDC32 hdc)
TAB_Refresh (WND *wndPtr, HDC hdc)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
HFONT32 hOldFont;
INT32 i;
HFONT hOldFont;
INT i;
if (!infoPtr->DoRedraw) return;
TAB_DrawBorder (wndPtr, hdc);
hOldFont = SelectObject32 (hdc, infoPtr->hFont);
hOldFont = SelectObject (hdc, infoPtr->hFont);
for (i = 0; i < infoPtr->uNumItem; i++) {
TAB_DrawItem (wndPtr, hdc, i);
}
SelectObject32 (hdc, hOldFont);
SelectObject (hdc, hOldFont);
}
static LRESULT
TAB_SetRedraw (WND *wndPtr, WPARAM32 wParam)
TAB_SetRedraw (WND *wndPtr, WPARAM wParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
infoPtr->DoRedraw=(BOOL32) wParam;
infoPtr->DoRedraw=(BOOL) wParam;
return 0;
}
static LRESULT
TAB_Paint (WND *wndPtr, WPARAM32 wParam)
TAB_Paint (WND *wndPtr, WPARAM wParam)
{
HDC32 hdc;
PAINTSTRUCT32 ps;
HDC hdc;
PAINTSTRUCT ps;
hdc = wParam== 0 ? BeginPaint32 (wndPtr->hwndSelf, &ps) : (HDC32)wParam;
hdc = wParam== 0 ? BeginPaint (wndPtr->hwndSelf, &ps) : (HDC)wParam;
TAB_Refresh (wndPtr, hdc);
if(!wParam)
EndPaint32 (wndPtr->hwndSelf, &ps);
EndPaint (wndPtr->hwndSelf, &ps);
return 0;
}
static LRESULT
TAB_InsertItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_InsertItem (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
TCITEM32A *pti;
HDC32 hdc;
INT32 iItem, len;
RECT32 rect;
TCITEMA *pti;
HDC hdc;
INT iItem, len;
RECT rect;
GetClientRect32 (wndPtr->hwndSelf, &rect);
GetClientRect (wndPtr->hwndSelf, &rect);
TRACE(tab, "Rect: %x T %i, L %i, B %i, R %i\n", wndPtr->hwndSelf,
rect.top, rect.left, rect.bottom, rect.right);
pti = (TCITEM32A *)lParam;
iItem = (INT32)wParam;
pti = (TCITEMA *)lParam;
iItem = (INT)wParam;
if (iItem < 0) return -1;
if (iItem > infoPtr->uNumItem)
@ -478,9 +478,9 @@ TAB_InsertItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
infoPtr->items[iItem].mask = pti->mask;
if (pti->mask & TCIF_TEXT) {
len = lstrlen32A (pti->pszText);
len = lstrlenA (pti->pszText);
infoPtr->items[iItem].pszText = COMCTL32_Alloc (len+1);
lstrcpy32A (infoPtr->items[iItem].pszText, pti->pszText);
lstrcpyA (infoPtr->items[iItem].pszText, pti->pszText);
infoPtr->items[iItem].cchTextMax = pti->cchTextMax;
}
@ -490,9 +490,9 @@ TAB_InsertItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
if (pti->mask & TCIF_PARAM)
infoPtr->items[iItem].lParam = pti->lParam;
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
TAB_Refresh (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
TRACE(tab, "[%04x]: added item %d '%s'\n",
wndPtr->hwndSelf, iItem, infoPtr->items[iItem].pszText);
@ -502,15 +502,15 @@ TAB_InsertItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
TAB_SetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_SetItemA (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
TCITEM32A *tabItem;
TCITEMA *tabItem;
TAB_ITEM *wineItem;
INT32 iItem,len;
INT iItem,len;
iItem=(INT32) wParam;
tabItem=(LPTCITEM32A ) lParam;
iItem=(INT) wParam;
tabItem=(LPTCITEMA ) lParam;
TRACE (tab,"%d %p\n",iItem, tabItem);
if ((iItem<0) || (iItem>infoPtr->uNumItem)) return FALSE;
@ -529,17 +529,17 @@ TAB_SetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
wineItem->dwState=tabItem->dwState;
if (tabItem->mask & TCIF_TEXT) {
len=lstrlen32A (tabItem->pszText);
len=lstrlenA (tabItem->pszText);
if (len>wineItem->cchTextMax)
wineItem->pszText= COMCTL32_ReAlloc (wineItem->pszText, len+1);
lstrcpyn32A (wineItem->pszText, tabItem->pszText, len);
lstrcpynA (wineItem->pszText, tabItem->pszText, len);
}
return TRUE;
}
static LRESULT
TAB_GetItemCount (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_GetItemCount (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
@ -548,15 +548,15 @@ TAB_GetItemCount (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
TAB_GetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_GetItemA (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
TCITEM32A *tabItem;
TCITEMA *tabItem;
TAB_ITEM *wineItem;
INT32 iItem;
INT iItem;
iItem=(INT32) wParam;
tabItem=(LPTCITEM32A) lParam;
iItem=(INT) wParam;
tabItem=(LPTCITEMA) lParam;
TRACE (tab,"\n");
if ((iItem<0) || (iItem>infoPtr->uNumItem)) return FALSE;
@ -575,20 +575,20 @@ TAB_GetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
tabItem->dwState=wineItem->dwState;
if (tabItem->mask & TCIF_TEXT)
lstrcpyn32A (tabItem->pszText, wineItem->pszText, tabItem->cchTextMax);
lstrcpynA (tabItem->pszText, wineItem->pszText, tabItem->cchTextMax);
return TRUE;
}
static LRESULT
TAB_DeleteItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_DeleteItem (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
FIXME (tab,"stub \n");
return TRUE;
}
static LRESULT
TAB_DeleteAllItems (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_DeleteAllItems (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
@ -600,7 +600,7 @@ TAB_DeleteAllItems (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
TAB_GetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_GetFont (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
@ -609,35 +609,35 @@ TAB_GetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
TAB_SetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_SetFont (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
TEXTMETRIC32A tm;
HFONT32 hFont, hOldFont;
HDC32 hdc;
TEXTMETRICA tm;
HFONT hFont, hOldFont;
HDC hdc;
TRACE (tab,"%x %lx\n",wParam, lParam);
infoPtr->hFont = (HFONT32)wParam;
infoPtr->hFont = (HFONT)wParam;
hFont = infoPtr->hFont ? infoPtr->hFont : GetStockObject32 (SYSTEM_FONT);
hFont = infoPtr->hFont ? infoPtr->hFont : GetStockObject (SYSTEM_FONT);
hdc = GetDC32 (0);
hOldFont = SelectObject32 (hdc, hFont);
GetTextMetrics32A (hdc, &tm);
hdc = GetDC (0);
hOldFont = SelectObject (hdc, hFont);
GetTextMetricsA (hdc, &tm);
infoPtr->nHeight= tm.tmHeight + tm.tmExternalLeading;
SelectObject32 (hdc, hOldFont);
SelectObject (hdc, hOldFont);
if (lParam) TAB_Refresh (wndPtr,hdc);
ReleaseDC32 (0, hdc);
ReleaseDC (0, hdc);
return 0;
}
static LRESULT
TAB_GetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_GetImageList (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
@ -646,7 +646,7 @@ TAB_GetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
TAB_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_SetImageList (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
HIMAGELIST himlPrev;
@ -659,40 +659,40 @@ TAB_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
static LRESULT
TAB_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_Size (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
RECT32 parent_rect;
HWND32 parent;
HDC32 hdc;
UINT32 uPosFlags,cx,cy;
RECT parent_rect;
HWND parent;
HDC hdc;
UINT uPosFlags,cx,cy;
uPosFlags=0;
if (!wParam) {
parent = GetParent32 (wndPtr->hwndSelf);
GetClientRect32(parent, &parent_rect);
parent = GetParent (wndPtr->hwndSelf);
GetClientRect(parent, &parent_rect);
cx=LOWORD (lParam);
cy=HIWORD (lParam);
if (wndPtr->dwStyle & CCS_NORESIZE)
uPosFlags |= (SWP_NOSIZE | SWP_NOMOVE);
SetWindowPos32 (wndPtr->hwndSelf, 0, parent_rect.left, parent_rect.top,
SetWindowPos (wndPtr->hwndSelf, 0, parent_rect.left, parent_rect.top,
cx, cy, uPosFlags | SWP_NOZORDER);
} else {
FIXME (tab,"WM_SIZE flag %x %lx not handled\n", wParam, lParam);
}
TAB_SetItemBounds (wndPtr);
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
TAB_Refresh (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
return 0;
}
static LRESULT
TAB_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr;
@ -702,7 +702,7 @@ TAB_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
infoPtr->uNumItem = 0;
infoPtr->hFont = 0;
infoPtr->items = 0;
infoPtr->hcurArrow = LoadCursor32A (0, IDC_ARROW32A);
infoPtr->hcurArrow = LoadCursorA (0, IDC_ARROWA);
infoPtr->iSelected = -1;
infoPtr->hwndToolTip=0;
@ -710,9 +710,9 @@ TAB_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
if (wndPtr->dwStyle & TCS_TOOLTIPS) {
/* Create tooltip control */
infoPtr->hwndToolTip =
CreateWindowEx32A (0, TOOLTIPS_CLASS32A, NULL, 0,
CW_USEDEFAULT32, CW_USEDEFAULT32,
CW_USEDEFAULT32, CW_USEDEFAULT32,
CreateWindowExA (0, TOOLTIPS_CLASSA, NULL, 0,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
wndPtr->hwndSelf, 0, 0, 0);
/* Send NM_TOOLTIPSCREATED notification */
@ -724,8 +724,8 @@ TAB_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
nmttc.hdr.code = NM_TOOLTIPSCREATED;
nmttc.hwndToolTips = infoPtr->hwndToolTip;
SendMessage32A (GetParent32 (wndPtr->hwndSelf), WM_NOTIFY,
(WPARAM32)wndPtr->wIDmenu, (LPARAM)&nmttc);
SendMessageA (GetParent (wndPtr->hwndSelf), WM_NOTIFY,
(WPARAM)wndPtr->wIDmenu, (LPARAM)&nmttc);
}
}
@ -734,10 +734,10 @@ TAB_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
static LRESULT
TAB_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TAB_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(wndPtr);
INT32 iItem;
INT iItem;
if (infoPtr->items) {
for (iItem = 0; iItem < infoPtr->uNumItem; iItem++) {
@ -748,14 +748,14 @@ TAB_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
if (infoPtr->hwndToolTip)
DestroyWindow32 (infoPtr->hwndToolTip);
DestroyWindow (infoPtr->hwndToolTip);
COMCTL32_Free (infoPtr);
return 0;
}
LRESULT WINAPI
TAB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -771,17 +771,17 @@ TAB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case TCM_GETITEMCOUNT:
return TAB_GetItemCount (wndPtr, wParam, lParam);
case TCM_GETITEM32A:
return TAB_GetItem32A (wndPtr, wParam, lParam);
case TCM_GETITEMA:
return TAB_GetItemA (wndPtr, wParam, lParam);
case TCM_GETITEM32W:
case TCM_GETITEMW:
FIXME (tab, "Unimplemented msg TCM_GETITEM32W\n");
return 0;
case TCM_SETITEM32A:
return TAB_SetItem32A (wndPtr, wParam, lParam);
case TCM_SETITEMA:
return TAB_SetItemA (wndPtr, wParam, lParam);
case TCM_SETITEM32W:
case TCM_SETITEMW:
FIXME (tab, "Unimplemented msg TCM_GETITEM32W\n");
return 0;
@ -804,10 +804,10 @@ TAB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case TCM_SETCURSEL:
return TAB_SetCurSel (wndPtr, wParam);
case TCM_INSERTITEM32A:
case TCM_INSERTITEMA:
return TAB_InsertItem (wndPtr, wParam, lParam);
case TCM_INSERTITEM32W:
case TCM_INSERTITEMW:
FIXME (tab, "Unimplemented msg TCM_INSERTITEM32W\n");
return 0;
@ -894,7 +894,7 @@ TAB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
if (uMsg >= WM_USER)
ERR (tab, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
return 0;
}
@ -903,27 +903,27 @@ TAB_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
VOID
TAB_Register (VOID)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if (GlobalFindAtom32A (WC_TABCONTROL32A)) return;
if (GlobalFindAtomA (WC_TABCONTROLA)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS;
wndClass.lpfnWndProc = (WNDPROC32)TAB_WindowProc;
wndClass.lpfnWndProc = (WNDPROC)TAB_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(TAB_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
wndClass.hbrBackground = 0;
wndClass.lpszClassName = WC_TABCONTROL32A;
wndClass.lpszClassName = WC_TABCONTROLA;
RegisterClass32A (&wndClass);
RegisterClassA (&wndClass);
}
VOID
TAB_Unregister (VOID)
{
if (GlobalFindAtom32A (WC_TABCONTROL32A))
UnregisterClass32A (WC_TABCONTROL32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (WC_TABCONTROLA))
UnregisterClassA (WC_TABCONTROLA, (HINSTANCE)NULL);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -72,7 +72,7 @@ static int accelIndex = -1;
* UPDOWN_InBounds
* Tests if a given value 'val' is between the Min&Max limits
*/
static BOOL32 UPDOWN_InBounds(WND *wndPtr, int val)
static BOOL UPDOWN_InBounds(WND *wndPtr, int val)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
@ -87,7 +87,7 @@ static BOOL32 UPDOWN_InBounds(WND *wndPtr, int val)
* Tests if we can change the current value by delta. If so, it changes
* it and returns TRUE. Else, it leaves it unchanged and returns FALSE.
*/
static BOOL32 UPDOWN_OffsetVal(WND *wndPtr, int delta)
static BOOL UPDOWN_OffsetVal(WND *wndPtr, int delta)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
@ -114,11 +114,11 @@ static BOOL32 UPDOWN_OffsetVal(WND *wndPtr, int delta)
* FALSE get the "decrement" rect (down or left)
*
*/
static void UPDOWN_GetArrowRect(WND *wndPtr, RECT32 *rect, BOOL32 incr)
static void UPDOWN_GetArrowRect(WND *wndPtr, RECT *rect, BOOL incr)
{
int len; /* will hold the width or height */
GetClientRect32(wndPtr->hwndSelf, rect);
GetClientRect(wndPtr->hwndSelf, rect);
if (wndPtr->dwStyle & UDS_HORZ) {
len = rect->right - rect->left; /* compute the width */
@ -142,10 +142,10 @@ static void UPDOWN_GetArrowRect(WND *wndPtr, RECT32 *rect, BOOL32 incr)
* If it returns the up rect, it returns TRUE.
* If it returns the down rect, it returns FALSE.
*/
static int UPDOWN_GetArrowFromPoint(WND *wndPtr, RECT32 *rect, POINT32 pt)
static int UPDOWN_GetArrowFromPoint(WND *wndPtr, RECT *rect, POINT pt)
{
UPDOWN_GetArrowRect(wndPtr, rect, TRUE);
if(PtInRect32(rect, pt))
if(PtInRect(rect, pt))
return TRUE;
UPDOWN_GetArrowRect(wndPtr, rect, FALSE);
@ -161,7 +161,7 @@ static char UPDOWN_GetThousandSep()
{
char sep[2];
if(GetLocaleInfo32A(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND,
if(GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND,
sep, sizeof(sep)) != 1)
return ',';
@ -176,24 +176,24 @@ static char UPDOWN_GetThousandSep()
* TRUE - if it read the integer from the buddy successfully
* FALSE - if an error occured
*/
static BOOL32 UPDOWN_GetBuddyInt(WND *wndPtr)
static BOOL UPDOWN_GetBuddyInt(WND *wndPtr)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
char txt[20], sep, *src, *dst;
int newVal;
if (!IsWindow32(infoPtr->Buddy))
if (!IsWindow(infoPtr->Buddy))
return FALSE;
/*if the buddy is a list window, we must set curr index */
if(WIDGETS_IsControl32(WIN_FindWndPtr(infoPtr->Buddy), BIC32_LISTBOX)){
newVal = SendMessage32A(infoPtr->Buddy, LB_GETCARETINDEX32, 0, 0);
if(WIDGETS_IsControl(WIN_FindWndPtr(infoPtr->Buddy), BIC32_LISTBOX)){
newVal = SendMessageA(infoPtr->Buddy, LB_GETCARETINDEX, 0, 0);
if(newVal < 0)
return FALSE;
}
else{
/* we have a regular window, so will get the text */
if (!GetWindowText32A(infoPtr->Buddy, txt, sizeof(txt)))
if (!GetWindowTextA(infoPtr->Buddy, txt, sizeof(txt)))
return FALSE;
sep = UPDOWN_GetThousandSep();
@ -225,21 +225,21 @@ static BOOL32 UPDOWN_GetBuddyInt(WND *wndPtr)
* TRUE - if it set the caption of the buddy successfully
* FALSE - if an error occured
*/
static BOOL32 UPDOWN_SetBuddyInt(WND *wndPtr)
static BOOL UPDOWN_SetBuddyInt(WND *wndPtr)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
char txt1[20], sep;
int len;
if (!IsWindow32(infoPtr->Buddy))
if (!IsWindow(infoPtr->Buddy))
return FALSE;
TRACE(updown, "set new value(%d) to buddy.\n",
infoPtr->CurVal);
/*if the buddy is a list window, we must set curr index */
if(WIDGETS_IsControl32(WIN_FindWndPtr(infoPtr->Buddy), BIC32_LISTBOX)){
SendMessage32A(infoPtr->Buddy, LB_SETCURSEL32, infoPtr->CurVal, 0);
if(WIDGETS_IsControl(WIN_FindWndPtr(infoPtr->Buddy), BIC32_LISTBOX)){
SendMessageA(infoPtr->Buddy, LB_SETCURSEL, infoPtr->CurVal, 0);
}
else{ /* Regular window, so set caption to the number */
len = sprintf(txt1, (infoPtr->Base==16) ? "%X" : "%d", infoPtr->CurVal);
@ -250,7 +250,7 @@ static BOOL32 UPDOWN_SetBuddyInt(WND *wndPtr)
if (!(wndPtr->dwStyle & UDS_NOTHOUSANDS) && (len > 3)) {
char txt2[20], *src = txt1, *dst = txt2;
if(len%3 > 0){
lstrcpyn32A (dst, src, len%3 + 1); /* need to include the null */
lstrcpynA (dst, src, len%3 + 1); /* need to include the null */
dst += len%3;
src += len%3;
}
@ -262,7 +262,7 @@ static BOOL32 UPDOWN_SetBuddyInt(WND *wndPtr)
*dst = 0; /* null terminate it */
strcpy(txt1, txt2); /* move it to the proper place */
}
SetWindowText32A(infoPtr->Buddy, txt1);
SetWindowTextA(infoPtr->Buddy, txt1);
}
return TRUE;
@ -273,28 +273,28 @@ static BOOL32 UPDOWN_SetBuddyInt(WND *wndPtr)
*
* Draw the arrows. The background need not be erased.
*/
static void UPDOWN_Draw (WND *wndPtr, HDC32 hdc)
static void UPDOWN_Draw (WND *wndPtr, HDC hdc)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
BOOL32 prssed;
RECT32 rect;
BOOL prssed;
RECT rect;
/* Draw the incr button */
UPDOWN_GetArrowRect(wndPtr, &rect, TRUE);
prssed = (infoPtr->Flags & FLAG_INCR) && (infoPtr->Flags & FLAG_MOUSEIN);
DrawFrameControl32(hdc, &rect, DFC_SCROLL,
DrawFrameControl(hdc, &rect, DFC_SCROLL,
(wndPtr->dwStyle & UDS_HORZ ? DFCS_SCROLLLEFT : DFCS_SCROLLUP) |
(prssed ? DFCS_PUSHED : 0) |
(wndPtr->dwStyle&WS_DISABLED ? DFCS_INACTIVE : 0) );
/* Draw the space between the buttons */
rect.top = rect.bottom; rect.bottom++;
DrawEdge32(hdc, &rect, 0, BF_MIDDLE);
DrawEdge(hdc, &rect, 0, BF_MIDDLE);
/* Draw the decr button */
UPDOWN_GetArrowRect(wndPtr, &rect, FALSE);
prssed = (infoPtr->Flags & FLAG_DECR) && (infoPtr->Flags & FLAG_MOUSEIN);
DrawFrameControl32(hdc, &rect, DFC_SCROLL,
DrawFrameControl(hdc, &rect, DFC_SCROLL,
(wndPtr->dwStyle & UDS_HORZ ? DFCS_SCROLLRIGHT : DFCS_SCROLLDOWN) |
(prssed ? DFCS_PUSHED : 0) |
(wndPtr->dwStyle&WS_DISABLED ? DFCS_INACTIVE : 0) );
@ -308,11 +308,11 @@ static void UPDOWN_Draw (WND *wndPtr, HDC32 hdc)
*/
static void UPDOWN_Refresh (WND *wndPtr)
{
HDC32 hdc;
HDC hdc;
hdc = GetDC32 (wndPtr->hwndSelf);
hdc = GetDC (wndPtr->hwndSelf);
UPDOWN_Draw (wndPtr, hdc);
ReleaseDC32 (wndPtr->hwndSelf, hdc);
ReleaseDC (wndPtr->hwndSelf, hdc);
}
@ -324,12 +324,12 @@ static void UPDOWN_Refresh (WND *wndPtr)
*/
static void UPDOWN_Paint (WND *wndPtr)
{
PAINTSTRUCT32 ps;
HDC32 hdc;
PAINTSTRUCT ps;
HDC hdc;
hdc = BeginPaint32 (wndPtr->hwndSelf, &ps);
hdc = BeginPaint (wndPtr->hwndSelf, &ps);
UPDOWN_Draw (wndPtr, hdc);
EndPaint32 (wndPtr->hwndSelf, &ps);
EndPaint (wndPtr->hwndSelf, &ps);
}
/***********************************************************************
@ -342,14 +342,14 @@ static void UPDOWN_Paint (WND *wndPtr)
* If window has the UDS_ALIGNLEFT or UDS_ALIGNRIGHT style
* the size/pos of the buddy and the control are adjusted accordingly.
*/
static BOOL32 UPDOWN_SetBuddy(WND *wndPtr, HWND32 hwndBud)
static BOOL UPDOWN_SetBuddy(WND *wndPtr, HWND hwndBud)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
RECT32 budRect; /* new coord for the buddy */
RECT budRect; /* new coord for the buddy */
int x; /* new x position and width for the up-down */
/* Is is a valid bud? */
if(!IsWindow32(hwndBud))
if(!IsWindow(hwndBud))
return FALSE;
if(wndPtr->dwStyle & UDS_ARROWKEYS){
@ -361,9 +361,9 @@ static BOOL32 UPDOWN_SetBuddy(WND *wndPtr, HWND32 hwndBud)
return TRUE;
/* Get the rect of the buddy relative to its parent */
GetWindowRect32(infoPtr->Buddy, &budRect);
MapWindowPoints32(HWND_DESKTOP, GetParent32(infoPtr->Buddy),
(POINT32 *)(&budRect.left), 2);
GetWindowRect(infoPtr->Buddy, &budRect);
MapWindowPoints(HWND_DESKTOP, GetParent(infoPtr->Buddy),
(POINT *)(&budRect.left), 2);
/* now do the positioning */
if(wndPtr->dwStyle & UDS_ALIGNRIGHT){
@ -376,7 +376,7 @@ static BOOL32 UPDOWN_SetBuddy(WND *wndPtr, HWND32 hwndBud)
}
/* first adjust the buddy to accomodate the up/down */
SetWindowPos32(infoPtr->Buddy, 0, budRect.left, budRect.top,
SetWindowPos(infoPtr->Buddy, 0, budRect.left, budRect.top,
budRect.right - budRect.left, budRect.bottom - budRect.top,
SWP_NOACTIVATE|SWP_NOZORDER);
@ -384,7 +384,7 @@ static BOOL32 UPDOWN_SetBuddy(WND *wndPtr, HWND32 hwndBud)
/* Since the UDS_ALIGN* flags were used, */
/* we will pick the position and size of the window. */
SetWindowPos32(wndPtr->hwndSelf,0,x,budRect.top-DEFAULT_ADDTOP,DEFAULT_WIDTH,
SetWindowPos(wndPtr->hwndSelf,0,x,budRect.top-DEFAULT_ADDTOP,DEFAULT_WIDTH,
(budRect.bottom-budRect.top)+DEFAULT_ADDTOP+DEFAULT_ADDBOT,
SWP_NOACTIVATE|SWP_NOZORDER);
@ -400,7 +400,7 @@ static BOOL32 UPDOWN_SetBuddy(WND *wndPtr, HWND32 hwndBud)
* It handles wraping and non-wraping correctly.
* It is assumed that delta>0
*/
static void UPDOWN_DoAction(WND *wndPtr, int delta, BOOL32 incr)
static void UPDOWN_DoAction(WND *wndPtr, int delta, BOOL incr)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
int old_val = infoPtr->CurVal;
@ -423,7 +423,7 @@ static void UPDOWN_DoAction(WND *wndPtr, int delta, BOOL32 incr)
ni.hdr.hwndFrom = wndPtr->hwndSelf;
ni.hdr.idFrom = wndPtr->wIDmenu;
ni.hdr.code = UDN_DELTAPOS;
if(SendMessage32A(wndPtr->parent->hwndSelf,
if(SendMessageA(wndPtr->parent->hwndSelf,
WM_NOTIFY, wndPtr->wIDmenu, (LPARAM)&ni))
return; /* we are not allowed to change */
@ -432,7 +432,7 @@ static void UPDOWN_DoAction(WND *wndPtr, int delta, BOOL32 incr)
return;
/* Now take care about our buddy */
if(!IsWindow32(infoPtr->Buddy))
if(!IsWindow(infoPtr->Buddy))
return; /* Nothing else to do */
@ -443,7 +443,7 @@ static void UPDOWN_DoAction(WND *wndPtr, int delta, BOOL32 incr)
/* FIXME: do we need to send the notification only if
we do not have the UDS_SETBUDDYINT style set? */
SendMessage32A(GetParent32 (wndPtr->hwndSelf),
SendMessageA(GetParent (wndPtr->hwndSelf),
wndPtr->dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL,
MAKELONG(incr ? SB_LINEUP : SB_LINEDOWN, infoPtr->CurVal),
wndPtr->hwndSelf);
@ -455,13 +455,13 @@ static void UPDOWN_DoAction(WND *wndPtr, int delta, BOOL32 incr)
* Returns TRUE if it is enabled as well as its buddy (if any)
* FALSE otherwise
*/
static BOOL32 UPDOWN_IsEnabled(WND *wndPtr)
static BOOL UPDOWN_IsEnabled(WND *wndPtr)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
if(wndPtr->dwStyle & WS_DISABLED)
return FALSE;
return IsWindowEnabled32(infoPtr->Buddy);
return IsWindowEnabled(infoPtr->Buddy);
}
/***********************************************************************
@ -472,7 +472,7 @@ static BOOL32 UPDOWN_IsEnabled(WND *wndPtr)
* If the control was not in cancel mode, it returns FALSE.
* If the control was in cancel mode, it returns TRUE.
*/
static BOOL32 UPDOWN_CancelMode(WND *wndPtr)
static BOOL UPDOWN_CancelMode(WND *wndPtr)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
@ -480,10 +480,10 @@ static BOOL32 UPDOWN_CancelMode(WND *wndPtr)
if(!(infoPtr->Flags & FLAG_CLICKED))
return FALSE;
KillTimer32(wndPtr->hwndSelf, TIMERID1); /* kill all possible timers */
KillTimer32(wndPtr->hwndSelf, TIMERID2);
KillTimer(wndPtr->hwndSelf, TIMERID1); /* kill all possible timers */
KillTimer(wndPtr->hwndSelf, TIMERID2);
if(GetCapture32() == wndPtr->hwndSelf) /* let the mouse go */
if(GetCapture() == wndPtr->hwndSelf) /* let the mouse go */
ReleaseCapture(); /* if we still have it */
infoPtr->Flags = 0; /* get rid of any flags */
@ -499,10 +499,10 @@ static BOOL32 UPDOWN_CancelMode(WND *wndPtr)
* 'pt' is the location of the mouse event in client or
* windows coordinates.
*/
static void UPDOWN_HandleMouseEvent(WND *wndPtr, UINT32 msg, POINT32 pt)
static void UPDOWN_HandleMouseEvent(WND *wndPtr, UINT msg, POINT pt)
{
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
RECT32 rect;
RECT rect;
int temp;
switch(msg)
@ -513,8 +513,8 @@ static void UPDOWN_HandleMouseEvent(WND *wndPtr, UINT32 msg, POINT32 pt)
return;
/* If the buddy is an edit, will set focus to it */
if(WIDGETS_IsControl32(WIN_FindWndPtr(infoPtr->Buddy), BIC32_EDIT))
SetFocus32(infoPtr->Buddy);
if(WIDGETS_IsControl(WIN_FindWndPtr(infoPtr->Buddy), BIC32_EDIT))
SetFocus(infoPtr->Buddy);
/* Now see which one is the 'active' arrow */
temp = UPDOWN_GetArrowFromPoint(wndPtr, &rect, pt);
@ -541,10 +541,10 @@ static void UPDOWN_HandleMouseEvent(WND *wndPtr, UINT32 msg, POINT32 pt)
UPDOWN_DoAction(wndPtr, 1, infoPtr->Flags & FLAG_INCR);
/* now capture all mouse messages */
SetCapture32(wndPtr->hwndSelf);
SetCapture(wndPtr->hwndSelf);
/* and startup the first timer */
SetTimer32(wndPtr->hwndSelf, TIMERID1, INITIAL_DELAY, 0);
SetTimer(wndPtr->hwndSelf, TIMERID1, INITIAL_DELAY, 0);
break;
case WM_MOUSEMOVE:
@ -562,7 +562,7 @@ static void UPDOWN_HandleMouseEvent(WND *wndPtr, UINT32 msg, POINT32 pt)
UPDOWN_GetArrowRect(wndPtr, &rect, FALSE);
/* Update the flags if we are in/out */
if(PtInRect32(&rect, pt))
if(PtInRect(&rect, pt))
infoPtr->Flags |= FLAG_MOUSEIN;
else{
infoPtr->Flags &= ~FLAG_MOUSEIN;
@ -583,7 +583,7 @@ static void UPDOWN_HandleMouseEvent(WND *wndPtr, UINT32 msg, POINT32 pt)
/***********************************************************************
* UpDownWndProc
*/
LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -610,7 +610,7 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
/* Do we pick the buddy win ourselves? */
if(wndPtr->dwStyle & UDS_AUTOBUDDY)
UPDOWN_SetBuddy(wndPtr, GetWindow32(wndPtr->hwndSelf, GW_HWNDPREV));
UPDOWN_SetBuddy(wndPtr, GetWindow(wndPtr->hwndSelf, GW_HWNDPREV));
TRACE(updown, "UpDown Ctrl creation, hwnd=%04x\n", hwnd);
break;
@ -634,7 +634,7 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
case WM_TIMER:
/* if initial timer, kill it and start the repeat timer */
if(wParam == TIMERID1){
KillTimer32(hwnd, TIMERID1);
KillTimer(hwnd, TIMERID1);
/* if no accel info given, used default timer */
if(infoPtr->AccelCount==0 || infoPtr->AccelVect==0){
accelIndex = -1;
@ -644,7 +644,7 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
accelIndex = 0; /* otherwise, use it */
temp = infoPtr->AccelVect[accelIndex].nSec * 1000 + 1;
}
SetTimer32(hwnd, TIMERID2, temp, 0);
SetTimer(hwnd, TIMERID2, temp, 0);
}
/* now, if the mouse is above us, do the thing...*/
@ -653,11 +653,11 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
UPDOWN_DoAction(wndPtr, temp, infoPtr->Flags & FLAG_INCR);
if(accelIndex!=-1 && accelIndex < infoPtr->AccelCount-1){
KillTimer32(hwnd, TIMERID2);
KillTimer(hwnd, TIMERID2);
accelIndex++; /* move to the next accel info */
temp = infoPtr->AccelVect[accelIndex].nSec * 1000 + 1;
/* make sure we have at least 1ms intervals */
SetTimer32(hwnd, TIMERID2, temp, 0);
SetTimer(hwnd, TIMERID2, temp, 0);
}
}
break;
@ -671,14 +671,14 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
break;
/*If we released the mouse and our buddy is an edit */
/* we must select all text in it. */
if(WIDGETS_IsControl32(WIN_FindWndPtr(infoPtr->Buddy), BIC32_EDIT))
SendMessage32A(infoPtr->Buddy, EM_SETSEL32, 0, MAKELONG(0, -1));
if(WIDGETS_IsControl(WIN_FindWndPtr(infoPtr->Buddy), BIC32_EDIT))
SendMessageA(infoPtr->Buddy, EM_SETSEL, 0, MAKELONG(0, -1));
break;
case WM_LBUTTONDOWN:
case WM_MOUSEMOVE:
if(UPDOWN_IsEnabled(wndPtr)){
POINT32 pt;
POINT pt;
CONV_POINT16TO32( (POINT16 *)&lParam, &pt );
UPDOWN_HandleMouseEvent( wndPtr, message, pt );
}
@ -782,14 +782,14 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
UPDOWN_SetBuddyInt(wndPtr);
return wParam; /* return prev value */
case UDM_GETRANGE:
case UDM_GETRANGE16:
if (wParam || lParam)
UNKNOWN_PARAM(UDM_GETRANGE, wParam, lParam);
UNKNOWN_PARAM(UDM_GETRANGE16, wParam, lParam);
return MAKELONG(infoPtr->MaxVal, infoPtr->MinVal);
case UDM_SETRANGE:
case UDM_SETRANGE16:
if (wParam)
UNKNOWN_PARAM(UDM_SETRANGE, wParam, lParam); /* we must have: */
UNKNOWN_PARAM(UDM_SETRANGE16, wParam, lParam); /* we must have: */
infoPtr->MaxVal = SLOWORD(lParam); /* UD_MINVAL <= Max <= UD_MAXVAL */
infoPtr->MinVal = SHIWORD(lParam); /* UD_MINVAL <= Min <= UD_MAXVAL */
/* |Max-Min| <= UD_MAXVAL */
@ -797,16 +797,16 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
infoPtr->MinVal, infoPtr->MaxVal, hwnd);
break;
case UDM_GETRANGE32:
case UDM_GETRANGE:
if (wParam)
*(LPINT32)wParam = infoPtr->MinVal;
*(LPINT)wParam = infoPtr->MinVal;
if (lParam)
*(LPINT32)lParam = infoPtr->MaxVal;
*(LPINT)lParam = infoPtr->MaxVal;
break;
case UDM_SETRANGE32:
infoPtr->MinVal = (INT32)wParam;
infoPtr->MaxVal = (INT32)lParam;
case UDM_SETRANGE:
infoPtr->MinVal = (INT)wParam;
infoPtr->MaxVal = (INT)lParam;
if (infoPtr->MaxVal <= infoPtr->MinVal)
infoPtr->MaxVal = infoPtr->MinVal + 1;
TRACE(updown, "UpDown Ctrl new range(%d to %d), hwnd=%04x\n",
@ -817,7 +817,7 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
if (message >= WM_USER)
ERR (updown, "unknown msg %04x wp=%04x lp=%08lx\n",
message, wParam, lParam);
return DefWindowProc32A (hwnd, message, wParam, lParam);
return DefWindowProcA (hwnd, message, wParam, lParam);
}
return 0;
@ -833,20 +833,20 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
VOID
UPDOWN_Register(void)
{
WNDCLASS32A wndClass;
WNDCLASSA wndClass;
if( GlobalFindAtom32A( UPDOWN_CLASS32A ) ) return;
if( GlobalFindAtomA( UPDOWN_CLASSA ) ) return;
ZeroMemory( &wndClass, sizeof( WNDCLASS32A ) );
ZeroMemory( &wndClass, sizeof( WNDCLASSA ) );
wndClass.style = CS_GLOBALCLASS | CS_VREDRAW;
wndClass.lpfnWndProc = (WNDPROC32)UpDownWindowProc;
wndClass.lpfnWndProc = (WNDPROC)UpDownWindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(UPDOWN_INFO*);
wndClass.hCursor = LoadCursor32A( 0, IDC_ARROW32A );
wndClass.hbrBackground = (HBRUSH32)(COLOR_3DFACE + 1);
wndClass.lpszClassName = UPDOWN_CLASS32A;
wndClass.hCursor = LoadCursorA( 0, IDC_ARROWA );
wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
wndClass.lpszClassName = UPDOWN_CLASSA;
RegisterClass32A( &wndClass );
RegisterClassA( &wndClass );
}
@ -859,7 +859,7 @@ UPDOWN_Register(void)
VOID
UPDOWN_Unregister (VOID)
{
if (GlobalFindAtom32A (UPDOWN_CLASS32A))
UnregisterClass32A (UPDOWN_CLASS32A, (HINSTANCE32)NULL);
if (GlobalFindAtomA (UPDOWN_CLASSA))
UnregisterClassA (UPDOWN_CLASSA, (HINSTANCE)NULL);
}

View File

@ -16,10 +16,10 @@
* Data
*/
static PLOADED_IMAGE32 IMAGEHLP_pFirstLoadedImage32=NULL;
static PLOADED_IMAGE32 IMAGEHLP_pLastLoadedImage32=NULL;
static PLOADED_IMAGE IMAGEHLP_pFirstLoadedImage=NULL;
static PLOADED_IMAGE IMAGEHLP_pLastLoadedImage=NULL;
static LOADED_IMAGE32 IMAGEHLP_EmptyLoadedImage32 = {
static LOADED_IMAGE IMAGEHLP_EmptyLoadedImage = {
NULL, /* ModuleName */
0xffffffff, /* hFile */
NULL, /* MappedAddress */
@ -30,16 +30,16 @@ static LOADED_IMAGE32 IMAGEHLP_EmptyLoadedImage32 = {
1, /* Characteristics */
FALSE, /* fSystemImage */
FALSE, /* fDOSImage */
{ &IMAGEHLP_EmptyLoadedImage32.Links, &IMAGEHLP_EmptyLoadedImage32.Links }, /* Links */
{ &IMAGEHLP_EmptyLoadedImage.Links, &IMAGEHLP_EmptyLoadedImage.Links }, /* Links */
148, /* SizeOfImage; */
};
/***********************************************************************
* EnumerateLoadedModules32 (IMAGEHLP.4)
*/
BOOL32 WINAPI EnumerateLoadedModules32(
HANDLE32 hProcess,
PENUMLOADED_MODULES_CALLBACK32 EnumLoadedModulesCallback,
BOOL WINAPI EnumerateLoadedModules(
HANDLE hProcess,
PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,
PVOID UserContext)
{
FIXME(imagehlp, "(0x%08x, %p, %p): stub\n",
@ -52,7 +52,7 @@ BOOL32 WINAPI EnumerateLoadedModules32(
/***********************************************************************
* GetTimestampForLoadedLibrary32 (IMAGEHLP.9)
*/
DWORD WINAPI GetTimestampForLoadedLibrary32(HMODULE32 Module)
DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE Module)
{
FIXME(imagehlp, "(0x%08x): stub\n", Module);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -62,9 +62,9 @@ DWORD WINAPI GetTimestampForLoadedLibrary32(HMODULE32 Module)
/***********************************************************************
* GetImageConfigInformation32 (IMAGEHLP.7)
*/
BOOL32 WINAPI GetImageConfigInformation32(
PLOADED_IMAGE32 LoadedImage,
PIMAGE_LOAD_CONFIG_DIRECTORY32 ImageConfigInformation)
BOOL WINAPI GetImageConfigInformation(
PLOADED_IMAGE LoadedImage,
PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation)
{
FIXME(imagehlp, "(%p, %p): stub\n",
LoadedImage, ImageConfigInformation
@ -76,8 +76,8 @@ BOOL32 WINAPI GetImageConfigInformation32(
/***********************************************************************
* GetImageUnusedHeaderBytes32 (IMAGEHLP.8)
*/
DWORD WINAPI GetImageUnusedHeaderBytes32(
PLOADED_IMAGE32 LoadedImage,
DWORD WINAPI GetImageUnusedHeaderBytes(
PLOADED_IMAGE LoadedImage,
LPDWORD SizeUnusedHeaderBytes)
{
FIXME(imagehlp, "(%p, %p): stub\n",
@ -90,7 +90,7 @@ DWORD WINAPI GetImageUnusedHeaderBytes32(
/***********************************************************************
* ImageDirectoryEntryToData32 (IMAGEHLP.11)
*/
PVOID WINAPI ImageDirectoryEntryToData32(
PVOID WINAPI ImageDirectoryEntryToData(
PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size)
{
FIXME(imagehlp, "(%p, %d, %d, %p): stub\n",
@ -103,27 +103,27 @@ PVOID WINAPI ImageDirectoryEntryToData32(
/***********************************************************************
* ImageLoad32 (IMAGEHLP.16)
*/
PLOADED_IMAGE32 WINAPI ImageLoad32(LPSTR DllName, LPSTR DllPath)
PLOADED_IMAGE WINAPI ImageLoad(LPSTR DllName, LPSTR DllPath)
{
PLOADED_IMAGE32 pLoadedImage =
HeapAlloc(IMAGEHLP_hHeap32, 0, sizeof(LOADED_IMAGE32));
PLOADED_IMAGE pLoadedImage =
HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE));
return pLoadedImage;
}
/***********************************************************************
* ImageNtHeader32 (IMAGEHLP.17)
*/
PIMAGE_NT_HEADERS32 WINAPI ImageNtHeader32(PVOID Base)
PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID Base)
{
return (PIMAGE_NT_HEADERS32)
((LPBYTE) Base + ((PIMAGE_DOS_HEADER32) Base)->e_lfanew);
return (PIMAGE_NT_HEADERS)
((LPBYTE) Base + ((PIMAGE_DOS_HEADER) Base)->e_lfanew);
}
/***********************************************************************
* ImageRvaToSection32 (IMAGEHLP.19)
*/
PIMAGE_SECTION_HEADER32 WINAPI ImageRvaToSection32(
PIMAGE_NT_HEADERS32 NtHeaders, PVOID Base, ULONG Rva)
PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(
PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva)
{
FIXME(imagehlp, "(%p, %p, %ld): stub\n", NtHeaders, Base, Rva);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -133,9 +133,9 @@ PIMAGE_SECTION_HEADER32 WINAPI ImageRvaToSection32(
/***********************************************************************
* ImageRvaToVa32 (IMAGEHLP.20)
*/
PVOID WINAPI ImageRvaToVa32(
PIMAGE_NT_HEADERS32 NtHeaders, PVOID Base, ULONG Rva,
PIMAGE_SECTION_HEADER32 *LastRvaSection)
PVOID WINAPI ImageRvaToVa(
PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva,
PIMAGE_SECTION_HEADER *LastRvaSection)
{
FIXME(imagehlp, "(%p, %p, %ld, %p): stub\n",
NtHeaders, Base, Rva, LastRvaSection
@ -147,10 +147,10 @@ PVOID WINAPI ImageRvaToVa32(
/***********************************************************************
* ImageUnload32 (IMAGEHLP.21)
*/
BOOL32 WINAPI ImageUnload32(PLOADED_IMAGE32 pLoadedImage)
BOOL WINAPI ImageUnload(PLOADED_IMAGE pLoadedImage)
{
LIST_ENTRY32 *pCurrent, *pFind;
if(!IMAGEHLP_pFirstLoadedImage32 || !pLoadedImage)
LIST_ENTRY *pCurrent, *pFind;
if(!IMAGEHLP_pFirstLoadedImage || !pLoadedImage)
{
/* No image loaded or null pointer */
SetLastError(ERROR_INVALID_PARAMETER);
@ -158,7 +158,7 @@ BOOL32 WINAPI ImageUnload32(PLOADED_IMAGE32 pLoadedImage)
}
pFind=&pLoadedImage->Links;
pCurrent=&IMAGEHLP_pFirstLoadedImage32->Links;
pCurrent=&IMAGEHLP_pFirstLoadedImage->Links;
while((pCurrent != pFind) &&
(pCurrent != NULL))
pCurrent = pCurrent->Flink;
@ -172,14 +172,14 @@ BOOL32 WINAPI ImageUnload32(PLOADED_IMAGE32 pLoadedImage)
if(pCurrent->Blink)
pCurrent->Blink->Flink = pCurrent->Flink;
else
IMAGEHLP_pFirstLoadedImage32 = pCurrent->Flink?CONTAINING_RECORD(
pCurrent->Flink, LOADED_IMAGE32, Links):NULL;
IMAGEHLP_pFirstLoadedImage = pCurrent->Flink?CONTAINING_RECORD(
pCurrent->Flink, LOADED_IMAGE, Links):NULL;
if(pCurrent->Flink)
pCurrent->Flink->Blink = pCurrent->Blink;
else
IMAGEHLP_pLastLoadedImage32 = pCurrent->Blink?CONTAINING_RECORD(
pCurrent->Blink, LOADED_IMAGE32, Links):NULL;
IMAGEHLP_pLastLoadedImage = pCurrent->Blink?CONTAINING_RECORD(
pCurrent->Blink, LOADED_IMAGE, Links):NULL;
return FALSE;
}
@ -187,29 +187,29 @@ BOOL32 WINAPI ImageUnload32(PLOADED_IMAGE32 pLoadedImage)
/***********************************************************************
* MapAndLoad32 (IMAGEHLP.25)
*/
BOOL32 WINAPI MapAndLoad32(
LPSTR pszImageName, LPSTR pszDllPath, PLOADED_IMAGE32 pLoadedImage,
BOOL32 bDotDll, BOOL32 bReadOnly)
BOOL WINAPI MapAndLoad(
LPSTR pszImageName, LPSTR pszDllPath, PLOADED_IMAGE pLoadedImage,
BOOL bDotDll, BOOL bReadOnly)
{
CHAR szFileName[MAX_PATH];
HANDLE32 hFile = (HANDLE32) NULL;
HANDLE32 hFileMapping = (HANDLE32) NULL;
HMODULE32 hModule = (HMODULE32) NULL;
PIMAGE_NT_HEADERS32 pNtHeader = NULL;
HANDLE hFile = (HANDLE) NULL;
HANDLE hFileMapping = (HANDLE) NULL;
HMODULE hModule = (HMODULE) NULL;
PIMAGE_NT_HEADERS pNtHeader = NULL;
/* PathCombine(&szFileName, pszDllPath, pszImageName); */
/* PathRenameExtension(&szFileName, bDotDll?:"dll":"exe"); */
/* FIXME: Check if the file already loaded (use IMAGEHLP_pFirstLoadedImage32) */
if(!(hFile = CreateFile32A(
if(!(hFile = CreateFileA(
szFileName, GENERIC_READ, 1, /* FIXME: FILE_SHARE_READ not defined */
NULL, OPEN_EXISTING, 0, (HANDLE32) NULL)))
NULL, OPEN_EXISTING, 0, (HANDLE) NULL)))
{
SetLastError(ERROR_FILE_NOT_FOUND);
goto Error;
}
if(!(hFileMapping = CreateFileMapping32A(
if(!(hFileMapping = CreateFileMappingA(
hFile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL)))
{
DWORD dwLastError = GetLastError();
@ -218,9 +218,9 @@ BOOL32 WINAPI MapAndLoad32(
goto Error;
}
CloseHandle(hFile);
hFile = (HANDLE32) NULL;
hFile = (HANDLE) NULL;
if(!(hModule = (HMODULE32) MapViewOfFile(
if(!(hModule = (HMODULE) MapViewOfFile(
hFileMapping, FILE_MAP_READ, 0, 0, 0)))
{
DWORD dwLastError = GetLastError();
@ -230,20 +230,20 @@ BOOL32 WINAPI MapAndLoad32(
}
CloseHandle(hFileMapping);
hFileMapping=(HANDLE32) NULL;
hFileMapping=(HANDLE) NULL;
pLoadedImage = (PLOADED_IMAGE32) HeapAlloc(
IMAGEHLP_hHeap32, 0, sizeof(LOADED_IMAGE32)
pLoadedImage = (PLOADED_IMAGE) HeapAlloc(
IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE)
);
pNtHeader = ImageNtHeader32((PVOID) hModule);
pNtHeader = ImageNtHeader((PVOID) hModule);
pLoadedImage->ModuleName =
HEAP_strdupA(IMAGEHLP_hHeap32, 0, pszDllPath); /* FIXME: Correct? */
HEAP_strdupA(IMAGEHLP_hHeap, 0, pszDllPath); /* FIXME: Correct? */
pLoadedImage->hFile = hFile;
pLoadedImage->MappedAddress = (PUCHAR) hModule;
pLoadedImage->FileHeader = pNtHeader;
pLoadedImage->Sections = (PIMAGE_SECTION_HEADER32)
pLoadedImage->Sections = (PIMAGE_SECTION_HEADER)
((LPBYTE) &pNtHeader->OptionalHeader +
pNtHeader->FileHeader.SizeOfOptionalHeader);
pLoadedImage->NumberOfSections =
@ -259,12 +259,12 @@ BOOL32 WINAPI MapAndLoad32(
/* FIXME: Make thread safe */
pLoadedImage->Links.Flink = NULL;
pLoadedImage->Links.Blink = &IMAGEHLP_pLastLoadedImage32->Links;
if(IMAGEHLP_pLastLoadedImage32)
IMAGEHLP_pLastLoadedImage32->Links.Flink = &pLoadedImage->Links;
IMAGEHLP_pLastLoadedImage32 = pLoadedImage;
if(!IMAGEHLP_pFirstLoadedImage32)
IMAGEHLP_pFirstLoadedImage32 = pLoadedImage;
pLoadedImage->Links.Blink = &IMAGEHLP_pLastLoadedImage->Links;
if(IMAGEHLP_pLastLoadedImage)
IMAGEHLP_pLastLoadedImage->Links.Flink = &pLoadedImage->Links;
IMAGEHLP_pLastLoadedImage = pLoadedImage;
if(!IMAGEHLP_pFirstLoadedImage)
IMAGEHLP_pFirstLoadedImage = pLoadedImage;
return TRUE;
@ -281,9 +281,9 @@ Error:
/***********************************************************************
* SetImageConfigInformation32 (IMAGEHLP.34)
*/
BOOL32 WINAPI SetImageConfigInformation32(
PLOADED_IMAGE32 LoadedImage,
PIMAGE_LOAD_CONFIG_DIRECTORY32 ImageConfigInformation)
BOOL WINAPI SetImageConfigInformation(
PLOADED_IMAGE LoadedImage,
PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation)
{
FIXME(imagehlp, "(%p, %p): stub\n",
LoadedImage, ImageConfigInformation
@ -295,7 +295,7 @@ BOOL32 WINAPI SetImageConfigInformation32(
/***********************************************************************
* UnMapAndLoad32 (IMAGEHLP.58)
*/
BOOL32 WINAPI UnMapAndLoad32(PLOADED_IMAGE32 LoadedImage)
BOOL WINAPI UnMapAndLoad(PLOADED_IMAGE LoadedImage)
{
FIXME(imagehlp, "(%p): stub\n", LoadedImage);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View File

@ -13,7 +13,7 @@
/***********************************************************************
* FindDebugInfoFile32 (IMAGEHLP.5)
*/
HANDLE32 WINAPI FindDebugInfoFile32(
HANDLE WINAPI FindDebugInfoFile(
LPSTR FileName, LPSTR SymbolPath, LPSTR DebugFilePath)
{
FIXME(imagehlp, "(%s, %s, %s): stub\n",
@ -21,13 +21,13 @@ HANDLE32 WINAPI FindDebugInfoFile32(
debugstr_a(DebugFilePath)
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return (HANDLE32) NULL;
return (HANDLE) NULL;
}
/***********************************************************************
* FindExecutableImage32 (IMAGEHLP.6)
*/
HANDLE32 WINAPI FindExecutableImage32(
HANDLE WINAPI FindExecutableImage(
LPSTR FileName, LPSTR SymbolPath, LPSTR ImageFilePath)
{
FIXME(imagehlp, "(%s, %s, %s): stub\n",
@ -35,14 +35,14 @@ HANDLE32 WINAPI FindExecutableImage32(
debugstr_a(ImageFilePath)
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return (HANDLE32) NULL;
return (HANDLE) NULL;
}
/***********************************************************************
* MapDebugInformation32 (IMAGEHLP.26)
*/
PIMAGE_DEBUG_INFORMATION32 WINAPI MapDebugInformation32(
HANDLE32 FileHandle, LPSTR FileName,
PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(
HANDLE FileHandle, LPSTR FileName,
LPSTR SymbolPath, DWORD ImageBase)
{
FIXME(imagehlp, "(0x%08x, %s, %s, 0x%08lx): stub\n",
@ -55,13 +55,13 @@ PIMAGE_DEBUG_INFORMATION32 WINAPI MapDebugInformation32(
/***********************************************************************
* StackWalk32 (IMAGEHLP.36)
*/
BOOL32 WINAPI StackWalk32(
DWORD MachineType, HANDLE32 hProcess, HANDLE32 hThread,
PSTACKFRAME32 StackFrame, PVOID ContextRecord,
PREAD_PROCESS_MEMORY_ROUTINE32 ReadMemoryRoutine,
PFUNCTION_TABLE_ACCESS_ROUTINE32 FunctionTableAccessRoutine,
PGET_MODULE_BASE_ROUTINE32 GetModuleBaseRoutine,
PTRANSLATE_ADDRESS_ROUTINE32 TranslateAddress)
BOOL WINAPI StackWalk(
DWORD MachineType, HANDLE hProcess, HANDLE hThread,
PSTACKFRAME StackFrame, PVOID ContextRecord,
PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
PTRANSLATE_ADDRESS_ROUTINE TranslateAddress)
{
FIXME(imagehlp,
"(%ld, 0x%08x, 0x%08x, %p, %p, %p, %p, %p, %p): stub\n",
@ -76,7 +76,7 @@ BOOL32 WINAPI StackWalk32(
/***********************************************************************
* UnDecorateSymbolName32 (IMAGEHLP.57)
*/
DWORD WINAPI UnDecorateSymbolName32(
DWORD WINAPI UnDecorateSymbolName(
LPCSTR DecoratedName, LPSTR UnDecoratedName,
DWORD UndecoratedLength, DWORD Flags)
{
@ -92,8 +92,8 @@ DWORD WINAPI UnDecorateSymbolName32(
* UnmapDebugInformation32 (IMAGEHLP.59)
*/
BOOL32 WINAPI UnmapDebugInformation32(
PIMAGE_DEBUG_INFORMATION32 DebugInfo)
BOOL WINAPI UnmapDebugInformation(
PIMAGE_DEBUG_INFORMATION DebugInfo)
{
FIXME(imagehlp, "(%p): stub\n", DebugInfo);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View File

@ -12,24 +12,24 @@
/**********************************************************************/
HANDLE32 IMAGEHLP_hHeap32 = (HANDLE32) NULL;
HANDLE IMAGEHLP_hHeap = (HANDLE) NULL;
static API_VERSION32 IMAGEHLP_ApiVersion = { 4, 0, 0, 5 };
static API_VERSION IMAGEHLP_ApiVersion = { 4, 0, 0, 5 };
/***********************************************************************
* IMAGEHLP_LibMain (IMAGEHLP.init)
*/
BOOL32 WINAPI IMAGEHLP_LibMain(
HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
BOOL WINAPI IMAGEHLP_LibMain(
HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
IMAGEHLP_hHeap32 = HeapCreate(0, 0x10000, 0);
IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
break;
case DLL_PROCESS_DETACH:
HeapDestroy(IMAGEHLP_hHeap32);
IMAGEHLP_hHeap32 = (HANDLE32) NULL;
HeapDestroy(IMAGEHLP_hHeap);
IMAGEHLP_hHeap = (HANDLE) NULL;
break;
case DLL_THREAD_ATTACH:
break;
@ -44,7 +44,7 @@ BOOL32 WINAPI IMAGEHLP_LibMain(
/***********************************************************************
* ImagehlpApiVersion32 (IMAGEHLP.22)
*/
PAPI_VERSION32 WINAPI ImagehlpApiVersion32()
PAPI_VERSION WINAPI ImagehlpApiVersion()
{
return &IMAGEHLP_ApiVersion;
}
@ -52,7 +52,7 @@ PAPI_VERSION32 WINAPI ImagehlpApiVersion32()
/***********************************************************************
* ImagehlpApiVersionEx32 (IMAGEHLP.23)
*/
PAPI_VERSION32 WINAPI ImagehlpApiVersionEx32(PAPI_VERSION32 AppVersion)
PAPI_VERSION WINAPI ImagehlpApiVersionEx(PAPI_VERSION AppVersion)
{
if(!AppVersion)
return NULL;
@ -68,7 +68,7 @@ PAPI_VERSION32 WINAPI ImagehlpApiVersionEx32(PAPI_VERSION32 AppVersion)
/***********************************************************************
* MakeSureDirectoryPathExists32 (IMAGEHLP.24)
*/
BOOL32 WINAPI MakeSureDirectoryPathExists32(LPCSTR DirPath)
BOOL WINAPI MakeSureDirectoryPathExists(LPCSTR DirPath)
{
FIXME(imagehlp, "(%s): stub\n", debugstr_a(DirPath));
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -84,7 +84,7 @@ BOOL32 WINAPI MakeSureDirectoryPathExists32(LPCSTR DirPath)
/***********************************************************************
* SearchTreeForFile32 (IMAGEHLP.33)
*/
BOOL32 WINAPI SearchTreeForFile32(
BOOL WINAPI SearchTreeForFile(
LPSTR RootPath, LPSTR InputPathName, LPSTR OutputPathBuffer)
{
FIXME(imagehlp, "(%s, %s, %s): stub\n",
@ -98,8 +98,8 @@ BOOL32 WINAPI SearchTreeForFile32(
/***********************************************************************
* TouchFileTimes32 (IMAGEHLP.56)
*/
BOOL32 WINAPI TouchFileTimes32(
HANDLE32 FileHandle, LPSYSTEMTIME lpSystemTime)
BOOL WINAPI TouchFileTimes(
HANDLE FileHandle, LPSYSTEMTIME lpSystemTime)
{
FIXME(imagehlp, "(0x%08x, %p): stub\n",
FileHandle, lpSystemTime

View File

@ -14,8 +14,8 @@
* ImageAddCertificate32 (IMAGEHLP.10)
*/
BOOL32 WINAPI ImageAddCertificate32(
HANDLE32 FileHandle, PWIN_CERTIFICATE32 Certificate, PDWORD Index)
BOOL WINAPI ImageAddCertificate(
HANDLE FileHandle, PWIN_CERTIFICATE Certificate, PDWORD Index)
{
FIXME(imagehlp, "(0x%08x, %p, %p): stub\n",
FileHandle, Certificate, Index
@ -27,8 +27,8 @@ BOOL32 WINAPI ImageAddCertificate32(
/***********************************************************************
* ImageEnumerateCertificates32 (IMAGEHLP.12)
*/
BOOL32 WINAPI ImageEnumerateCertificates32(
HANDLE32 FileHandle, WORD TypeFilter, PDWORD CertificateCount,
BOOL WINAPI ImageEnumerateCertificates(
HANDLE FileHandle, WORD TypeFilter, PDWORD CertificateCount,
PDWORD Indices, DWORD IndexCount)
{
FIXME(imagehlp, "(0x%08x, %hd, %p, %p, %ld): stub\n",
@ -41,9 +41,9 @@ BOOL32 WINAPI ImageEnumerateCertificates32(
/***********************************************************************
* ImageGetCertificateData32 (IMAGEHLP.13)
*/
BOOL32 WINAPI ImageGetCertificateData32(
HANDLE32 FileHandle, DWORD CertificateIndex,
PWIN_CERTIFICATE32 Certificate, PDWORD RequiredLength)
BOOL WINAPI ImageGetCertificateData(
HANDLE FileHandle, DWORD CertificateIndex,
PWIN_CERTIFICATE Certificate, PDWORD RequiredLength)
{
FIXME(imagehlp, "(0x%08x, %ld, %p, %p): stub\n",
FileHandle, CertificateIndex, Certificate, RequiredLength
@ -55,9 +55,9 @@ BOOL32 WINAPI ImageGetCertificateData32(
/***********************************************************************
* ImageGetCertificateHeader32 (IMAGEHLP.14)
*/
BOOL32 WINAPI ImageGetCertificateHeader32(
HANDLE32 FileHandle, DWORD CertificateIndex,
PWIN_CERTIFICATE32 Certificateheader)
BOOL WINAPI ImageGetCertificateHeader(
HANDLE FileHandle, DWORD CertificateIndex,
PWIN_CERTIFICATE Certificateheader)
{
FIXME(imagehlp, "(0x%08x, %ld, %p): stub\n",
FileHandle, CertificateIndex, Certificateheader
@ -69,9 +69,9 @@ BOOL32 WINAPI ImageGetCertificateHeader32(
/***********************************************************************
* ImageGetDigestStream32 (IMAGEHLP.15)
*/
BOOL32 WINAPI ImageGetDigestStream32(
HANDLE32 FileHandle, DWORD DigestLevel,
DIGEST_FUNCTION32 DigestFunction, DIGEST_HANDLE32 DigestHandle)
BOOL WINAPI ImageGetDigestStream(
HANDLE FileHandle, DWORD DigestLevel,
DIGEST_FUNCTION DigestFunction, DIGEST_HANDLE DigestHandle)
{
FIXME(imagehlp, "(%0x08x, %ld, %p, %p): stub\n",
FileHandle, DigestLevel, DigestFunction, DigestHandle
@ -83,7 +83,7 @@ BOOL32 WINAPI ImageGetDigestStream32(
/***********************************************************************
* ImageRemoveCertificate32 (IMAGEHLP.18)
*/
BOOL32 WINAPI ImageRemoveCertificate32(HANDLE32 FileHandle, DWORD Index)
BOOL WINAPI ImageRemoveCertificate(HANDLE FileHandle, DWORD Index)
{
FIXME(imagehlp, "(0x%08x, %ld): stub\n", FileHandle, Index);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View File

@ -13,7 +13,7 @@
/***********************************************************************
* InitializeListHead32
*/
VOID InitializeListHead32(PLIST_ENTRY32 pListHead)
VOID InitializeListHead(PLIST_ENTRY pListHead)
{
pListHead->Flink = pListHead;
pListHead->Blink = pListHead;
@ -22,7 +22,7 @@ VOID InitializeListHead32(PLIST_ENTRY32 pListHead)
/***********************************************************************
* InsertHeadList32
*/
VOID InsertHeadList32(PLIST_ENTRY32 pListHead, PLIST_ENTRY32 pEntry)
VOID InsertHeadList(PLIST_ENTRY pListHead, PLIST_ENTRY pEntry)
{
pEntry->Blink = pListHead;
pEntry->Flink = pListHead->Flink;
@ -32,7 +32,7 @@ VOID InsertHeadList32(PLIST_ENTRY32 pListHead, PLIST_ENTRY32 pEntry)
/***********************************************************************
* InsertTailList32
*/
VOID InsertTailList32(PLIST_ENTRY32 pListHead, PLIST_ENTRY32 pEntry)
VOID InsertTailList(PLIST_ENTRY pListHead, PLIST_ENTRY pEntry)
{
pEntry->Flink = pListHead;
pEntry->Blink = pListHead->Blink;
@ -42,7 +42,7 @@ VOID InsertTailList32(PLIST_ENTRY32 pListHead, PLIST_ENTRY32 pEntry)
/***********************************************************************
* IsListEmpty32
*/
BOOLEAN IsListEmpty32(PLIST_ENTRY32 pListHead)
BOOLEAN IsListEmpty(PLIST_ENTRY pListHead)
{
return !pListHead;
}
@ -50,7 +50,7 @@ BOOLEAN IsListEmpty32(PLIST_ENTRY32 pListHead)
/***********************************************************************
* PopEntryList32
*/
PSINGLE_LIST_ENTRY32 PopEntryList32(PSINGLE_LIST_ENTRY32 pListHead)
PSINGLE_LIST_ENTRY PopEntryList(PSINGLE_LIST_ENTRY pListHead)
{
pListHead->Next = NULL;
return pListHead;
@ -59,8 +59,8 @@ PSINGLE_LIST_ENTRY32 PopEntryList32(PSINGLE_LIST_ENTRY32 pListHead)
/***********************************************************************
* PushEntryList32
*/
VOID PushEntryList32(
PSINGLE_LIST_ENTRY32 pListHead, PSINGLE_LIST_ENTRY32 pEntry)
VOID PushEntryList(
PSINGLE_LIST_ENTRY pListHead, PSINGLE_LIST_ENTRY pEntry)
{
pEntry->Next=pListHead;
}
@ -68,7 +68,7 @@ VOID PushEntryList32(
/***********************************************************************
* RemoveEntryList32
*/
VOID RemoveEntryList32(PLIST_ENTRY32 pEntry)
VOID RemoveEntryList(PLIST_ENTRY pEntry)
{
pEntry->Flink->Blink = pEntry->Blink;
pEntry->Blink->Flink = pEntry->Flink;
@ -79,13 +79,13 @@ VOID RemoveEntryList32(PLIST_ENTRY32 pEntry)
/***********************************************************************
* RemoveHeadList32
*/
PLIST_ENTRY32 RemoveHeadList32(PLIST_ENTRY32 pListHead)
PLIST_ENTRY RemoveHeadList(PLIST_ENTRY pListHead)
{
PLIST_ENTRY32 p = pListHead->Flink;
PLIST_ENTRY p = pListHead->Flink;
if(p != pListHead)
{
RemoveEntryList32(pListHead);
RemoveEntryList(pListHead);
return p;
}
else
@ -99,9 +99,9 @@ PLIST_ENTRY32 RemoveHeadList32(PLIST_ENTRY32 pListHead)
/***********************************************************************
* RemoveTailList32
*/
PLIST_ENTRY32 RemoveTailList32(PLIST_ENTRY32 pListHead)
PLIST_ENTRY RemoveTailList(PLIST_ENTRY pListHead)
{
RemoveHeadList32(pListHead->Blink);
RemoveHeadList(pListHead->Blink);
if(pListHead != pListHead->Blink)
return pListHead;
else

View File

@ -13,18 +13,18 @@
/***********************************************************************
* BindImage32 (IMAGEHLP.1)
*/
BOOL32 WINAPI BindImage32(
BOOL WINAPI BindImage(
LPSTR ImageName, LPSTR DllPath, LPSTR SymbolPath)
{
return BindImageEx32(0, ImageName, DllPath, SymbolPath, NULL);
return BindImageEx(0, ImageName, DllPath, SymbolPath, NULL);
}
/***********************************************************************
* BindImageEx32 (IMAGEHLP.2)
*/
BOOL32 WINAPI BindImageEx32(
BOOL WINAPI BindImageEx(
DWORD Flags, LPSTR ImageName, LPSTR DllPath, LPSTR SymbolPath,
PIMAGEHLP_STATUS_ROUTINE32 StatusRoutine)
PIMAGEHLP_STATUS_ROUTINE StatusRoutine)
{
FIXME(imagehlp, "(%ld, %s, %s, %s, %p): stub\n",
Flags, debugstr_a(ImageName), debugstr_a(DllPath),
@ -37,7 +37,7 @@ BOOL32 WINAPI BindImageEx32(
/***********************************************************************
* CheckSumMappedFile32 (IMAGEHLP.3)
*/
PIMAGE_NT_HEADERS32 WINAPI CheckSumMappedFile32(
PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
LPVOID BaseAddress, DWORD FileLength,
LPDWORD HeaderSum, LPDWORD CheckSum)
{
@ -51,7 +51,7 @@ PIMAGE_NT_HEADERS32 WINAPI CheckSumMappedFile32(
/***********************************************************************
* MapFileAndCheckSum32A (IMAGEHLP.27)
*/
DWORD WINAPI MapFileAndCheckSum32A(
DWORD WINAPI MapFileAndCheckSumA(
LPSTR Filename, LPDWORD HeaderSum, LPDWORD CheckSum)
{
FIXME(imagehlp, "(%s, %p, %p): stub\n",
@ -64,7 +64,7 @@ DWORD WINAPI MapFileAndCheckSum32A(
/***********************************************************************
* MapFileAndCheckSum32W (IMAGEHLP.28)
*/
DWORD WINAPI MapFileAndCheckSum32W(
DWORD WINAPI MapFileAndCheckSumW(
LPWSTR Filename, LPDWORD HeaderSum, LPDWORD CheckSum)
{
FIXME(imagehlp, "(%s, %p, %p): stub\n",
@ -77,9 +77,9 @@ DWORD WINAPI MapFileAndCheckSum32W(
/***********************************************************************
* ReBaseImage32 (IMAGEHLP.30)
*/
BOOL32 WINAPI ReBaseImage32(
LPSTR CurrentImageName, LPSTR SymbolPath, BOOL32 fReBase,
BOOL32 fRebaseSysfileOk, BOOL32 fGoingDown, ULONG CheckImageSize,
BOOL WINAPI ReBaseImage(
LPSTR CurrentImageName, LPSTR SymbolPath, BOOL fReBase,
BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
ULONG *OldImageSize, ULONG *OldImageBase, ULONG *NewImageSize,
ULONG *NewImageBase, ULONG TimeStamp)
{
@ -96,7 +96,7 @@ BOOL32 WINAPI ReBaseImage32(
/***********************************************************************
* RemovePrivateCvSymbolic32 (IMAGEHLP.31)
*/
BOOL32 WINAPI RemovePrivateCvSymbolic32(
BOOL WINAPI RemovePrivateCvSymbolic(
PCHAR DebugData, PCHAR *NewDebugData, ULONG *NewDebugSize)
{
FIXME(imagehlp, "(%p, %p, %p): stub\n",
@ -109,7 +109,7 @@ BOOL32 WINAPI RemovePrivateCvSymbolic32(
/***********************************************************************
* RemoveRelocations32 (IMAGEHLP.32)
*/
VOID WINAPI RemoveRelocations32(PCHAR ImageName)
VOID WINAPI RemoveRelocations(PCHAR ImageName)
{
FIXME(imagehlp, "(%p): stub\n", ImageName);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -118,7 +118,7 @@ VOID WINAPI RemoveRelocations32(PCHAR ImageName)
/***********************************************************************
* SplitSymbols32 (IMAGEHLP.35)
*/
BOOL32 WINAPI SplitSymbols32(
BOOL WINAPI SplitSymbols(
LPSTR ImageName, LPSTR SymbolsPath,
LPSTR SymbolFilePath, DWORD Flags)
{
@ -133,9 +133,9 @@ BOOL32 WINAPI SplitSymbols32(
/***********************************************************************
* UpdateDebugInfoFile32 (IMAGEHLP.60)
*/
BOOL32 WINAPI UpdateDebugInfoFile32(
BOOL WINAPI UpdateDebugInfoFile(
LPSTR ImageFileName, LPSTR SymbolPath,
LPSTR DebugFilePath, PIMAGE_NT_HEADERS32 NtHeaders)
LPSTR DebugFilePath, PIMAGE_NT_HEADERS NtHeaders)
{
FIXME(imagehlp, "(%s, %s, %s, %p): stub\n",
debugstr_a(ImageFileName), debugstr_a(SymbolPath),
@ -150,9 +150,9 @@ BOOL32 WINAPI UpdateDebugInfoFile32(
* FIXME
* Function has no ordinal.
*/
BOOL32 WINAPI UpdateDebugInfoFileEx32(
BOOL WINAPI UpdateDebugInfoFileEx(
LPSTR ImageFileName, LPSTR SymbolPath, LPSTR DebugFilePath,
PIMAGE_NT_HEADERS32 NtHeaders, DWORD OldChecksum)
PIMAGE_NT_HEADERS NtHeaders, DWORD OldChecksum)
{
FIXME(imagehlp, "(%s, %s, %s, %p, %ld): stub\n",
debugstr_a(ImageFileName), debugstr_a(SymbolPath),

View File

@ -13,7 +13,7 @@
/***********************************************************************
* SymCleanup32 (IMAGEHLP.37)
*/
BOOL32 WINAPI SymCleanup32(HANDLE32 hProcess)
BOOL WINAPI SymCleanup(HANDLE hProcess)
{
FIXME(imagehlp, "(0x%08x): stub\n", hProcess);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -24,8 +24,8 @@ BOOL32 WINAPI SymCleanup32(HANDLE32 hProcess)
* SymEnumerateModules32 (IMAGEHLP.38)
*/
BOOL32 WINAPI SymEnumerateModules32(
HANDLE32 hProcess, PSYM_ENUMMODULES_CALLBACK32 EnumModulesCallback,
BOOL WINAPI SymEnumerateModules(
HANDLE hProcess, PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,
PVOID UserContext)
{
FIXME(imagehlp, "(0x%08x, %p, %p): stub\n",
@ -38,9 +38,9 @@ BOOL32 WINAPI SymEnumerateModules32(
/***********************************************************************
* SymEnumerateSymbols32 (IMAGEHLP.39)
*/
BOOL32 WINAPI SymEnumerateSymbols32(
HANDLE32 hProcess, DWORD BaseOfDll,
PSYM_ENUMSYMBOLS_CALLBACK32 EnumSymbolsCallback, PVOID UserContext)
BOOL WINAPI SymEnumerateSymbols(
HANDLE hProcess, DWORD BaseOfDll,
PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext)
{
FIXME(imagehlp, "(0x%08x, %p, %p): stub\n",
hProcess, EnumSymbolsCallback, UserContext
@ -52,7 +52,7 @@ BOOL32 WINAPI SymEnumerateSymbols32(
/***********************************************************************
* SymFunctionTableAccess32 (IMAGEHLP.40)
*/
PVOID WINAPI SymFunctionTableAccess32(HANDLE32 hProcess, DWORD AddrBase)
PVOID WINAPI SymFunctionTableAccess(HANDLE hProcess, DWORD AddrBase)
{
FIXME(imagehlp, "(0x%08x, 0x%08lx): stub\n", hProcess, AddrBase);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -62,7 +62,7 @@ PVOID WINAPI SymFunctionTableAccess32(HANDLE32 hProcess, DWORD AddrBase)
/***********************************************************************
* SymGetModuleBase32 (IMAGEHLP.41)
*/
DWORD WINAPI SymGetModuleBase32(HANDLE32 hProcess, DWORD dwAddr)
DWORD WINAPI SymGetModuleBase(HANDLE hProcess, DWORD dwAddr)
{
FIXME(imagehlp, "(0x%08x, 0x%08lx): stub\n", hProcess, dwAddr);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -72,9 +72,9 @@ DWORD WINAPI SymGetModuleBase32(HANDLE32 hProcess, DWORD dwAddr)
/***********************************************************************
* SymGetModuleInfo32 (IMAGEHLP.42)
*/
BOOL32 WINAPI SymGetModuleInfo32(
HANDLE32 hProcess, DWORD dwAddr,
PIMAGEHLP_MODULE32 ModuleInfo)
BOOL WINAPI SymGetModuleInfo(
HANDLE hProcess, DWORD dwAddr,
PIMAGEHLP_MODULE ModuleInfo)
{
FIXME(imagehlp, "(0x%08x, 0x%08lx, %p): stub\n",
hProcess, dwAddr, ModuleInfo
@ -86,7 +86,7 @@ BOOL32 WINAPI SymGetModuleInfo32(
/***********************************************************************
* SymGetOptions32 (IMAGEHLP.43)
*/
DWORD WINAPI SymGetOptions32()
DWORD WINAPI SymGetOptions()
{
FIXME(imagehlp, "(): stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -96,8 +96,8 @@ DWORD WINAPI SymGetOptions32()
/***********************************************************************
* SymGetSearchPath32 (IMAGEHLP.44)
*/
BOOL32 WINAPI SymGetSearchPath32(
HANDLE32 hProcess, LPSTR szSearchPath, DWORD SearchPathLength)
BOOL WINAPI SymGetSearchPath(
HANDLE hProcess, LPSTR szSearchPath, DWORD SearchPathLength)
{
FIXME(imagehlp, "(0x%08x, %s, %ld): stub\n",
hProcess, debugstr_an(szSearchPath,SearchPathLength), SearchPathLength
@ -109,9 +109,9 @@ BOOL32 WINAPI SymGetSearchPath32(
/***********************************************************************
* SymGetSymFromAddr32 (IMAGEHLP.45)
*/
BOOL32 WINAPI SymGetSymFromAddr32(
HANDLE32 hProcess, DWORD dwAddr,
PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL32 Symbol)
BOOL WINAPI SymGetSymFromAddr(
HANDLE hProcess, DWORD dwAddr,
PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL Symbol)
{
FIXME(imagehlp, "(0x%08x, 0x%08lx, %p, %p): stub\n",
hProcess, dwAddr, pdwDisplacement, Symbol
@ -123,8 +123,8 @@ BOOL32 WINAPI SymGetSymFromAddr32(
/***********************************************************************
* SymGetSymFromName32 (IMAGEHLP.46)
*/
BOOL32 WINAPI SymGetSymFromName32(
HANDLE32 hProcess, LPSTR Name, PIMAGEHLP_SYMBOL32 Symbol)
BOOL WINAPI SymGetSymFromName(
HANDLE hProcess, LPSTR Name, PIMAGEHLP_SYMBOL Symbol)
{
FIXME(imagehlp, "(0x%08x, %s, %p): stub\n", hProcess, Name, Symbol);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -134,8 +134,8 @@ BOOL32 WINAPI SymGetSymFromName32(
/***********************************************************************
* SymGetSymNext32 (IMAGEHLP.47)
*/
BOOL32 WINAPI SymGetSymNext32(
HANDLE32 hProcess, PIMAGEHLP_SYMBOL32 Symbol)
BOOL WINAPI SymGetSymNext(
HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol)
{
FIXME(imagehlp, "(0x%08x, %p): stub\n", hProcess, Symbol);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -146,8 +146,8 @@ BOOL32 WINAPI SymGetSymNext32(
* SymGetSymPrev32 (IMAGEHLP.48)
*/
BOOL32 WINAPI SymGetSymPrev32(
HANDLE32 hProcess, PIMAGEHLP_SYMBOL32 Symbol)
BOOL WINAPI SymGetSymPrev(
HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol)
{
FIXME(imagehlp, "(0x%08x, %p): stub\n", hProcess, Symbol);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -157,8 +157,8 @@ BOOL32 WINAPI SymGetSymPrev32(
/***********************************************************************
* SymInitialize32 (IMAGEHLP.49)
*/
BOOL32 WINAPI SymInitialize32(
HANDLE32 hProcess, LPSTR UserSearchPath, BOOL32 fInvadeProcess)
BOOL WINAPI SymInitialize(
HANDLE hProcess, LPSTR UserSearchPath, BOOL fInvadeProcess)
{
FIXME(imagehlp, "(0x%08x, %s, %d): stub\n",
hProcess, debugstr_a(UserSearchPath), fInvadeProcess
@ -171,8 +171,8 @@ BOOL32 WINAPI SymInitialize32(
* SymLoadModule32 (IMAGEHLP.50)
*/
BOOL32 WINAPI SymLoadModule32(
HANDLE32 hProcess, HANDLE32 hFile, LPSTR ImageName, LPSTR ModuleName,
BOOL WINAPI SymLoadModule(
HANDLE hProcess, HANDLE hFile, LPSTR ImageName, LPSTR ModuleName,
DWORD BaseOfDll, DWORD SizeOfDll)
{
FIXME(imagehlp, "(0x%08x, 0x%08x, %s, %s, %ld, %ld): stub\n",
@ -186,8 +186,8 @@ BOOL32 WINAPI SymLoadModule32(
/***********************************************************************
* SymRegisterCallback32 (IMAGEHLP.51)
*/
BOOL32 WINAPI SymRegisterCallback32(
HANDLE32 hProcess, PSYMBOL_REGISTERED_CALLBACK32 CallbackFunction,
BOOL WINAPI SymRegisterCallback(
HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
PVOID UserContext)
{
FIXME(imagehlp, "(0x%08x, %p, %p): stub\n",
@ -200,7 +200,7 @@ BOOL32 WINAPI SymRegisterCallback32(
/***********************************************************************
* SymSetOptions32 (IMAGEHLP.52)
*/
DWORD WINAPI SymSetOptions32(DWORD SymOptions)
DWORD WINAPI SymSetOptions(DWORD SymOptions)
{
FIXME(imagehlp, "(%lx): stub\n", SymOptions);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -210,7 +210,7 @@ DWORD WINAPI SymSetOptions32(DWORD SymOptions)
/***********************************************************************
* SymSetSearchPath32 (IMAGEHLP.53)
*/
BOOL32 WINAPI SymSetSearchPath32(HANDLE32 hProcess, LPSTR szSearchPath)
BOOL WINAPI SymSetSearchPath(HANDLE hProcess, LPSTR szSearchPath)
{
FIXME(imagehlp, "(0x%08x, %s): stub\n",
hProcess, debugstr_a(szSearchPath)
@ -222,8 +222,8 @@ BOOL32 WINAPI SymSetSearchPath32(HANDLE32 hProcess, LPSTR szSearchPath)
/***********************************************************************
* SymUnDName32 (IMAGEHLP.54)
*/
BOOL32 WINAPI SymUnDName32(
PIMAGEHLP_SYMBOL32 sym, LPSTR UnDecName, DWORD UnDecNameLength)
BOOL WINAPI SymUnDName(
PIMAGEHLP_SYMBOL sym, LPSTR UnDecName, DWORD UnDecNameLength)
{
FIXME(imagehlp, "(%p, %s, %ld): stub\n",
sym, UnDecName, UnDecNameLength
@ -235,8 +235,8 @@ BOOL32 WINAPI SymUnDName32(
/***********************************************************************
* SymUnloadModule32 (IMAGEHLP.55)
*/
BOOL32 WINAPI SymUnloadModule32(
HANDLE32 hProcess, DWORD BaseOfDll)
BOOL WINAPI SymUnloadModule(
HANDLE hProcess, DWORD BaseOfDll)
{
FIXME(imagehlp, "(0x%08x, 0x%08lx): stub\n", hProcess, BaseOfDll);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View File

@ -18,10 +18,10 @@
* MSACM_BuiltinDrivers
*/
LONG WINAPI MSACM_DummyDriverProc(
DWORD dwDriverId, HDRVR32 hdrvr, UINT32 msg,
DWORD dwDriverId, HDRVR hdrvr, UINT msg,
LONG lParam1, LONG lParam2);
WINE_ACMBUILTINDRIVER32 MSACM_BuiltinDrivers32[] = {
WINE_ACMBUILTINDRIVER MSACM_BuiltinDrivers[] = {
{ "MSACM.dummy", &MSACM_DummyDriverProc },
{ NULL, NULL }
};
@ -30,7 +30,7 @@ WINE_ACMBUILTINDRIVER32 MSACM_BuiltinDrivers32[] = {
* MSACM_DummyDriverProc
*/
LONG WINAPI MSACM_DummyDriverProc(
DWORD dwDriverId, HDRVR32 hdrvr, UINT32 msg,
DWORD dwDriverId, HDRVR hdrvr, UINT msg,
LONG lParam1, LONG lParam2)
{
switch(msg)
@ -68,7 +68,7 @@ LONG WINAPI MSACM_DummyDriverProc(
default:
/* FIXME: DefDriverProc not implemented */
#if 0
DefDriverProc32(dwDriverId, hdrvr, msg, lParam1, lParam2);
DefDriverProc(dwDriverId, hdrvr, msg, lParam1, lParam2);
#endif
break;
}

View File

@ -19,11 +19,11 @@
/***********************************************************************
* acmDriverAddA (MSACM32.2)
*/
MMRESULT32 WINAPI acmDriverAdd32A(
PHACMDRIVERID32 phadid, HINSTANCE32 hinstModule,
MMRESULT WINAPI acmDriverAddA(
PHACMDRIVERID phadid, HINSTANCE hinstModule,
LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
{
PWINE_ACMLOCALDRIVER32 pld;
PWINE_ACMLOCALDRIVER pld;
if(!phadid)
return MMSYSERR_INVALPARAM;
@ -38,10 +38,10 @@ MMRESULT32 WINAPI acmDriverAdd32A(
(fdwAdd & ACM_DRIVERADDF_NOTIFYHWND))
return MMSYSERR_INVALFLAG;
pld = HeapAlloc(MSACM_hHeap32, 0, sizeof(WINE_ACMLOCALDRIVER32));
pld->pfnDriverProc = (DRIVERPROC32)
GetProcAddress32(hinstModule, "DriverProc");
*phadid = (HACMDRIVERID32) MSACM_RegisterDriver32(NULL, NULL, pld);
pld = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMLOCALDRIVER));
pld->pfnDriverProc = (DRIVERPROC)
GetProcAddress(hinstModule, "DriverProc");
*phadid = (HACMDRIVERID) MSACM_RegisterDriver(NULL, NULL, pld);
/* FIXME: lParam, dwPriority and fdwAdd ignored */
@ -53,8 +53,8 @@ MMRESULT32 WINAPI acmDriverAdd32A(
* FIXME
* Not implemented
*/
MMRESULT32 WINAPI acmDriverAdd32W(
PHACMDRIVERID32 phadid, HINSTANCE32 hinstModule,
MMRESULT WINAPI acmDriverAddW(
PHACMDRIVERID phadid, HINSTANCE hinstModule,
LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
{
FIXME(msacm, "(%p, 0x%08x, %ld, %ld, %ld): stub\n",
@ -67,15 +67,15 @@ MMRESULT32 WINAPI acmDriverAdd32W(
/***********************************************************************
* acmDriverClose (MSACM32.4)
*/
MMRESULT32 WINAPI acmDriverClose32(
HACMDRIVER32 had, DWORD fdwClose)
MMRESULT WINAPI acmDriverClose(
HACMDRIVER had, DWORD fdwClose)
{
PWINE_ACMDRIVER32 p;
PWINE_ACMDRIVER p;
if(fdwClose)
return MMSYSERR_INVALFLAG;
p = MSACM_GetDriver32(had);
p = MSACM_GetDriver(had);
if(!p)
return MMSYSERR_INVALHANDLE;
@ -84,10 +84,10 @@ MMRESULT32 WINAPI acmDriverClose32(
/* FIXME: CloseDriver32 not implemented */
#if 0
if(p->hDrvr)
CloseDriver32(p->hDrvr, 0, 0);
CloseDriver(p->hDrvr, 0, 0);
#endif
HeapFree(MSACM_hHeap32, 0, p);
HeapFree(MSACM_hHeap, 0, p);
return MMSYSERR_NOERROR;
}
@ -95,14 +95,14 @@ MMRESULT32 WINAPI acmDriverClose32(
/***********************************************************************
* acmDriverDetailsA (MSACM32.5)
*/
MMRESULT32 WINAPI acmDriverDetails32A(
HACMDRIVERID32 hadid, PACMDRIVERDETAILS32A padd, DWORD fdwDetails)
MMRESULT WINAPI acmDriverDetailsA(
HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, DWORD fdwDetails)
{
PWINE_ACMDRIVERID32 p;
MMRESULT32 mmr;
BOOL32 bOpenTemporary;
PWINE_ACMDRIVERID p;
MMRESULT mmr;
BOOL bOpenTemporary;
p = MSACM_GetDriverID32(hadid);
p = MSACM_GetDriverID(hadid);
if(!p)
return MMSYSERR_INVALHANDLE;
@ -112,7 +112,7 @@ MMRESULT32 WINAPI acmDriverDetails32A(
bOpenTemporary = !p->pACMDriver;
if(bOpenTemporary) {
bOpenTemporary = TRUE;
acmDriverOpen32((PHACMDRIVER32) &p->pACMDriver, hadid, 0);
acmDriverOpen((PHACMDRIVER) &p->pACMDriver, hadid, 0);
}
/* FIXME
@ -120,13 +120,13 @@ MMRESULT32 WINAPI acmDriverDetails32A(
* the UNICODE variant of PACMDRIVERDETAILS is used?
* It might check cbStruct or does it only accept ANSI.
*/
mmr = (MMRESULT32) acmDriverMessage32(
(HACMDRIVER32) p->pACMDriver, ACMDM_DRIVER_DETAILS,
mmr = (MMRESULT) acmDriverMessage(
(HACMDRIVER) p->pACMDriver, ACMDM_DRIVER_DETAILS,
(LPARAM) padd, 0
);
if(bOpenTemporary) {
acmDriverClose32((HACMDRIVER32) p->pACMDriver, 0);
acmDriverClose((HACMDRIVER) p->pACMDriver, 0);
p->pACMDriver = NULL;
}
@ -138,8 +138,8 @@ MMRESULT32 WINAPI acmDriverDetails32A(
* FIXME
* Not implemented
*/
MMRESULT32 WINAPI acmDriverDetails32W(
HACMDRIVERID32 hadid, PACMDRIVERDETAILS32W padd, DWORD fdwDetails)
MMRESULT WINAPI acmDriverDetailsW(
HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails)
{
FIXME(msacm, "(0x%08x, %p, %ld): stub\n", hadid, padd, fdwDetails);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -149,10 +149,10 @@ MMRESULT32 WINAPI acmDriverDetails32W(
/***********************************************************************
* acmDriverEnum (MSACM32.7)
*/
MMRESULT32 WINAPI acmDriverEnum32(
ACMDRIVERENUMCB32 fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmDriverEnum(
ACMDRIVERENUMCB fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
PWINE_ACMDRIVERID32 p;
PWINE_ACMDRIVERID p;
if(!fnCallback)
{
@ -164,10 +164,10 @@ MMRESULT32 WINAPI acmDriverEnum32(
return MMSYSERR_INVALFLAG;
}
p = MSACM_pFirstACMDriverID32;
p = MSACM_pFirstACMDriverID;
while(p)
{
(*fnCallback)((HACMDRIVERID32) p, dwInstance, ACMDRIVERDETAILS_SUPPORTF_CODEC);
(*fnCallback)((HACMDRIVERID) p, dwInstance, ACMDRIVERDETAILS_SUPPORTF_CODEC);
p = p->pNextACMDriverID;
}
@ -177,12 +177,12 @@ MMRESULT32 WINAPI acmDriverEnum32(
/***********************************************************************
* acmDriverID (MSACM32.8)
*/
MMRESULT32 WINAPI acmDriverID32(
HACMOBJ32 hao, PHACMDRIVERID32 phadid, DWORD fdwDriverID)
MMRESULT WINAPI acmDriverID(
HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
{
PWINE_ACMOBJ32 pao;
PWINE_ACMOBJ pao;
pao = MSACM_GetObj32(hao);
pao = MSACM_GetObj(hao);
if(!pao)
return MMSYSERR_INVALHANDLE;
@ -192,7 +192,7 @@ MMRESULT32 WINAPI acmDriverID32(
if(fdwDriverID)
return MMSYSERR_INVALFLAG;
*phadid = (HACMDRIVERID32) pao->pACMDriverID;
*phadid = (HACMDRIVERID) pao->pACMDriverID;
return MMSYSERR_NOERROR;
}
@ -202,16 +202,16 @@ MMRESULT32 WINAPI acmDriverID32(
* FIXME
* Not implemented
*/
LRESULT WINAPI acmDriverMessage32(
HACMDRIVER32 had, UINT32 uMsg, LPARAM lParam1, LPARAM lParam2)
LRESULT WINAPI acmDriverMessage(
HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
{
PWINE_ACMDRIVER32 pad = MSACM_GetDriver32(had);
PWINE_ACMDRIVER pad = MSACM_GetDriver(had);
if(!pad)
return MMSYSERR_INVALPARAM;
/* FIXME: Check if uMsg legal */
if(!SendDriverMessage32(pad->hDrvr, uMsg, lParam1, lParam2))
if(!SendDriverMessage(pad->hDrvr, uMsg, lParam1, lParam2))
return MMSYSERR_NOTSUPPORTED;
return MMSYSERR_NOERROR;
@ -221,15 +221,15 @@ LRESULT WINAPI acmDriverMessage32(
/***********************************************************************
* acmDriverOpen (MSACM32.10)
*/
MMRESULT32 WINAPI acmDriverOpen32(
PHACMDRIVER32 phad, HACMDRIVERID32 hadid, DWORD fdwOpen)
MMRESULT WINAPI acmDriverOpen(
PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
{
PWINE_ACMDRIVERID32 padid;
PWINE_ACMDRIVERID padid;
if(!phad)
return MMSYSERR_INVALPARAM;
padid = MSACM_GetDriverID32(hadid);
padid = MSACM_GetDriverID(hadid);
if(!padid)
return MMSYSERR_INVALHANDLE;
@ -244,16 +244,16 @@ MMRESULT32 WINAPI acmDriverOpen32(
}
padid->pACMDriver = HeapAlloc(
MSACM_hHeap32, 0, sizeof(WINE_ACMDRIVER32)
MSACM_hHeap, 0, sizeof(WINE_ACMDRIVER)
);
padid->pACMDriver->obj.pACMDriverID = padid;
if(!padid->pACMLocalDriver)
padid->pACMDriver->hDrvr =
OpenDriver32A(padid->pszDriverAlias, "drivers32", 0);
OpenDriverA(padid->pszDriverAlias, "drivers32", 0);
else
{
padid->pACMDriver->hDrvr = MSACM_OpenDriverProc32(
padid->pACMDriver->hDrvr = MSACM_OpenDriverProc(
padid->pACMLocalDriver->pfnDriverProc
);
}
@ -262,7 +262,7 @@ MMRESULT32 WINAPI acmDriverOpen32(
return MMSYSERR_ERROR;
/* FIXME: Create a WINE_ACMDRIVER32 */
*phad = (HACMDRIVER32) NULL;
*phad = (HACMDRIVER) NULL;
return MMSYSERR_ERROR;
}
@ -270,10 +270,10 @@ MMRESULT32 WINAPI acmDriverOpen32(
/***********************************************************************
* acmDriverPriority (MSACM32.11)
*/
MMRESULT32 WINAPI acmDriverPriority32(
HACMDRIVERID32 hadid, DWORD dwPriority, DWORD fdwPriority)
MMRESULT WINAPI acmDriverPriority(
HACMDRIVERID hadid, DWORD dwPriority, DWORD fdwPriority)
{
PWINE_ACMDRIVERID32 padid;
PWINE_ACMDRIVERID padid;
CHAR szSubKey[17];
CHAR szBuffer[256];
LONG lBufferLength = sizeof(szBuffer);
@ -281,7 +281,7 @@ MMRESULT32 WINAPI acmDriverPriority32(
HKEY hPriorityKey;
DWORD dwPriorityCounter;
padid = MSACM_GetDriverID32(hadid);
padid = MSACM_GetDriverID(hadid);
if(!padid)
return MMSYSERR_INVALHANDLE;
@ -301,7 +301,7 @@ MMRESULT32 WINAPI acmDriverPriority32(
(fdwPriority & ACM_DRIVERPRIORITYF_END))
return MMSYSERR_INVALFLAG;
lError = RegOpenKey32A(HKEY_CURRENT_USER,
lError = RegOpenKeyA(HKEY_CURRENT_USER,
"Software\\Microsoft\\Multimedia\\"
"Audio Compression Manager\\Priority v4.00",
&hPriorityKey
@ -312,8 +312,8 @@ MMRESULT32 WINAPI acmDriverPriority32(
for(dwPriorityCounter = 1; ; dwPriorityCounter++)
{
wsnprintf32A(szSubKey, 17, "Priorty%ld", dwPriorityCounter);
lError = RegQueryValue32A(hPriorityKey, szSubKey, szBuffer, &lBufferLength);
wsnprintfA(szSubKey, 17, "Priorty%ld", dwPriorityCounter);
lError = RegQueryValueA(hPriorityKey, szSubKey, szBuffer, &lBufferLength);
if(lError != ERROR_SUCCESS)
break;
@ -331,19 +331,19 @@ MMRESULT32 WINAPI acmDriverPriority32(
/***********************************************************************
* acmDriverRemove (MSACM32.12)
*/
MMRESULT32 WINAPI acmDriverRemove32(
HACMDRIVERID32 hadid, DWORD fdwRemove)
MMRESULT WINAPI acmDriverRemove(
HACMDRIVERID hadid, DWORD fdwRemove)
{
PWINE_ACMDRIVERID32 padid;
PWINE_ACMDRIVERID padid;
padid = MSACM_GetDriverID32(hadid);
padid = MSACM_GetDriverID(hadid);
if(!padid)
return MMSYSERR_INVALHANDLE;
if(fdwRemove)
return MMSYSERR_INVALFLAG;
MSACM_UnregisterDriver32(padid);
MSACM_UnregisterDriver(padid);
return MMSYSERR_NOERROR;
}

View File

@ -14,8 +14,8 @@
/***********************************************************************
* acmFilterChooseA (MSACM32.13)
*/
MMRESULT32 WINAPI acmFilterChoose32A(
PACMFILTERCHOOSE32A pafltrc)
MMRESULT WINAPI acmFilterChooseA(
PACMFILTERCHOOSEA pafltrc)
{
FIXME(msacm, "(%p): stub\n", pafltrc);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -25,8 +25,8 @@ MMRESULT32 WINAPI acmFilterChoose32A(
/***********************************************************************
* acmFilterChooseW (MSACM32.14)
*/
MMRESULT32 WINAPI acmFilterChoose32W(
PACMFILTERCHOOSE32W pafltrc)
MMRESULT WINAPI acmFilterChooseW(
PACMFILTERCHOOSEW pafltrc)
{
FIXME(msacm, "(%p): stub\n", pafltrc);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -36,8 +36,8 @@ MMRESULT32 WINAPI acmFilterChoose32W(
/***********************************************************************
* acmFilterDetailsA (MSACM32.15)
*/
MMRESULT32 WINAPI acmFilterDetails32A(
HACMDRIVER32 had, PACMFILTERDETAILS32A pafd, DWORD fdwDetails)
MMRESULT WINAPI acmFilterDetailsA(
HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails)
{
if(fdwDetails & ~(ACM_FILTERDETAILSF_FILTER))
return MMSYSERR_INVALFLAG;
@ -47,7 +47,7 @@ MMRESULT32 WINAPI acmFilterDetails32A(
* the UNICODE variant of PACMFILTERDETAILS is used?
* It might check cbStruct or does it only accept ANSI.
*/
return (MMRESULT32) acmDriverMessage32(
return (MMRESULT) acmDriverMessage(
had, ACMDM_FILTER_DETAILS,
(LPARAM) pafd, (LPARAM) fdwDetails
);
@ -56,8 +56,8 @@ MMRESULT32 WINAPI acmFilterDetails32A(
/***********************************************************************
* acmFilterDetailsW (MSACM32.16)
*/
MMRESULT32 WINAPI acmFilterDetails32W(
HACMDRIVER32 had, PACMFILTERDETAILS32W pafd, DWORD fdwDetails)
MMRESULT WINAPI acmFilterDetailsW(
HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails)
{
FIXME(msacm, "(0x%08x, %p, %ld): stub\n", had, pafd, fdwDetails);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -67,9 +67,9 @@ MMRESULT32 WINAPI acmFilterDetails32W(
/***********************************************************************
* acmFilterEnumA (MSACM32.17)
*/
MMRESULT32 WINAPI acmFilterEnum32A(
HACMDRIVER32 had, PACMFILTERDETAILS32A pafd,
ACMFILTERENUMCB32A fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmFilterEnumA(
HACMDRIVER had, PACMFILTERDETAILSA pafd,
ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
FIXME(msacm, "(0x%08x, %p, %p, %ld, %ld): stub\n",
had, pafd, fnCallback, dwInstance, fdwEnum
@ -81,9 +81,9 @@ MMRESULT32 WINAPI acmFilterEnum32A(
/***********************************************************************
* acmFilterEnumW (MSACM32.18)
*/
MMRESULT32 WINAPI acmFilterEnum32W(
HACMDRIVER32 had, PACMFILTERDETAILS32W pafd,
ACMFILTERENUMCB32W fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmFilterEnumW(
HACMDRIVER had, PACMFILTERDETAILSW pafd,
ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
FIXME(msacm, "(0x%08x, %p, %p, %ld, %ld): stub\n",
had, pafd, fnCallback, dwInstance, fdwEnum
@ -95,8 +95,8 @@ MMRESULT32 WINAPI acmFilterEnum32W(
/***********************************************************************
* acmFilterTagDetailsA (MSACM32.19)
*/
MMRESULT32 WINAPI acmFilterTagDetails32A(
HACMDRIVER32 had, PACMFILTERTAGDETAILS32A paftd, DWORD fdwDetails)
MMRESULT WINAPI acmFilterTagDetailsA(
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd, DWORD fdwDetails)
{
if(fdwDetails &
~(ACM_FILTERTAGDETAILSF_FILTERTAG|
@ -108,7 +108,7 @@ MMRESULT32 WINAPI acmFilterTagDetails32A(
* the UNICODE variant of PACMFILTERTAGDETAILS is used?
* It might check cbStruct or does it only accept ANSI.
*/
return (MMRESULT32) acmDriverMessage32(
return (MMRESULT) acmDriverMessage(
had, ACMDM_FILTERTAG_DETAILS,
(LPARAM) paftd, (LPARAM) fdwDetails
);
@ -117,8 +117,8 @@ MMRESULT32 WINAPI acmFilterTagDetails32A(
/***********************************************************************
* acmFilterTagDetailsW (MSACM32.20)
*/
MMRESULT32 WINAPI acmFilterTagDetails32W(
HACMDRIVER32 had, PACMFILTERTAGDETAILS32W paftd, DWORD fdwDetails)
MMRESULT WINAPI acmFilterTagDetailsW(
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
{
FIXME(msacm, "(0x%08x, %p, %ld): stub\n", had, paftd, fdwDetails);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -128,9 +128,9 @@ MMRESULT32 WINAPI acmFilterTagDetails32W(
/***********************************************************************
* acmFilterTagEnumA (MSACM32.21)
*/
MMRESULT32 WINAPI acmFilterTagEnum32A(
HACMDRIVER32 had, PACMFILTERTAGDETAILS32A paftd,
ACMFILTERTAGENUMCB32A fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmFilterTagEnumA(
HACMDRIVER had, PACMFILTERTAGDETAILSA paftd,
ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
FIXME(msacm, "(0x%08x, %p, %p, %ld, %ld): stub\n",
had, paftd, fnCallback, dwInstance, fdwEnum
@ -142,9 +142,9 @@ MMRESULT32 WINAPI acmFilterTagEnum32A(
/***********************************************************************
* acmFilterTagEnumW (MSACM32.22)
*/
MMRESULT32 WINAPI acmFilterTagEnum32W(
HACMDRIVER32 had, PACMFILTERTAGDETAILS32W paftd,
ACMFILTERTAGENUMCB32W fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmFilterTagEnumW(
HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
FIXME(msacm, "(0x%08x, %p, %p, %ld, %ld): stub\n",
had, paftd, fnCallback, dwInstance, fdwEnum

View File

@ -15,8 +15,8 @@
/***********************************************************************
* acmFormatChooseA (MSACM32.23)
*/
MMRESULT32 WINAPI acmFormatChoose32A(
PACMFORMATCHOOSE32A pafmtc)
MMRESULT WINAPI acmFormatChooseA(
PACMFORMATCHOOSEA pafmtc)
{
FIXME(msacm, "(%p): stub\n", pafmtc);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -26,8 +26,8 @@ MMRESULT32 WINAPI acmFormatChoose32A(
/***********************************************************************
* acmFormatChooseW (MSACM32.24)
*/
MMRESULT32 WINAPI acmFormatChoose32W(
PACMFORMATCHOOSE32W pafmtc)
MMRESULT WINAPI acmFormatChooseW(
PACMFORMATCHOOSEW pafmtc)
{
FIXME(msacm, "(%p): stub\n", pafmtc);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -37,8 +37,8 @@ MMRESULT32 WINAPI acmFormatChoose32W(
/***********************************************************************
* acmFormatDetailsA (MSACM32.25)
*/
MMRESULT32 WINAPI acmFormatDetails32A(
HACMDRIVER32 had, PACMFORMATDETAILS32A pafd, DWORD fdwDetails)
MMRESULT WINAPI acmFormatDetailsA(
HACMDRIVER had, PACMFORMATDETAILSA pafd, DWORD fdwDetails)
{
if(fdwDetails & ~(ACM_FORMATDETAILSF_FORMAT))
return MMSYSERR_INVALFLAG;
@ -48,7 +48,7 @@ MMRESULT32 WINAPI acmFormatDetails32A(
* the UNICODE variant of PACMFORMATDETAILS is used?
* It might check cbStruct or does it only accept ANSI.
*/
return (MMRESULT32) acmDriverMessage32(
return (MMRESULT) acmDriverMessage(
had, ACMDM_FORMAT_DETAILS,
(LPARAM) pafd, (LPARAM) fdwDetails
);
@ -57,8 +57,8 @@ MMRESULT32 WINAPI acmFormatDetails32A(
/***********************************************************************
* acmFormatDetailsW (MSACM32.26)
*/
MMRESULT32 WINAPI acmFormatDetails32W(
HACMDRIVER32 had, PACMFORMATDETAILS32W pafd, DWORD fdwDetails)
MMRESULT WINAPI acmFormatDetailsW(
HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails)
{
FIXME(msacm, "(0x%08x, %p, %ld): stub\n", had, pafd, fdwDetails);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -68,9 +68,9 @@ MMRESULT32 WINAPI acmFormatDetails32W(
/***********************************************************************
* acmFormatEnumA (MSACM32.27)
*/
MMRESULT32 WINAPI acmFormatEnum32A(
HACMDRIVER32 had, PACMFORMATDETAILS32A pafd,
ACMFORMATENUMCB32A fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmFormatEnumA(
HACMDRIVER had, PACMFORMATDETAILSA pafd,
ACMFORMATENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
FIXME(msacm, "(0x%08x, %p, %p, %ld, %ld): stub\n",
had, pafd, fnCallback, dwInstance, fdwEnum
@ -82,9 +82,9 @@ MMRESULT32 WINAPI acmFormatEnum32A(
/***********************************************************************
* acmFormatEnumW (MSACM32.28)
*/
MMRESULT32 WINAPI acmFormatEnum32W(
HACMDRIVER32 had, PACMFORMATDETAILS32W pafd,
ACMFORMATENUMCB32W fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmFormatEnumW(
HACMDRIVER had, PACMFORMATDETAILSW pafd,
ACMFORMATENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
FIXME(msacm, "(0x%08x, %p, %p, %ld, %ld): stub\n",
had, pafd, fnCallback, dwInstance, fdwEnum
@ -96,8 +96,8 @@ MMRESULT32 WINAPI acmFormatEnum32W(
/***********************************************************************
* acmFormatSuggest (MSACM32.29)
*/
MMRESULT32 WINAPI acmFormatSuggest32(
HACMDRIVER32 had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst,
MMRESULT WINAPI acmFormatSuggest(
HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst,
DWORD cbwfxDst, DWORD fdwSuggest)
{
FIXME(msacm, "(0x%08x, %p, %p, %ld, %ld): stub\n",
@ -110,8 +110,8 @@ MMRESULT32 WINAPI acmFormatSuggest32(
/***********************************************************************
* acmFormatTagDetailsA (MSACM32.30)
*/
MMRESULT32 WINAPI acmFormatTagDetails32A(
HACMDRIVER32 had, PACMFORMATTAGDETAILS32A paftd, DWORD fdwDetails)
MMRESULT WINAPI acmFormatTagDetailsA(
HACMDRIVER had, PACMFORMATTAGDETAILSA paftd, DWORD fdwDetails)
{
if(fdwDetails &
~(ACM_FORMATTAGDETAILSF_FORMATTAG|ACM_FORMATTAGDETAILSF_LARGESTSIZE))
@ -122,7 +122,7 @@ MMRESULT32 WINAPI acmFormatTagDetails32A(
* the UNICODE variant of PACMFORMATTAGDETAILS is used?
* It might check cbStruct or does it only accept ANSI.
*/
return (MMRESULT32) acmDriverMessage32(
return (MMRESULT) acmDriverMessage(
had, ACMDM_FORMATTAG_DETAILS,
(LPARAM) paftd, (LPARAM) fdwDetails
);
@ -131,8 +131,8 @@ MMRESULT32 WINAPI acmFormatTagDetails32A(
/***********************************************************************
* acmFormatTagDetailsW (MSACM32.31)
*/
MMRESULT32 WINAPI acmFormatTagDetails32W(
HACMDRIVER32 had, PACMFORMATTAGDETAILS32W paftd, DWORD fdwDetails)
MMRESULT WINAPI acmFormatTagDetailsW(
HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, DWORD fdwDetails)
{
FIXME(msacm, "(0x%08x, %p, %ld): stub\n", had, paftd, fdwDetails);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -142,9 +142,9 @@ MMRESULT32 WINAPI acmFormatTagDetails32W(
/***********************************************************************
* acmFormatTagEnumA (MSACM32.32)
*/
MMRESULT32 WINAPI acmFormatTagEnum32A(
HACMDRIVER32 had, PACMFORMATTAGDETAILS32A paftd,
ACMFORMATTAGENUMCB32A fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmFormatTagEnumA(
HACMDRIVER had, PACMFORMATTAGDETAILSA paftd,
ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
FIXME(msacm, "(0x%08x, %p, %p, %ld, %ld): stub\n",
had, paftd, fnCallback, dwInstance, fdwEnum
@ -156,9 +156,9 @@ MMRESULT32 WINAPI acmFormatTagEnum32A(
/***********************************************************************
* acmFormatTagEnumW (MSACM32.33)
*/
MMRESULT32 WINAPI acmFormatTagEnum32W(
HACMDRIVER32 had, PACMFORMATTAGDETAILS32W paftd,
ACMFORMATTAGENUMCB32W fnCallback, DWORD dwInstance, DWORD fdwEnum)
MMRESULT WINAPI acmFormatTagEnumW(
HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
FIXME(msacm, "(0x%08x, %p, %p, %ld, %ld): stub\n",
had, paftd, fnCallback, dwInstance, fdwEnum

View File

@ -16,34 +16,34 @@
/**********************************************************************/
HANDLE32 MSACM_hHeap32 = (HANDLE32) NULL;
PWINE_ACMDRIVERID32 MSACM_pFirstACMDriverID32 = NULL;
PWINE_ACMDRIVERID32 MSACM_pLastACMDriverID32 = NULL;
HANDLE MSACM_hHeap = (HANDLE) NULL;
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID = NULL;
PWINE_ACMDRIVERID MSACM_pLastACMDriverID = NULL;
/***********************************************************************
* MSACM_RegisterDriver32()
*/
PWINE_ACMDRIVERID32 MSACM_RegisterDriver32(
PWINE_ACMDRIVERID MSACM_RegisterDriver(
LPSTR pszDriverAlias, LPSTR pszFileName,
PWINE_ACMLOCALDRIVER32 pLocalDriver)
PWINE_ACMLOCALDRIVER pLocalDriver)
{
PWINE_ACMDRIVERID32 padid;
padid = (PWINE_ACMDRIVERID32) HeapAlloc(
MSACM_hHeap32, 0, sizeof(WINE_ACMDRIVERID32)
PWINE_ACMDRIVERID padid;
padid = (PWINE_ACMDRIVERID) HeapAlloc(
MSACM_hHeap, 0, sizeof(WINE_ACMDRIVERID)
);
padid->pszDriverAlias =
HEAP_strdupA(MSACM_hHeap32, 0, pszDriverAlias);
HEAP_strdupA(MSACM_hHeap, 0, pszDriverAlias);
padid->pszFileName =
HEAP_strdupA(MSACM_hHeap32, 0, pszFileName);
HEAP_strdupA(MSACM_hHeap, 0, pszFileName);
padid->pACMLocalDriver = pLocalDriver;
padid->bEnabled = TRUE;
padid->pACMDriver = NULL;
padid->pNextACMDriverID = NULL;
padid->pPreviousACMDriverID =
MSACM_pLastACMDriverID32;
MSACM_pLastACMDriverID32 = padid;
if(!MSACM_pFirstACMDriverID32)
MSACM_pFirstACMDriverID32 = padid;
MSACM_pLastACMDriverID;
MSACM_pLastACMDriverID = padid;
if(!MSACM_pFirstACMDriverID)
MSACM_pFirstACMDriverID = padid;
return padid;
}
@ -51,9 +51,9 @@ PWINE_ACMDRIVERID32 MSACM_RegisterDriver32(
/***********************************************************************
* MSACM_RegisterAllDrivers32()
*/
void MSACM_RegisterAllDrivers32()
void MSACM_RegisterAllDrivers()
{
PWINE_ACMBUILTINDRIVER32 pbd;
PWINE_ACMBUILTINDRIVER pbd;
LPSTR pszBuffer;
DWORD dwBufferLength;
@ -61,33 +61,33 @@ void MSACM_RegisterAllDrivers32()
* What if the user edits system.ini while the program is running?
* Does Windows handle that?
*/
if(!MSACM_pFirstACMDriverID32)
if(!MSACM_pFirstACMDriverID)
return;
/* FIXME: Do not work! How do I determine the section length? */
dwBufferLength =
GetPrivateProfileSection32A("drivers32", NULL, 0, "system.ini");
GetPrivateProfileSectionA("drivers32", NULL, 0, "system.ini");
pszBuffer = (LPSTR) HeapAlloc(
MSACM_hHeap32, 0, dwBufferLength
MSACM_hHeap, 0, dwBufferLength
);
if(GetPrivateProfileSection32A(
if(GetPrivateProfileSectionA(
"drivers32", pszBuffer, dwBufferLength, "system.ini"))
{
char *s = pszBuffer;
while(*s)
{
if(!lstrncmpi32A("MSACM.", s, 6))
if(!lstrncmpiA("MSACM.", s, 6))
{
char *s2 = s;
while(*s2 != '\0' && *s2 != '=') s2++;
if(*s2)
{
*s2++='\0';
MSACM_RegisterDriver32(s, s2, NULL);
MSACM_RegisterDriver(s, s2, NULL);
}
}
s += lstrlen32A(s) + 1; /* Either next char or \0 */
s += lstrlenA(s) + 1; /* Either next char or \0 */
}
}
@ -96,34 +96,34 @@ void MSACM_RegisterAllDrivers32()
* when the external drivers was.
*/
pbd = MSACM_BuiltinDrivers32;
pbd = MSACM_BuiltinDrivers;
while(pbd->pszDriverAlias)
{
PWINE_ACMLOCALDRIVER32 pld;
pld = HeapAlloc(MSACM_hHeap32, 0, sizeof(WINE_ACMLOCALDRIVER32));
PWINE_ACMLOCALDRIVER pld;
pld = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMLOCALDRIVER));
pld->pfnDriverProc = pbd->pfnDriverProc;
MSACM_RegisterDriver32(pbd->pszDriverAlias, NULL, pld);
MSACM_RegisterDriver(pbd->pszDriverAlias, NULL, pld);
pbd++;
}
HeapFree(MSACM_hHeap32, 0, pszBuffer);
HeapFree(MSACM_hHeap, 0, pszBuffer);
}
/***********************************************************************
* MSACM_UnregisterDriver32()
*/
PWINE_ACMDRIVERID32 MSACM_UnregisterDriver32(PWINE_ACMDRIVERID32 p)
PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
{
PWINE_ACMDRIVERID32 pNextACMDriverID;
PWINE_ACMDRIVERID pNextACMDriverID;
if(p->pACMDriver)
acmDriverClose32((HACMDRIVER32) p->pACMDriver, 0);
acmDriverClose((HACMDRIVER) p->pACMDriver, 0);
if(p->pszDriverAlias)
HeapFree(MSACM_hHeap32, 0, p->pszDriverAlias);
HeapFree(MSACM_hHeap, 0, p->pszDriverAlias);
if(p->pszFileName)
HeapFree(MSACM_hHeap32, 0, p->pszFileName);
HeapFree(MSACM_hHeap, 0, p->pszFileName);
if(p->pACMLocalDriver)
HeapFree(MSACM_hHeap32, 0, p->pACMLocalDriver);
HeapFree(MSACM_hHeap, 0, p->pACMLocalDriver);
if(p->pPreviousACMDriverID)
p->pPreviousACMDriverID->pNextACMDriverID = p->pNextACMDriverID;
@ -132,7 +132,7 @@ PWINE_ACMDRIVERID32 MSACM_UnregisterDriver32(PWINE_ACMDRIVERID32 p)
pNextACMDriverID = p->pNextACMDriverID;
HeapFree(MSACM_hHeap32, 0, p);
HeapFree(MSACM_hHeap, 0, p);
return pNextACMDriverID;
}
@ -142,34 +142,34 @@ PWINE_ACMDRIVERID32 MSACM_UnregisterDriver32(PWINE_ACMDRIVERID32 p)
* FIXME
* Where should this function be called?
*/
void MSACM_UnregisterAllDrivers32()
void MSACM_UnregisterAllDrivers()
{
PWINE_ACMDRIVERID32 p = MSACM_pFirstACMDriverID32;
while(p) p = MSACM_UnregisterDriver32(p);
PWINE_ACMDRIVERID p = MSACM_pFirstACMDriverID;
while(p) p = MSACM_UnregisterDriver(p);
}
/***********************************************************************
* MSACM_GetDriverID32()
*/
PWINE_ACMDRIVERID32 MSACM_GetDriverID32(HACMDRIVERID32 hDriverID)
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
{
return (PWINE_ACMDRIVERID32) hDriverID;
return (PWINE_ACMDRIVERID) hDriverID;
}
/***********************************************************************
* MSACM_GetDriver32()
*/
PWINE_ACMDRIVER32 MSACM_GetDriver32(HACMDRIVER32 hDriver)
PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
{
return (PWINE_ACMDRIVER32) hDriver;
return (PWINE_ACMDRIVER) hDriver;
}
/***********************************************************************
* MSACM_GetObj32()
*/
PWINE_ACMOBJ32 MSACM_GetObj32(HACMOBJ32 hObj)
PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj)
{
return (PWINE_ACMOBJ32) hObj;
return (PWINE_ACMOBJ) hObj;
}
/***********************************************************************
@ -178,21 +178,21 @@ PWINE_ACMOBJ32 MSACM_GetObj32(HACMOBJ32 hObj)
* This function should be integrated with OpenDriver,
* renamed and moved there.
*/
HDRVR32 MSACM_OpenDriverProc32(DRIVERPROC32 pfnDriverProc)
HDRVR MSACM_OpenDriverProc(DRIVERPROC pfnDriverProc)
{
#if 0
LPDRIVERITEM32A pDrvr;
LPDRIVERITEMA pDrvr;
/* FIXME: This is a very bad solution */
pDrvr = (LPDRIVERITEM32A) HeapAlloc(MSACM_hHeap32, HEAP_ZERO_MEMORY, sizeof(DRIVERITEM32A));
pDrvr = (LPDRIVERITEMA) HeapAlloc(MSACM_hHeap, HEAP_ZERO_MEMORY, sizeof(DRIVERITEMA));
pDrvr->count = 1;
pDrvr->driverproc = pfnDriverProc;
/* FIXME: Send DRV_OPEN among others to DriverProc */
return (HDRVR32) pDrvr;
return (HDRVR) pDrvr;
#else
return (HDRVR32) 0;
return (HDRVR) 0;
#endif
}

View File

@ -14,31 +14,31 @@
/**********************************************************************/
static DWORD MSACM_dwProcessesAttached32 = 0;
static DWORD MSACM_dwProcessesAttached = 0;
/***********************************************************************
* MSACM_LibMain32 (MSACM32.init)
*/
BOOL32 WINAPI MSACM32_LibMain(
HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
BOOL WINAPI MSACM32_LibMain(
HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
if(MSACM_dwProcessesAttached32 == 0)
if(MSACM_dwProcessesAttached == 0)
{
MSACM_hHeap32 = HeapCreate(0, 0x10000, 0);
MSACM_RegisterAllDrivers32();
MSACM_hHeap = HeapCreate(0, 0x10000, 0);
MSACM_RegisterAllDrivers();
}
MSACM_dwProcessesAttached32++;
MSACM_dwProcessesAttached++;
break;
case DLL_PROCESS_DETACH:
MSACM_dwProcessesAttached32--;
if(MSACM_dwProcessesAttached32 == 0)
MSACM_dwProcessesAttached--;
if(MSACM_dwProcessesAttached == 0)
{
MSACM_UnregisterAllDrivers32();
HeapDestroy(MSACM_hHeap32);
MSACM_hHeap32 = (HANDLE32) NULL;
MSACM_UnregisterAllDrivers();
HeapDestroy(MSACM_hHeap);
MSACM_hHeap = (HANDLE) NULL;
}
break;
case DLL_THREAD_ATTACH:
@ -60,7 +60,7 @@ BOOL32 WINAPI MSACM32_LibMain(
/***********************************************************************
* acmGetVersion32 (MSACM32.34)
*/
DWORD WINAPI acmGetVersion32()
DWORD WINAPI acmGetVersion()
{
switch(VERSION_GetVersion())
{
@ -82,11 +82,11 @@ DWORD WINAPI acmGetVersion32()
/***********************************************************************
* acmMetrics (MSACM32.36)
*/
MMRESULT32 WINAPI acmMetrics32(
HACMOBJ32 hao, UINT32 uMetric, LPVOID pMetric)
MMRESULT WINAPI acmMetrics(
HACMOBJ hao, UINT uMetric, LPVOID pMetric)
{
PWINE_ACMOBJ32 pao = MSACM_GetObj32(hao);
BOOL32 bLocal = TRUE;
PWINE_ACMOBJ pao = MSACM_GetObj(hao);
BOOL bLocal = TRUE;
FIXME(msacm, "(0x%08x, %d, %p): stub\n", hao, uMetric, pMetric);

View File

@ -15,8 +15,8 @@
/***********************************************************************
* acmStreamClose (MSACM32.37)
*/
MMRESULT32 WINAPI acmStreamClose32(
HACMSTREAM32 has, DWORD fdwClose)
MMRESULT WINAPI acmStreamClose(
HACMSTREAM has, DWORD fdwClose)
{
FIXME(msacm, "(0x%08x, %ld): stub\n", has, fdwClose);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -26,8 +26,8 @@ MMRESULT32 WINAPI acmStreamClose32(
/***********************************************************************
* acmStreamConvert (MSACM32.38)
*/
MMRESULT32 WINAPI acmStreamConvert32(
HACMSTREAM32 has, PACMSTREAMHEADER32 pash, DWORD fdwConvert)
MMRESULT WINAPI acmStreamConvert(
HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert)
{
FIXME(msacm, "(0x%08x, %p, %ld): stub\n", has, pash, fdwConvert);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -37,8 +37,8 @@ MMRESULT32 WINAPI acmStreamConvert32(
/***********************************************************************
* acmStreamMessage (MSACM32.39)
*/
MMRESULT32 WINAPI acmStreamMessage32(
HACMSTREAM32 has, UINT32 uMsg, LPARAM lParam1, LPARAM lParam2)
MMRESULT WINAPI acmStreamMessage(
HACMSTREAM has, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
{
FIXME(msacm, "(0x%08x, %u, %ld, %ld): stub\n",
has, uMsg, lParam1, lParam2
@ -50,8 +50,8 @@ MMRESULT32 WINAPI acmStreamMessage32(
/***********************************************************************
* acmStreamOpen (MSACM32.40)
*/
MMRESULT32 WINAPI acmStreamOpen32(
PHACMSTREAM32 phas, HACMDRIVER32 had, PWAVEFORMATEX pwfxSrc,
MMRESULT WINAPI acmStreamOpen(
PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,
DWORD dwInstance, DWORD fdwOpen)
{
@ -67,8 +67,8 @@ MMRESULT32 WINAPI acmStreamOpen32(
/***********************************************************************
* acmStreamPrepareHeader (MSACM32.41)
*/
MMRESULT32 WINAPI acmStreamPrepareHeader32(
HACMSTREAM32 has, PACMSTREAMHEADER32 pash, DWORD fdwPrepare)
MMRESULT WINAPI acmStreamPrepareHeader(
HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare)
{
FIXME(msacm, "(0x%08x, %p, %ld): stub\n", has, pash, fdwPrepare);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -78,8 +78,8 @@ MMRESULT32 WINAPI acmStreamPrepareHeader32(
/***********************************************************************
* acmStreamReset (MSACM32.42)
*/
MMRESULT32 WINAPI acmStreamReset32(
HACMSTREAM32 has, DWORD fdwReset)
MMRESULT WINAPI acmStreamReset(
HACMSTREAM has, DWORD fdwReset)
{
FIXME(msacm, "(0x%08x, %ld): stub\n", has, fdwReset);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -89,8 +89,8 @@ MMRESULT32 WINAPI acmStreamReset32(
/***********************************************************************
* acmStreamSize (MSACM32.43)
*/
MMRESULT32 WINAPI acmStreamSize32(
HACMSTREAM32 has, DWORD cbInput,
MMRESULT WINAPI acmStreamSize(
HACMSTREAM has, DWORD cbInput,
LPDWORD pdwOutputBytes, DWORD fdwSize)
{
FIXME(msacm, "(0x%08x, %ld, %p, %ld): stub\n",
@ -103,8 +103,8 @@ MMRESULT32 WINAPI acmStreamSize32(
/***********************************************************************
* acmStreamUnprepareHeader (MSACM32.44)
*/
MMRESULT32 WINAPI acmStreamUnprepareHeader32(
HACMSTREAM32 has, PACMSTREAMHEADER32 pash, DWORD fdwUnprepare)
MMRESULT WINAPI acmStreamUnprepareHeader(
HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare)
{
FIXME(msacm, "(0x%08x, %p, %ld): stub\n",
has, pash, fdwUnprepare

View File

@ -107,7 +107,7 @@ NTSTATUS WINAPI NtCreateTimer(
* NtSetTimer [NTDLL.221]
*/
NTSTATUS WINAPI NtSetTimer(
IN HANDLE32 TimerHandle,
IN HANDLE TimerHandle,
IN PLARGE_INTEGER DueTime,
IN PTIMERAPCROUTINE TimerApcRoutine,
IN PVOID TimerContext,
@ -140,8 +140,8 @@ NTSTATUS WINAPI NtCreateEvent(
* NtDeviceIoControlFile [NTDLL.94]
*/
NTSTATUS WINAPI NtDeviceIoControlFile(
IN HANDLE32 DeviceHandle,
IN HANDLE32 Event OPTIONAL,
IN HANDLE DeviceHandle,
IN HANDLE Event OPTIONAL,
IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL,
IN PVOID UserApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
@ -192,7 +192,7 @@ NTSTATUS WINAPI NtOpenDirectoryObject(
* DataWritten Caller supplied storage for the number of bytes written (or NULL)
*/
NTSTATUS WINAPI NtQueryDirectoryObject(
IN HANDLE32 DirObjHandle,
IN HANDLE DirObjHandle,
OUT POBJDIR_INFORMATION DirObjInformation,
IN ULONG BufferLength,
IN BOOLEAN GetNextIndex,
@ -239,7 +239,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
* NtQueryObject [NTDLL.161]
*/
NTSTATUS WINAPI NtQueryObject(
IN HANDLE32 ObjectHandle,
IN HANDLE ObjectHandle,
IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
OUT PVOID ObjectInformation,
IN ULONG Length,
@ -255,7 +255,7 @@ NTSTATUS WINAPI NtQueryObject(
* NtSetInformationProcess [NTDLL.207]
*/
NTSTATUS WINAPI NtSetInformationProcess(
IN HANDLE32 ProcessHandle,
IN HANDLE ProcessHandle,
IN PROCESSINFOCLASS ProcessInformationClass,
IN PVOID ProcessInformation,
IN ULONG ProcessInformationLength)
@ -269,8 +269,8 @@ NTSTATUS WINAPI NtSetInformationProcess(
* NtFsControlFile [NTDLL.108]
*/
NTSTATUS WINAPI NtFsControlFile(
IN HANDLE32 DeviceHandle,
IN HANDLE32 Event OPTIONAL,
IN HANDLE DeviceHandle,
IN HANDLE Event OPTIONAL,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
@ -301,7 +301,7 @@ NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3)
* Handle handle to close
*/
NTSTATUS WINAPI NtClose(
HANDLE32 Handle)
HANDLE Handle)
{
FIXME(ntdll,"(0x%08x),stub!\n",Handle);
return 1;
@ -311,7 +311,7 @@ NTSTATUS WINAPI NtClose(
*
*/
NTSTATUS WINAPI NtQueryInformationProcess(
IN HANDLE32 ProcessHandle,
IN HANDLE ProcessHandle,
IN PROCESSINFOCLASS ProcessInformationClass,
OUT PVOID ProcessInformation,
IN ULONG ProcessInformationLength,
@ -326,7 +326,7 @@ NTSTATUS WINAPI NtQueryInformationProcess(
*
*/
NTSTATUS WINAPI NtQueryInformationThread(
IN HANDLE32 ThreadHandle,
IN HANDLE ThreadHandle,
IN THREADINFOCLASS ThreadInformationClass,
OUT PVOID ThreadInformation,
IN ULONG ThreadInformationLength,
@ -366,9 +366,9 @@ NTSTATUS WINAPI NtCreatePagingFile(
* NtDuplicateObject [NTDLL]
*/
NTSTATUS WINAPI NtDuplicateObject(
IN HANDLE32 SourceProcessHandle,
IN HANDLE SourceProcessHandle,
IN PHANDLE SourceHandle,
IN HANDLE32 TargetProcessHandle,
IN HANDLE TargetProcessHandle,
OUT PHANDLE TargetHandle,
IN ACCESS_MASK DesiredAccess,
IN BOOLEAN InheritHandle,
@ -397,7 +397,7 @@ NTSTATUS WINAPI NtDuplicateToken(
* FIXME: parameters unsafe
*/
NTSTATUS WINAPI NtAdjustPrivilegesToken(
IN HANDLE32 TokenHandle,
IN HANDLE TokenHandle,
IN BOOLEAN DisableAllPrivileges,
IN PTOKEN_PRIVILEGES NewState,
IN DWORD BufferLength,
@ -421,7 +421,7 @@ NTSTATUS WINAPI NtOpenProcessToken(DWORD x1,DWORD x2,DWORD x3) {
* NtSetInformationThread [NTDLL]
*/
NTSTATUS WINAPI NtSetInformationThread(
HANDLE32 ThreadHandle,
HANDLE ThreadHandle,
THREADINFOCLASS ThreadInformationClass,
PVOID ThreadInformation,
ULONG ThreadInformationLength)
@ -443,7 +443,7 @@ NTSTATUS WINAPI NtOpenThreadToken(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
* NtSetVolumeInformationFile [NTDLL]
*/
NTSTATUS WINAPI NtSetVolumeInformationFile(
IN HANDLE32 FileHandle,
IN HANDLE FileHandle,
IN PVOID VolumeInformationClass,
PVOID VolumeInformation,
ULONG Length)
@ -466,7 +466,7 @@ NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
* NtSetInformationFile [NTDLL]
*/
NTSTATUS WINAPI NtSetInformationFile(
HANDLE32 FileHandle,
HANDLE FileHandle,
PIO_STATUS_BLOCK IoStatusBlock,
PVOID FileInformation,
ULONG Length,
@ -481,7 +481,7 @@ NTSTATUS WINAPI NtSetInformationFile(
* NtSetEvent [NTDLL]
*/
NTSTATUS WINAPI NtSetEvent(
IN HANDLE32 EventHandle,
IN HANDLE EventHandle,
PULONG NumberOfThreadsReleased)
{
FIXME(ntdll,"(0x%08x,%p)\n",
@ -494,7 +494,7 @@ NTSTATUS WINAPI NtSetEvent(
* NtQueryInformationFile [NTDLL]
*/
NTSTATUS WINAPI NtQueryInformationFile(
HANDLE32 FileHandle,
HANDLE FileHandle,
PIO_STATUS_BLOCK IoStatusBlock,
PVOID FileInformation,
ULONG Length,
@ -590,8 +590,8 @@ NTSTATUS WINAPI NtCreateDirectoryObject(
* Protect Protection for the committed region of the view
*/
NTSTATUS WINAPI NtMapViewOfSection(
HANDLE32 SectionHandle,
HANDLE32 ProcessHandle,
HANDLE SectionHandle,
HANDLE ProcessHandle,
PVOID* BaseAddress,
ULONG ZeroBits,
ULONG CommitSize,
@ -630,8 +630,8 @@ NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x
* PULONG Key OPTIONAL
*/
NTSTATUS WINAPI NtReadFile (
HANDLE32 FileHandle,
HANDLE32 EventHandle,
HANDLE FileHandle,
HANDLE EventHandle,
PIO_APC_ROUTINE ApcRoutine,
PVOID ApcContext,
PIO_STATUS_BLOCK IoStatusBlock,
@ -656,7 +656,7 @@ NTSTATUS WINAPI NtCreateSection(
IN PLARGE_INTEGER MaximumSize OPTIONAL,
IN ULONG SectionPageProtection OPTIONAL,
IN ULONG AllocationAttributes,
IN HANDLE32 FileHandle OPTIONAL)
IN HANDLE FileHandle OPTIONAL)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),%p,0x%08lx,0x%08lx,0x%08x) stub\n",
SectionHandle,DesiredAccess,ObjectAttributes,
@ -669,7 +669,7 @@ NTSTATUS WINAPI NtCreateSection(
* NtResumeThread [NTDLL]
*/
NTSTATUS WINAPI NtResumeThread(
IN HANDLE32 ThreadHandle,
IN HANDLE ThreadHandle,
IN PULONG SuspendCount)
{
FIXME(ntdll,"(0x%08x,%p),stub!\n",
@ -713,7 +713,7 @@ NTSTATUS WINAPI NtRegisterThreadTerminatePort(DWORD x1) {
* NtTerminateThread [NTDLL]
*/
NTSTATUS WINAPI NtTerminateThread(
IN HANDLE32 ThreadHandle,
IN HANDLE ThreadHandle,
IN NTSTATUS ExitStatus)
{
if ( TerminateThread(ThreadHandle,ExitStatus) )
@ -758,7 +758,7 @@ NTSTATUS WINAPI NtQueryPerformanceCounter(
* NtQuerySection [NTDLL]
*/
NTSTATUS WINAPI NtQuerySection(
IN HANDLE32 SectionHandle,
IN HANDLE SectionHandle,
IN PVOID SectionInformationClass,
OUT PVOID SectionInformation,
IN ULONG Length,
@ -796,7 +796,7 @@ NTSTATUS WINAPI NtCreateSemaphore(
* NtOpenSemaphore [NTDLL]
*/
NTSTATUS WINAPI NtOpenSemaphore(
IN HANDLE32 SemaphoreHandle,
IN HANDLE SemaphoreHandle,
IN ACCESS_MASK DesiredAcces,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
@ -810,7 +810,7 @@ NTSTATUS WINAPI NtOpenSemaphore(
* NtQuerySemaphore [NTDLL]
*/
NTSTATUS WINAPI NtQuerySemaphore(
HANDLE32 SemaphoreHandle,
HANDLE SemaphoreHandle,
PVOID SemaphoreInformationClass,
OUT PVOID SemaphoreInformation,
ULONG Length,
@ -824,7 +824,7 @@ NTSTATUS WINAPI NtQuerySemaphore(
* NtQuerySemaphore [NTDLL]
*/
NTSTATUS WINAPI NtReleaseSemaphore(
IN HANDLE32 SemaphoreHandle,
IN HANDLE SemaphoreHandle,
IN ULONG ReleaseCount,
IN PULONG PreviousCount)
{
@ -865,7 +865,7 @@ NTSTATUS WINAPI NtOpenSymbolicLinkObject(
* NtQuerySymbolicLinkObject [NTDLL]
*/
NTSTATUS NtQuerySymbolicLinkObject(
IN HANDLE32 LinkHandle,
IN HANDLE LinkHandle,
IN OUT PUNICODE_STRING LinkTarget,
OUT PULONG ReturnedLength OPTIONAL)
{

View File

@ -29,7 +29,7 @@ NTSTATUS WINAPI NtCreateKey(
* NtDeleteKey [NTDLL]
* ZwDeleteKey
*/
NTSTATUS NtDeleteKey(HANDLE32 KeyHandle)
NTSTATUS NtDeleteKey(HANDLE KeyHandle)
{
FIXME(ntdll,"(0x%08x) stub!\n",
KeyHandle);
@ -41,7 +41,7 @@ NTSTATUS NtDeleteKey(HANDLE32 KeyHandle)
* ZwDeleteValueKey
*/
NTSTATUS WINAPI NtDeleteValueKey(
IN HANDLE32 KeyHandle,
IN HANDLE KeyHandle,
IN PUNICODE_STRING ValueName)
{
FIXME(ntdll,"(0x%08x,%p(%s)) stub!\n",
@ -54,7 +54,7 @@ NTSTATUS WINAPI NtDeleteValueKey(
* ZwEnumerateKey
*/
NTSTATUS WINAPI NtEnumerateKey(
HANDLE32 KeyHandle,
HANDLE KeyHandle,
ULONG Index,
KEY_INFORMATION_CLASS KeyInformationClass,
PVOID KeyInformation,
@ -71,7 +71,7 @@ NTSTATUS WINAPI NtEnumerateKey(
* ZwEnumerateValueKey
*/
NTSTATUS WINAPI NtEnumerateValueKey(
HANDLE32 KeyHandle,
HANDLE KeyHandle,
ULONG Index,
KEY_VALUE_INFORMATION_CLASS KeyInformationClass,
PVOID KeyInformation,
@ -87,7 +87,7 @@ NTSTATUS WINAPI NtEnumerateValueKey(
* NtFlushKey [NTDLL]
* ZwFlushKey
*/
NTSTATUS NtFlushKey(HANDLE32 KeyHandle)
NTSTATUS NtFlushKey(HANDLE KeyHandle)
{
FIXME(ntdll,"(0x%08x) stub!\n",
KeyHandle);
@ -113,8 +113,8 @@ NTSTATUS WINAPI NtLoadKey(
* ZwNotifyChangeKey
*/
NTSTATUS WINAPI NtNotifyChangeKey(
IN HANDLE32 KeyHandle,
IN HANDLE32 Event,
IN HANDLE KeyHandle,
IN HANDLE Event,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
@ -153,7 +153,7 @@ NTSTATUS WINAPI NtOpenKey(
* ZwQueryKey
*/
NTSTATUS WINAPI NtQueryKey(
HANDLE32 KeyHandle,
HANDLE KeyHandle,
KEY_INFORMATION_CLASS KeyInformationClass,
PVOID KeyInformation,
ULONG Length,
@ -170,7 +170,7 @@ NTSTATUS WINAPI NtQueryKey(
*/
NTSTATUS WINAPI NtQueryMultipleValueKey(
HANDLE32 KeyHandle,
HANDLE KeyHandle,
PVALENTW ListOfValuesToQuery,
ULONG NumberOfItems,
PVOID MultipleValueInformation,
@ -188,7 +188,7 @@ NTSTATUS WINAPI NtQueryMultipleValueKey(
* ZwQueryValueKey
*/
NTSTATUS WINAPI NtQueryValueKey(
HANDLE32 KeyHandle,
HANDLE KeyHandle,
PUNICODE_STRING ValueName,
KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
PVOID KeyValueInformation,
@ -206,7 +206,7 @@ NTSTATUS WINAPI NtQueryValueKey(
*/
NTSTATUS WINAPI NtReplaceKey(
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN HANDLE32 Key,
IN HANDLE Key,
IN POBJECT_ATTRIBUTES ReplacedObjectAttributes)
{
FIXME(ntdll,"(%p(%s),0x%08x,%p (%s)),stub!\n",
@ -220,8 +220,8 @@ NTSTATUS WINAPI NtReplaceKey(
* ZwRestoreKey
*/
NTSTATUS WINAPI NtRestoreKey(
HANDLE32 KeyHandle,
HANDLE32 FileHandle,
HANDLE KeyHandle,
HANDLE FileHandle,
ULONG RestoreFlags)
{
FIXME(ntdll,"(0x%08x,0x%08x,0x%08lx) stub\n",
@ -234,8 +234,8 @@ NTSTATUS WINAPI NtRestoreKey(
* ZwSaveKey
*/
NTSTATUS WINAPI NtSaveKey(
IN HANDLE32 KeyHandle,
IN HANDLE32 FileHandle)
IN HANDLE KeyHandle,
IN HANDLE FileHandle)
{
FIXME(ntdll,"(0x%08x,0x%08x) stub\n",
KeyHandle, FileHandle);
@ -246,7 +246,7 @@ NTSTATUS WINAPI NtSaveKey(
* ZwSetInformationKey
*/
NTSTATUS WINAPI NtSetInformationKey(
IN HANDLE32 KeyHandle,
IN HANDLE KeyHandle,
IN const int KeyInformationClass,
IN PVOID KeyInformation,
IN ULONG KeyInformationLength)
@ -260,7 +260,7 @@ NTSTATUS WINAPI NtSetInformationKey(
* ZwSetValueKey
*/
NTSTATUS WINAPI NtSetValueKey(
HANDLE32 KeyHandle,
HANDLE KeyHandle,
PUNICODE_STRING ValueName,
ULONG TitleIndex,
ULONG Type,
@ -278,7 +278,7 @@ NTSTATUS WINAPI NtSetValueKey(
* ZwUnloadKey
*/
NTSTATUS WINAPI NtUnloadKey(
IN HANDLE32 KeyHandle)
IN HANDLE KeyHandle)
{
FIXME(ntdll,"(0x%08x) stub\n",
KeyHandle);

View File

@ -553,7 +553,7 @@ VOID WINAPI RtlInitAnsiString(PANSI_STRING target,LPCSTR source)
target->Buffer = (LPSTR)source;
if (!source)
return;
target->MaximumLength = lstrlen32A(target->Buffer);
target->MaximumLength = lstrlenA(target->Buffer);
target->Length = target->MaximumLength+1;
}
/**************************************************************************
@ -565,7 +565,7 @@ VOID WINAPI RtlInitString(PSTRING target,LPCSTR source)
target->Buffer = (LPSTR)source;
if (!source)
return;
target->MaximumLength = lstrlen32A(target->Buffer);
target->MaximumLength = lstrlenA(target->Buffer);
target->Length = target->MaximumLength+1;
}
@ -578,7 +578,7 @@ VOID WINAPI RtlInitUnicodeString(PUNICODE_STRING target,LPCWSTR source)
target->Buffer = (LPWSTR)source;
if (!source)
return;
target->MaximumLength = lstrlen32W(target->Buffer)*2;
target->MaximumLength = lstrlenW(target->Buffer)*2;
target->Length = target->MaximumLength+2;
}
@ -658,7 +658,7 @@ DWORD WINAPI RtlEqualUnicodeString(PUNICODE_STRING s1,PUNICODE_STRING s2,DWORD x
return 0;
if (s1->Length != s2->Length)
return 1;
return !lstrncmp32W(s1->Buffer,s2->Buffer,s1->Length/2);
return !lstrncmpW(s1->Buffer,s2->Buffer,s1->Length/2);
}
/**************************************************************************
@ -689,7 +689,7 @@ DWORD WINAPI RtlUpcaseUnicodeString(PUNICODE_STRING dest,PUNICODE_STRING src,BOO
/**************************************************************************
* RtlxOemStringToUnicodeSize [NTDLL.549]
*/
UINT32 WINAPI RtlxOemStringToUnicodeSize(PSTRING str)
UINT WINAPI RtlxOemStringToUnicodeSize(PSTRING str)
{
return str->Length*2+2;
}
@ -697,7 +697,7 @@ UINT32 WINAPI RtlxOemStringToUnicodeSize(PSTRING str)
/**************************************************************************
* RtlxAnsiStringToUnicodeSize [NTDLL.548]
*/
UINT32 WINAPI RtlxAnsiStringToUnicodeSize(PANSI_STRING str)
UINT WINAPI RtlxAnsiStringToUnicodeSize(PANSI_STRING str)
{
return str->Length*2+2;
}
@ -777,8 +777,8 @@ void WINAPI RtlInitializeResource(LPRTL_RWLOCK rwl)
rwl->hOwningThreadId = 0;
rwl->dwTimeoutBoost = 0; /* no info on this one, default value is 0 */
InitializeCriticalSection( &rwl->rtlCS );
rwl->hExclusiveReleaseSemaphore = CreateSemaphore32A( NULL, 0, 65535, NULL );
rwl->hSharedReleaseSemaphore = CreateSemaphore32A( NULL, 0, 65535, NULL );
rwl->hExclusiveReleaseSemaphore = CreateSemaphoreA( NULL, 0, 65535, NULL );
rwl->hSharedReleaseSemaphore = CreateSemaphoreA( NULL, 0, 65535, NULL );
}
}
@ -833,7 +833,7 @@ wait:
rwl->uExclusiveWaiters++;
LeaveCriticalSection( &rwl->rtlCS );
if( WaitForSingleObject( rwl->hExclusiveReleaseSemaphore, INFINITE32 ) == WAIT_FAILED )
if( WaitForSingleObject( rwl->hExclusiveReleaseSemaphore, INFINITE ) == WAIT_FAILED )
goto done;
goto start; /* restart the acquisition to avoid deadlocks */
}
@ -873,7 +873,7 @@ start:
{
rwl->uSharedWaiters++;
LeaveCriticalSection( &rwl->rtlCS );
if( (dwWait = WaitForSingleObject( rwl->hSharedReleaseSemaphore, INFINITE32 )) == WAIT_FAILED )
if( (dwWait = WaitForSingleObject( rwl->hSharedReleaseSemaphore, INFINITE )) == WAIT_FAILED )
goto done;
goto start;
}
@ -920,7 +920,7 @@ wake_exclusive:
else
if( rwl->uSharedWaiters )
{
UINT32 n = rwl->uSharedWaiters;
UINT n = rwl->uSharedWaiters;
rwl->iNumberActive = rwl->uSharedWaiters; /* prevent new writers from joining until
* all queued readers have done their thing */
rwl->uSharedWaiters = 0;
@ -957,7 +957,7 @@ void WINAPI RtlDumpResource(LPRTL_RWLOCK rwl)
void __cdecl DbgPrint(LPCSTR fmt,LPVOID args) {
char buf[512];
wvsprintf32A(buf,fmt,&args);
wvsprintfA(buf,fmt,&args);
MSG("DbgPrint says: %s",buf);
/* hmm, raise exception? */
}
@ -1120,7 +1120,7 @@ DWORD WINAPI RtlTimeToElapsedTimeFields( DWORD x1, DWORD x2 )
/******************************************************************************
* RtlExtendedLargeIntegerDivide [NTDLL.359]
*/
INT32 WINAPI RtlExtendedLargeIntegerDivide(
INT WINAPI RtlExtendedLargeIntegerDivide(
LARGE_INTEGER dividend,
DWORD divisor,
LPDWORD rest
@ -1144,7 +1144,7 @@ INT32 WINAPI RtlExtendedLargeIntegerDivide(
*/
long long /*LARGE_INTEGER*/
WINAPI RtlExtendedIntegerMultiply(
LARGE_INTEGER factor1,INT32 factor2
LARGE_INTEGER factor1,INT factor2
) {
#if SIZEOF_LONG_LONG==8
return (*(long long*)&factor1)*factor2;

View File

@ -15,7 +15,7 @@
/***********************************************************************
* EmptyWorkingSet (PSAPI.1)
*/
BOOL32 WINAPI EmptyWorkingSet32(HANDLE32 hProcess)
BOOL WINAPI EmptyWorkingSet(HANDLE hProcess)
{
return SetProcessWorkingSetSize(hProcess, 0xFFFFFFFF, 0xFFFFFFFF);
}
@ -23,7 +23,7 @@ BOOL32 WINAPI EmptyWorkingSet32(HANDLE32 hProcess)
/***********************************************************************
* EnumDeviceDrivers (PSAPI.2)
*/
BOOL32 WINAPI EnumDeviceDrivers(
BOOL WINAPI EnumDeviceDrivers(
LPVOID *lpImageBase, DWORD cb, LPDWORD lpcbNeeded)
{
FIXME(psapi, "(%p, %ld, %p): stub\n", lpImageBase, cb, lpcbNeeded);
@ -38,7 +38,7 @@ BOOL32 WINAPI EnumDeviceDrivers(
/***********************************************************************
* EnumProcesses (PSAPI.3)
*/
BOOL32 WINAPI EnumProcesses(DWORD *lpidProcess, DWORD cb, DWORD *lpcbNeeded)
BOOL WINAPI EnumProcesses(DWORD *lpidProcess, DWORD cb, DWORD *lpcbNeeded)
{
FIXME(psapi, "(%p, %ld, %p): stub\n", lpidProcess,cb, lpcbNeeded);
@ -51,8 +51,8 @@ BOOL32 WINAPI EnumProcesses(DWORD *lpidProcess, DWORD cb, DWORD *lpcbNeeded)
/***********************************************************************
* EnumProcessModules (PSAPI.4)
*/
BOOL32 WINAPI EnumProcessModules(
HANDLE32 hProcess, HMODULE32 *lphModule, DWORD cb, LPDWORD lpcbNeeded)
BOOL WINAPI EnumProcessModules(
HANDLE hProcess, HMODULE *lphModule, DWORD cb, LPDWORD lpcbNeeded)
{
FIXME(psapi, "(hProcess=0x%08x, %p, %ld, %p): stub\n",
hProcess, lphModule, cb, lpcbNeeded
@ -67,7 +67,7 @@ BOOL32 WINAPI EnumProcessModules(
/***********************************************************************
* GetDeviceDriverBaseName32A (PSAPI.5)
*/
DWORD WINAPI GetDeviceDriverBaseName32A(
DWORD WINAPI GetDeviceDriverBaseNameA(
LPVOID ImageBase, LPSTR lpBaseName, DWORD nSize)
{
FIXME(psapi, "(%p, %s, %ld): stub\n",
@ -83,7 +83,7 @@ DWORD WINAPI GetDeviceDriverBaseName32A(
/***********************************************************************
* GetDeviceDriverBaseName32W (PSAPI.6)
*/
DWORD WINAPI GetDeviceDriverBaseName32W(
DWORD WINAPI GetDeviceDriverBaseNameW(
LPVOID ImageBase, LPWSTR lpBaseName, DWORD nSize)
{
FIXME(psapi, "(%p, %s, %ld): stub\n",
@ -99,7 +99,7 @@ DWORD WINAPI GetDeviceDriverBaseName32W(
/***********************************************************************
* GetDeviceDriverFileName32A (PSAPI.7)
*/
DWORD WINAPI GetDeviceDriverFileName32A(
DWORD WINAPI GetDeviceDriverFileNameA(
LPVOID ImageBase, LPSTR lpFilename, DWORD nSize)
{
FIXME(psapi, "(%p, %s, %ld): stub\n",
@ -115,7 +115,7 @@ DWORD WINAPI GetDeviceDriverFileName32A(
/***********************************************************************
* GetDeviceDriverFileName32W (PSAPI.8)
*/
DWORD WINAPI GetDeviceDriverFileName32W(
DWORD WINAPI GetDeviceDriverFileNameW(
LPVOID ImageBase, LPWSTR lpFilename, DWORD nSize)
{
FIXME(psapi, "(%p, %s, %ld): stub\n",
@ -131,8 +131,8 @@ DWORD WINAPI GetDeviceDriverFileName32W(
/***********************************************************************
* GetMappedFileName32A (PSAPI.9)
*/
DWORD WINAPI GetMappedFileName32A(
HANDLE32 hProcess, LPVOID lpv, LPSTR lpFilename, DWORD nSize)
DWORD WINAPI GetMappedFileNameA(
HANDLE hProcess, LPVOID lpv, LPSTR lpFilename, DWORD nSize)
{
FIXME(psapi, "(hProcess=0x%08x, %p, %s, %ld): stub\n",
hProcess, lpv, debugstr_a(lpFilename), nSize
@ -147,8 +147,8 @@ DWORD WINAPI GetMappedFileName32A(
/***********************************************************************
* GetMappedFileName32W (PSAPI.10)
*/
DWORD WINAPI GetMappedFileName32W(
HANDLE32 hProcess, LPVOID lpv, LPWSTR lpFilename, DWORD nSize)
DWORD WINAPI GetMappedFileNameW(
HANDLE hProcess, LPVOID lpv, LPWSTR lpFilename, DWORD nSize)
{
FIXME(psapi, "(hProcess=0x%08x, %p, %s, %ld): stub\n",
hProcess, lpv, debugstr_w(lpFilename), nSize
@ -163,8 +163,8 @@ DWORD WINAPI GetMappedFileName32W(
/***********************************************************************
* GetModuleBaseName32A (PSAPI.11)
*/
DWORD WINAPI GetModuleBaseName32A(
HANDLE32 hProcess, HMODULE32 hModule, LPSTR lpBaseName, DWORD nSize)
DWORD WINAPI GetModuleBaseNameA(
HANDLE hProcess, HMODULE hModule, LPSTR lpBaseName, DWORD nSize)
{
FIXME(psapi, "(hProcess=0x%08x, hModule=0x%08x, %s, %ld): stub\n",
hProcess, hModule, debugstr_a(lpBaseName), nSize
@ -179,8 +179,8 @@ DWORD WINAPI GetModuleBaseName32A(
/***********************************************************************
* GetModuleBaseName32W (PSAPI.12)
*/
DWORD WINAPI GetModuleBaseName32W(
HANDLE32 hProcess, HMODULE32 hModule, LPWSTR lpBaseName, DWORD nSize)
DWORD WINAPI GetModuleBaseNameW(
HANDLE hProcess, HMODULE hModule, LPWSTR lpBaseName, DWORD nSize)
{
FIXME(psapi, "(hProcess=0x%08x, hModule=0x%08x, %s, %ld): stub\n",
hProcess, hModule, debugstr_w(lpBaseName), nSize);
@ -194,8 +194,8 @@ DWORD WINAPI GetModuleBaseName32W(
/***********************************************************************
* GetModuleFileNameEx32A (PSAPI.13)
*/
DWORD WINAPI GetModuleFileNameEx32A(
HANDLE32 hProcess, HMODULE32 hModule, LPSTR lpFilename, DWORD nSize)
DWORD WINAPI GetModuleFileNameExA(
HANDLE hProcess, HMODULE hModule, LPSTR lpFilename, DWORD nSize)
{
FIXME(psapi, "(hProcess=0x%08x,hModule=0x%08x, %s, %ld): stub\n",
hProcess, hModule, debugstr_a(lpFilename), nSize
@ -210,8 +210,8 @@ DWORD WINAPI GetModuleFileNameEx32A(
/***********************************************************************
* GetModuleFileNameEx32W (PSAPI.14)
*/
DWORD WINAPI GetModuleFileNameEx32W(
HANDLE32 hProcess, HMODULE32 hModule, LPWSTR lpFilename, DWORD nSize)
DWORD WINAPI GetModuleFileNameExW(
HANDLE hProcess, HMODULE hModule, LPWSTR lpFilename, DWORD nSize)
{
FIXME(psapi, "(hProcess=0x%08x,hModule=0x%08x, %s, %ld): stub\n",
hProcess, hModule, debugstr_w(lpFilename), nSize
@ -226,8 +226,8 @@ DWORD WINAPI GetModuleFileNameEx32W(
/***********************************************************************
* GetModuleInformation32 (PSAPI.15)
*/
BOOL32 WINAPI GetModuleInformation32(
HANDLE32 hProcess, HMODULE32 hModule, LPMODULEINFO32 lpmodinfo, DWORD cb)
BOOL WINAPI GetModuleInformation(
HANDLE hProcess, HMODULE hModule, LPMODULEINFO lpmodinfo, DWORD cb)
{
FIXME(psapi, "(hProcess=0x%08x, hModule=0x%08x, %p, %ld): stub\n",
hProcess, hModule, lpmodinfo, cb
@ -241,8 +241,8 @@ BOOL32 WINAPI GetModuleInformation32(
/***********************************************************************
* GetProcessMemoryInfo32 (PSAPI.16)
*/
BOOL32 WINAPI GetProcessMemoryInfo32(
HANDLE32 Process, PPROCESS_MEMORY_COUNTERS32 ppsmemCounters, DWORD cb)
BOOL WINAPI GetProcessMemoryInfo(
HANDLE Process, PPROCESS_MEMORY_COUNTERS ppsmemCounters, DWORD cb)
{
FIXME(psapi, "(hProcess=0x%08x, %p, %ld): stub\n",
Process, ppsmemCounters, cb
@ -256,8 +256,8 @@ BOOL32 WINAPI GetProcessMemoryInfo32(
/***********************************************************************
* GetWsChanges32 (PSAPI.17)
*/
BOOL32 WINAPI GetWsChanges32(
HANDLE32 hProcess, PPSAPI_WS_WATCH_INFORMATION32 lpWatchInfo, DWORD cb)
BOOL WINAPI GetWsChanges(
HANDLE hProcess, PPSAPI_WS_WATCH_INFORMATION lpWatchInfo, DWORD cb)
{
FIXME(psapi, "(hProcess=0x%08x, %p, %ld): stub\n",
hProcess, lpWatchInfo, cb
@ -271,7 +271,7 @@ BOOL32 WINAPI GetWsChanges32(
/***********************************************************************
* InitializeProcessForWsWatch32 (PSAPI.18)
*/
BOOL32 WINAPI InitializeProcessForWsWatch32(HANDLE32 hProcess)
BOOL WINAPI InitializeProcessForWsWatch(HANDLE hProcess)
{
FIXME(psapi, "(hProcess=0x%08x): stub\n", hProcess);
@ -284,7 +284,7 @@ BOOL32 WINAPI InitializeProcessForWsWatch32(HANDLE32 hProcess)
* I haven't been able to find the ordinal for this function,
* This means it can't be called from outside the DLL.
*/
BOOL32 WINAPI QueryWorkingSet32(HANDLE32 hProcess, LPVOID pv, DWORD cb)
BOOL WINAPI QueryWorkingSet(HANDLE hProcess, LPVOID pv, DWORD cb)
{
FIXME(psapi, "(hProcess=0x%08x, %p, %ld)", hProcess, pv, cb);

View File

@ -11,7 +11,7 @@
/**************************************************************************
* RasEnumConnections32A [RASAPI32.544]
*/
DWORD WINAPI RasEnumConnections32A( LPRASCONN32A rca, LPDWORD x, LPDWORD y) {
DWORD WINAPI RasEnumConnectionsA( LPRASCONNA rca, LPDWORD x, LPDWORD y) {
/* Remote Access Service stuff is done by underlying OS anyway */
FIXME(ras,"(%p,%p,%p),stub!\n",rca,x,y);
return 0;

View File

@ -24,19 +24,19 @@
#define IDD_TREEVIEW 99
static HWND32 hwndTreeView;
static LPBROWSEINFO32A lpBrowseInfo;
static HWND hwndTreeView;
static LPBROWSEINFOA lpBrowseInfo;
static LPITEMIDLIST pidlRet;
static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hParent);
static void InitializeTreeView(HWND32 hwndParent)
static void InitializeTreeView(HWND hwndParent)
{
HIMAGELIST hImageList;
LPSHELLFOLDER lpsf;
HRESULT hr;
hwndTreeView = GetDlgItem32 (hwndParent, IDD_TREEVIEW);
hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW);
Shell_GetImageList(NULL, &hImageList);
TRACE(shell,"dlg=%x tree=%x\n", hwndParent, hwndTreeView );
@ -57,13 +57,13 @@ static void InitializeTreeView(HWND32 hwndParent)
}
}
static int GetIcon(LPITEMIDLIST lpi, UINT32 uFlags)
{ SHFILEINFO32A sfi;
SHGetFileInfo32A((LPCSTR)lpi,0,&sfi, sizeof(SHFILEINFO32A), uFlags);
static int GetIcon(LPITEMIDLIST lpi, UINT uFlags)
{ SHFILEINFOA sfi;
SHGetFileInfoA((LPCSTR)lpi,0,&sfi, sizeof(SHFILEINFOA), uFlags);
return sfi.iIcon;
}
static void GetNormalAndSelectedIcons(LPITEMIDLIST lpifq,LPTVITEM32A lpTV_ITEM)
static void GetNormalAndSelectedIcons(LPITEMIDLIST lpifq,LPTVITEMA lpTV_ITEM)
{ TRACE (shell,"%p %p\n",lpifq, lpTV_ITEM);
lpTV_ITEM->iImage = GetIcon(lpifq, SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
@ -79,9 +79,9 @@ typedef struct tagID
LPITEMIDLIST lpifq;
} TV_ITEMDATA, *LPTV_ITEMDATA;
static BOOL32 GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR lpFriendlyName)
static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR lpFriendlyName)
{
BOOL32 bSuccess=TRUE;
BOOL bSuccess=TRUE;
STRRET str;
TRACE(shell,"%p %p %lx %p\n", lpsf, lpi, dwFlags, lpFriendlyName);
@ -97,8 +97,8 @@ static BOOL32 GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR
static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hParent)
{
TVITEM32A tvi;
TVINSERTSTRUCT32A tvins;
TVITEMA tvi;
TVINSERTSTRUCTA tvins;
HTREEITEM hPrev = 0;
LPENUMIDLIST lpe=0;
LPITEMIDLIST pidlTemp=0;
@ -106,12 +106,12 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare
ULONG ulFetched;
HRESULT hr;
char szBuff[256];
HWND32 hwnd=GetParent32(hwndTreeView);
HWND hwnd=GetParent(hwndTreeView);
TRACE(shell, "%p %p %x\n",lpsf, pidl, (INT32)hParent);
TRACE(shell, "%p %p %x\n",lpsf, pidl, (INT)hParent);
SetCapture32(GetParent32(hwndTreeView));
SetCursor32(LoadCursor32A(0, IDC_WAIT32A));
SetCapture(GetParent(hwndTreeView));
SetCursor(LoadCursorA(0, IDC_WAITA));
hr=lpsf->lpvtbl->fnEnumObjects(lpsf,hwnd, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS,&lpe);
@ -148,7 +148,7 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare
tvins.hInsertAfter = hPrev;
tvins.hParent = hParent;
hPrev = (HTREEITEM)TreeView_InsertItem32A (hwndTreeView, &tvins);
hPrev = (HTREEITEM)TreeView_InsertItemA (hwndTreeView, &tvins);
}
}
@ -159,15 +159,15 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare
Done:
ReleaseCapture();
SetCursor32(LoadCursor32A(0, IDC_ARROW32A));
SetCursor(LoadCursorA(0, IDC_ARROWA));
if (lpe) lpe->lpvtbl->fnRelease(lpe);
if (pidlTemp ) SHFree(pidlTemp);
}
static LRESULT MsgNotify(HWND32 hWnd, UINT32 CtlID, LPNMHDR lpnmh)
static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
{
NMTREEVIEW32A *pnmtv = (NMTREEVIEW32A *)lpnmh;
NMTREEVIEWA *pnmtv = (NMTREEVIEWA *)lpnmh;
LPTV_ITEMDATA lptvid; //Long pointer to TreeView item data
LPSHELLFOLDER lpsf2=0;
@ -221,14 +221,14 @@ static LRESULT MsgNotify(HWND32 hWnd, UINT32 CtlID, LPNMHDR lpnmh)
/*************************************************************************
* BrsFolderDlgProc32 (not an exported API function)
*/
BOOL32 WINAPI BrsFolderDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
BOOL WINAPI BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
LPARAM lParam )
{ TRACE(shell,"hwnd=%i msg=%i 0x%08x 0x%08lx\n", hWnd, msg, wParam, lParam );
switch(msg)
{ case WM_INITDIALOG:
pidlRet = NULL;
lpBrowseInfo = (LPBROWSEINFO32A) lParam;
lpBrowseInfo = (LPBROWSEINFOA) lParam;
if (lpBrowseInfo->lpfn)
FIXME(shell,"Callbacks not implemented\n");
if (lpBrowseInfo->ulFlags)
@ -242,7 +242,7 @@ BOOL32 WINAPI BrsFolderDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
return 1;
case WM_NOTIFY:
MsgNotify( hWnd, (UINT32)wParam, (LPNMHDR)lParam);
MsgNotify( hWnd, (UINT)wParam, (LPNMHDR)lParam);
break;
case WM_COMMAND:
@ -250,11 +250,11 @@ BOOL32 WINAPI BrsFolderDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
{ case IDOK:
pdump ( pidlRet );
_ILGetPidlPath (pidlRet, lpBrowseInfo->pszDisplayName, MAX_PATH);
EndDialog32(hWnd, (DWORD) ILClone(pidlRet));
EndDialog(hWnd, (DWORD) ILClone(pidlRet));
return TRUE;
case IDCANCEL:
EndDialog32(hWnd, 0);
EndDialog(hWnd, 0);
return TRUE;
}
break;
@ -267,11 +267,11 @@ extern LPCVOID _Resource_Dlg_SHBRSFORFOLDER_MSGBOX_0_data ;
* SHBrowseForFolderA [SHELL32.209]
*
*/
LPITEMIDLIST WINAPI SHBrowseForFolder32A (LPBROWSEINFO32A lpbi)
LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi)
{
TRACE(shell, "(%lx,%s) empty stub!\n", (DWORD)lpbi, lpbi->lpszTitle);
return (LPITEMIDLIST) DialogBoxIndirectParam32A( 0,
return (LPITEMIDLIST) DialogBoxIndirectParamA( 0,
&_Resource_Dlg_SHBRSFORFOLDER_MSGBOX_0_data, 0,
BrsFolderDlgProc32, (INT32)lpbi );
BrsFolderDlgProc, (INT)lpbi );
}

View File

@ -13,16 +13,16 @@
#include "shlobj.h"
#include "shell32_main.h"
BOOL32 HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len)
BOOL HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len)
{ HKEY hkey;
TRACE(shell, "%s %p\n",szExtension, szFileType );
if (RegOpenKeyEx32A(HKEY_CLASSES_ROOT,szExtension,0,0x02000000,&hkey))
if (RegOpenKeyExA(HKEY_CLASSES_ROOT,szExtension,0,0x02000000,&hkey))
{ return FALSE;
}
if (RegQueryValue32A(hkey,NULL,szFileType,&len))
if (RegQueryValueA(hkey,NULL,szFileType,&len))
{ RegCloseKey(hkey);
return FALSE;
}
@ -33,7 +33,7 @@ BOOL32 HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len)
return TRUE;
}
BOOL32 HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len )
BOOL HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len )
{ HKEY hkey;
char sTemp[256];
@ -41,11 +41,11 @@ BOOL32 HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWOR
sprintf(sTemp, "%s\\shell\\%s\\command",szClass, szVerb);
if (RegOpenKeyEx32A(HKEY_CLASSES_ROOT,sTemp,0,0x02000000,&hkey))
if (RegOpenKeyExA(HKEY_CLASSES_ROOT,sTemp,0,0x02000000,&hkey))
{ return FALSE;
}
if (RegQueryValue32A(hkey,NULL,szDest,&len))
if (RegQueryValueA(hkey,NULL,szDest,&len))
{ RegCloseKey(hkey);
return FALSE;
}
@ -61,7 +61,7 @@ BOOL32 HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWOR
*
* Gets the icon for a filetype
*/
BOOL32 HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr)
BOOL HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr)
{ HKEY hkey;
char sTemp[256];
char sNum[5];
@ -70,22 +70,22 @@ BOOL32 HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr
sprintf(sTemp, "%s\\DefaultIcon",szClass);
if (RegOpenKeyEx32A(HKEY_CLASSES_ROOT,sTemp,0,0x02000000,&hkey))
if (RegOpenKeyExA(HKEY_CLASSES_ROOT,sTemp,0,0x02000000,&hkey))
{ return FALSE;
}
if (RegQueryValue32A(hkey,NULL,szDest,&len))
if (RegQueryValueA(hkey,NULL,szDest,&len))
{ RegCloseKey(hkey);
return FALSE;
}
RegCloseKey(hkey);
if (ParseField32A (szDest, 2, sNum, 5))
if (ParseFieldA (szDest, 2, sNum, 5))
{ *dwNr=atoi(sNum);
}
ParseField32A (szDest, 1, szDest, len);
ParseFieldA (szDest, 1, szDest, len);
TRACE(shell, "-- %s %li\n", szDest, *dwNr );

View File

@ -23,22 +23,22 @@ typedef struct
DWORD ref;
LPSHELLFOLDER pSFParent;
LPITEMIDLIST *aPidls;
BOOL32 bAllValues;
BOOL bAllValues;
} IContextMenuImpl;
static HRESULT WINAPI IContextMenu_fnQueryInterface(IContextMenu *,REFIID , LPVOID *);
static ULONG WINAPI IContextMenu_fnAddRef(IContextMenu *);
static ULONG WINAPI IContextMenu_fnRelease(IContextMenu *);
static HRESULT WINAPI IContextMenu_fnQueryContextMenu(IContextMenu *, HMENU32 ,UINT32 ,UINT32 ,UINT32 ,UINT32);
static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *, LPCMINVOKECOMMANDINFO32);
static HRESULT WINAPI IContextMenu_fnGetCommandString(IContextMenu *, UINT32 ,UINT32 ,LPUINT32 ,LPSTR ,UINT32);
static HRESULT WINAPI IContextMenu_fnHandleMenuMsg(IContextMenu *, UINT32, WPARAM32, LPARAM);
static HRESULT WINAPI IContextMenu_fnQueryContextMenu(IContextMenu *, HMENU ,UINT ,UINT ,UINT ,UINT);
static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *, LPCMINVOKECOMMANDINFO);
static HRESULT WINAPI IContextMenu_fnGetCommandString(IContextMenu *, UINT ,UINT ,LPUINT ,LPSTR ,UINT);
static HRESULT WINAPI IContextMenu_fnHandleMenuMsg(IContextMenu *, UINT, WPARAM, LPARAM);
/* Private Methods */
BOOL32 IContextMenu_AllocPidlTable(IContextMenuImpl*, DWORD);
BOOL IContextMenu_AllocPidlTable(IContextMenuImpl*, DWORD);
void IContextMenu_FreePidlTable(IContextMenuImpl*);
BOOL32 IContextMenu_CanRenameItems(IContextMenuImpl*);
BOOL32 IContextMenu_FillPidlTable(IContextMenuImpl*, LPCITEMIDLIST *, UINT32);
BOOL IContextMenu_CanRenameItems(IContextMenuImpl*);
BOOL IContextMenu_FillPidlTable(IContextMenuImpl*, LPCITEMIDLIST *, UINT);
/**************************************************************************
* IContextMenu VTable
@ -124,9 +124,9 @@ static ULONG WINAPI IContextMenu_fnRelease(IContextMenu *iface)
/**************************************************************************
* IContextMenu_Constructor()
*/
IContextMenu *IContextMenu_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST *aPidls, UINT32 uItemCount)
IContextMenu *IContextMenu_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST *aPidls, UINT uItemCount)
{ IContextMenuImpl* cm;
UINT32 u;
UINT u;
FIXME(shell, "HELLO age\n") ;
cm = (IContextMenuImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IContextMenuImpl));
cm->lpvtbl=&cmvt;
@ -155,9 +155,9 @@ IContextMenu *IContextMenu_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST *a
/**************************************************************************
* ICM_InsertItem()
*/
void WINAPI _InsertMenuItem (HMENU32 hmenu, UINT32 indexMenu, BOOL32 fByPosition,
UINT32 wID, UINT32 fType, LPSTR dwTypeData, UINT32 fState)
{ MENUITEMINFO32A mii;
void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition,
UINT wID, UINT fType, LPSTR dwTypeData, UINT fState)
{ MENUITEMINFOA mii;
ZeroMemory(&mii, sizeof(mii));
mii.cbSize = sizeof(mii);
@ -171,16 +171,16 @@ void WINAPI _InsertMenuItem (HMENU32 hmenu, UINT32 indexMenu, BOOL32 fByPosition
}
mii.wID = wID;
mii.fType = fType;
InsertMenuItem32A( hmenu, indexMenu, fByPosition, &mii);
InsertMenuItemA( hmenu, indexMenu, fByPosition, &mii);
}
/**************************************************************************
* IContextMenu_fnQueryContextMenu()
*/
static HRESULT WINAPI IContextMenu_fnQueryContextMenu(IContextMenu *iface, HMENU32 hmenu, UINT32 indexMenu,
UINT32 idCmdFirst,UINT32 idCmdLast,UINT32 uFlags)
static HRESULT WINAPI IContextMenu_fnQueryContextMenu(IContextMenu *iface, HMENU hmenu, UINT indexMenu,
UINT idCmdFirst,UINT idCmdLast,UINT uFlags)
{ ICOM_THIS(IContextMenuImpl, iface);
BOOL32 fExplore ;
BOOL fExplore ;
TRACE(shell,"(%p)->(hmenu=%x indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n",This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
@ -217,20 +217,20 @@ static HRESULT WINAPI IContextMenu_fnQueryContextMenu(IContextMenu *iface, HMENU
/**************************************************************************
* IContextMenu_fnInvokeCommand()
*/
static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *iface, LPCMINVOKECOMMANDINFO32 lpcmi)
static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *iface, LPCMINVOKECOMMANDINFO lpcmi)
{ ICOM_THIS(IContextMenuImpl, iface);
LPITEMIDLIST pidlTemp,pidlFQ;
LPSHELLBROWSER lpSB;
LPSHELLVIEW lpSV;
HWND32 hWndSV;
SHELLEXECUTEINFO32A sei;
HWND hWndSV;
SHELLEXECUTEINFOA sei;
int i;
TRACE(shell,"(%p)->(invcom=%p verb=%p wnd=%x)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd);
if(HIWORD(lpcmi->lpVerb))
{ /* get the active IShellView */
lpSB = (LPSHELLBROWSER)SendMessage32A(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0);
lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0);
IShellBrowser_QueryActiveShellView(lpSB, &lpSV); /* does AddRef() on lpSV */
lpSV->lpvtbl->fnGetWindow(lpSV, &hWndSV);
@ -240,10 +240,10 @@ static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *iface, LPCMINVO
{ FIXME(shell,"%s not implemented\n",lpcmi->lpVerb);
}
else if (! strcmp(lpcmi->lpVerb,CMDSTR_VIEWLIST))
{ SendMessage32A(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_LISTVIEW,0),0 );
{ SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_LISTVIEW,0),0 );
}
else if (! strcmp(lpcmi->lpVerb,CMDSTR_VIEWDETAILS))
{ SendMessage32A(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_REPORTVIEW,0),0 );
{ SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_REPORTVIEW,0),0 );
}
else
{ FIXME(shell,"please report: unknown verb %s\n",lpcmi->lpVerb);
@ -284,12 +284,12 @@ static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *iface, LPCMINVO
else
{ sei.lpVerb = "open";
}
ShellExecuteEx32A(&sei);
ShellExecuteExA(&sei);
SHFree(pidlFQ);
break;
case IDM_RENAME:
MessageBeep32(MB_OK);
MessageBeep(MB_OK);
/*handle rename for the view here*/
break;
}
@ -299,8 +299,8 @@ static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *iface, LPCMINVO
/**************************************************************************
* IContextMenu_fnGetCommandString()
*/
static HRESULT WINAPI IContextMenu_fnGetCommandString(IContextMenu *iface, UINT32 idCommand,
UINT32 uFlags,LPUINT32 lpReserved,LPSTR lpszName,UINT32 uMaxNameLen)
static HRESULT WINAPI IContextMenu_fnGetCommandString(IContextMenu *iface, UINT idCommand,
UINT uFlags,LPUINT lpReserved,LPSTR lpszName,UINT uMaxNameLen)
{ ICOM_THIS(IContextMenuImpl, iface);
HRESULT hr = E_INVALIDARG;
@ -345,7 +345,7 @@ static HRESULT WINAPI IContextMenu_fnGetCommandString(IContextMenu *iface, UINT3
* should be only in IContextMenu2 and IContextMenu3
* is nevertheless called from word95
*/
static HRESULT WINAPI IContextMenu_fnHandleMenuMsg(IContextMenu *iface, UINT32 uMsg,WPARAM32 wParam,LPARAM lParam)
static HRESULT WINAPI IContextMenu_fnHandleMenuMsg(IContextMenu *iface, UINT uMsg,WPARAM wParam,LPARAM lParam)
{ ICOM_THIS(IContextMenuImpl, iface);
TRACE(shell,"(%p)->(msg=%x wp=%x lp=%lx)\n",This, uMsg, wParam, lParam);
return E_NOTIMPL;
@ -356,7 +356,7 @@ static HRESULT WINAPI IContextMenu_fnHandleMenuMsg(IContextMenu *iface, UINT32 u
/**************************************************************************
* IContextMenu_AllocPidlTable()
*/
BOOL32 IContextMenu_AllocPidlTable(IContextMenuImpl *This, DWORD dwEntries)
BOOL IContextMenu_AllocPidlTable(IContextMenuImpl *This, DWORD dwEntries)
{ TRACE(shell,"(%p)->(entrys=%lu)\n",This, dwEntries);
/*add one for NULL terminator */
@ -391,8 +391,8 @@ void IContextMenu_FreePidlTable(IContextMenuImpl *This)
/**************************************************************************
* IContextMenu_FillPidlTable()
*/
BOOL32 IContextMenu_FillPidlTable(IContextMenuImpl *This, LPCITEMIDLIST *aPidls, UINT32 uItemCount)
{ UINT32 i;
BOOL IContextMenu_FillPidlTable(IContextMenuImpl *This, LPCITEMIDLIST *aPidls, UINT uItemCount)
{ UINT i;
TRACE(shell,"(%p)->(apidl=%p count=%u)\n",This, aPidls, uItemCount);
if(This->aPidls)
{ for(i = 0; i < uItemCount; i++)
@ -406,8 +406,8 @@ BOOL32 IContextMenu_FillPidlTable(IContextMenuImpl *This, LPCITEMIDLIST *aPidls,
/**************************************************************************
* IContextMenu_CanRenameItems()
*/
BOOL32 IContextMenu_CanRenameItems(IContextMenuImpl *This)
{ UINT32 i;
BOOL IContextMenu_CanRenameItems(IContextMenuImpl *This)
{ UINT i;
DWORD dwAttributes;
TRACE(shell,"(%p)->()\n",This);

View File

@ -17,9 +17,9 @@
#include "winerror.h"
#include "shell32_main.h"
UINT32 cfShellIDList=0;
UINT32 cfFileGroupDesc=0;
UINT32 cfFileContents=0;
UINT cfShellIDList=0;
UINT cfFileGroupDesc=0;
UINT cfFileContents=0;
/***********************************************************************
* IEnumFORMATETC implementation
@ -30,15 +30,15 @@ typedef struct
ICOM_VTABLE(IEnumFORMATETC)* lpvtbl;
DWORD ref;
/* IEnumFORMATETC fields */
UINT32 posFmt;
UINT32 countFmt;
LPFORMATETC32 pFmt;
UINT posFmt;
UINT countFmt;
LPFORMATETC pFmt;
} IEnumFORMATETCImpl;
static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPENUMFORMATETC iface, REFIID riid, LPVOID* ppvObj);
static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPENUMFORMATETC iface);
static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface);
static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC32* rgelt, ULONG* pceltFethed);
static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC* rgelt, ULONG* pceltFethed);
static HRESULT WINAPI IEnumFORMATETC_fnSkip(LPENUMFORMATETC iface, ULONG celt);
static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface);
static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum);
@ -54,10 +54,10 @@ static struct ICOM_VTABLE(IEnumFORMATETC) efvt =
IEnumFORMATETC_fnClone
};
LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32 cfmt, const FORMATETC32 afmt[])
LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[])
{
IEnumFORMATETCImpl* ef;
DWORD size=cfmt * sizeof(FORMATETC32);
DWORD size=cfmt * sizeof(FORMATETC);
ef=(IEnumFORMATETCImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IEnumFORMATETCImpl));
ef->ref=1;
@ -124,10 +124,10 @@ static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface)
}
return This->ref;
}
static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed)
static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC *rgelt, ULONG *pceltFethed)
{
ICOM_THIS(IEnumFORMATETCImpl,iface);
UINT32 cfetch;
UINT cfetch;
HRESULT hres = S_FALSE;
TRACE (shell, "(%p)->()\n", This);
@ -138,7 +138,7 @@ static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, F
{ cfetch = celt;
hres = S_OK;
}
memcpy(rgelt, &This->pFmt[This->posFmt], cfetch * sizeof(FORMATETC32));
memcpy(rgelt, &This->pFmt[This->posFmt], cfetch * sizeof(FORMATETC));
This->posFmt += cfetch;
}
else
@ -195,13 +195,13 @@ typedef struct
static HRESULT WINAPI IDataObject_fnQueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID* ppvObj);
static ULONG WINAPI IDataObject_fnAddRef(LPDATAOBJECT iface);
static ULONG WINAPI IDataObject_fnRelease(LPDATAOBJECT iface);
static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetcIn, STGMEDIUM32* pmedium);
static HRESULT WINAPI IDataObject_fnGetDataHere(LPDATAOBJECT iface, LPFORMATETC32 pformatetc, STGMEDIUM32* pmedium);
static HRESULT WINAPI IDataObject_fnQueryGetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetc);
static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut);
static HRESULT WINAPI IDataObject_fnSetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetc, STGMEDIUM32* pmedium, BOOL32 fRelease);
static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM* pmedium);
static HRESULT WINAPI IDataObject_fnGetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM* pmedium);
static HRESULT WINAPI IDataObject_fnQueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc);
static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut);
static HRESULT WINAPI IDataObject_fnSetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM* pmedium, BOOL fRelease);
static HRESULT WINAPI IDataObject_fnEnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC** ppenumFormatEtc);
static HRESULT WINAPI IDataObject_fnDAdvise(LPDATAOBJECT iface, LPFORMATETC32* pformatetc, DWORD advf, IAdviseSink* pAdvSink, DWORD* pdwConnection);
static HRESULT WINAPI IDataObject_fnDAdvise(LPDATAOBJECT iface, LPFORMATETC* pformatetc, DWORD advf, IAdviseSink* pAdvSink, DWORD* pdwConnection);
static HRESULT WINAPI IDataObject_fnDUnadvise(LPDATAOBJECT iface, DWORD dwConnection);
static HRESULT WINAPI IDataObject_fnEnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise);
@ -224,7 +224,7 @@ static struct ICOM_VTABLE(IDataObject) dtovt =
/**************************************************************************
* IDataObject_Constructor
*/
LPDATAOBJECT IDataObject_Constructor(HWND32 hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT32 cidl)
LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT cidl)
{
IDataObjectImpl* dto;
if (!(dto = (IDataObjectImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDataObjectImpl))))
@ -309,12 +309,12 @@ static ULONG WINAPI IDataObject_fnRelease(LPDATAOBJECT iface)
* NOTES
* get or register the "Shell IDList Array" clipformat
*/
static BOOL32 DATAOBJECT_InitShellIDList(void)
static BOOL DATAOBJECT_InitShellIDList(void)
{ if (cfShellIDList)
{ return(TRUE);
}
cfShellIDList = RegisterClipboardFormat32A(CFSTR_SHELLIDLIST);
cfShellIDList = RegisterClipboardFormatA(CFSTR_SHELLIDLIST);
return(cfShellIDList != 0);
}
@ -354,17 +354,17 @@ static BOOL32 DATAOBJECT_InitFileContents(void)
/**************************************************************************
* interface implementation
*/
static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium)
static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM *pmedium)
{
ICOM_THIS(IDataObjectImpl,iface);
char temp[256];
UINT32 cItems;
UINT cItems;
DWORD size, size1, size2;
LPITEMIDLIST pidl;
LPCIDA pcida;
HGLOBAL32 hmem;
HGLOBAL hmem;
GetClipboardFormatName32A (pformatetcIn->cfFormat, temp, 256);
GetClipboardFormatNameA (pformatetcIn->cfFormat, temp, 256);
WARN (shell, "(%p)->(%p %p format=%s)semi-stub\n", This, pformatetcIn, pmedium, temp);
if (!DATAOBJECT_InitShellIDList()) /* is the clipformat registred? */
@ -387,11 +387,11 @@ static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC32 pf
/*hack consider only the first item*/
cItems = 2;
size = sizeof(CIDA) + sizeof (UINT32)*(cItems-1);
size = sizeof(CIDA) + sizeof (UINT)*(cItems-1);
size1 = ILGetSize (This->pidl);
size2 = ILGetSize (pidl);
hmem = GlobalAlloc32(GMEM_FIXED, size+size1+size2);
pcida = GlobalLock32 (hmem);
hmem = GlobalAlloc(GMEM_FIXED, size+size1+size2);
pcida = GlobalLock (hmem);
if (!pcida)
{ return(E_OUTOFMEMORY);
}
@ -408,10 +408,10 @@ static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC32 pf
memcpy ((LPBYTE)pcida+size+size1, pidl, size2);
TRACE(shell,"-- after copy\n");
GlobalUnlock32(hmem);
GlobalUnlock(hmem);
pmedium->tymed = TYMED_HGLOBAL;
pmedium->u.hGlobal = (HGLOBAL32)pcida;
pmedium->u.hGlobal = (HGLOBAL)pcida;
pmedium->pUnkForRelease = NULL;
TRACE(shell,"-- ready\n");
return(NOERROR);
@ -420,25 +420,25 @@ static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC32 pf
FIXME (shell, "-- clipformat not implemented\n");
return (E_INVALIDARG);
}
static HRESULT WINAPI IDataObject_fnGetDataHere(LPDATAOBJECT iface, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium)
static HRESULT WINAPI IDataObject_fnGetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium)
{
ICOM_THIS(IDataObjectImpl,iface);
FIXME (shell, "(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI IDataObject_fnQueryGetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetc)
static HRESULT WINAPI IDataObject_fnQueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc)
{
ICOM_THIS(IDataObjectImpl,iface);
FIXME (shell, "(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut)
static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut)
{
ICOM_THIS(IDataObjectImpl,iface);
FIXME (shell, "(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI IDataObject_fnSetData(LPDATAOBJECT iface, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease)
static HRESULT WINAPI IDataObject_fnSetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease)
{
ICOM_THIS(IDataObjectImpl,iface);
FIXME (shell, "(%p)->()\n", This);
@ -450,7 +450,7 @@ static HRESULT WINAPI IDataObject_fnEnumFormatEtc(LPDATAOBJECT iface, DWORD dwDi
FIXME (shell, "(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI IDataObject_fnDAdvise(LPDATAOBJECT iface, LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
static HRESULT WINAPI IDataObject_fnDAdvise(LPDATAOBJECT iface, LPFORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
{
ICOM_THIS(IDataObjectImpl,iface);
FIXME (shell, "(%p)->()\n", This);

View File

@ -22,9 +22,9 @@ static HRESULT WINAPI IEnumIDList_Next(LPENUMIDLIST,ULONG,LPITEMIDLIST*,ULONG*);
static HRESULT WINAPI IEnumIDList_Skip(LPENUMIDLIST,ULONG);
static HRESULT WINAPI IEnumIDList_Reset(LPENUMIDLIST);
static HRESULT WINAPI IEnumIDList_Clone(LPENUMIDLIST,LPENUMIDLIST*);
static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST,LPCSTR, DWORD);
static BOOL32 WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST,LPITEMIDLIST);
static BOOL32 WINAPI IEnumIDList_DeleteList(LPENUMIDLIST);
static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST,LPCSTR, DWORD);
static BOOL WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST,LPITEMIDLIST);
static BOOL WINAPI IEnumIDList_DeleteList(LPENUMIDLIST);
/**************************************************************************
* IEnumIDList_VTable
@ -206,11 +206,11 @@ static HRESULT WINAPI IEnumIDList_Clone(
* fixme: devices not handled
* fixme: add wildcards to path
*/
static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath, DWORD dwFlags)
static BOOL WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPath, DWORD dwFlags)
{ LPITEMIDLIST pidl=NULL;
LPPIDLDATA pData=NULL;
WIN32_FIND_DATA32A stffile;
HANDLE32 hFile;
WIN32_FIND_DATAA stffile;
HANDLE hFile;
DWORD dwDrivemap;
CHAR szDriveName[4];
CHAR szPath[MAX_PATH];
@ -219,7 +219,7 @@ static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPa
if (lpszPath && lpszPath[0]!='\0')
{ strcpy(szPath, lpszPath);
PathAddBackslash32A(szPath);
PathAddBackslashA(szPath);
strcat(szPath,"*.*");
}
@ -254,8 +254,8 @@ static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPa
}
else
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_FOLDERS of %s\n",this,debugstr_a(szPath));
hFile = FindFirstFile32A(szPath,&stffile);
if ( hFile != INVALID_HANDLE_VALUE32 )
hFile = FindFirstFileA(szPath,&stffile);
if ( hFile != INVALID_HANDLE_VALUE )
{ do
{ if ( (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && strcmp (stffile.cFileName, ".") && strcmp (stffile.cFileName, ".."))
{ pidl = _ILCreateFolder( stffile.cAlternateFileName, stffile.cFileName);
@ -272,8 +272,8 @@ static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPa
{ return FALSE;
}
}
} while( FindNextFile32A(hFile,&stffile));
FindClose32 (hFile);
} while( FindNextFileA(hFile,&stffile));
FindClose (hFile);
}
}
}
@ -281,8 +281,8 @@ static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPa
if(dwFlags & SHCONTF_NONFOLDERS)
{ if(lpszPath)
{ TRACE (shell,"-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",this,debugstr_a(szPath));
hFile = FindFirstFile32A(szPath,&stffile);
if ( hFile != INVALID_HANDLE_VALUE32 )
hFile = FindFirstFileA(szPath,&stffile);
if ( hFile != INVALID_HANDLE_VALUE )
{ do
{ if (! (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) )
{ pidl = _ILCreateValue( stffile.cAlternateFileName, stffile.cFileName);
@ -299,8 +299,8 @@ static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPa
{ return FALSE;
}
}
} while( FindNextFile32A(hFile,&stffile));
FindClose32 (hFile);
} while( FindNextFileA(hFile,&stffile));
FindClose (hFile);
}
}
}
@ -310,7 +310,7 @@ static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPa
/**************************************************************************
* EnumIDList_AddToEnumList()
*/
static BOOL32 WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST this,LPITEMIDLIST pidl)
static BOOL WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST this,LPITEMIDLIST pidl)
{ LPENUMLIST pNew;
TRACE(shell,"(%p)->(pidl=%p)\n",this,pidl);
@ -341,7 +341,7 @@ static BOOL32 WINAPI IEnumIDList_AddToEnumList(LPENUMIDLIST this,LPITEMIDLIST pi
/**************************************************************************
* EnumIDList_DeleteList()
*/
static BOOL32 WINAPI IEnumIDList_DeleteList(LPENUMIDLIST this)
static BOOL WINAPI IEnumIDList_DeleteList(LPENUMIDLIST this)
{ LPENUMLIST pDelete;
TRACE(shell,"(%p)->()\n",this);

View File

@ -23,8 +23,8 @@ static HRESULT WINAPI IExtractIcon_QueryInterface(LPEXTRACTICON, REFIID, LPVOID
static ULONG WINAPI IExtractIcon_AddRef(LPEXTRACTICON);
static ULONG WINAPI IExtractIcon_AddRef(LPEXTRACTICON);
static ULONG WINAPI IExtractIcon_Release(LPEXTRACTICON);
static HRESULT WINAPI IExtractIcon_GetIconLocation(LPEXTRACTICON, UINT32, LPSTR, UINT32, int *, UINT32 *);
static HRESULT WINAPI IExtractIcon_Extract(LPEXTRACTICON, LPCSTR, UINT32, HICON32 *, HICON32 *, UINT32);
static HRESULT WINAPI IExtractIcon_GetIconLocation(LPEXTRACTICON, UINT, LPSTR, UINT, int *, UINT *);
static HRESULT WINAPI IExtractIcon_Extract(LPEXTRACTICON, LPCSTR, UINT, HICON *, HICON *, UINT);
/***********************************************************************
@ -109,7 +109,7 @@ static ULONG WINAPI IExtractIcon_Release(LPEXTRACTICON this)
/**************************************************************************
* IExtractIcon_GetIconLocation
*/
static HRESULT WINAPI IExtractIcon_GetIconLocation(LPEXTRACTICON this, UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax, int * piIndex, UINT32 * pwFlags)
static HRESULT WINAPI IExtractIcon_GetIconLocation(LPEXTRACTICON this, UINT uFlags, LPSTR szIconFile, UINT cchMax, int * piIndex, UINT * pwFlags)
{ WARN (shell,"(%p) (flags=%u file=%s max=%u %p %p) semi-stub\n", this, uFlags, szIconFile, cchMax, piIndex, pwFlags);
*piIndex = (int) SHMapPIDLToSystemImageListIndex(0, this->pidl,0);
@ -122,7 +122,7 @@ static HRESULT WINAPI IExtractIcon_GetIconLocation(LPEXTRACTICON this, UINT32 uF
/**************************************************************************
* IExtractIcon_Extract
*/
static HRESULT WINAPI IExtractIcon_Extract(LPEXTRACTICON this, LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize)
static HRESULT WINAPI IExtractIcon_Extract(LPEXTRACTICON this, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize)
{ FIXME (shell,"(%p) (file=%s index=%u %p %p size=%u) semi-stub\n", this, pszFile, nIconIndex, phiconLarge, phiconSmall, nIconSize);
*phiconLarge = pImageList_GetIcon(ShellBigIconList, nIconIndex, ILD_TRANSPARENT);
*phiconSmall = pImageList_GetIcon(ShellSmallIconList, nIconIndex, ILD_TRANSPARENT);

View File

@ -46,7 +46,7 @@ typedef struct
/*************************************************************************
* SHELL_GetResourceTable
*/
static DWORD SHELL_GetResourceTable(HFILE32 hFile,LPBYTE *retptr)
static DWORD SHELL_GetResourceTable(HFILE hFile,LPBYTE *retptr)
{ IMAGE_DOS_HEADER mz_header;
char magic[4];
int size;
@ -54,8 +54,8 @@ static DWORD SHELL_GetResourceTable(HFILE32 hFile,LPBYTE *retptr)
TRACE(shell,"\n");
*retptr = NULL;
_llseek32( hFile, 0, SEEK_SET );
if ((_lread32(hFile,&mz_header,sizeof(mz_header)) != sizeof(mz_header)) || (mz_header.e_magic != IMAGE_DOS_SIGNATURE))
_llseek( hFile, 0, SEEK_SET );
if ((_lread(hFile,&mz_header,sizeof(mz_header)) != sizeof(mz_header)) || (mz_header.e_magic != IMAGE_DOS_SIGNATURE))
{ if (mz_header.e_cblp == 1) /* .ICO file ? */
{ *retptr = (LPBYTE)-1; /* ICONHEADER.idType, must be 1 */
return 1;
@ -63,12 +63,12 @@ static DWORD SHELL_GetResourceTable(HFILE32 hFile,LPBYTE *retptr)
else
return 0; /* failed */
}
_llseek32( hFile, mz_header.e_lfanew, SEEK_SET );
_llseek( hFile, mz_header.e_lfanew, SEEK_SET );
if (_lread32( hFile, magic, sizeof(magic) ) != sizeof(magic))
if (_lread( hFile, magic, sizeof(magic) ) != sizeof(magic))
return 0;
_llseek32( hFile, mz_header.e_lfanew, SEEK_SET);
_llseek( hFile, mz_header.e_lfanew, SEEK_SET);
if (*(DWORD*)magic == IMAGE_NT_SIGNATURE)
return IMAGE_NT_SIGNATURE;
@ -77,7 +77,7 @@ static DWORD SHELL_GetResourceTable(HFILE32 hFile,LPBYTE *retptr)
{ IMAGE_OS2_HEADER ne_header;
LPBYTE pTypeInfo = (LPBYTE)-1;
if (_lread32(hFile,&ne_header,sizeof(ne_header))!=sizeof(ne_header))
if (_lread(hFile,&ne_header,sizeof(ne_header))!=sizeof(ne_header))
return 0;
if (ne_header.ne_magic != IMAGE_OS2_SIGNATURE)
@ -88,8 +88,8 @@ static DWORD SHELL_GetResourceTable(HFILE32 hFile,LPBYTE *retptr)
if( size > sizeof(NE_TYPEINFO) )
{ pTypeInfo = (BYTE*)HeapAlloc( GetProcessHeap(), 0, size);
if( pTypeInfo )
{ _llseek32(hFile, mz_header.e_lfanew+ne_header.resource_tab_offset, SEEK_SET);
if( _lread32( hFile, (char*)pTypeInfo, size) != size )
{ _llseek(hFile, mz_header.e_lfanew+ne_header.resource_tab_offset, SEEK_SET);
if( _lread( hFile, (char*)pTypeInfo, size) != size )
{ HeapFree( GetProcessHeap(), 0, pTypeInfo);
pTypeInfo = NULL;
}
@ -103,15 +103,15 @@ static DWORD SHELL_GetResourceTable(HFILE32 hFile,LPBYTE *retptr)
/*************************************************************************
* SHELL_LoadResource
*/
static HGLOBAL16 SHELL_LoadResource(HINSTANCE32 hInst, HFILE32 hFile, NE_NAMEINFO* pNInfo, WORD sizeShift)
static HGLOBAL16 SHELL_LoadResource(HINSTANCE hInst, HFILE hFile, NE_NAMEINFO* pNInfo, WORD sizeShift)
{ BYTE* ptr;
HGLOBAL16 handle = DirectResAlloc( hInst, 0x10, (DWORD)pNInfo->length << sizeShift);
HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, (DWORD)pNInfo->length << sizeShift);
TRACE(shell,"\n");
if( (ptr = (BYTE*)GlobalLock16( handle )) )
{ _llseek32( hFile, (DWORD)pNInfo->offset << sizeShift, SEEK_SET);
_lread32( hFile, (char*)ptr, pNInfo->length << sizeShift);
{ _llseek( hFile, (DWORD)pNInfo->offset << sizeShift, SEEK_SET);
_lread( hFile, (char*)ptr, pNInfo->length << sizeShift);
return handle;
}
return 0;
@ -120,13 +120,13 @@ static HGLOBAL16 SHELL_LoadResource(HINSTANCE32 hInst, HFILE32 hFile, NE_NAMEINF
/*************************************************************************
* ICO_LoadIcon
*/
static HGLOBAL16 ICO_LoadIcon(HINSTANCE32 hInst, HFILE32 hFile, LPicoICONDIRENTRY lpiIDE)
static HGLOBAL16 ICO_LoadIcon(HINSTANCE hInst, HFILE hFile, LPicoICONDIRENTRY lpiIDE)
{ BYTE* ptr;
HGLOBAL16 handle = DirectResAlloc( hInst, 0x10, lpiIDE->dwBytesInRes);
HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10, lpiIDE->dwBytesInRes);
TRACE(shell,"\n");
if( (ptr = (BYTE*)GlobalLock16( handle )) )
{ _llseek32( hFile, lpiIDE->dwImageOffset, SEEK_SET);
_lread32( hFile, (char*)ptr, lpiIDE->dwBytesInRes);
{ _llseek( hFile, lpiIDE->dwImageOffset, SEEK_SET);
_lread( hFile, (char*)ptr, lpiIDE->dwBytesInRes);
return handle;
}
return 0;
@ -137,14 +137,14 @@ static HGLOBAL16 ICO_LoadIcon(HINSTANCE32 hInst, HFILE32 hFile, LPicoICONDIRENTR
*
* Read .ico file and build phony ICONDIR struct for GetIconID
*/
static HGLOBAL16 ICO_GetIconDirectory(HINSTANCE32 hInst, HFILE32 hFile, LPicoICONDIR* lplpiID )
static HGLOBAL16 ICO_GetIconDirectory(HINSTANCE hInst, HFILE hFile, LPicoICONDIR* lplpiID )
{ WORD id[3]; /* idReserved, idType, idCount */
LPicoICONDIR lpiID;
int i;
TRACE(shell,"\n");
_llseek32( hFile, 0, SEEK_SET );
if( _lread32(hFile,(char*)id,sizeof(id)) != sizeof(id) )
_llseek( hFile, 0, SEEK_SET );
if( _lread(hFile,(char*)id,sizeof(id)) != sizeof(id) )
return 0;
/* check .ICO header
@ -159,8 +159,8 @@ static HGLOBAL16 ICO_GetIconDirectory(HINSTANCE32 hInst, HFILE32 hFile, LPicoICO
lpiID = (LPicoICONDIR)HeapAlloc( GetProcessHeap(), 0, i);
if( _lread32(hFile,(char*)lpiID->idEntries,i) == i )
{ HGLOBAL16 handle = DirectResAlloc( hInst, 0x10,id[2]*sizeof(ICONDIRENTRY) + sizeof(id) );
if( _lread(hFile,(char*)lpiID->idEntries,i) == i )
{ HGLOBAL16 handle = DirectResAlloc16( hInst, 0x10,id[2]*sizeof(ICONDIRENTRY) + sizeof(id) );
if( handle )
{ CURSORICONDIR* lpID = (CURSORICONDIR*)GlobalLock16( handle );
lpID->idReserved = lpiID->idReserved = id[0];
@ -191,19 +191,19 @@ static HGLOBAL16 ICO_GetIconDirectory(HINSTANCE32 hInst, HFILE32 hFile, LPicoICO
#define ICO_INVALID_FILE 1
#define ICO_NO_ICONS 0
HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32 * RetPtr, UINT32 nIconIndex, UINT32 n, UINT32 cxDesired, UINT32 cyDesired )
{ HGLOBAL32 hRet = ICO_NO_ICONS;
HGLOBAL WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON * RetPtr, UINT nIconIndex, UINT n, UINT cxDesired, UINT cyDesired )
{ HGLOBAL hRet = ICO_NO_ICONS;
LPBYTE pData;
OFSTRUCT ofs;
DWORD sig;
HFILE32 hFile = OpenFile32( lpszExeFileName, &ofs, OF_READ );
HFILE hFile = OpenFile( lpszExeFileName, &ofs, OF_READ );
UINT16 iconDirCount = 0,iconCount = 0;
LPBYTE peimage;
HANDLE32 fmapping;
HANDLE fmapping;
TRACE(shell,"(file %s,start %d,extract %d\n", lpszExeFileName, nIconIndex, n);
if( hFile == HFILE_ERROR32 || !n )
if( hFile == HFILE_ERROR || !n )
return ICO_INVALID_FILE;
sig = SHELL_GetResourceTable(hFile,&pData);
@ -250,7 +250,7 @@ HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32 * RetPtr, UIN
if( lpiID == NULL )
hIcon = SHELL_LoadResource( 0, hFile, pIconDir + i, *(WORD*)pData );
RetPtr[i-nIconIndex] = GetIconID( hIcon, 3 );
RetPtr[i-nIconIndex] = GetIconID16( hIcon, 3 );
GlobalFree16(hIcon);
}
@ -267,7 +267,7 @@ HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32 * RetPtr, UIN
}
}
if( hIcon )
{ RetPtr[icon-nIconIndex] = LoadIconHandler( hIcon, TRUE );
{ RetPtr[icon-nIconIndex] = LoadIconHandler16( hIcon, TRUE );
}
else
{ RetPtr[icon-nIconIndex] = 0;
@ -293,7 +293,7 @@ HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32 * RetPtr, UIN
PIMAGE_RESOURCE_DIRECTORY_ENTRY xresent;
int i,j;
if ( !(fmapping = CreateFileMapping32A(hFile,NULL,PAGE_READONLY|SEC_COMMIT,0,0,NULL)))
if ( !(fmapping = CreateFileMappingA(hFile,NULL,PAGE_READONLY|SEC_COMMIT,0,0,NULL)))
{ WARN(shell,"failed to create filemap.\n"); /* FIXME, INVALID_HANDLE_VALUE? */
hRet = ICO_INVALID_FILE;
goto end_2; /* failure */
@ -325,7 +325,7 @@ HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32 * RetPtr, UIN
goto end_4; /* failure */
}
/* search the group icon dir*/
if (!(icongroupresdir = GetResDirEntryW(rootresdir,RT_GROUP_ICON32W, (DWORD)rootresdir,FALSE)))
if (!(icongroupresdir = GetResDirEntryW(rootresdir,RT_GROUP_ICONW, (DWORD)rootresdir,FALSE)))
{ WARN(shell,"No Icongroupresourcedirectory!\n");
goto end_4; /* failure */
}
@ -375,10 +375,10 @@ HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32 * RetPtr, UIN
{ WARN(shell,"no matching real address for icongroup!\n");
goto end_4; /* failure */
}
RetPtr[i] = (HICON32)pLookupIconIdFromDirectoryEx32(igdata, TRUE, cxDesired, cyDesired, LR_DEFAULTCOLOR);
RetPtr[i] = (HICON)pLookupIconIdFromDirectoryEx(igdata, TRUE, cxDesired, cyDesired, LR_DEFAULTCOLOR);
}
if (!(iconresdir=GetResDirEntryW(rootresdir,RT_ICON32W,(DWORD)rootresdir,FALSE)))
if (!(iconresdir=GetResDirEntryW(rootresdir,RT_ICONW,(DWORD)rootresdir,FALSE)))
{ WARN(shell,"No Iconresourcedirectory!\n");
goto end_4; /* failure */
}
@ -403,7 +403,7 @@ HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32 * RetPtr, UIN
RetPtr[i]=0;
continue;
}
RetPtr[i] = (HICON32) pCreateIconFromResourceEx32(idata,idataent->Size,TRUE,0x00030000, cxDesired, cyDesired, LR_DEFAULTCOLOR);
RetPtr[i] = (HICON) pCreateIconFromResourceEx(idata,idataent->Size,TRUE,0x00030000, cxDesired, cyDesired, LR_DEFAULTCOLOR);
}
hRet = RetPtr[0]; /* return first icon */
goto end_3; /* sucess */
@ -415,7 +415,7 @@ HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32 * RetPtr, UIN
end_4: hRet = 0; /* failure */
end_3: UnmapViewOfFile(peimage); /* success */
end_2: CloseHandle(fmapping);
end_1: _lclose32( hFile);
end_1: _lclose( hFile);
return hRet;
}
@ -437,7 +437,7 @@ typedef struct
* NOTES
* Callback for DPA_Search
*/
INT32 CALLBACK SIC_CompareEntrys( LPVOID p1, LPVOID p2, LPARAM lparam)
INT CALLBACK SIC_CompareEntrys( LPVOID p1, LPVOID p2, LPARAM lparam)
{ TRACE(shell,"%p %p\n", p1, p2);
if (((LPSIC_ENTRY)p1)->dwSourceIndex != ((LPSIC_ENTRY)p2)->dwSourceIndex) /* first the faster one*/
@ -453,9 +453,9 @@ INT32 CALLBACK SIC_CompareEntrys( LPVOID p1, LPVOID p2, LPARAM lparam)
* NOTES
* appends a icon pair to the end of the cache
*/
static INT32 SIC_IconAppend (LPCSTR sSourceFile, INT32 dwSourceIndex, HICON32 hSmallIcon, HICON32 hBigIcon)
static INT SIC_IconAppend (LPCSTR sSourceFile, INT dwSourceIndex, HICON hSmallIcon, HICON hBigIcon)
{ LPSIC_ENTRY lpsice;
INT32 index, index1;
INT index, index1;
TRACE(shell,"%s %i %x %x\n", sSourceFile, dwSourceIndex, hSmallIcon ,hBigIcon);
@ -486,9 +486,9 @@ static INT32 SIC_IconAppend (LPCSTR sSourceFile, INT32 dwSourceIndex, HICON32 hS
* NOTES
* gets small/big icon by number from a file
*/
static INT32 SIC_LoadIcon (LPCSTR sSourceFile, INT32 dwSourceIndex)
{ HICON32 hiconLarge=0;
HICON32 hiconSmall=0;
static INT SIC_LoadIcon (LPCSTR sSourceFile, INT dwSourceIndex)
{ HICON hiconLarge=0;
HICON hiconSmall=0;
ICO_ExtractIconEx(sSourceFile, &hiconLarge, dwSourceIndex, 1, 32, 32 );
ICO_ExtractIconEx(sSourceFile, &hiconSmall, dwSourceIndex, 1, 16, 16 );
@ -506,9 +506,9 @@ static INT32 SIC_LoadIcon (LPCSTR sSourceFile, INT32 dwSourceIndex)
* look in the cache for a proper icon. if not available the icon is taken
* from the file and cached
*/
INT32 SIC_GetIconIndex (LPCSTR sSourceFile, INT32 dwSourceIndex )
INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex )
{ SIC_ENTRY sice;
INT32 index = INVALID_INDEX;
INT index = INVALID_INDEX;
TRACE(shell,"%s %i\n", sSourceFile, dwSourceIndex);
@ -531,8 +531,8 @@ INT32 SIC_GetIconIndex (LPCSTR sSourceFile, INT32 dwSourceIndex )
* NOTES
* retrives the specified icon from the iconcache. if not found try's to load the icon
*/
static HICON32 SIC_GetIcon (LPCSTR sSourceFile, INT32 dwSourceIndex, BOOL32 bSmallIcon )
{ INT32 index;
static HICON SIC_GetIcon (LPCSTR sSourceFile, INT dwSourceIndex, BOOL bSmallIcon )
{ INT index;
TRACE(shell,"%s %i\n", sSourceFile, dwSourceIndex);
@ -552,11 +552,11 @@ static HICON32 SIC_GetIcon (LPCSTR sSourceFile, INT32 dwSourceIndex, BOOL32 bSma
* hack to load the resources from the shell32.dll under a different dll name
* will be removed when the resource-compiler is ready
*/
BOOL32 SIC_Initialize(void)
BOOL SIC_Initialize(void)
{ CHAR szShellPath[MAX_PATH];
HGLOBAL32 hSmRet, hLgRet;
HICON32 *pSmRet, *pLgRet;
UINT32 index;
HGLOBAL hSmRet, hLgRet;
HICON *pSmRet, *pLgRet;
UINT index;
TRACE(shell,"\n");
@ -569,17 +569,17 @@ BOOL32 SIC_Initialize(void)
{ return(FALSE);
}
GetSystemDirectory32A(szShellPath,MAX_PATH);
PathAddBackslash32A(szShellPath);
GetSystemDirectoryA(szShellPath,MAX_PATH);
PathAddBackslashA(szShellPath);
strcat(szShellPath,"shell32.dll");
hSmRet = GlobalAlloc32( GMEM_FIXED | GMEM_ZEROINIT, sizeof(HICON32)*40);
hLgRet = GlobalAlloc32( GMEM_FIXED | GMEM_ZEROINIT, sizeof(HICON32)*40);
hSmRet = GlobalAlloc( GMEM_FIXED | GMEM_ZEROINIT, sizeof(HICON)*40);
hLgRet = GlobalAlloc( GMEM_FIXED | GMEM_ZEROINIT, sizeof(HICON)*40);
pSmRet = (HICON32*)GlobalLock32(hSmRet);
pLgRet = (HICON32*)GlobalLock32(hLgRet);
pSmRet = (HICON*)GlobalLock(hSmRet);
pLgRet = (HICON*)GlobalLock(hLgRet);
ExtractIconEx32A ( szShellPath, 0, pLgRet, pSmRet, 40 );
ExtractIconExA ( szShellPath, 0, pLgRet, pSmRet, 40 );
ShellSmallIconList = pImageList_Create(16,16,ILC_COLORDDB | ILC_MASK,0,0x20);
ShellBigIconList = pImageList_Create(32,32,ILC_COLORDDB | ILC_MASK,0,0x20);
@ -594,11 +594,11 @@ BOOL32 SIC_Initialize(void)
SIC_IconAppend (szShellPath, index, pSmRet[index], pLgRet[index]);
}
GlobalUnlock32(hLgRet);
GlobalFree32(hLgRet);
GlobalUnlock(hLgRet);
GlobalFree(hLgRet);
GlobalUnlock32(hSmRet);
GlobalFree32(hSmRet);
GlobalUnlock(hSmRet);
GlobalFree(hSmRet);
TRACE(shell,"hIconSmall=%p hIconBig=%p\n",ShellSmallIconList, ShellBigIconList);
@ -682,13 +682,13 @@ DWORD WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,LPITEMIDLIST pidl,
* Shell_GetCachedImageIndex [SHELL32.72]
*
*/
INT32 WINAPI Shell_GetCachedImageIndex32A(LPCSTR szPath, INT32 nIndex, DWORD z)
INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, DWORD z)
{ WARN(shell,"(%s,%08x,%08lx) semi-stub.\n",debugstr_a(szPath),nIndex,z);
return SIC_GetIconIndex(szPath, nIndex);
}
INT32 WINAPI Shell_GetCachedImageIndex32W(LPCWSTR szPath, INT32 nIndex, DWORD z)
{ INT32 ret;
INT WINAPI Shell_GetCachedImageIndexW(LPCWSTR szPath, INT nIndex, DWORD z)
{ INT ret;
LPSTR sTemp = HEAP_strdupWtoA (GetProcessHeap(),0,szPath);
WARN(shell,"(%s,%08x,%08lx) semi-stub.\n",debugstr_w(szPath),nIndex,z);
@ -698,19 +698,19 @@ INT32 WINAPI Shell_GetCachedImageIndex32W(LPCWSTR szPath, INT32 nIndex, DWORD z)
return ret;
}
INT32 WINAPI Shell_GetCachedImageIndex32AW(LPCVOID szPath, INT32 nIndex, DWORD z)
INT WINAPI Shell_GetCachedImageIndexAW(LPCVOID szPath, INT nIndex, DWORD z)
{ if( VERSION_OsIsUnicode())
return Shell_GetCachedImageIndex32W(szPath, nIndex, z);
return Shell_GetCachedImageIndex32A(szPath, nIndex, z);
return Shell_GetCachedImageIndexW(szPath, nIndex, z);
return Shell_GetCachedImageIndexA(szPath, nIndex, z);
}
/*************************************************************************
* ExtracticonEx32 [shell32.189]
*/
HICON32 WINAPI ExtractIconEx32AW ( LPCVOID lpszFile, INT32 nIconIndex, HICON32 * phiconLarge, HICON32 * phiconSmall, UINT32 nIcons )
HICON WINAPI ExtractIconExAW ( LPCVOID lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons )
{ if (VERSION_OsIsUnicode())
return ExtractIconEx32W ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
return ExtractIconEx32A ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
return ExtractIconExW ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
return ExtractIconExA ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
}
/*************************************************************************
* ExtracticonEx32A [shell32.190]
@ -719,8 +719,8 @@ HICON32 WINAPI ExtractIconEx32AW ( LPCVOID lpszFile, INT32 nIconIndex, HICON32 *
* 1 file is not valid
* HICON32 handle of a icon (phiconLarge/Small == NULL)
*/
HICON32 WINAPI ExtractIconEx32A ( LPCSTR lpszFile, INT32 nIconIndex, HICON32 * phiconLarge, HICON32 * phiconSmall, UINT32 nIcons )
{ HICON32 ret=0;
HICON WINAPI ExtractIconExA ( LPCSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons )
{ HICON ret=0;
TRACE(shell,"file=%s idx=%i %p %p num=%i\n", lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons );
@ -751,14 +751,14 @@ HICON32 WINAPI ExtractIconEx32A ( LPCSTR lpszFile, INT32 nIconIndex, HICON32 * p
/*************************************************************************
* ExtracticonEx32W [shell32.191]
*/
HICON32 WINAPI ExtractIconEx32W ( LPCWSTR lpszFile, INT32 nIconIndex, HICON32 * phiconLarge, HICON32 * phiconSmall, UINT32 nIcons )
HICON WINAPI ExtractIconExW ( LPCWSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons )
{ LPSTR sFile;
DWORD ret;
TRACE(shell,"file=%s idx=%i %p %p num=%i\n", debugstr_w(lpszFile), nIconIndex, phiconLarge, phiconSmall, nIcons );
sFile = HEAP_strdupWtoA (GetProcessHeap(),0,lpszFile);
ret = ExtractIconEx32A ( sFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
ret = ExtractIconExA ( sFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
HeapFree(GetProcessHeap(),0,sFile);
return ret;
}

View File

@ -54,9 +54,9 @@ void pdump (LPCITEMIDLIST pidl)
/*************************************************************************
* ILGetDisplayName [SHELL32.15]
*/
BOOL32 WINAPI ILGetDisplayName(LPCITEMIDLIST pidl,LPSTR path)
BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl,LPSTR path)
{ FIXME(shell,"pidl=%p %p semi-stub\n",pidl,path);
return SHGetPathFromIDList32A(pidl, path);
return SHGetPathFromIDListA(pidl, path);
}
/*************************************************************************
* ILFindLastID [SHELL32.16]
@ -79,7 +79,7 @@ LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl)
* NOTES
* Removes the last item
*/
BOOL32 WINAPI ILRemoveLastID(LPCITEMIDLIST pidl)
BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl)
{ TRACE(shell,"pidl=%p\n",pidl);
if (!pidl || !pidl->mkid.cb)
return 0;
@ -148,7 +148,7 @@ LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
* NOTES
* exported by ordinal
*/
LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND32 hwndOwner,DWORD nFolder,DWORD x3)
LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND hwndOwner,DWORD nFolder,DWORD x3)
{ LPITEMIDLIST ppidl;
WARN(shell,"(hwnd=0x%x,csidl=0x%lx,0x%lx):semi-stub.\n",
hwndOwner,nFolder,x3);
@ -184,7 +184,7 @@ LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl)
* ILIsEqual [SHELL32.21]
*
*/
BOOL32 WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
{ LPPIDLDATA ppidldata;
CHAR * szData1;
CHAR * szData2;
@ -416,7 +416,7 @@ LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl)
* otherwise adds the item to the end. (???)
* Destroys the passed in idlist! (???)
*/
LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL32 bEnd)
LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL bEnd)
{ LPITEMIDLIST idlRet;
WARN(pidl,"(pidl=%p,pidl=%p,%08u)semi-stub\n",pidl,item,bEnd);
pdump (pidl);
@ -477,11 +477,11 @@ LPITEMIDLIST WINAPI ILCreateFromPath(LPVOID path)
if ( !VERSION_OsIsUnicode())
{ TRACE(pidl,"(path=%s)\n",(LPSTR)path);
LocalToWideChar32(lpszDisplayName, path, MAX_PATH);
LocalToWideChar(lpszDisplayName, path, MAX_PATH);
}
else
{ TRACE(pidl,"(path=L%s)\n",debugstr_w(path));
lstrcpy32W(lpszDisplayName, path);
lstrcpyW(lpszDisplayName, path);
}
if (SHGetDesktopFolder(&shellfolder)==S_OK)
@ -494,7 +494,7 @@ LPITEMIDLIST WINAPI ILCreateFromPath(LPVOID path)
* SHSimpleIDListFromPath [SHELL32.162]
*
*/
LPITEMIDLIST WINAPI SHSimpleIDListFromPath32AW (LPVOID lpszPath)
LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW (LPVOID lpszPath)
{ LPCSTR lpszElement;
char lpszTemp[MAX_PATH];
@ -503,15 +503,15 @@ LPITEMIDLIST WINAPI SHSimpleIDListFromPath32AW (LPVOID lpszPath)
if ( VERSION_OsIsUnicode())
{ TRACE(pidl,"(path=L%s)\n",debugstr_w((LPWSTR)lpszPath));
WideCharToLocal32(lpszTemp, lpszPath, MAX_PATH);
WideCharToLocal(lpszTemp, lpszPath, MAX_PATH);
}
else
{ TRACE(pidl,"(path=%s)\n",(LPSTR)lpszPath);
strcpy(lpszTemp, lpszPath);
}
lpszElement = PathFindFilename32A(lpszTemp);
if( GetFileAttributes32A(lpszTemp) & FILE_ATTRIBUTE_DIRECTORY )
lpszElement = PathFindFilenameA(lpszTemp);
if( GetFileAttributesA(lpszTemp) & FILE_ATTRIBUTE_DIRECTORY )
{ return _ILCreateFolder(NULL, lpszElement); /*FIXME: fill shortname */
}
return _ILCreateValue(NULL, lpszElement); /*FIXME: fill shortname */
@ -520,7 +520,7 @@ LPITEMIDLIST WINAPI SHSimpleIDListFromPath32AW (LPVOID lpszPath)
* SHGetDataFromIDListA [SHELL32.247]
*
*/
HRESULT WINAPI SHGetDataFromIDList32A(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len)
HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len)
{ FIXME(shell,"sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len);
switch (nFormat)
{ case SHGDFIL_FINDDATA:
@ -536,9 +536,9 @@ HRESULT WINAPI SHGetDataFromIDList32A(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int
* SHGetDataFromIDListW [SHELL32.247]
*
*/
HRESULT WINAPI SHGetDataFromIDList32W(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len)
HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len)
{ FIXME(shell,"sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len);
return SHGetDataFromIDList32A( psf, pidl, nFormat, dest, len);
return SHGetDataFromIDListA( psf, pidl, nFormat, dest, len);
}
/**************************************************************************
@ -662,30 +662,30 @@ DWORD WINAPI _ILGetItemText(LPCITEMIDLIST pidl, LPSTR lpszText, UINT16 uSize)
* _ILIsFolder()
* _ILIsValue()
*/
BOOL32 WINAPI _ILIsDesktop(LPCITEMIDLIST pidl)
BOOL WINAPI _ILIsDesktop(LPCITEMIDLIST pidl)
{ TRACE(pidl,"(%p)\n",pidl);
return ( !pidl || (pidl && pidl->mkid.cb == 0x00) );
}
BOOL32 WINAPI _ILIsMyComputer(LPCITEMIDLIST pidl)
BOOL WINAPI _ILIsMyComputer(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE(pidl,"(%p)\n",pidl);
return (pidl && lpPData && PT_MYCOMP == lpPData->type);
}
BOOL32 WINAPI _ILIsDrive(LPCITEMIDLIST pidl)
BOOL WINAPI _ILIsDrive(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE(pidl,"(%p)\n",pidl);
return (pidl && lpPData && PT_DRIVE == lpPData->type);
}
BOOL32 WINAPI _ILIsFolder(LPCITEMIDLIST pidl)
BOOL WINAPI _ILIsFolder(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE(pidl,"(%p)\n",pidl);
return (pidl && lpPData && PT_FOLDER == lpPData->type);
}
BOOL32 WINAPI _ILIsValue(LPCITEMIDLIST pidl)
BOOL WINAPI _ILIsValue(LPCITEMIDLIST pidl)
{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
TRACE(pidl,"(%p)\n",pidl);
return (pidl && lpPData && PT_VALUE == lpPData->type);
@ -904,7 +904,7 @@ LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE type, LPVOID pIn, UINT16 uInSize)
* RETURNS
* length of data (raw)
*/
DWORD WINAPI _ILGetData(PIDLTYPE type, LPCITEMIDLIST pidl, LPVOID pOut, UINT32 uOutSize)
DWORD WINAPI _ILGetData(PIDLTYPE type, LPCITEMIDLIST pidl, LPVOID pOut, UINT uOutSize)
{ LPPIDLDATA pData;
DWORD dwReturn=0;
LPSTR pszSrc;
@ -1001,7 +1001,7 @@ LPSTR WINAPI _ILGetSTextPointer(PIDLTYPE type, LPPIDLDATA pidldata)
}
return NULL;
}
BOOL32 WINAPI _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize)
BOOL WINAPI _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
{ LPPIDLDATA pdata =_ILGetDataPointer(pidl);
FILETIME ft;
SYSTEMTIME time;
@ -1020,9 +1020,9 @@ BOOL32 WINAPI _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize)
return FALSE;
}
FileTimeToSystemTime (&ft, &time);
return GetDateFormat32A(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, pOut, uOutSize);
return GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, pOut, uOutSize);
}
BOOL32 WINAPI _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize)
BOOL WINAPI _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
{ LPPIDLDATA pdata =_ILGetDataPointer(pidl);
char stemp[20]; /* for filesize */
@ -1036,12 +1036,12 @@ BOOL32 WINAPI _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize)
default:
return FALSE;
}
StrFormatByteSize32A(pdata->u.file.dwFileSize, stemp, 20);
StrFormatByteSizeA(pdata->u.file.dwFileSize, stemp, 20);
strncpy( pOut, stemp, 20);
return TRUE;
}
BOOL32 WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize)
BOOL WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
{ char pTemp[MAX_PATH];
int i;
@ -1066,12 +1066,12 @@ BOOL32 WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize)
* IDLList "Item ID List List"
*
*/
static UINT32 WINAPI IDLList_GetState(LPIDLLIST this);
static LPITEMIDLIST WINAPI IDLList_GetElement(LPIDLLIST this, UINT32 nIndex);
static UINT32 WINAPI IDLList_GetCount(LPIDLLIST this);
static BOOL32 WINAPI IDLList_StoreItem(LPIDLLIST this, LPITEMIDLIST pidl);
static BOOL32 WINAPI IDLList_AddItems(LPIDLLIST this, LPITEMIDLIST *apidl, UINT32 cidl);
static BOOL32 WINAPI IDLList_InitList(LPIDLLIST this);
static UINT WINAPI IDLList_GetState(LPIDLLIST this);
static LPITEMIDLIST WINAPI IDLList_GetElement(LPIDLLIST this, UINT nIndex);
static UINT WINAPI IDLList_GetCount(LPIDLLIST this);
static BOOL WINAPI IDLList_StoreItem(LPIDLLIST this, LPITEMIDLIST pidl);
static BOOL WINAPI IDLList_AddItems(LPIDLLIST this, LPITEMIDLIST *apidl, UINT cidl);
static BOOL WINAPI IDLList_InitList(LPIDLLIST this);
static void WINAPI IDLList_CleanList(LPIDLLIST this);
static IDLList_VTable idllvt =
@ -1084,7 +1084,7 @@ static IDLList_VTable idllvt =
IDLList_CleanList
};
LPIDLLIST IDLList_Constructor (UINT32 uStep)
LPIDLLIST IDLList_Constructor (UINT uStep)
{ LPIDLLIST lpidll;
if (!(lpidll = (LPIDLLIST)HeapAlloc(GetProcessHeap(),0,sizeof(IDLList))))
return NULL;
@ -1101,7 +1101,7 @@ void IDLList_Destructor(LPIDLLIST this)
IDLList_CleanList(this);
}
static UINT32 WINAPI IDLList_GetState(LPIDLLIST this)
static UINT WINAPI IDLList_GetState(LPIDLLIST this)
{ TRACE (shell,"(%p)->(uStep=%u dpa=%p)\n",this, this->uStep, this->dpa);
if (this->uStep == 0)
@ -1111,15 +1111,15 @@ static UINT32 WINAPI IDLList_GetState(LPIDLLIST this)
}
return(State_UnInit);
}
static LPITEMIDLIST WINAPI IDLList_GetElement(LPIDLLIST this, UINT32 nIndex)
static LPITEMIDLIST WINAPI IDLList_GetElement(LPIDLLIST this, UINT nIndex)
{ TRACE (shell,"(%p)->(index=%u)\n",this, nIndex);
return((LPITEMIDLIST)pDPA_GetPtr(this->dpa, nIndex));
}
static UINT32 WINAPI IDLList_GetCount(LPIDLLIST this)
static UINT WINAPI IDLList_GetCount(LPIDLLIST this)
{ TRACE (shell,"(%p)\n",this);
return(IDLList_GetState(this)==State_Init ? DPA_GetPtrCount(this->dpa) : 0);
}
static BOOL32 WINAPI IDLList_StoreItem(LPIDLLIST this, LPITEMIDLIST pidl)
static BOOL WINAPI IDLList_StoreItem(LPIDLLIST this, LPITEMIDLIST pidl)
{ TRACE (shell,"(%p)->(pidl=%p)\n",this, pidl);
if (pidl)
{ if (IDLList_InitList(this) && pDPA_InsertPtr(this->dpa, 0x7fff, (LPSTR)pidl)>=0)
@ -1129,8 +1129,8 @@ static BOOL32 WINAPI IDLList_StoreItem(LPIDLLIST this, LPITEMIDLIST pidl)
IDLList_CleanList(this);
return(FALSE);
}
static BOOL32 WINAPI IDLList_AddItems(LPIDLLIST this, LPITEMIDLIST *apidl, UINT32 cidl)
{ INT32 i;
static BOOL WINAPI IDLList_AddItems(LPIDLLIST this, LPITEMIDLIST *apidl, UINT cidl)
{ INT i;
TRACE (shell,"(%p)->(apidl=%p cidl=%u)\n",this, apidl, cidl);
for (i=0; i<cidl; ++i)
@ -1139,7 +1139,7 @@ static BOOL32 WINAPI IDLList_AddItems(LPIDLLIST this, LPITEMIDLIST *apidl, UINT3
}
return(TRUE);
}
static BOOL32 WINAPI IDLList_InitList(LPIDLLIST this)
static BOOL WINAPI IDLList_InitList(LPIDLLIST this)
{ TRACE (shell,"(%p)\n",this);
switch (IDLList_GetState(this))
{ case State_Init:
@ -1156,7 +1156,7 @@ static BOOL32 WINAPI IDLList_InitList(LPIDLLIST this)
}
}
static void WINAPI IDLList_CleanList(LPIDLLIST this)
{ INT32 i;
{ INT i;
TRACE (shell,"(%p)\n",this);
if (this->uStep != 0)

View File

@ -82,19 +82,19 @@ DWORD WINAPI _ILGetPidlPath(LPCITEMIDLIST,LPSTR,DWORD);
/*
* getting special values from simple pidls
*/
BOOL32 WINAPI _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize);
BOOL32 WINAPI _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize);
BOOL32 WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize);
BOOL WINAPI _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
BOOL WINAPI _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
BOOL WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
/*
* testing simple pidls
*/
BOOL32 WINAPI _ILIsDesktop(LPCITEMIDLIST);
BOOL32 WINAPI _ILIsMyComputer(LPCITEMIDLIST);
BOOL32 WINAPI _ILIsDrive(LPCITEMIDLIST);
BOOL32 WINAPI _ILIsFolder(LPCITEMIDLIST);
BOOL32 WINAPI _ILIsValue(LPCITEMIDLIST);
BOOL WINAPI _ILIsDesktop(LPCITEMIDLIST);
BOOL WINAPI _ILIsMyComputer(LPCITEMIDLIST);
BOOL WINAPI _ILIsDrive(LPCITEMIDLIST);
BOOL WINAPI _ILIsFolder(LPCITEMIDLIST);
BOOL WINAPI _ILIsValue(LPCITEMIDLIST);
/*
* simple pidls from strings
@ -110,7 +110,7 @@ LPITEMIDLIST WINAPI _ILCreateValue(LPCSTR, LPCSTR);
*
* data is binary / sizes are bytes
*/
DWORD WINAPI _ILGetData(PIDLTYPE,LPCITEMIDLIST,LPVOID,UINT32);
DWORD WINAPI _ILGetData(PIDLTYPE,LPCITEMIDLIST,LPVOID,UINT);
LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE,LPVOID,UINT16);
/*

View File

@ -82,7 +82,7 @@ LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
* http://premium.microsoft.com/msdn/library/techart/msdn193.htm
*/
void WINAPI Control_RunDLL( HWND32 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,
debugstr_a(cmd), arg4);
@ -95,9 +95,9 @@ void WINAPI Control_RunDLL( HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4 )
*
*/
DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
SHFILEINFO32A *psfi, UINT32 sizeofpsfi,
UINT32 flags )
DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
SHFILEINFOA *psfi, UINT sizeofpsfi,
UINT flags )
{ CHAR szTemp[MAX_PATH];
LPPIDLDATA pData;
LPITEMIDLIST pPidlTemp = NULL;
@ -109,7 +109,7 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
/* translate the pidl to a path*/
if (flags & SHGFI_PIDL)
{ pPidlTemp = (LPCITEMIDLIST)path;
SHGetPathFromIDList32A (pPidlTemp, szTemp);
SHGetPathFromIDListA (pPidlTemp, szTemp);
TRACE(shell,"pidl=%p is %s\n", path, szTemp);
}
else
@ -227,9 +227,9 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
*
*/
DWORD WINAPI SHGetFileInfo32W(LPCWSTR path,DWORD dwFileAttributes,
SHFILEINFO32W *psfi, UINT32 sizeofpsfi,
UINT32 flags )
DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
SHFILEINFOW *psfi, UINT sizeofpsfi,
UINT flags )
{ FIXME(shell,"(%s,0x%lx,%p,0x%x,0x%x)\n",
debugstr_w(path),dwFileAttributes,psfi,sizeofpsfi,flags);
return 0;
@ -238,9 +238,9 @@ DWORD WINAPI SHGetFileInfo32W(LPCWSTR path,DWORD dwFileAttributes,
/*************************************************************************
* ExtractIcon32A (SHELL32.133)
*/
HICON32 WINAPI ExtractIcon32A( HINSTANCE32 hInstance, LPCSTR lpszExeFileName,
UINT32 nIconIndex )
{ HGLOBAL16 handle = InternalExtractIcon(hInstance,lpszExeFileName,nIconIndex, 1);
HICON WINAPI ExtractIconA( HINSTANCE hInstance, LPCSTR lpszExeFileName,
UINT nIconIndex )
{ HGLOBAL16 handle = InternalExtractIcon16(hInstance,lpszExeFileName,nIconIndex, 1);
TRACE(shell,"\n");
if( handle )
{
@ -256,14 +256,14 @@ HICON32 WINAPI ExtractIcon32A( HINSTANCE32 hInstance, LPCSTR lpszExeFileName,
/*************************************************************************
* ExtractIcon32W (SHELL32.180)
*/
HICON32 WINAPI ExtractIcon32W( HINSTANCE32 hInstance, LPCWSTR lpszExeFileName,
UINT32 nIconIndex )
HICON WINAPI ExtractIconW( HINSTANCE hInstance, LPCWSTR lpszExeFileName,
UINT nIconIndex )
{ LPSTR exefn;
HICON32 ret;
HICON ret;
TRACE(shell,"\n");
exefn = HEAP_strdupWtoA(GetProcessHeap(),0,lpszExeFileName);
ret = ExtractIcon32A(hInstance,exefn,nIconIndex);
ret = ExtractIconA(hInstance,exefn,nIconIndex);
HeapFree(GetProcessHeap(),0,exefn);
return ret;
@ -272,9 +272,9 @@ HICON32 WINAPI ExtractIcon32W( HINSTANCE32 hInstance, LPCWSTR lpszExeFileName,
/*************************************************************************
* FindExecutable32A (SHELL32.184)
*/
HINSTANCE32 WINAPI FindExecutable32A( LPCSTR lpFile, LPCSTR lpDirectory,
HINSTANCE WINAPI FindExecutableA( LPCSTR lpFile, LPCSTR lpDirectory,
LPSTR lpResult )
{ HINSTANCE32 retval=31; /* default - 'No association was found' */
{ HINSTANCE retval=31; /* default - 'No association was found' */
char old_dir[1024];
TRACE(shell, "File %s, Dir %s\n",
@ -290,22 +290,22 @@ HINSTANCE32 WINAPI FindExecutable32A( LPCSTR lpFile, LPCSTR lpDirectory,
}
if (lpDirectory)
{ GetCurrentDirectory32A( sizeof(old_dir), old_dir );
SetCurrentDirectory32A( lpDirectory );
{ GetCurrentDirectoryA( sizeof(old_dir), old_dir );
SetCurrentDirectoryA( lpDirectory );
}
retval = SHELL_FindExecutable( lpFile, "open", lpResult );
TRACE(shell, "returning %s\n", lpResult);
if (lpDirectory)
SetCurrentDirectory32A( old_dir );
SetCurrentDirectoryA( old_dir );
return retval;
}
/*************************************************************************
* FindExecutable32W (SHELL32.219)
*/
HINSTANCE32 WINAPI FindExecutable32W(LPCWSTR lpFile, LPCWSTR lpDirectory,
HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory,
LPWSTR lpResult)
{
FIXME(shell, "(%p,%p,%p): stub\n", lpFile, lpDirectory, lpResult);
@ -315,7 +315,7 @@ HINSTANCE32 WINAPI FindExecutable32W(LPCWSTR lpFile, LPCWSTR lpDirectory,
typedef struct
{ LPCSTR szApp;
LPCSTR szOtherStuff;
HICON32 hIcon;
HICON hIcon;
} ABOUT_INFO;
#define IDC_STATIC_TEXT 100
@ -325,13 +325,13 @@ typedef struct
#define DROP_FIELD_TOP (-15)
#define DROP_FIELD_HEIGHT 15
extern HICON32 hIconTitleFont;
extern HICON hIconTitleFont;
static BOOL32 __get_dropline( HWND32 hWnd, LPRECT32 lprect )
{ HWND32 hWndCtl = GetDlgItem32(hWnd, IDC_WINE_TEXT);
static BOOL __get_dropline( HWND hWnd, LPRECT lprect )
{ HWND hWndCtl = GetDlgItem(hWnd, IDC_WINE_TEXT);
if( hWndCtl )
{ GetWindowRect32( hWndCtl, lprect );
MapWindowPoints32( 0, hWnd, (LPPOINT32)lprect, 2 );
{ GetWindowRect( hWndCtl, lprect );
MapWindowPoints( 0, hWnd, (LPPOINT)lprect, 2 );
lprect->bottom = (lprect->top += DROP_FIELD_TOP);
return TRUE;
}
@ -341,7 +341,7 @@ static BOOL32 __get_dropline( HWND32 hWnd, LPRECT32 lprect )
/*************************************************************************
* SHAppBarMessage32 [SHELL32.207]
*/
UINT32 WINAPI SHAppBarMessage32(DWORD msg, PAPPBARDATA data)
UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
{ FIXME(shell,"(0x%08lx,%p): stub\n", msg, data);
#if 0
switch (msg)
@ -408,9 +408,9 @@ DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder)
/*************************************************************************
* SHGetPathFromIDList [SHELL32.221][NT 4.0: SHELL32.219]
*/
BOOL32 WINAPI SHGetPathFromIDList32(LPCITEMIDLIST pidl,LPSTR pszPath)
BOOL WINAPI SHGetPathFromIDListAW(LPCITEMIDLIST pidl,LPSTR pszPath)
{ TRACE(shell,"(pidl=%p,%p)\n",pidl,pszPath);
return SHGetPathFromIDList32A(pidl,pszPath);
return SHGetPathFromIDListA(pidl,pszPath);
}
/*************************************************************************
@ -430,7 +430,7 @@ BOOL32 WINAPI SHGetPathFromIDList32(LPCITEMIDLIST pidl,LPSTR pszPath)
* - look for "User Shell Folder" first
*
*/
HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITEMIDLIST * ppidl)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST * ppidl)
{ LPSHELLFOLDER shellfolder;
DWORD pchEaten,tpathlen=MAX_PATH,type,dwdisp,res;
CHAR pszTemp[256],buffer[256],tpath[MAX_PATH],npath[MAX_PATH];
@ -448,7 +448,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\");
res=RegCreateKeyEx32A(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp);
res=RegCreateKeyExA(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp);
if (res)
{ ERR(shell,"Could not create key %s %08lx \n",buffer,res);
return E_OUTOFMEMORY;
@ -541,9 +541,9 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
{ case FT_DIR:
/* Directory: get the value from the registry, if its not there
create it and the directory*/
if (RegQueryValueEx32A(key,buffer,NULL,&type,(LPBYTE)tpath,&tpathlen))
{ GetWindowsDirectory32A(npath,MAX_PATH);
PathAddBackslash32A(npath);
if (RegQueryValueExA(key,buffer,NULL,&type,(LPBYTE)tpath,&tpathlen))
{ GetWindowsDirectoryA(npath,MAX_PATH);
PathAddBackslashA(npath);
switch (nFolder)
{ case CSIDL_DESKTOPDIRECTORY:
case CSIDL_COMMON_DESKTOPDIRECTORY:
@ -573,7 +573,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
case CSIDL_COMMON_PROGRAMS:
case CSIDL_PROGRAMS:
strcat (npath,"Start Menu");
CreateDirectory32A(npath,NULL);
CreateDirectoryA(npath,NULL);
strcat (npath,"\\Programs");
break;
case CSIDL_RECENT:
@ -589,7 +589,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
case CSIDL_COMMON_STARTUP:
case CSIDL_STARTUP:
strcat (npath,"Start Menu");
CreateDirectory32A(npath,NULL);
CreateDirectoryA(npath,NULL);
strcat (npath,"\\Startup");
break;
case CSIDL_TEMPLATES:
@ -599,13 +599,13 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
RegCloseKey(key);
return E_OUTOFMEMORY;
}
if (RegSetValueEx32A(key,buffer,0,REG_SZ,(LPBYTE)npath,sizeof(npath)+1))
if (RegSetValueExA(key,buffer,0,REG_SZ,(LPBYTE)npath,sizeof(npath)+1))
{ ERR(shell,"could not create value %s\n",buffer);
RegCloseKey(key);
return E_OUTOFMEMORY;
}
TRACE(shell,"value %s=%s created\n",buffer,npath);
CreateDirectory32A(npath,NULL);
CreateDirectoryA(npath,NULL);
strcpy(tpath,npath);
}
break;
@ -624,7 +624,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
RegCloseKey(key);
TRACE(shell,"Value=%s\n",tpath);
LocalToWideChar32(lpszDisplayName, tpath, 256);
LocalToWideChar(lpszDisplayName, tpath, 256);
if (SHGetDesktopFolder(&shellfolder)==S_OK)
{ shellfolder->lpvtbl->fnParseDisplayName(shellfolder,hwndOwner, NULL,lpszDisplayName,&pchEaten,ppidl,NULL);
@ -658,9 +658,9 @@ DWORD WINAPI SHLoadInProc (DWORD dwArg1)
/*************************************************************************
* ShellExecute32A (SHELL32.245)
*/
HINSTANCE32 WINAPI ShellExecute32A( HWND32 hWnd, LPCSTR lpOperation,
HINSTANCE WINAPI ShellExecuteA( HWND hWnd, LPCSTR lpOperation,
LPCSTR lpFile, LPCSTR lpParameters,
LPCSTR lpDirectory, INT32 iShowCmd )
LPCSTR lpDirectory, INT iShowCmd )
{ TRACE(shell,"\n");
return ShellExecute16( hWnd, lpOperation, lpFile, lpParameters,
lpDirectory, iShowCmd );
@ -672,14 +672,14 @@ HINSTANCE32 WINAPI ShellExecute32A( HWND32 hWnd, LPCSTR lpOperation,
* WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation,
* LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
*/
HINSTANCE32 WINAPI
ShellExecute32W(
HWND32 hwnd,
HINSTANCE WINAPI
ShellExecuteW(
HWND hwnd,
LPCWSTR lpOperation,
LPCWSTR lpFile,
LPCWSTR lpParameters,
LPCWSTR lpDirectory,
INT32 nShowCmd) {
INT nShowCmd) {
FIXME(shell,": stub\n");
return 0;
@ -688,9 +688,9 @@ ShellExecute32W(
/*************************************************************************
* AboutDlgProc32 (not an exported API function)
*/
BOOL32 WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
BOOL WINAPI AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
LPARAM lParam )
{ HWND32 hWndCtl;
{ HWND hWndCtl;
char Template[512], AppTitle[512];
TRACE(shell,"\n");
@ -700,55 +700,55 @@ BOOL32 WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
{ ABOUT_INFO *info = (ABOUT_INFO *)lParam;
if (info)
{ const char* const *pstr = SHELL_People;
SendDlgItemMessage32A(hWnd, stc1, STM_SETICON32,info->hIcon, 0);
GetWindowText32A( hWnd, Template, sizeof(Template) );
SendDlgItemMessageA(hWnd, stc1, STM_SETICON,info->hIcon, 0);
GetWindowTextA( hWnd, Template, sizeof(Template) );
sprintf( AppTitle, Template, info->szApp );
SetWindowText32A( hWnd, AppTitle );
SetWindowText32A( GetDlgItem32(hWnd, IDC_STATIC_TEXT),
SetWindowTextA( hWnd, AppTitle );
SetWindowTextA( GetDlgItem(hWnd, IDC_STATIC_TEXT),
info->szOtherStuff );
hWndCtl = GetDlgItem32(hWnd, IDC_LISTBOX);
SendMessage32A( hWndCtl, WM_SETREDRAW, 0, 0 );
SendMessage32A( hWndCtl, WM_SETFONT, hIconTitleFont, 0 );
hWndCtl = GetDlgItem(hWnd, IDC_LISTBOX);
SendMessageA( hWndCtl, WM_SETREDRAW, 0, 0 );
SendMessageA( hWndCtl, WM_SETFONT, hIconTitleFont, 0 );
while (*pstr)
{ SendMessage32A( hWndCtl, LB_ADDSTRING32, (WPARAM32)-1, (LPARAM)*pstr );
{ SendMessageA( hWndCtl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)*pstr );
pstr++;
}
SendMessage32A( hWndCtl, WM_SETREDRAW, 1, 0 );
SendMessageA( hWndCtl, WM_SETREDRAW, 1, 0 );
}
}
return 1;
case WM_PAINT:
{ RECT32 rect;
PAINTSTRUCT32 ps;
HDC32 hDC = BeginPaint32( hWnd, &ps );
{ RECT rect;
PAINTSTRUCT ps;
HDC hDC = BeginPaint( hWnd, &ps );
if( __get_dropline( hWnd, &rect ) ) {
SelectObject32( hDC, GetStockObject32( BLACK_PEN ) );
MoveToEx32( hDC, rect.left, rect.top, NULL );
LineTo32( hDC, rect.right, rect.bottom );
SelectObject( hDC, GetStockObject( BLACK_PEN ) );
MoveToEx( hDC, rect.left, rect.top, NULL );
LineTo( hDC, rect.right, rect.bottom );
}
EndPaint32( hWnd, &ps );
EndPaint( hWnd, &ps );
}
break;
case WM_LBTRACKPOINT:
hWndCtl = GetDlgItem32(hWnd, IDC_LISTBOX);
hWndCtl = GetDlgItem(hWnd, IDC_LISTBOX);
if( (INT16)GetKeyState16( VK_CONTROL ) < 0 )
{ if( DragDetect32( hWndCtl, *((LPPOINT32)&lParam) ) )
{ INT32 idx = SendMessage32A( hWndCtl, LB_GETCURSEL32, 0, 0 );
{ if( DragDetect( hWndCtl, *((LPPOINT)&lParam) ) )
{ INT idx = SendMessageA( hWndCtl, LB_GETCURSEL, 0, 0 );
if( idx != -1 )
{ INT32 length = SendMessage32A( hWndCtl, LB_GETTEXTLEN32, (WPARAM32)idx, 0 );
{ INT length = SendMessageA( hWndCtl, LB_GETTEXTLEN, (WPARAM)idx, 0 );
HGLOBAL16 hMemObj = GlobalAlloc16( GMEM_MOVEABLE, length + 1 );
char* pstr = (char*)GlobalLock16( hMemObj );
if( pstr )
{ HCURSOR16 hCursor = LoadCursor16( 0, MAKEINTRESOURCE16(OCR_DRAGOBJECT) );
SendMessage32A( hWndCtl, LB_GETTEXT32, (WPARAM32)idx, (LPARAM)pstr );
SendMessage32A( hWndCtl, LB_DELETESTRING32, (WPARAM32)idx, 0 );
UpdateWindow32( hWndCtl );
SendMessageA( hWndCtl, LB_GETTEXT, (WPARAM)idx, (LPARAM)pstr );
SendMessageA( hWndCtl, LB_DELETESTRING, (WPARAM)idx, 0 );
UpdateWindow( hWndCtl );
if( !DragObject16((HWND16)hWnd, (HWND16)hWnd, DRAGOBJ_DATA, 0, (WORD)hMemObj, hCursor) )
SendMessage32A( hWndCtl, LB_ADDSTRING32, (WPARAM32)-1, (LPARAM)pstr );
SendMessageA( hWndCtl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)pstr );
}
if( hMemObj )
GlobalFree16( hMemObj );
@ -761,14 +761,14 @@ BOOL32 WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
if( wParam == 0 )
{ LPDRAGINFO lpDragInfo = (LPDRAGINFO)PTR_SEG_TO_LIN((SEGPTR)lParam);
if( lpDragInfo && lpDragInfo->wFlags == DRAGOBJ_DATA )
{ RECT32 rect;
{ RECT rect;
if( __get_dropline( hWnd, &rect ) )
{ POINT32 pt;
{ POINT pt;
pt.x=lpDragInfo->pt.x;
pt.x=lpDragInfo->pt.y;
rect.bottom += DROP_FIELD_HEIGHT;
if( PtInRect32( &rect, pt ) )
{ SetWindowLong32A( hWnd, DWL_MSGRESULT, 1 );
if( PtInRect( &rect, pt ) )
{ SetWindowLongA( hWnd, DWL_MSGRESULT, 1 );
return TRUE;
}
}
@ -784,21 +784,21 @@ BOOL32 WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
if( pstr )
{ static char __appendix_str[] = " with";
hWndCtl = GetDlgItem32( hWnd, IDC_WINE_TEXT );
SendMessage32A( hWndCtl, WM_GETTEXT, 512, (LPARAM)Template );
if( !lstrncmp32A( Template, "WINE", 4 ) )
SetWindowText32A( GetDlgItem32(hWnd, IDC_STATIC_TEXT), Template );
hWndCtl = GetDlgItem( hWnd, IDC_WINE_TEXT );
SendMessageA( hWndCtl, WM_GETTEXT, 512, (LPARAM)Template );
if( !lstrncmpA( Template, "WINE", 4 ) )
SetWindowTextA( GetDlgItem(hWnd, IDC_STATIC_TEXT), Template );
else
{ char* pch = Template + strlen(Template) - strlen(__appendix_str);
*pch = '\0';
SendMessage32A( GetDlgItem32(hWnd, IDC_LISTBOX), LB_ADDSTRING32,
(WPARAM32)-1, (LPARAM)Template );
SendMessageA( GetDlgItem(hWnd, IDC_LISTBOX), LB_ADDSTRING,
(WPARAM)-1, (LPARAM)Template );
}
lstrcpy32A( Template, pstr );
lstrcat32A( Template, __appendix_str );
SetWindowText32A( hWndCtl, Template );
SetWindowLong32A( hWnd, DWL_MSGRESULT, 1 );
lstrcpyA( Template, pstr );
lstrcatA( Template, __appendix_str );
SetWindowTextA( hWndCtl, Template );
SetWindowLongA( hWnd, DWL_MSGRESULT, 1 );
return TRUE;
}
}
@ -807,7 +807,7 @@ BOOL32 WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
case WM_COMMAND:
if (wParam == IDOK)
{ EndDialog32(hWnd, TRUE);
{ EndDialog(hWnd, TRUE);
return TRUE;
}
break;
@ -819,26 +819,26 @@ BOOL32 WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
/*************************************************************************
* ShellAbout32A (SHELL32.243)
*/
BOOL32 WINAPI ShellAbout32A( HWND32 hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
HICON32 hIcon )
BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
HICON hIcon )
{ ABOUT_INFO info;
TRACE(shell,"\n");
info.szApp = szApp;
info.szOtherStuff = szOtherStuff;
info.hIcon = hIcon;
if (!hIcon) info.hIcon = LoadIcon16( 0, MAKEINTRESOURCE16(OIC_WINEICON) );
return DialogBoxIndirectParam32A( WIN_GetWindowInstance( hWnd ),
return DialogBoxIndirectParamA( WIN_GetWindowInstance( hWnd ),
SYSRES_GetResPtr( SYSRES_DIALOG_SHELL_ABOUT_MSGBOX ),
hWnd, AboutDlgProc32, (LPARAM)&info );
hWnd, AboutDlgProc, (LPARAM)&info );
}
/*************************************************************************
* ShellAbout32W (SHELL32.244)
*/
BOOL32 WINAPI ShellAbout32W( HWND32 hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
HICON32 hIcon )
{ BOOL32 ret;
BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
HICON hIcon )
{ BOOL ret;
ABOUT_INFO info;
TRACE(shell,"\n");
@ -847,9 +847,9 @@ BOOL32 WINAPI ShellAbout32W( HWND32 hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
info.szOtherStuff = HEAP_strdupWtoA( GetProcessHeap(), 0, szOtherStuff );
info.hIcon = hIcon;
if (!hIcon) info.hIcon = LoadIcon16( 0, MAKEINTRESOURCE16(OIC_WINEICON) );
ret = DialogBoxIndirectParam32A( WIN_GetWindowInstance( hWnd ),
ret = DialogBoxIndirectParamA( WIN_GetWindowInstance( hWnd ),
SYSRES_GetResPtr( SYSRES_DIALOG_SHELL_ABOUT_MSGBOX ),
hWnd, AboutDlgProc32, (LPARAM)&info );
hWnd, AboutDlgProc, (LPARAM)&info );
HeapFree( GetProcessHeap(), 0, (LPSTR)info.szApp );
HeapFree( GetProcessHeap(), 0, (LPSTR)info.szOtherStuff );
return ret;
@ -861,7 +861,7 @@ BOOL32 WINAPI ShellAbout32W( HWND32 hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
* This function is supposed to deal with the systray.
* Any ideas on how this is to be implimented?
*/
BOOL32 WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATA pnid )
BOOL WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATA pnid )
{ TRACE(shell,"\n");
return FALSE;
}
@ -872,7 +872,7 @@ BOOL32 WINAPI Shell_NotifyIcon( DWORD dwMessage, PNOTIFYICONDATA pnid )
* This function is supposed to deal with the systray.
* Any ideas on how this is to be implimented?
*/
BOOL32 WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATA pnid )
BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATA pnid )
{ TRACE(shell,"\n");
return FALSE;
}
@ -900,7 +900,7 @@ void WINAPI FreeIconList( DWORD dw )
* FIXME
* fnGetDisplayNameOf can return different types of OLEString
*/
DWORD WINAPI SHGetPathFromIDList32A (LPCITEMIDLIST pidl,LPSTR pszPath)
DWORD WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath)
{ STRRET lpName;
LPSHELLFOLDER shellfolder;
CHAR buffer[MAX_PATH],tpath[MAX_PATH];
@ -912,17 +912,17 @@ DWORD WINAPI SHGetPathFromIDList32A (LPCITEMIDLIST pidl,LPSTR pszPath)
if (!pidl)
{ strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\");
if (RegCreateKeyEx32A(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp))
if (RegCreateKeyExA(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp))
{ return E_OUTOFMEMORY;
}
type=REG_SZ;
strcpy (buffer,"Desktop"); /*registry name*/
if ( RegQueryValueEx32A(key,buffer,NULL,&type,(LPBYTE)tpath,&tpathlen))
{ GetWindowsDirectory32A(tpath,MAX_PATH);
PathAddBackslash32A(tpath);
if ( RegQueryValueExA(key,buffer,NULL,&type,(LPBYTE)tpath,&tpathlen))
{ GetWindowsDirectoryA(tpath,MAX_PATH);
PathAddBackslashA(tpath);
strcat (tpath,"Desktop"); /*folder name*/
RegSetValueEx32A(key,buffer,0,REG_SZ,(LPBYTE)tpath,tpathlen);
CreateDirectory32A(tpath,NULL);
RegSetValueExA(key,buffer,0,REG_SZ,(LPBYTE)tpath,tpathlen);
CreateDirectoryA(tpath,NULL);
}
RegCloseKey(key);
strcpy(pszPath,tpath);
@ -942,12 +942,12 @@ DWORD WINAPI SHGetPathFromIDList32A (LPCITEMIDLIST pidl,LPSTR pszPath)
/*************************************************************************
* SHGetPathFromIDList32W [SHELL32.262]
*/
DWORD WINAPI SHGetPathFromIDList32W (LPCITEMIDLIST pidl,LPWSTR pszPath)
DWORD WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath)
{ char sTemp[MAX_PATH];
TRACE (shell,"(pidl=%p)\n", pidl);
SHGetPathFromIDList32A (pidl, sTemp);
SHGetPathFromIDListA (pidl, sTemp);
lstrcpyAtoW(pszPath, sTemp);
TRACE(shell,"-- (%s)\n",debugstr_w(pszPath));
@ -960,39 +960,39 @@ DWORD WINAPI SHGetPathFromIDList32W (LPCITEMIDLIST pidl,LPWSTR pszPath)
*
*/
void (WINAPI* pDLLInitComctl)(LPVOID);
INT32 (WINAPI* pImageList_AddIcon) (HIMAGELIST himl, HICON32 hIcon);
INT32 (WINAPI* pImageList_ReplaceIcon) (HIMAGELIST, INT32, HICON32);
HIMAGELIST (WINAPI * pImageList_Create) (INT32,INT32,UINT32,INT32,INT32);
HICON32 (WINAPI * pImageList_GetIcon) (HIMAGELIST, INT32, UINT32);
INT32 (WINAPI* pImageList_GetImageCount)(HIMAGELIST);
INT (WINAPI* pImageList_AddIcon) (HIMAGELIST himl, HICON hIcon);
INT (WINAPI* pImageList_ReplaceIcon) (HIMAGELIST, INT, HICON);
HIMAGELIST (WINAPI * pImageList_Create) (INT,INT,UINT,INT,INT);
HICON (WINAPI * pImageList_GetIcon) (HIMAGELIST, INT, UINT);
INT (WINAPI* pImageList_GetImageCount)(HIMAGELIST);
LPVOID (WINAPI* pCOMCTL32_Alloc) (INT32);
BOOL32 (WINAPI* pCOMCTL32_Free) (LPVOID);
LPVOID (WINAPI* pCOMCTL32_Alloc) (INT);
BOOL (WINAPI* pCOMCTL32_Free) (LPVOID);
HDPA (WINAPI* pDPA_Create) (INT32);
INT32 (WINAPI* pDPA_InsertPtr) (const HDPA, INT32, LPVOID);
BOOL32 (WINAPI* pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);
LPVOID (WINAPI* pDPA_GetPtr) (const HDPA, INT32);
BOOL32 (WINAPI* pDPA_Destroy) (const HDPA);
INT32 (WINAPI *pDPA_Search) (const HDPA, LPVOID, INT32, PFNDPACOMPARE, LPARAM, UINT32);
HDPA (WINAPI* pDPA_Create) (INT);
INT (WINAPI* pDPA_InsertPtr) (const HDPA, INT, LPVOID);
BOOL (WINAPI* pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);
LPVOID (WINAPI* pDPA_GetPtr) (const HDPA, INT);
BOOL (WINAPI* pDPA_Destroy) (const HDPA);
INT (WINAPI *pDPA_Search) (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
/* user32 */
HICON32 (WINAPI *pLookupIconIdFromDirectoryEx32)(LPBYTE dir, BOOL32 bIcon, INT32 width, INT32 height, UINT32 cFlag);
HICON32 (WINAPI *pCreateIconFromResourceEx32)(LPBYTE bits,UINT32 cbSize, BOOL32 bIcon, DWORD dwVersion, INT32 width, INT32 height,UINT32 cFlag);
HICON (WINAPI *pLookupIconIdFromDirectoryEx)(LPBYTE dir, BOOL bIcon, INT width, INT height, UINT cFlag);
HICON (WINAPI *pCreateIconFromResourceEx)(LPBYTE bits,UINT cbSize, BOOL bIcon, DWORD dwVersion, INT width, INT height,UINT cFlag);
static BOOL32 bShell32IsInitialized = 0;
static HINSTANCE32 hComctl32;
static INT32 shell32_RefCount = 0;
static BOOL bShell32IsInitialized = 0;
static HINSTANCE hComctl32;
static INT shell32_RefCount = 0;
INT32 shell32_ObjCount = 0;
HINSTANCE32 shell32_hInstance;
INT shell32_ObjCount = 0;
HINSTANCE shell32_hInstance;
/*************************************************************************
* SHELL32 LibMain
*
*/
BOOL32 WINAPI Shell32LibMain(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{ HMODULE32 hUser32;
BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{ HMODULE hUser32;
TRACE(shell,"0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
@ -1001,31 +1001,31 @@ BOOL32 WINAPI Shell32LibMain(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID fImpL
switch (fdwReason)
{ case DLL_PROCESS_ATTACH:
if (!bShell32IsInitialized)
{ hComctl32 = LoadLibrary32A("COMCTL32.DLL");
hUser32 = GetModuleHandle32A("USER32");
{ hComctl32 = LoadLibraryA("COMCTL32.DLL");
hUser32 = GetModuleHandleA("USER32");
if (hComctl32 && hUser32)
{ pDLLInitComctl=(void*)GetProcAddress32(hComctl32,"InitCommonControlsEx");
{ pDLLInitComctl=(void*)GetProcAddress(hComctl32,"InitCommonControlsEx");
if (pDLLInitComctl)
{ pDLLInitComctl(NULL);
}
pImageList_Create=(void*)GetProcAddress32(hComctl32,"ImageList_Create");
pImageList_AddIcon=(void*)GetProcAddress32(hComctl32,"ImageList_AddIcon");
pImageList_ReplaceIcon=(void*)GetProcAddress32(hComctl32,"ImageList_ReplaceIcon");
pImageList_GetIcon=(void*)GetProcAddress32(hComctl32,"ImageList_GetIcon");
pImageList_GetImageCount=(void*)GetProcAddress32(hComctl32,"ImageList_GetImageCount");
pImageList_Create=(void*)GetProcAddress(hComctl32,"ImageList_Create");
pImageList_AddIcon=(void*)GetProcAddress(hComctl32,"ImageList_AddIcon");
pImageList_ReplaceIcon=(void*)GetProcAddress(hComctl32,"ImageList_ReplaceIcon");
pImageList_GetIcon=(void*)GetProcAddress(hComctl32,"ImageList_GetIcon");
pImageList_GetImageCount=(void*)GetProcAddress(hComctl32,"ImageList_GetImageCount");
/* imports by ordinal, pray that it works*/
pCOMCTL32_Alloc=(void*)GetProcAddress32(hComctl32, (LPCSTR)71L);
pCOMCTL32_Free=(void*)GetProcAddress32(hComctl32, (LPCSTR)73L);
pDPA_Create=(void*)GetProcAddress32(hComctl32, (LPCSTR)328L);
pDPA_Destroy=(void*)GetProcAddress32(hComctl32, (LPCSTR)329L);
pDPA_GetPtr=(void*)GetProcAddress32(hComctl32, (LPCSTR)332L);
pDPA_InsertPtr=(void*)GetProcAddress32(hComctl32, (LPCSTR)334L);
pDPA_Sort=(void*)GetProcAddress32(hComctl32, (LPCSTR)338L);
pDPA_Search=(void*)GetProcAddress32(hComctl32, (LPCSTR)339L);
pCOMCTL32_Alloc=(void*)GetProcAddress(hComctl32, (LPCSTR)71L);
pCOMCTL32_Free=(void*)GetProcAddress(hComctl32, (LPCSTR)73L);
pDPA_Create=(void*)GetProcAddress(hComctl32, (LPCSTR)328L);
pDPA_Destroy=(void*)GetProcAddress(hComctl32, (LPCSTR)329L);
pDPA_GetPtr=(void*)GetProcAddress(hComctl32, (LPCSTR)332L);
pDPA_InsertPtr=(void*)GetProcAddress(hComctl32, (LPCSTR)334L);
pDPA_Sort=(void*)GetProcAddress(hComctl32, (LPCSTR)338L);
pDPA_Search=(void*)GetProcAddress(hComctl32, (LPCSTR)339L);
/* user32 */
pLookupIconIdFromDirectoryEx32=(void*)GetProcAddress32(hUser32,"LookupIconIdFromDirectoryEx");
pCreateIconFromResourceEx32=(void*)GetProcAddress32(hUser32,"CreateIconFromResourceEx");
pLookupIconIdFromDirectoryEx=(void*)GetProcAddress(hUser32,"LookupIconIdFromDirectoryEx");
pCreateIconFromResourceEx=(void*)GetProcAddress(hUser32,"CreateIconFromResourceEx");
}
else
{ ERR(shell,"P A N I C SHELL32 loading failed\n");
@ -1048,7 +1048,7 @@ BOOL32 WINAPI Shell32LibMain(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID fImpL
case DLL_PROCESS_DETACH:
shell32_RefCount--;
if ( !shell32_RefCount )
{ FreeLibrary32(hComctl32);
{ FreeLibrary(hComctl32);
bShell32IsInitialized = FALSE;
if (pdesktopfolder)

View File

@ -8,8 +8,8 @@
/*******************************************
* global SHELL32.DLL variables
*/
extern HINSTANCE32 shell32_hInstance;
extern INT32 shell32_ObjCount;
extern HINSTANCE shell32_hInstance;
extern INT shell32_ObjCount;
extern HIMAGELIST ShellSmallIconList;
extern HIMAGELIST ShellBigIconList;
@ -17,24 +17,24 @@ extern HIMAGELIST ShellBigIconList;
* pointer to functions dynamically loaded
*/
extern void (WINAPI* pDLLInitComctl)(LPVOID);
extern INT32 (WINAPI* pImageList_AddIcon) (HIMAGELIST himl, HICON32 hIcon);
extern INT32 (WINAPI* pImageList_ReplaceIcon) (HIMAGELIST, INT32, HICON32);
extern HIMAGELIST (WINAPI* pImageList_Create) (INT32,INT32,UINT32,INT32,INT32);
extern HICON32 (WINAPI* pImageList_GetIcon) (HIMAGELIST, INT32, UINT32);
extern INT32 (WINAPI* pImageList_GetImageCount)(HIMAGELIST);
extern INT (WINAPI* pImageList_AddIcon) (HIMAGELIST himl, HICON hIcon);
extern INT (WINAPI* pImageList_ReplaceIcon) (HIMAGELIST, INT, HICON);
extern HIMAGELIST (WINAPI* pImageList_Create) (INT,INT,UINT,INT,INT);
extern HICON (WINAPI* pImageList_GetIcon) (HIMAGELIST, INT, UINT);
extern INT (WINAPI* pImageList_GetImageCount)(HIMAGELIST);
extern LPVOID (WINAPI* pCOMCTL32_Alloc) (INT32);
extern BOOL32 (WINAPI* pCOMCTL32_Free) (LPVOID);
extern LPVOID (WINAPI* pCOMCTL32_Alloc) (INT);
extern BOOL (WINAPI* pCOMCTL32_Free) (LPVOID);
extern HDPA (WINAPI* pDPA_Create) (INT32);
extern INT32 (WINAPI* pDPA_InsertPtr) (const HDPA, INT32, LPVOID);
extern BOOL32 (WINAPI* pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);
extern LPVOID (WINAPI* pDPA_GetPtr) (const HDPA, INT32);
extern BOOL32 (WINAPI* pDPA_Destroy) (const HDPA);
extern INT32 (WINAPI* pDPA_Search) (const HDPA, LPVOID, INT32, PFNDPACOMPARE, LPARAM, UINT32);
extern HDPA (WINAPI* pDPA_Create) (INT);
extern INT (WINAPI* pDPA_InsertPtr) (const HDPA, INT, LPVOID);
extern BOOL (WINAPI* pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);
extern LPVOID (WINAPI* pDPA_GetPtr) (const HDPA, INT);
extern BOOL (WINAPI* pDPA_Destroy) (const HDPA);
extern INT (WINAPI* pDPA_Search) (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
extern HICON32 (WINAPI *pLookupIconIdFromDirectoryEx32)(LPBYTE dir, BOOL32 bIcon, INT32 width, INT32 height, UINT32 cFlag);
extern HICON32 (WINAPI *pCreateIconFromResourceEx32)(LPBYTE bits,UINT32 cbSize, BOOL32 bIcon, DWORD dwVersion, INT32 width, INT32 height,UINT32 cFlag);
extern HICON (WINAPI *pLookupIconIdFromDirectoryEx)(LPBYTE dir, BOOL bIcon, INT width, INT height, UINT cFlag);
extern HICON (WINAPI *pCreateIconFromResourceEx)(LPBYTE bits,UINT cbSize, BOOL bIcon, DWORD dwVersion, INT width, INT height,UINT cFlag);
/* undocumented WINAPI functions not globaly exported */
LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl);
@ -49,33 +49,33 @@ HRESULT WINAPI StrRetToStrN (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST
/* Iconcache */
#define INVALID_INDEX -1
BOOL32 SIC_Initialize(void);
BOOL SIC_Initialize(void);
/*INT32 SIC_GetIconIndex (LPCSTR sSourceFile, INT32 dwSourceIndex );*/
/* Classes Root */
BOOL32 HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len);
BOOL32 HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len );
BOOL32 HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr);
BOOL HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len);
BOOL HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len );
BOOL HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr);
DWORD WINAPI ParseField32A(LPCSTR src,DWORD field,LPSTR dst,DWORD len);
DWORD WINAPI ParseFieldA(LPCSTR src,DWORD field,LPSTR dst,DWORD len);
HGLOBAL32 WINAPI SHAllocShared(LPVOID psrc, DWORD size, DWORD procID);
LPVOID WINAPI SHLockShared(HANDLE32 hmem, DWORD procID);
BOOL32 WINAPI SHUnlockShared(HANDLE32 pmem);
HANDLE32 WINAPI SHFreeShared(HANDLE32 hmem, DWORD procID);
HGLOBAL WINAPI SHAllocShared(LPVOID psrc, DWORD size, DWORD procID);
LPVOID WINAPI SHLockShared(HANDLE hmem, DWORD procID);
BOOL WINAPI SHUnlockShared(HANDLE pmem);
HANDLE WINAPI SHFreeShared(HANDLE hmem, DWORD procID);
/****************************************************************************
* Class constructors
*/
#ifdef __WINE__
extern LPDATAOBJECT IDataObject_Constructor(HWND32 hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT32 cidl);
extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32, const FORMATETC32 []);
extern LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT cidl);
extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
extern LPCLASSFACTORY IShellLink_CF_Constructor(void);
extern LPCLASSFACTORY IShellLinkW_CF_Constructor(void);
extern LPCLASSFACTORY IClassFactory_Constructor(void);
extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT32);
extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT);
extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
extern LPSHELLLINK IShellLink_Constructor(void);

View File

@ -160,14 +160,14 @@ static HRESULT WINAPI IPersistFile_fnIsDirty(const IPersistFile* iface)
FIXME(shell,"(%p)\n",This);
return NOERROR;
}
static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR32 pszFileName, DWORD dwMode)
static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode)
{
ICOM_THIS(IPersistFileImpl,iface);
OFSTRUCT ofs;
LPSTR sFile = HEAP_strdupWtoA ( GetProcessHeap(), 0, pszFileName);
HFILE32 hFile = OpenFile32( sFile, &ofs, OF_READ );
HANDLE32 hMapping;
HFILE hFile = OpenFile( sFile, &ofs, OF_READ );
HANDLE hMapping;
PLINK_HEADER pImage;
HRESULT hRet = E_FAIL;
CHAR sTemp[512];
@ -176,7 +176,7 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR32 pszFi
HeapFree(GetProcessHeap(),0,sFile);
if ( !(hMapping = CreateFileMapping32A(hFile,NULL,PAGE_READONLY|SEC_COMMIT,0,0,NULL)))
if ( !(hMapping = CreateFileMappingA(hFile,NULL,PAGE_READONLY|SEC_COMMIT,0,0,NULL)))
{ WARN(shell,"failed to create filemap.\n");
goto end_1;
}
@ -194,15 +194,15 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR32 pszFi
{ /* for debugging */
SYSTEMTIME time;
FileTimeToSystemTime (&pImage->Time1, &time);
GetDateFormat32A(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, sTemp, 256);
GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, sTemp, 256);
TRACE(shell, "-- time1: %s\n", sTemp);
FileTimeToSystemTime (&pImage->Time2, &time);
GetDateFormat32A(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, sTemp, 256);
GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, sTemp, 256);
TRACE(shell, "-- time2: %s\n", sTemp);
FileTimeToSystemTime (&pImage->Time3, &time);
GetDateFormat32A(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, sTemp, 256);
GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, sTemp, 256);
TRACE(shell, "-- time3: %s\n", sTemp);
pdump (&pImage->Pidl);
}
@ -215,24 +215,24 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR32 pszFi
hRet = NOERROR;
end_3: UnmapViewOfFile(pImage);
end_2: CloseHandle(hMapping);
end_1: _lclose32( hFile);
end_1: _lclose( hFile);
return hRet;
}
static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR32 pszFileName, BOOL32 fRemember)
static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFileName, BOOL fRemember)
{
ICOM_THIS(IPersistFileImpl,iface);
FIXME(shell,"(%p)->(%s)\n",This,debugstr_w(pszFileName));
return NOERROR;
}
static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLESTR32 pszFileName)
static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLESTR pszFileName)
{
ICOM_THIS(IPersistFileImpl,iface);
FIXME(shell,"(%p)->(%s)\n",This,debugstr_w(pszFileName));
return NOERROR;
}
static HRESULT WINAPI IPersistFile_fnGetCurFile(const IPersistFile* iface, LPOLESTR32 *ppszFileName)
static HRESULT WINAPI IPersistFile_fnGetCurFile(const IPersistFile* iface, LPOLESTR *ppszFileName)
{
ICOM_CTHIS(IPersistFileImpl,iface);
FIXME(shell,"(%p)\n",This);
@ -376,7 +376,7 @@ static HRESULT WINAPI IShellLink_CF_CreateInstance(
/******************************************************************************
* IShellLink_CF_LockServer
*/
static HRESULT WINAPI IShellLink_CF_LockServer(IClassFactory* iface, BOOL32 fLock)
static HRESULT WINAPI IShellLink_CF_LockServer(IClassFactory* iface, BOOL fLock)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE(shell,"%p->(0x%x), not implemented\n",This, fLock);
@ -484,7 +484,7 @@ static ULONG WINAPI IShellLink_fnRelease(IShellLink * iface)
return This->ref;
}
static HRESULT WINAPI IShellLink_fnGetPath(IShellLink * iface, LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags)
static HRESULT WINAPI IShellLink_fnGetPath(IShellLink * iface, LPSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
{
ICOM_THIS(IShellLinkImpl, iface);
@ -513,7 +513,7 @@ static HRESULT WINAPI IShellLink_fnSetIDList(IShellLink * iface, LPCITEMIDLIST p
This->lppf->pPidl = ILClone (pidl);
return NOERROR;
}
static HRESULT WINAPI IShellLink_fnGetDescription(IShellLink * iface, LPSTR pszName,INT32 cchMaxName)
static HRESULT WINAPI IShellLink_fnGetDescription(IShellLink * iface, LPSTR pszName,INT cchMaxName)
{
ICOM_THIS(IShellLinkImpl, iface);
@ -528,7 +528,7 @@ static HRESULT WINAPI IShellLink_fnSetDescription(IShellLink * iface, LPCSTR psz
FIXME(shell,"(%p)->(desc=%s)\n",This, pszName);
return NOERROR;
}
static HRESULT WINAPI IShellLink_fnGetWorkingDirectory(IShellLink * iface, LPSTR pszDir,INT32 cchMaxPath)
static HRESULT WINAPI IShellLink_fnGetWorkingDirectory(IShellLink * iface, LPSTR pszDir,INT cchMaxPath)
{
ICOM_THIS(IShellLinkImpl, iface);
@ -543,7 +543,7 @@ static HRESULT WINAPI IShellLink_fnSetWorkingDirectory(IShellLink * iface, LPCST
FIXME(shell,"(%p)->(dir=%s)\n",This, pszDir);
return NOERROR;
}
static HRESULT WINAPI IShellLink_fnGetArguments(IShellLink * iface, LPSTR pszArgs,INT32 cchMaxPath)
static HRESULT WINAPI IShellLink_fnGetArguments(IShellLink * iface, LPSTR pszArgs,INT cchMaxPath)
{
ICOM_THIS(IShellLinkImpl, iface);
@ -573,7 +573,7 @@ static HRESULT WINAPI IShellLink_fnSetHotkey(IShellLink * iface, WORD wHotkey)
FIXME(shell,"(%p)->(hotkey=%x)\n",This, wHotkey);
return NOERROR;
}
static HRESULT WINAPI IShellLink_fnGetShowCmd(IShellLink * iface, INT32 *piShowCmd)
static HRESULT WINAPI IShellLink_fnGetShowCmd(IShellLink * iface, INT *piShowCmd)
{
ICOM_THIS(IShellLinkImpl, iface);
@ -581,14 +581,14 @@ static HRESULT WINAPI IShellLink_fnGetShowCmd(IShellLink * iface, INT32 *piShowC
*piShowCmd=0;
return NOERROR;
}
static HRESULT WINAPI IShellLink_fnSetShowCmd(IShellLink * iface, INT32 iShowCmd)
static HRESULT WINAPI IShellLink_fnSetShowCmd(IShellLink * iface, INT iShowCmd)
{
ICOM_THIS(IShellLinkImpl, iface);
FIXME(shell,"(%p)->(showcmd=%x)\n",This, iShowCmd);
return NOERROR;
}
static HRESULT WINAPI IShellLink_fnGetIconLocation(IShellLink * iface, LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon)
static HRESULT WINAPI IShellLink_fnGetIconLocation(IShellLink * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon)
{
ICOM_THIS(IShellLinkImpl, iface);
@ -597,7 +597,7 @@ static HRESULT WINAPI IShellLink_fnGetIconLocation(IShellLink * iface, LPSTR psz
*piIcon=1;
return NOERROR;
}
static HRESULT WINAPI IShellLink_fnSetIconLocation(IShellLink * iface, LPCSTR pszIconPath,INT32 iIcon)
static HRESULT WINAPI IShellLink_fnSetIconLocation(IShellLink * iface, LPCSTR pszIconPath,INT iIcon)
{
ICOM_THIS(IShellLinkImpl, iface);
@ -611,7 +611,7 @@ static HRESULT WINAPI IShellLink_fnSetRelativePath(IShellLink * iface, LPCSTR ps
FIXME(shell,"(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved);
return NOERROR;
}
static HRESULT WINAPI IShellLink_fnResolve(IShellLink * iface, HWND32 hwnd, DWORD fFlags)
static HRESULT WINAPI IShellLink_fnResolve(IShellLink * iface, HWND hwnd, DWORD fFlags)
{
ICOM_THIS(IShellLinkImpl, iface);
@ -772,7 +772,7 @@ static HRESULT WINAPI IShellLinkW_CF_CreateInstance(
* IShellLinkW_CF_LockServer
*/
static HRESULT WINAPI IShellLinkW_CF_LockServer(LPCLASSFACTORY iface, BOOL32 fLock)
static HRESULT WINAPI IShellLinkW_CF_LockServer(LPCLASSFACTORY iface, BOOL fLock)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE(shell,"%p->(0x%x), not implemented\n",This, fLock);
@ -886,7 +886,7 @@ static ULONG WINAPI IShellLinkW_fnRelease(IShellLinkW * iface)
return This->ref;
}
static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags)
static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
{
ICOM_THIS(IShellLinkWImpl, iface);
@ -912,7 +912,7 @@ static HRESULT WINAPI IShellLinkW_fnSetIDList(IShellLinkW * iface, LPCITEMIDLIST
return NOERROR;
}
static HRESULT WINAPI IShellLinkW_fnGetDescription(IShellLinkW * iface, LPWSTR pszName,INT32 cchMaxName)
static HRESULT WINAPI IShellLinkW_fnGetDescription(IShellLinkW * iface, LPWSTR pszName,INT cchMaxName)
{
ICOM_THIS(IShellLinkWImpl, iface);
@ -929,7 +929,7 @@ static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR
return NOERROR;
}
static HRESULT WINAPI IShellLinkW_fnGetWorkingDirectory(IShellLinkW * iface, LPWSTR pszDir,INT32 cchMaxPath)
static HRESULT WINAPI IShellLinkW_fnGetWorkingDirectory(IShellLinkW * iface, LPWSTR pszDir,INT cchMaxPath)
{
ICOM_THIS(IShellLinkWImpl, iface);
@ -946,7 +946,7 @@ static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPC
return NOERROR;
}
static HRESULT WINAPI IShellLinkW_fnGetArguments(IShellLinkW * iface, LPWSTR pszArgs,INT32 cchMaxPath)
static HRESULT WINAPI IShellLinkW_fnGetArguments(IShellLinkW * iface, LPWSTR pszArgs,INT cchMaxPath)
{
ICOM_THIS(IShellLinkWImpl, iface);
@ -980,7 +980,7 @@ static HRESULT WINAPI IShellLinkW_fnSetHotkey(IShellLinkW * iface, WORD wHotkey)
return NOERROR;
}
static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT32 *piShowCmd)
static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT *piShowCmd)
{
ICOM_THIS(IShellLinkWImpl, iface);
@ -989,7 +989,7 @@ static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT32 *piSho
return NOERROR;
}
static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT32 iShowCmd)
static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd)
{
ICOM_THIS(IShellLinkWImpl, iface);
@ -997,7 +997,7 @@ static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT32 iShowC
return NOERROR;
}
static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon)
static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT cchIconPath,INT *piIcon)
{
ICOM_THIS(IShellLinkWImpl, iface);
@ -1007,7 +1007,7 @@ static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR
return NOERROR;
}
static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR pszIconPath,INT32 iIcon)
static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR pszIconPath,INT iIcon)
{
ICOM_THIS(IShellLinkWImpl, iface);
@ -1023,7 +1023,7 @@ static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR
return NOERROR;
}
static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND32 hwnd, DWORD fFlags)
static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWORD fFlags)
{
ICOM_THIS(IShellLinkWImpl, iface);

View File

@ -24,31 +24,31 @@
*/
typedef DWORD (* WINAPI GetClassPtr)(REFCLSID,REFIID,LPVOID);
static GetClassPtr SH_find_moduleproc(LPSTR dllname,HMODULE32 *xhmod,LPSTR name)
{ HMODULE32 hmod;
FARPROC32 dllunload,nameproc;
static GetClassPtr SH_find_moduleproc(LPSTR dllname,HMODULE *xhmod,LPSTR name)
{ HMODULE hmod;
FARPROC dllunload,nameproc;
TRACE(shell,"dll=%s, hmodule=%p, name=%s\n",dllname, xhmod, name);
if (xhmod)
{ *xhmod = 0;
}
if (!strcasecmp(PathFindFilename32A(dllname),"shell32.dll"))
if (!strcasecmp(PathFindFilenameA(dllname),"shell32.dll"))
{ return (GetClassPtr)SHELL32_DllGetClassObject;
}
hmod = LoadLibraryEx32A(dllname,0,LOAD_WITH_ALTERED_SEARCH_PATH);
hmod = LoadLibraryExA(dllname,0,LOAD_WITH_ALTERED_SEARCH_PATH);
if (!hmod)
{ return NULL;
}
dllunload = GetProcAddress32(hmod,"DllCanUnloadNow");
dllunload = GetProcAddress(hmod,"DllCanUnloadNow");
if (!dllunload)
{ if (xhmod)
{ *xhmod = hmod;
}
}
nameproc = GetProcAddress32(hmod,name);
nameproc = GetProcAddress(hmod,name);
if (!nameproc)
{ FreeLibrary32(hmod);
{ FreeLibrary(hmod);
return NULL;
}
/* register unloadable dll with unloadproc ... */
@ -111,12 +111,12 @@ LRESULT WINAPI SHCoCreateInstance(LPSTR aclsid,CLSID *clsid,LPUNKNOWN unknownout
sprintf(buffer,"CLSID\\%s\\InProcServer32",xclsid);
if (RegOpenKeyEx32A(HKEY_CLASSES_ROOT,buffer,0,0x02000000,&inprockey))
if (RegOpenKeyExA(HKEY_CLASSES_ROOT,buffer,0,0x02000000,&inprockey))
{ return SH_get_instance(clsid,"shell32.dll",unknownouter,refiid,inst);
}
pathlen=sizeof(path);
if (RegQueryValue32A(inprockey,NULL,path,&pathlen))
if (RegQueryValueA(inprockey,NULL,path,&pathlen))
{ RegCloseKey(inprockey);
return SH_get_instance(clsid,"shell32.dll",unknownouter,refiid,inst);
}
@ -124,7 +124,7 @@ LRESULT WINAPI SHCoCreateInstance(LPSTR aclsid,CLSID *clsid,LPUNKNOWN unknownout
TRACE(shell, "Server dll is %s\n",path);
tmodellen=sizeof(tmodel);
type=REG_SZ;
if (RegQueryValueEx32A(inprockey,"ThreadingModel",NULL,&type,tmodel,&tmodellen))
if (RegQueryValueExA(inprockey,"ThreadingModel",NULL,&type,tmodel,&tmodellen))
{ RegCloseKey(inprockey);
return SH_get_instance(clsid,"shell32.dll",unknownouter,refiid,inst);
}
@ -203,9 +203,9 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
* What we are currently doing is not very wrong, since we always use the same
* heap (ProcessHeap).
*/
DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal)
DWORD WINAPI SHGetMalloc(LPMALLOC *lpmal)
{ TRACE(shell,"(%p)\n", lpmal);
return CoGetMalloc32(0,lpmal);
return CoGetMalloc(0,lpmal);
}
/**************************************************************************
@ -345,7 +345,7 @@ static HRESULT WINAPI IClassFactory_fnCreateInstance(
/******************************************************************************
* IClassFactory_LockServer
*/
static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface, BOOL32 fLock)
static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface, BOOL fLock)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE(shell,"%p->(0x%x), not implemented\n",This, fLock);

View File

@ -24,7 +24,7 @@
*/
DWORD WINAPI
SHChangeNotifyRegister(
HWND32 hwnd,
HWND hwnd,
LONG events1,
LONG events2,
DWORD msg,
@ -49,7 +49,7 @@ SHChangeNotifyDeregister(LONG x1)
* (usually just one I think).
*/
DWORD WINAPI NTSHChangeNotifyRegister(
HWND32 hwnd,
HWND hwnd,
LONG events1,
LONG events2,
DWORD msg,
@ -71,7 +71,7 @@ DWORD WINAPI NTSHChangeNotifyDeregister(LONG x1)
* ParseField [SHELL32.58]
*
*/
DWORD WINAPI ParseField32A(LPCSTR src, DWORD field, LPSTR dst, DWORD len)
DWORD WINAPI ParseFieldA(LPCSTR src, DWORD field, LPSTR dst, DWORD len)
{ WARN(shell,"('%s',0x%08lx,%p,%ld) semi-stub.\n",src,field,dst,len);
if (!src || !src[0] || !dst || !len)
@ -107,12 +107,12 @@ DWORD WINAPI PickIconDlg(DWORD x,DWORD y,DWORD z,DWORD a)
* GetFileNameFromBrowse [SHELL32.63]
*
*/
DWORD WINAPI GetFileNameFromBrowse(HWND32 howner, LPSTR targetbuf, DWORD len, DWORD x, LPCSTR suffix, LPCSTR y, LPCSTR cmd)
DWORD WINAPI GetFileNameFromBrowse(HWND howner, LPSTR targetbuf, DWORD len, DWORD x, LPCSTR suffix, LPCSTR y, LPCSTR cmd)
{ FIXME(shell,"(%04x,%p,%ld,%08lx,%s,%s,%s):stub.\n",
howner,targetbuf,len,x,suffix,y,cmd);
/* puts up a Open Dialog and requests input into targetbuf */
/* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
lstrcpy32A(targetbuf,"x:\\dummy.exe");
lstrcpyA(targetbuf,"x:\\dummy.exe");
return 1;
}
@ -140,7 +140,7 @@ DWORD WINAPI SHGetSettings(DWORD x,DWORD y,DWORD z)
* shell view to re-sort the item list. lParam identifies the column
* that was clicked.
*/
int WINAPI SHShellFolderView_Message(HWND32 hwndCabinet,UINT32 uMsg,LPARAM lParam)
int WINAPI SHShellFolderView_Message(HWND hwndCabinet,UINT uMsg,LPARAM lParam)
{ FIXME(shell,"%04x %08ux %08lx stub\n",hwndCabinet,uMsg,lParam);
return 0;
}
@ -153,8 +153,8 @@ int WINAPI SHShellFolderView_Message(HWND32 hwndCabinet,UINT32 uMsg,LPARAM lPara
* FIXME
* wrong implemented OleStr is NOT wide string !!!! (jsch)
*/
BOOL32 WINAPI
OleStrToStrN (LPSTR lpMulti, INT32 nMulti, LPCWSTR lpWide, INT32 nWide) {
BOOL WINAPI
OleStrToStrN (LPSTR lpMulti, INT nMulti, LPCWSTR lpWide, INT nWide) {
return WideCharToMultiByte (0, 0, lpWide, nWide,
lpMulti, nMulti, NULL, NULL);
}
@ -167,8 +167,8 @@ OleStrToStrN (LPSTR lpMulti, INT32 nMulti, LPCWSTR lpWide, INT32 nWide) {
* FIXME
* wrong implemented OleStr is NOT wide string !!!! (jsch)
*/
BOOL32 WINAPI
StrToOleStrN (LPWSTR lpWide, INT32 nWide, LPCSTR lpMulti, INT32 nMulti) {
BOOL WINAPI
StrToOleStrN (LPWSTR lpWide, INT nWide, LPCSTR lpMulti, INT nMulti) {
return MultiByteToWideChar (0, 0, lpMulti, nMulti, lpWide, nWide);
}
@ -182,7 +182,7 @@ StrToOleStrN (LPWSTR lpWide, INT32 nWide, LPCSTR lpMulti, INT32 nMulti) {
* NOTES
* exported by ordinal
*/
void WINAPI RegisterShellHook32(HWND32 hwnd, DWORD y) {
void WINAPI RegisterShellHook(HWND hwnd, DWORD y) {
FIXME(shell,"(0x%08x,0x%08lx):stub.\n",hwnd,y);
}
/*************************************************************************
@ -196,8 +196,8 @@ void WINAPI RegisterShellHook32(HWND32 hwnd, DWORD y) {
* NOTES
* exported by ordinal
*/
INT32 __cdecl
ShellMessageBoxW(HMODULE32 hmod,HWND32 hwnd,DWORD idText,DWORD idTitle,DWORD uType,LPCVOID arglist)
INT __cdecl
ShellMessageBoxW(HMODULE hmod,HWND hwnd,DWORD idText,DWORD idTitle,DWORD uType,LPCVOID arglist)
{ WCHAR szText[100],szTitle[100],szTemp[256];
LPWSTR pszText = &szText[0], pszTitle = &szTitle[0];
LPVOID args = &arglist;
@ -205,24 +205,24 @@ ShellMessageBoxW(HMODULE32 hmod,HWND32 hwnd,DWORD idText,DWORD idTitle,DWORD uTy
TRACE(shell,"(%08lx,%08lx,%08lx,%08lx,%08lx,%p)\n",(DWORD)hmod,(DWORD)hwnd,idText,idTitle,uType,arglist);
if (!HIWORD (idTitle))
LoadString32W(hmod,idTitle,pszTitle,100);
LoadStringW(hmod,idTitle,pszTitle,100);
else
pszTitle = (LPWSTR)idTitle;
if (! HIWORD (idText))
LoadString32W(hmod,idText,pszText,100);
LoadStringW(hmod,idText,pszText,100);
else
pszText = (LPWSTR)idText;
FormatMessage32W(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY ,szText,0,0,szTemp,256,args);
return MessageBox32W(hwnd,szTemp,szTitle,uType);
FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY ,szText,0,0,szTemp,256,args);
return MessageBoxW(hwnd,szTemp,szTitle,uType);
}
/*************************************************************************
* ShellMessageBoxA [SHELL32.183]
*/
INT32 __cdecl
ShellMessageBoxA(HMODULE32 hmod,HWND32 hwnd,DWORD idText,DWORD idTitle,DWORD uType,LPCVOID arglist)
INT __cdecl
ShellMessageBoxA(HMODULE hmod,HWND hwnd,DWORD idText,DWORD idTitle,DWORD uType,LPCVOID arglist)
{ char szText[100],szTitle[100],szTemp[256];
LPSTR pszText = &szText[0], pszTitle = &szTitle[0];
LPVOID args = &arglist;
@ -230,17 +230,17 @@ ShellMessageBoxA(HMODULE32 hmod,HWND32 hwnd,DWORD idText,DWORD idTitle,DWORD uTy
TRACE(shell,"(%08lx,%08lx,%08lx,%08lx,%08lx,%p)\n", (DWORD)hmod,(DWORD)hwnd,idText,idTitle,uType,arglist);
if (!HIWORD (idTitle))
LoadString32A(hmod,idTitle,pszTitle,100);
LoadStringA(hmod,idTitle,pszTitle,100);
else
pszTitle = (LPSTR)idTitle;
if (! HIWORD (idText))
LoadString32A(hmod,idText,pszText,100);
LoadStringA(hmod,idText,pszText,100);
else
pszText = (LPSTR)idText;
FormatMessage32A(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY ,pszText,0,0,szTemp,256,args);
return MessageBox32A(hwnd,szTemp,pszTitle,uType);
FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY ,pszText,0,0,szTemp,256,args);
return MessageBoxA(hwnd,szTemp,pszTitle,uType);
}
/*************************************************************************
@ -276,7 +276,7 @@ DWORD WINAPI SHRestricted (DWORD pol) {
HKEY xhkey;
FIXME(shell,"(%08lx):stub.\n",pol);
if (RegOpenKey32A(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Policies",&xhkey))
if (RegOpenKeyA(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Policies",&xhkey))
return 0;
/* FIXME: do nothing for now, just return 0 (== "allowed") */
RegCloseKey(xhkey);
@ -292,7 +292,7 @@ DWORD WINAPI SHRestricted (DWORD pol) {
*/
DWORD WINAPI SHCreateDirectory(LPSECURITY_ATTRIBUTES sec,LPCSTR path) {
TRACE(shell,"(%p,%s):stub.\n",sec,path);
if (CreateDirectory32A(path,sec))
if (CreateDirectoryA(path,sec))
return TRUE;
/* SHChangeNotify(8,1,path,0); */
return FALSE;
@ -352,7 +352,7 @@ DWORD WINAPI OpenRegStream(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
* NOTES
* exported by ordinal
*/
DWORD WINAPI SHRegisterDragDrop(HWND32 hwnd,DWORD x2) {
DWORD WINAPI SHRegisterDragDrop(HWND hwnd,DWORD x2) {
FIXME (shell, "(0x%08x,0x%08lx):stub.\n", hwnd, x2);
return 0;
}
@ -375,8 +375,8 @@ DWORD WINAPI SHRevokeDragDrop(DWORD x) {
* Original name: RunFileDlg (exported by ordinal)
*/
DWORD WINAPI
RunFileDlg (HWND32 hwndOwner, DWORD dwParam1, DWORD dwParam2,
LPSTR lpszTitle, LPSTR lpszPrompt, UINT32 uFlags)
RunFileDlg (HWND hwndOwner, DWORD dwParam1, DWORD dwParam2,
LPSTR lpszTitle, LPSTR lpszPrompt, UINT uFlags)
{
FIXME (shell,"(0x%08x 0x%lx 0x%lx \"%s\" \"%s\" 0x%x):stub.\n",
hwndOwner, dwParam1, dwParam2, lpszTitle, lpszPrompt, uFlags);
@ -390,7 +390,7 @@ RunFileDlg (HWND32 hwndOwner, DWORD dwParam1, DWORD dwParam2,
* exported by ordinal
*/
DWORD WINAPI
ExitWindowsDialog (HWND32 hwndOwner)
ExitWindowsDialog (HWND hwndOwner)
{
FIXME (shell,"(0x%08x):stub.\n", hwndOwner);
return 0;
@ -449,7 +449,7 @@ SignalFileOpen (DWORD dwParam1)
* NOTES
* exported by name
*/
DWORD WINAPI SHAddToRecentDocs32 (UINT32 uFlags,LPCVOID pv)
DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
{ if (SHARD_PIDL==uFlags)
{ FIXME (shell,"(0x%08x,pidl=%p):stub.\n", uFlags,pv);
}
@ -462,7 +462,7 @@ DWORD WINAPI SHAddToRecentDocs32 (UINT32 uFlags,LPCVOID pv)
* SHFileOperation32 [SHELL32.242]
*
*/
DWORD WINAPI SHFileOperation32(DWORD x)
DWORD WINAPI SHFileOperationAW(DWORD x)
{ FIXME(shell,"0x%08lx stub\n",x);
return 0;
@ -474,7 +474,7 @@ DWORD WINAPI SHFileOperation32(DWORD x)
* NOTES
* exported by name
*/
DWORD WINAPI SHFileOperation32A (LPSHFILEOPSTRUCT32A lpFileOp)
DWORD WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp)
{ FIXME (shell,"(%p):stub.\n", lpFileOp);
return 1;
}
@ -484,7 +484,7 @@ DWORD WINAPI SHFileOperation32A (LPSHFILEOPSTRUCT32A lpFileOp)
* NOTES
* exported by name
*/
DWORD WINAPI SHFileOperation32W (LPSHFILEOPSTRUCT32W lpFileOp)
DWORD WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp)
{ FIXME (shell,"(%p):stub.\n", lpFileOp);
return 1;
}
@ -495,9 +495,9 @@ DWORD WINAPI SHFileOperation32W (LPSHFILEOPSTRUCT32W lpFileOp)
* NOTES
* exported by name
*/
DWORD WINAPI SHChangeNotify32 (
INT32 wEventId, /* [IN] flags that specifies the event*/
UINT32 uFlags, /* [IN] the meaning of dwItem[1|2]*/
DWORD WINAPI SHChangeNotify (
INT wEventId, /* [IN] flags that specifies the event*/
UINT uFlags, /* [IN] the meaning of dwItem[1|2]*/
LPCVOID dwItem1,
LPCVOID dwItem2)
{ FIXME (shell,"(0x%08x,0x%08ux,%p,%p):stub.\n", wEventId,uFlags,dwItem1,dwItem2);
@ -509,7 +509,7 @@ DWORD WINAPI SHChangeNotify32 (
* NOTES
* see IShellFolder::CreateViewObject
*/
HRESULT WINAPI SHCreateShellFolderViewEx32(
HRESULT WINAPI SHCreateShellFolderViewEx(
LPSHELLVIEWDATA psvcbi, /*[in ] shelltemplate struct*/
LPVOID* ppv) /*[out] IShellView pointer*/
{ FIXME (shell,"(%p,%p):stub.\n", psvcbi,ppv);
@ -527,7 +527,7 @@ HRESULT WINAPI SHCreateShellFolderViewEx32(
* w [in] no pointer
* x [in] no pointer
*/
HRESULT WINAPI SHFind_InitMenuPopup (HMENU32 hMenu, HWND32 hWndParent, DWORD w, DWORD x)
HRESULT WINAPI SHFind_InitMenuPopup (HMENU hMenu, HWND hWndParent, DWORD w, DWORD x)
{ FIXME(shell,"hmenu=0x%08x hwnd=0x%08x 0x%08lx 0x%08lx stub\n",
hMenu,hWndParent,w,x);
return 0;
@ -561,7 +561,7 @@ HRESULT WINAPI FileMenu_Create (DWORD u, DWORD v, DWORD w, DWORD x, DWORD z)
* hWndParent [in]
* z could be rect (trace) or TPMPARAMS (TrackPopupMenuEx)
*/
HRESULT WINAPI FileMenu_TrackPopupMenuEx (DWORD t, DWORD uFlags, DWORD posX, DWORD posY, HWND32 hWndParent, DWORD z)
HRESULT WINAPI FileMenu_TrackPopupMenuEx (DWORD t, DWORD uFlags, DWORD posX, DWORD posY, HWND hWndParent, DWORD z)
{ FIXME(shell,"0x%lx flags=0x%lx posx=0x%lx posy=0x%lx hwndp=0x%x 0x%lx stub\n",
t,uFlags,posX,posY, hWndParent,z);
return 0;
@ -586,20 +586,20 @@ HRESULT WINAPI SHRunControlPanel (DWORD x, DWORD z)
* ShellExecuteEx [SHELL32.291]
*
*/
BOOL32 WINAPI ShellExecuteEx32 (LPVOID sei)
BOOL WINAPI ShellExecuteExAW (LPVOID sei)
{ if (VERSION_OsIsUnicode())
return ShellExecuteEx32W (sei);
return ShellExecuteEx32A (sei);
return ShellExecuteExW (sei);
return ShellExecuteExA (sei);
}
/*************************************************************************
* ShellExecuteEx32A [SHELL32.292]
*
*/
BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
BOOL WINAPI ShellExecuteExA (LPSHELLEXECUTEINFOA sei)
{ CHAR szApplicationName[MAX_PATH],szCommandline[MAX_PATH],szPidl[20];
LPSTR pos;
int gap, len;
STARTUPINFO32A startupinfo;
STARTUPINFOA startupinfo;
PROCESS_INFORMATION processinformation;
WARN(shell,"mask=0x%08lx hwnd=0x%04x verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s incomplete\n",
@ -627,7 +627,7 @@ BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
/* process the IDList */
if ( (sei->fMask & SEE_MASK_INVOKEIDLIST) == SEE_MASK_INVOKEIDLIST) /*0x0c*/
{ SHGetPathFromIDList32A (sei->lpIDList,szApplicationName);
{ SHGetPathFromIDListA (sei->lpIDList,szApplicationName);
TRACE(shell,"-- idlist=%p (%s)\n", sei->lpIDList, szApplicationName);
}
else
@ -635,7 +635,7 @@ BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
{ /* %I is the adress of a global item ID*/
pos = strstr(szCommandline, "%I");
if (pos)
{ HGLOBAL32 hmem = SHAllocShared ( sei->lpIDList, ILGetSize(sei->lpIDList), 0);
{ HGLOBAL hmem = SHAllocShared ( sei->lpIDList, ILGetSize(sei->lpIDList), 0);
sprintf(szPidl,":%li",(DWORD)SHLockShared(hmem,0) );
SHUnlockShared(hmem);
@ -657,10 +657,10 @@ BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
TRACE(shell,"execute: %s %s\n",szApplicationName, szCommandline);
ZeroMemory(&startupinfo,sizeof(STARTUPINFO32A));
startupinfo.cb = sizeof(STARTUPINFO32A);
ZeroMemory(&startupinfo,sizeof(STARTUPINFOA));
startupinfo.cb = sizeof(STARTUPINFOA);
return CreateProcess32A(szApplicationName[0] ? szApplicationName:NULL,
return CreateProcessA(szApplicationName[0] ? szApplicationName:NULL,
szCommandline[0] ? szCommandline : NULL,
NULL, NULL, FALSE, 0,
NULL, NULL, &startupinfo, &processinformation);
@ -671,13 +671,13 @@ BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
* ShellExecuteEx32W [SHELL32.293]
*
*/
BOOL32 WINAPI ShellExecuteEx32W (LPSHELLEXECUTEINFO32W sei)
{ SHELLEXECUTEINFO32A seiA;
BOOL WINAPI ShellExecuteExW (LPSHELLEXECUTEINFOW sei)
{ SHELLEXECUTEINFOA seiA;
DWORD ret;
TRACE (shell,"%p\n", sei);
memcpy(&seiA, sei, sizeof(SHELLEXECUTEINFO32A));
memcpy(&seiA, sei, sizeof(SHELLEXECUTEINFOA));
if (sei->lpVerb)
seiA.lpVerb = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpVerb);
@ -696,7 +696,7 @@ BOOL32 WINAPI ShellExecuteEx32W (LPSHELLEXECUTEINFO32W sei)
else
seiA.lpClass = NULL;
ret = ShellExecuteEx32A(&seiA);
ret = ShellExecuteExA(&seiA);
if (seiA.lpVerb) HeapFree( GetProcessHeap(), 0, (LPSTR) seiA.lpVerb );
if (seiA.lpFile) HeapFree( GetProcessHeap(), 0, (LPSTR) seiA.lpFile );
@ -770,7 +770,7 @@ HRESULT WINAPI FileMenu_Destroy (DWORD u)
* SHRegCloseKey32 [NT4.0:SHELL32.505]
*
*/
HRESULT WINAPI SHRegCloseKey32 (HKEY hkey)
HRESULT WINAPI SHRegCloseKey (HKEY hkey)
{ TRACE(shell,"0x%04x\n",hkey);
return RegCloseKey( hkey );
}
@ -778,25 +778,25 @@ HRESULT WINAPI SHRegCloseKey32 (HKEY hkey)
* SHRegOpenKey32A [SHELL32.506]
*
*/
HRESULT WINAPI SHRegOpenKey32A(HKEY hKey, LPSTR lpSubKey, LPHKEY phkResult)
HRESULT WINAPI SHRegOpenKeyA(HKEY hKey, LPSTR lpSubKey, LPHKEY phkResult)
{ FIXME(shell,"(0x%08x, %s, %p)\n", hKey, debugstr_a(lpSubKey),
phkResult);
return RegOpenKey32A(hKey, lpSubKey, phkResult);
return RegOpenKeyA(hKey, lpSubKey, phkResult);
}
/*************************************************************************
* SHRegOpenKey32W [NT4.0:SHELL32.507]
*
*/
HRESULT WINAPI SHRegOpenKey32W (HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey)
HRESULT WINAPI SHRegOpenKeyW (HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey)
{ WARN(shell,"0x%04x %s %p\n",hkey,debugstr_w(lpszSubKey),retkey);
return RegOpenKey32W( hkey, lpszSubKey, retkey );
return RegOpenKeyW( hkey, lpszSubKey, retkey );
}
/*************************************************************************
* SHRegQueryValueExA [SHELL32.509]
*
*/
HRESULT WINAPI SHRegQueryValueEx32A(DWORD u, LPSTR v, DWORD w, DWORD x,
HRESULT WINAPI SHRegQueryValueExA(DWORD u, LPSTR v, DWORD w, DWORD x,
DWORD y, DWORD z)
{ FIXME(shell,"0x%04lx %s 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n",
u,debugstr_a(v),w,x,y,z);
@ -806,11 +806,11 @@ HRESULT WINAPI SHRegQueryValueEx32A(DWORD u, LPSTR v, DWORD w, DWORD x,
* SHRegQueryValue32W [NT4.0:SHELL32.510]
*
*/
HRESULT WINAPI SHRegQueryValue32W (HKEY hkey, LPWSTR lpszSubKey,
HRESULT WINAPI SHRegQueryValueW (HKEY hkey, LPWSTR lpszSubKey,
LPWSTR lpszData, LPDWORD lpcbData )
{ WARN(shell,"0x%04x %s %p %p semi-stub\n",
hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);
return RegQueryValue32W( hkey, lpszSubKey, lpszData, lpcbData );
return RegQueryValueW( hkey, lpszSubKey, lpszData, lpcbData );
}
/*************************************************************************
@ -820,12 +820,12 @@ HRESULT WINAPI SHRegQueryValue32W (HKEY hkey, LPWSTR lpszSubKey,
* if the datatype REG_EXPAND_SZ then expand the string and change
* *pdwType to REG_SZ.
*/
HRESULT WINAPI SHRegQueryValueEx32W (HKEY hkey, LPWSTR pszValue, LPDWORD pdwReserved,
HRESULT WINAPI SHRegQueryValueExW (HKEY hkey, LPWSTR pszValue, LPDWORD pdwReserved,
LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData)
{ DWORD ret;
WARN(shell,"0x%04x %s %p %p %p %p semi-stub\n",
hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
ret = RegQueryValueEx32W ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
return ret;
}
@ -849,7 +849,7 @@ HRESULT WINAPI WriteCabinetState(DWORD u)
* FileIconInit [SHELL32.660]
*
*/
BOOL32 WINAPI FileIconInit(BOOL32 bFullInit)
BOOL WINAPI FileIconInit(BOOL bFullInit)
{ FIXME(shell,"(%s)\n", bFullInit ? "true" : "false");
return 0;
}
@ -925,7 +925,7 @@ LPWSTR WINAPI StrChrW (LPWSTR str, WCHAR x )
* StrCmpNIW [NT 4.0:SHELL32.*]
*
*/
INT32 WINAPI StrCmpNIW ( LPWSTR wstr1, LPWSTR wstr2, INT32 len)
INT WINAPI StrCmpNIW ( LPWSTR wstr1, LPWSTR wstr2, INT len)
{ FIXME( shell,"%s %s %i stub\n", debugstr_w(wstr1),debugstr_w(wstr2),len);
return 0;
}
@ -942,22 +942,22 @@ INT32 WINAPI StrCmpNIW ( LPWSTR wstr1, LPWSTR wstr2, INT32 len)
* WM_USER+2 could be the undocumented CWM_SETPATH
* the allocated memory contains a pidl
*/
HGLOBAL32 WINAPI SHAllocShared(LPVOID psrc, DWORD size, DWORD procID)
{ HGLOBAL32 hmem;
HGLOBAL WINAPI SHAllocShared(LPVOID psrc, DWORD size, DWORD procID)
{ HGLOBAL hmem;
LPVOID pmem;
TRACE(shell,"ptr=%p size=0x%04lx procID=0x%04lx\n",psrc,size,procID);
hmem = GlobalAlloc32(GMEM_FIXED, size);
hmem = GlobalAlloc(GMEM_FIXED, size);
if (!hmem)
return 0;
pmem = GlobalLock32 (hmem);
pmem = GlobalLock (hmem);
if (! pmem)
return 0;
memcpy (pmem, psrc, size);
GlobalUnlock32(hmem);
GlobalUnlock(hmem);
return hmem;
}
/*************************************************************************
@ -969,9 +969,9 @@ HGLOBAL32 WINAPI SHAllocShared(LPVOID psrc, DWORD size, DWORD procID)
* the receiver of (WM_USER+2) trys to lock the HANDLE (?)
* the returnvalue seems to be a memoryadress
*/
LPVOID WINAPI SHLockShared(HANDLE32 hmem, DWORD procID)
LPVOID WINAPI SHLockShared(HANDLE hmem, DWORD procID)
{ TRACE(shell,"handle=0x%04x procID=0x%04lx\n",hmem,procID);
return GlobalLock32(hmem);
return GlobalLock(hmem);
}
/*************************************************************************
* SHUnlockShared [SHELL32.522]
@ -979,9 +979,9 @@ LPVOID WINAPI SHLockShared(HANDLE32 hmem, DWORD procID)
* NOTES
* parameter1 is return value from SHLockShared
*/
BOOL32 WINAPI SHUnlockShared(HANDLE32 pmem)
BOOL WINAPI SHUnlockShared(HANDLE pmem)
{ TRACE(shell,"handle=0x%04x\n",pmem);
return GlobalUnlock32(pmem);
return GlobalUnlock(pmem);
}
/*************************************************************************
* SHFreeShared [SHELL32.523]
@ -990,16 +990,16 @@ BOOL32 WINAPI SHUnlockShared(HANDLE32 pmem)
* parameter1 is return value from SHAllocShared
* parameter2 is return value from GetCurrentProcessId
*/
HANDLE32 WINAPI SHFreeShared(HANDLE32 hmem, DWORD procID)
HANDLE WINAPI SHFreeShared(HANDLE hmem, DWORD procID)
{ TRACE(shell,"handle=0x%04x 0x%04lx\n",hmem,procID);
return GlobalFree32(hmem);
return GlobalFree(hmem);
}
/*************************************************************************
* SetAppStartingCursor32 [SHELL32.99]
*
*/
HRESULT WINAPI SetAppStartingCursor32(HWND32 u, DWORD v)
HRESULT WINAPI SetAppStartingCursor(HWND u, DWORD v)
{ FIXME(shell,"hwnd=0x%04x 0x%04lx stub\n",u,v );
return 0;
}
@ -1007,7 +1007,7 @@ HRESULT WINAPI SetAppStartingCursor32(HWND32 u, DWORD v)
* SHLoadOLE32 [SHELL32.151]
*
*/
HRESULT WINAPI SHLoadOLE32(DWORD u)
HRESULT WINAPI SHLoadOLE(DWORD u)
{ FIXME(shell,"0x%04lx stub\n",u);
return S_OK;
}
@ -1015,14 +1015,14 @@ HRESULT WINAPI SHLoadOLE32(DWORD u)
* Shell_MergeMenus32 [SHELL32.67]
*
*/
BOOL32 _SHIsMenuSeparator(HMENU32 hm, int i)
BOOL _SHIsMenuSeparator(HMENU hm, int i)
{
MENUITEMINFO32A mii;
MENUITEMINFOA mii;
mii.cbSize = sizeof(MENUITEMINFO32A);
mii.cbSize = sizeof(MENUITEMINFOA);
mii.fMask = MIIM_TYPE;
mii.cch = 0; /* WARNING: We MUST initialize it to 0*/
if (!GetMenuItemInfo32A(hm, i, TRUE, &mii))
if (!GetMenuItemInfoA(hm, i, TRUE, &mii))
{ return(FALSE);
}
@ -1034,13 +1034,13 @@ BOOL32 _SHIsMenuSeparator(HMENU32 hm, int i)
}
#define MM_ADDSEPARATOR 0x00000001L
#define MM_SUBMENUSHAVEIDS 0x00000002L
HRESULT WINAPI Shell_MergeMenus32 (HMENU32 hmDst, HMENU32 hmSrc, UINT32 uInsert, UINT32 uIDAdjust, UINT32 uIDAdjustMax, ULONG uFlags)
HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
{ int nItem;
HMENU32 hmSubMenu;
BOOL32 bAlreadySeparated;
MENUITEMINFO32A miiSrc;
HMENU hmSubMenu;
BOOL bAlreadySeparated;
MENUITEMINFOA miiSrc;
char szName[256];
UINT32 uTemp, uIDMax = uIDAdjust;
UINT uTemp, uIDMax = uIDAdjust;
FIXME(shell,"hmenu1=0x%04x hmenu2=0x%04x 0x%04x 0x%04x 0x%04x 0x%04lx stub\n",
hmDst, hmSrc, uInsert, uIDAdjust, uIDAdjustMax, uFlags);
@ -1049,9 +1049,9 @@ HRESULT WINAPI Shell_MergeMenus32 (HMENU32 hmDst, HMENU32 hmSrc, UINT32 uInsert,
{ return uIDMax;
}
nItem = GetMenuItemCount32(hmDst);
if (uInsert >= (UINT32)nItem)
{ uInsert = (UINT32)nItem;
nItem = GetMenuItemCount(hmDst);
if (uInsert >= (UINT)nItem)
{ uInsert = (UINT)nItem;
bAlreadySeparated = TRUE;
}
else
@ -1059,14 +1059,14 @@ HRESULT WINAPI Shell_MergeMenus32 (HMENU32 hmDst, HMENU32 hmSrc, UINT32 uInsert,
}
if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated)
{ /* Add a separator between the menus */
InsertMenu32A(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
InsertMenuA(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
bAlreadySeparated = TRUE;
}
/* Go through the menu items and clone them*/
for (nItem = GetMenuItemCount32(hmSrc) - 1; nItem >= 0; nItem--)
{ miiSrc.cbSize = sizeof(MENUITEMINFO32A);
for (nItem = GetMenuItemCount(hmSrc) - 1; nItem >= 0; nItem--)
{ miiSrc.cbSize = sizeof(MENUITEMINFOA);
miiSrc.fMask = MIIM_STATE | MIIM_ID | MIIM_SUBMENU | MIIM_CHECKMARKS | MIIM_TYPE | MIIM_DATA;
/* We need to reset this every time through the loop in case
menus DON'T have IDs*/
@ -1075,7 +1075,7 @@ HRESULT WINAPI Shell_MergeMenus32 (HMENU32 hmDst, HMENU32 hmSrc, UINT32 uInsert,
miiSrc.dwItemData = 0;
miiSrc.cch = sizeof(szName);
if (!GetMenuItemInfo32A(hmSrc, nItem, TRUE, &miiSrc))
if (!GetMenuItemInfoA(hmSrc, nItem, TRUE, &miiSrc))
{ continue;
}
if (miiSrc.fType & MFT_SEPARATOR)
@ -1101,11 +1101,11 @@ HRESULT WINAPI Shell_MergeMenus32 (HMENU32 hmDst, HMENU32 hmSrc, UINT32 uInsert,
miiSrc.fMask &= ~MIIM_ID;
}
hmSubMenu = miiSrc.hSubMenu;
miiSrc.hSubMenu = CreatePopupMenu32();
miiSrc.hSubMenu = CreatePopupMenu();
if (!miiSrc.hSubMenu)
{ return(uIDMax);
}
uTemp = Shell_MergeMenus32(miiSrc.hSubMenu, hmSubMenu, 0, uIDAdjust, uIDAdjustMax, uFlags&MM_SUBMENUSHAVEIDS);
uTemp = Shell_MergeMenus(miiSrc.hSubMenu, hmSubMenu, 0, uIDAdjust, uIDAdjustMax, uFlags&MM_SUBMENUSHAVEIDS);
if (uIDMax <= uTemp)
{ uIDMax = uTemp;
}
@ -1122,7 +1122,7 @@ HRESULT WINAPI Shell_MergeMenus32 (HMENU32 hmDst, HMENU32 hmSrc, UINT32 uInsert,
}
bAlreadySeparated = FALSE;
}
if (!InsertMenuItem32A(hmDst, uInsert, TRUE, &miiSrc))
if (!InsertMenuItemA(hmDst, uInsert, TRUE, &miiSrc))
{ return(uIDMax);
}
}
@ -1131,19 +1131,19 @@ HRESULT WINAPI Shell_MergeMenus32 (HMENU32 hmDst, HMENU32 hmSrc, UINT32 uInsert,
inserted menu items*/
if (uInsert == 0)
{ if (bAlreadySeparated)
{ DeleteMenu32(hmDst, uInsert, MF_BYPOSITION);
{ DeleteMenu(hmDst, uInsert, MF_BYPOSITION);
}
}
else
{ if (_SHIsMenuSeparator(hmDst, uInsert-1))
{ if (bAlreadySeparated)
{ DeleteMenu32(hmDst, uInsert, MF_BYPOSITION);
{ DeleteMenu(hmDst, uInsert, MF_BYPOSITION);
}
}
else
{ if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated)
{ /* Add a separator between the menus*/
InsertMenu32A(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
InsertMenuA(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
}
}
}
@ -1154,7 +1154,7 @@ HRESULT WINAPI Shell_MergeMenus32 (HMENU32 hmDst, HMENU32 hmSrc, UINT32 uInsert,
* DriveType32 [SHELL32.64]
*
*/
HRESULT WINAPI DriveType32(DWORD u)
HRESULT WINAPI DriveType(DWORD u)
{ FIXME(shell,"0x%04lx stub\n",u);
return 0;
}
@ -1207,7 +1207,7 @@ LPWSTR WINAPI StrRChrW(LPWSTR lpStart, LPWSTR lpEnd, DWORD wMatch)
/*************************************************************************
* StrFormatByteSize [SHLWAPI]
*/
LPSTR WINAPI StrFormatByteSize32A ( DWORD dw, LPSTR pszBuf, UINT32 cchBuf )
LPSTR WINAPI StrFormatByteSizeA ( DWORD dw, LPSTR pszBuf, UINT cchBuf )
{ char buf[64];
TRACE(shell,"%lx %p %i\n", dw, pszBuf, cchBuf);
if ( dw<1024L )
@ -1225,7 +1225,7 @@ LPSTR WINAPI StrFormatByteSize32A ( DWORD dw, LPSTR pszBuf, UINT32 cchBuf )
strncpy (pszBuf, buf, cchBuf);
return pszBuf;
}
LPWSTR WINAPI StrFormatByteSize32W ( DWORD dw, LPWSTR pszBuf, UINT32 cchBuf )
LPWSTR WINAPI StrFormatByteSizeW ( DWORD dw, LPWSTR pszBuf, UINT cchBuf )
{ char buf[64];
TRACE(shell,"%lx %p %i\n", dw, pszBuf, cchBuf);
if ( dw<1024L )
@ -1255,7 +1255,7 @@ HRESULT WINAPI SHWaitForFileToOpen(DWORD u, DWORD v, DWORD w)
* Control_FillCache_RunDLL [SHELL32.8]
*
*/
HRESULT WINAPI Control_FillCache_RunDLL(HWND32 hWnd, HANDLE32 hModule, DWORD w, DWORD x)
HRESULT WINAPI Control_FillCache_RunDLL(HWND hWnd, HANDLE hModule, DWORD w, DWORD x)
{ FIXME(shell,"0x%04x 0x%04x 0x%04lx 0x%04lx stub\n",hWnd, hModule,w,x);
return 0;
}

View File

@ -16,7 +16,7 @@
/*************************************************************************
* PathIsRoot [SHELL32.29]
*/
BOOL32 WINAPI PathIsRoot32A(LPCSTR x)
BOOL WINAPI PathIsRootA(LPCSTR x)
{ TRACE(shell,"%s\n",x);
if (*(x+1)==':' && *(x+2)=='\\') /* "X:\" */
return 1;
@ -34,7 +34,7 @@ BOOL32 WINAPI PathIsRoot32A(LPCSTR x)
}
return 0;
}
BOOL32 WINAPI PathIsRoot32W(LPCWSTR x)
BOOL WINAPI PathIsRootW(LPCWSTR x)
{ TRACE(shell,"%s\n",debugstr_w(x));
if (*(x+1)==':' && *(x+2)=='\\') /* "X:\" */
return 1;
@ -52,16 +52,16 @@ BOOL32 WINAPI PathIsRoot32W(LPCWSTR x)
}
return 0;
}
BOOL32 WINAPI PathIsRoot32AW(LPCVOID x)
BOOL WINAPI PathIsRootAW(LPCVOID x)
{ if (VERSION_OsIsUnicode())
return PathIsRoot32W(x);
return PathIsRoot32A(x);
return PathIsRootW(x);
return PathIsRootA(x);
}
/*************************************************************************
* PathBuildRoot [SHELL32.30]
*/
LPSTR WINAPI PathBuildRoot32A(LPSTR root,BYTE drive) {
LPSTR WINAPI PathBuildRootA(LPSTR root,BYTE drive) {
TRACE(shell,"%p %i\n",root, drive);
strcpy(root,"A:\\");
root[0]+=drive;
@ -74,7 +74,7 @@ LPSTR WINAPI PathBuildRoot32A(LPSTR root,BYTE drive) {
* NOTES
* returns pointer to last . in last pathcomponent or at \0.
*/
LPCSTR WINAPI PathFindExtension32A(LPCSTR path)
LPCSTR WINAPI PathFindExtensionA(LPCSTR path)
{ LPCSTR lastpoint = NULL;
TRACE(shell,"%p %s\n",path,path);
while (*path)
@ -86,7 +86,7 @@ LPCSTR WINAPI PathFindExtension32A(LPCSTR path)
}
return lastpoint?lastpoint:path;
}
LPCWSTR WINAPI PathFindExtension32W(LPCWSTR path)
LPCWSTR WINAPI PathFindExtensionW(LPCWSTR path)
{ LPCWSTR lastpoint = NULL;
TRACE(shell,"%p L%s\n",path,debugstr_w(path));
while (*path)
@ -98,10 +98,10 @@ LPCWSTR WINAPI PathFindExtension32W(LPCWSTR path)
}
return lastpoint?lastpoint:path;
}
LPCVOID WINAPI PathFindExtension32AW(LPCVOID path)
LPCVOID WINAPI PathFindExtensionAW(LPCVOID path)
{ if (VERSION_OsIsUnicode())
return PathFindExtension32W(path);
return PathFindExtension32A(path);
return PathFindExtensionW(path);
return PathFindExtensionA(path);
}
@ -111,7 +111,7 @@ LPCVOID WINAPI PathFindExtension32AW(LPCVOID path)
* NOTES
* append \ if there is none
*/
LPSTR WINAPI PathAddBackslash32A(LPSTR path)
LPSTR WINAPI PathAddBackslashA(LPSTR path)
{ int len;
TRACE(shell,"%p->%s\n",path,path);
@ -123,11 +123,11 @@ LPSTR WINAPI PathAddBackslash32A(LPSTR path)
}
return path+len;
}
LPWSTR WINAPI PathAddBackslash32W(LPWSTR path)
LPWSTR WINAPI PathAddBackslashW(LPWSTR path)
{ int len;
TRACE(shell,"%p->%s\n",path,debugstr_w(path));
len = lstrlen32W(path);
len = lstrlenW(path);
if (len && path[len-1]!=(WCHAR)'\\')
{ path[len] = (WCHAR)'\\';
path[len+1]= 0x00;
@ -135,10 +135,10 @@ LPWSTR WINAPI PathAddBackslash32W(LPWSTR path)
}
return path+len;
}
LPVOID WINAPI PathAddBackslash32AW(LPVOID path)
LPVOID WINAPI PathAddBackslashAW(LPVOID path)
{ if(VERSION_OsIsUnicode())
return PathAddBackslash32W(path);
return PathAddBackslash32A(path);
return PathAddBackslashW(path);
return PathAddBackslashA(path);
}
/*************************************************************************
@ -147,7 +147,7 @@ LPVOID WINAPI PathAddBackslash32AW(LPVOID path)
* NOTES
* remove spaces from beginning and end of passed string
*/
LPSTR WINAPI PathRemoveBlanks32A(LPSTR str)
LPSTR WINAPI PathRemoveBlanksA(LPSTR str)
{ LPSTR x = str;
TRACE(shell,"%s\n",str);
while (*x==' ') x++;
@ -162,25 +162,25 @@ LPSTR WINAPI PathRemoveBlanks32A(LPSTR str)
*x='\0';
return x;
}
LPWSTR WINAPI PathRemoveBlanks32W(LPWSTR str)
LPWSTR WINAPI PathRemoveBlanksW(LPWSTR str)
{ LPWSTR x = str;
TRACE(shell,"%s\n",debugstr_w(str));
while (*x==' ') x++;
if (x!=str)
lstrcpy32W(str,x);
lstrcpyW(str,x);
if (!*str)
return str;
x=str+lstrlen32W(str)-1;
x=str+lstrlenW(str)-1;
while (*x==' ')
x--;
if (*x==' ')
*x='\0';
return x;
}
LPVOID WINAPI PathRemoveBlanks32AW(LPVOID str)
LPVOID WINAPI PathRemoveBlanksAW(LPVOID str)
{ if(VERSION_OsIsUnicode())
return PathRemoveBlanks32W(str);
return PathRemoveBlanks32A(str);
return PathRemoveBlanksW(str);
return PathRemoveBlanksA(str);
}
@ -191,7 +191,7 @@ LPVOID WINAPI PathRemoveBlanks32AW(LPVOID str)
* NOTES
* basename(char *fn);
*/
LPCSTR WINAPI PathFindFilename32A(LPCSTR aptr)
LPCSTR WINAPI PathFindFilenameA(LPCSTR aptr)
{ LPCSTR aslash;
aslash = aptr;
@ -204,7 +204,7 @@ LPCSTR WINAPI PathFindFilename32A(LPCSTR aptr)
return aslash;
}
LPCWSTR WINAPI PathFindFilename32W(LPCWSTR wptr)
LPCWSTR WINAPI PathFindFilenameW(LPCWSTR wptr)
{ LPCWSTR wslash;
wslash = wptr;
@ -216,11 +216,11 @@ LPCWSTR WINAPI PathFindFilename32W(LPCWSTR wptr)
}
return wslash;
}
LPCVOID WINAPI PathFindFilename32AW(LPCVOID fn)
LPCVOID WINAPI PathFindFilenameAW(LPCVOID fn)
{
if(VERSION_OsIsUnicode())
return PathFindFilename32W(fn);
return PathFindFilename32A(fn);
return PathFindFilenameW(fn);
return PathFindFilenameA(fn);
}
/*************************************************************************
@ -233,7 +233,7 @@ LPCVOID WINAPI PathFindFilename32AW(LPCVOID fn)
* "\" -> "\"
* "a:\foo" -> "a:\"
*/
DWORD WINAPI PathRemoveFileSpec32A(LPSTR fn) {
DWORD WINAPI PathRemoveFileSpecA(LPSTR fn) {
LPSTR x,cutplace;
TRACE(shell,"%s\n",fn);
if (!fn[0])
@ -274,10 +274,10 @@ DWORD WINAPI PathRemoveFileSpec32A(LPSTR fn) {
* concat_paths(char*target,const char*add);
* concats "target\\add" and writes them to target
*/
LPSTR WINAPI PathAppend32A(LPSTR x1,LPSTR x2) {
LPSTR WINAPI PathAppendA(LPSTR x1,LPSTR x2) {
TRACE(shell,"%s %s\n",x1,x2);
while (x2[0]=='\\') x2++;
return PathCombine32A(x1,x1,x2);
return PathCombineA(x1,x1,x2);
}
/*************************************************************************
@ -287,7 +287,7 @@ LPSTR WINAPI PathAppend32A(LPSTR x1,LPSTR x2) {
* if lpszFile='.' skip it
* szDest can be equal to lpszFile. Thats why we use sTemp
*/
LPSTR WINAPI PathCombine32A(LPSTR szDest, LPCSTR lpszDir, LPCSTR lpszFile)
LPSTR WINAPI PathCombineA(LPSTR szDest, LPCSTR lpszDir, LPCSTR lpszFile)
{ char sTemp[MAX_PATH];
TRACE(shell,"%p %p->%s %p->%s\n",szDest, lpszDir, lpszDir, lpszFile, lpszFile);
@ -298,44 +298,44 @@ LPSTR WINAPI PathCombine32A(LPSTR szDest, LPCSTR lpszDir, LPCSTR lpszFile)
}
/* if lpszFile is a complete path don't care about lpszDir */
if (PathIsRoot32A(lpszFile))
if (PathIsRootA(lpszFile))
{ strcpy(szDest,lpszFile);
}
else
{ strcpy(sTemp,lpszDir);
PathAddBackslash32A(sTemp);
PathAddBackslashA(sTemp);
strcat(sTemp,lpszFile);
strcpy(szDest,sTemp);
}
return szDest;
}
LPWSTR WINAPI PathCombine32W(LPWSTR szDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
LPWSTR WINAPI PathCombineW(LPWSTR szDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
{ WCHAR sTemp[MAX_PATH];
TRACE(shell,"%p %p->%s %p->%s\n",szDest, lpszDir, debugstr_w(lpszDir),
lpszFile, debugstr_w(lpszFile));
if (!lpszFile || !lpszFile[0] || (lpszFile[0]==(WCHAR)'.' && !lpszFile[1]) )
{ lstrcpy32W(szDest,lpszDir);
{ lstrcpyW(szDest,lpszDir);
return szDest;
}
/* if lpszFile is a complete path don't care about lpszDir */
if (PathIsRoot32W(lpszFile))
{ lstrcpy32W(szDest,lpszFile);
if (PathIsRootW(lpszFile))
{ lstrcpyW(szDest,lpszFile);
}
else
{ lstrcpy32W(sTemp,lpszDir);
PathAddBackslash32W(sTemp);
lstrcat32W(sTemp,lpszFile);
lstrcpy32W(szDest,sTemp);
{ lstrcpyW(sTemp,lpszDir);
PathAddBackslashW(sTemp);
lstrcatW(sTemp,lpszFile);
lstrcpyW(szDest,sTemp);
}
return szDest;
}
LPVOID WINAPI PathCombine32AW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile)
LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile)
{ if (VERSION_OsIsUnicode())
return PathCombine32W( szDest, lpszDir, lpszFile );
return PathCombine32A( szDest, lpszDir, lpszFile );
return PathCombineW( szDest, lpszDir, lpszFile );
return PathCombineA( szDest, lpszDir, lpszFile );
}
/*************************************************************************
@ -344,64 +344,64 @@ LPVOID WINAPI PathCombine32AW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile)
* NOTES
* PathIsUNC(char*path);
*/
BOOL32 WINAPI PathIsUNC32A(LPCSTR path)
BOOL WINAPI PathIsUNCA(LPCSTR path)
{ TRACE(shell,"%s\n",path);
if ((path[0]=='\\') && (path[1]=='\\'))
return TRUE;
return FALSE;
}
BOOL32 WINAPI PathIsUNC32W(LPCWSTR path)
BOOL WINAPI PathIsUNCW(LPCWSTR path)
{ TRACE(shell,"%s\n",debugstr_w(path));
if ((path[0]=='\\') && (path[1]=='\\'))
return TRUE;
return FALSE;
}
BOOL32 WINAPI PathIsUNC32AW (LPCVOID path)
BOOL WINAPI PathIsUNCAW (LPCVOID path)
{ if (VERSION_OsIsUnicode())
return PathIsUNC32W( path );
return PathIsUNC32A( path );
return PathIsUNCW( path );
return PathIsUNCA( path );
}
/*************************************************************************
* PathIsRelativ [SHELL32.40]
*
*/
BOOL32 WINAPI PathIsRelative32A (LPCSTR path)
BOOL WINAPI PathIsRelativeA (LPCSTR path)
{ TRACE(shell,"path=%s\n",path);
if (path && (path[0]!='\\' && path[1]==':'))
return TRUE;
return FALSE;
}
BOOL32 WINAPI PathIsRelative32W (LPCWSTR path)
BOOL WINAPI PathIsRelativeW (LPCWSTR path)
{ TRACE(shell,"path=%s\n",debugstr_w(path));
if (path && (path[0]!='\\' && path[1]==':'))
return TRUE;
return FALSE;
}
BOOL32 WINAPI PathIsRelative32AW (LPCVOID path)
BOOL WINAPI PathIsRelativeAW (LPCVOID path)
{ if (VERSION_OsIsUnicode())
return PathIsRelative32W( path );
return PathIsRelative32A( path );
return PathIsRelativeW( path );
return PathIsRelativeA( path );
}
/*************************************************************************
* PathIsExe [SHELL32.43]
*
*/
BOOL32 WINAPI PathIsExe32A (LPCSTR path)
BOOL WINAPI PathIsExeA (LPCSTR path)
{ FIXME(shell,"path=%s\n",path);
return FALSE;
}
BOOL32 WINAPI PathIsExe32W (LPCWSTR path)
BOOL WINAPI PathIsExeW (LPCWSTR path)
{ FIXME(shell,"path=%s\n",debugstr_w(path));
return FALSE;
}
BOOL32 WINAPI PathIsExe32AW (LPCVOID path)
BOOL WINAPI PathIsExeAW (LPCVOID path)
{ if (VERSION_OsIsUnicode())
return PathIsExe32W (path);
return PathIsExe32A(path);
return PathIsExeW (path);
return PathIsExeA(path);
}
/*************************************************************************
@ -410,9 +410,9 @@ BOOL32 WINAPI PathIsExe32AW (LPCVOID path)
* NOTES
* file_exists(char *fn);
*/
BOOL32 WINAPI PathFileExists32A(LPSTR fn) {
BOOL WINAPI PathFileExistsA(LPSTR fn) {
TRACE(shell,"%s\n",fn);
if (GetFileAttributes32A(fn)==-1)
if (GetFileAttributesA(fn)==-1)
return FALSE;
else
return TRUE;
@ -424,7 +424,7 @@ BOOL32 WINAPI PathFileExists32A(LPSTR fn) {
* used from COMDLG32
*/
BOOL32 WINAPI PathMatchSpec32A(LPCSTR name, LPCSTR mask)
BOOL WINAPI PathMatchSpecA(LPCSTR name, LPCSTR mask)
{ LPCSTR _name;
TRACE(shell,"%s %s stub\n",name,mask);
@ -455,14 +455,14 @@ BOOL32 WINAPI PathMatchSpec32A(LPCSTR name, LPCSTR mask)
}
return (!*_name && (!*mask || *mask==';'));
}
BOOL32 WINAPI PathMatchSpec32W(LPCWSTR name, LPCWSTR mask)
BOOL WINAPI PathMatchSpecW(LPCWSTR name, LPCWSTR mask)
{ WCHAR stemp[4];
LPCWSTR _name;
TRACE(shell,"%s %s stub\n",debugstr_w(name),debugstr_w(mask));
lstrcpyAtoW(stemp,"*.*");
if (!lstrcmp32W( mask, stemp )) return 1;
if (!lstrcmpW( mask, stemp )) return 1;
_name = name;
while (*_name && *mask)
@ -490,10 +490,10 @@ BOOL32 WINAPI PathMatchSpec32W(LPCWSTR name, LPCWSTR mask)
}
return (!*_name && (!*mask || *mask==';'));
}
BOOL32 WINAPI PathMatchSpec32AW(LPVOID name, LPVOID mask)
BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask)
{ if (VERSION_OsIsUnicode())
return PathMatchSpec32W( name, mask );
return PathMatchSpec32A( name, mask );
return PathMatchSpecW( name, mask );
return PathMatchSpecA( name, mask );
}
/*************************************************************************
* PathSetDlgItemPath32AW [SHELL32.48]
@ -501,36 +501,36 @@ BOOL32 WINAPI PathMatchSpec32AW(LPVOID name, LPVOID mask)
* use PathCompactPath to make sure, the path fits into the control
*/
BOOL32 WINAPI PathSetDlgItemPath32A(HWND32 hDlg, int id, LPCSTR pszPath)
BOOL WINAPI PathSetDlgItemPathA(HWND hDlg, int id, LPCSTR pszPath)
{ TRACE(shell,"%x %x %s\n",hDlg, id, pszPath);
return SetDlgItemText32A(hDlg, id, pszPath);
return SetDlgItemTextA(hDlg, id, pszPath);
}
BOOL32 WINAPI PathSetDlgItemPath32W(HWND32 hDlg, int id, LPCWSTR pszPath)
BOOL WINAPI PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR pszPath)
{ TRACE(shell,"%x %x %s\n",hDlg, id, debugstr_w(pszPath));
return SetDlgItemText32W(hDlg, id, pszPath);
return SetDlgItemTextW(hDlg, id, pszPath);
}
BOOL32 WINAPI PathSetDlgItemPath32AW(HWND32 hDlg, int id, LPCVOID pszPath)
BOOL WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath)
{ if (VERSION_OsIsUnicode())
return PathSetDlgItemPath32W(hDlg, id, pszPath);
return PathSetDlgItemPath32A(hDlg, id, pszPath);
return PathSetDlgItemPathW(hDlg, id, pszPath);
return PathSetDlgItemPathA(hDlg, id, pszPath);
}
/*************************************************************************
* PathQualify32AW [SHELL32.49]
*/
BOOL32 WINAPI PathQualify32A(LPCSTR pszPath)
BOOL WINAPI PathQualifyA(LPCSTR pszPath)
{ TRACE(shell,"%s\n",pszPath);
return 0;
}
BOOL32 WINAPI PathQualify32W(LPCWSTR pszPath)
BOOL WINAPI PathQualifyW(LPCWSTR pszPath)
{ TRACE(shell,"%s\n",debugstr_w(pszPath));
return 0;
}
BOOL32 WINAPI PathQualify32AW(LPCVOID pszPath)
BOOL WINAPI PathQualifyAW(LPCVOID pszPath)
{ if (VERSION_OsIsUnicode())
return PathQualify32W(pszPath);
return PathQualify32A(pszPath);
return PathQualifyW(pszPath);
return PathQualifyA(pszPath);
}
/*************************************************************************
@ -548,8 +548,8 @@ DWORD WINAPI PathResolve(LPCSTR s,DWORD x2,DWORD x3) {
* look for next arg in string. handle "quoted" strings
* returns pointer to argument *AFTER* the space. Or to the \0.
*/
LPCSTR WINAPI PathGetArgs32A(LPCSTR cmdline)
{ BOOL32 qflag = FALSE;
LPCSTR WINAPI PathGetArgsA(LPCSTR cmdline)
{ BOOL qflag = FALSE;
TRACE(shell,"%s\n",cmdline);
@ -563,8 +563,8 @@ LPCSTR WINAPI PathGetArgs32A(LPCSTR cmdline)
return cmdline;
}
LPCWSTR WINAPI PathGetArgs32W(LPCWSTR cmdline)
{ BOOL32 qflag = FALSE;
LPCWSTR WINAPI PathGetArgsW(LPCWSTR cmdline)
{ BOOL qflag = FALSE;
TRACE(shell,"%sL\n",debugstr_w(cmdline));
@ -577,10 +577,10 @@ LPCWSTR WINAPI PathGetArgs32W(LPCWSTR cmdline)
}
return cmdline;
}
LPCVOID WINAPI PathGetArgs32AW(LPVOID cmdline)
LPCVOID WINAPI PathGetArgsAW(LPVOID cmdline)
{ if (VERSION_OsIsUnicode())
return PathGetArgs32W(cmdline);
return PathGetArgs32A(cmdline);
return PathGetArgsW(cmdline);
return PathGetArgsA(cmdline);
}
/*************************************************************************
* PathQuoteSpaces [SHELL32.55]
@ -588,19 +588,19 @@ LPCVOID WINAPI PathGetArgs32AW(LPVOID cmdline)
* NOTES
* basename(char *fn);
*/
LPSTR WINAPI PathQuoteSpaces32A(LPCSTR aptr)
LPSTR WINAPI PathQuoteSpacesA(LPCSTR aptr)
{ FIXME(shell,"%s\n",aptr);
return 0;
}
LPWSTR WINAPI PathQuoteSpaces32W(LPCWSTR wptr)
LPWSTR WINAPI PathQuoteSpacesW(LPCWSTR wptr)
{ FIXME(shell,"L%s\n",debugstr_w(wptr));
return 0;
}
LPVOID WINAPI PathQuoteSpaces32AW (LPCVOID fn)
LPVOID WINAPI PathQuoteSpacesAW (LPCVOID fn)
{ if(VERSION_OsIsUnicode())
return PathQuoteSpaces32W(fn);
return PathQuoteSpaces32A(fn);
return PathQuoteSpacesW(fn);
return PathQuoteSpacesA(fn);
}
@ -610,19 +610,19 @@ LPVOID WINAPI PathQuoteSpaces32AW (LPCVOID fn)
* NOTES
* unquote string (remove ")
*/
VOID WINAPI PathUnquoteSpaces32A(LPSTR str)
{ DWORD len = lstrlen32A(str);
VOID WINAPI PathUnquoteSpacesA(LPSTR str)
{ DWORD len = lstrlenA(str);
TRACE(shell,"%s\n",str);
if (*str!='"')
return;
if (str[len-1]!='"')
return;
str[len-1]='\0';
lstrcpy32A(str,str+1);
lstrcpyA(str,str+1);
return;
}
VOID WINAPI PathUnquoteSpaces32W(LPWSTR str)
{ DWORD len = lstrlen32W(str);
VOID WINAPI PathUnquoteSpacesW(LPWSTR str)
{ DWORD len = lstrlenW(str);
TRACE(shell,"%s\n",debugstr_w(str));
@ -631,13 +631,13 @@ VOID WINAPI PathUnquoteSpaces32W(LPWSTR str)
if (str[len-1]!='"')
return;
str[len-1]='\0';
lstrcpy32W(str,str+1);
lstrcpyW(str,str+1);
return;
}
VOID WINAPI PathUnquoteSpaces32AW(LPVOID str)
VOID WINAPI PathUnquoteSpacesAW(LPVOID str)
{ if(VERSION_OsIsUnicode())
PathUnquoteSpaces32W(str);
PathUnquoteSpaces32A(str);
PathUnquoteSpacesW(str);
PathUnquoteSpacesA(str);
}
@ -645,7 +645,7 @@ VOID WINAPI PathUnquoteSpaces32AW(LPVOID str)
* PathGetDriveNumber32 [SHELL32.57]
*
*/
HRESULT WINAPI PathGetDriveNumber32(LPSTR u)
HRESULT WINAPI PathGetDriveNumber(LPSTR u)
{ FIXME(shell,"%s stub\n",debugstr_a(u));
return 0;
}
@ -656,7 +656,7 @@ HRESULT WINAPI PathGetDriveNumber32(LPSTR u)
* NOTES
* exported by ordinal
*/
BOOL32 WINAPI PathYetAnotherMakeUniqueName32A(LPDWORD x,LPDWORD y) {
BOOL WINAPI PathYetAnotherMakeUniqueNameA(LPDWORD x,LPDWORD y) {
FIXME(shell,"(%p,%p):stub.\n",x,y);
return TRUE;
}
@ -667,28 +667,28 @@ BOOL32 WINAPI PathYetAnotherMakeUniqueName32A(LPDWORD x,LPDWORD y) {
* NOTES
* exported by ordinal Name
*/
BOOL32 WINAPI IsLFNDrive32A(LPCSTR path) {
BOOL WINAPI IsLFNDriveA(LPCSTR path) {
DWORD fnlen;
if (!GetVolumeInformation32A(path,NULL,0,NULL,&fnlen,NULL,NULL,0))
if (!GetVolumeInformationA(path,NULL,0,NULL,&fnlen,NULL,NULL,0))
return FALSE;
return fnlen>12;
}
/*************************************************************************
* PathFindOnPath [SHELL32.145]
*/
BOOL32 WINAPI PathFindOnPath32A(LPSTR sFile, LPCSTR sOtherDirs)
BOOL WINAPI PathFindOnPathA(LPSTR sFile, LPCSTR sOtherDirs)
{ FIXME(shell,"%s %s\n",sFile, sOtherDirs);
return FALSE;
}
BOOL32 WINAPI PathFindOnPath32W(LPWSTR sFile, LPCWSTR sOtherDirs)
BOOL WINAPI PathFindOnPathW(LPWSTR sFile, LPCWSTR sOtherDirs)
{ FIXME(shell,"%s %s\n",debugstr_w(sFile), debugstr_w(sOtherDirs));
return FALSE;
}
BOOL32 WINAPI PathFindOnPath32AW(LPVOID sFile, LPCVOID sOtherDirs)
BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs)
{ if (VERSION_OsIsUnicode())
return PathFindOnPath32W(sFile, sOtherDirs);
return PathFindOnPath32A(sFile, sOtherDirs);
return PathFindOnPathW(sFile, sOtherDirs);
return PathFindOnPathA(sFile, sOtherDirs);
}
/*************************************************************************
@ -697,27 +697,27 @@ BOOL32 WINAPI PathFindOnPath32AW(LPVOID sFile, LPCVOID sOtherDirs)
* NOTES
* exported by ordinal
*/
LPCSTR WINAPI PathGetExtension32A(LPCSTR path,DWORD y,DWORD z)
LPCSTR WINAPI PathGetExtensionA(LPCSTR path,DWORD y,DWORD z)
{ TRACE(shell,"(%s,%08lx,%08lx)\n",path,y,z);
path = PathFindExtension32A(path);
path = PathFindExtensionA(path);
return *path?(path+1):path;
}
LPCWSTR WINAPI PathGetExtension32W(LPCWSTR path,DWORD y,DWORD z)
LPCWSTR WINAPI PathGetExtensionW(LPCWSTR path,DWORD y,DWORD z)
{ TRACE(shell,"(L%s,%08lx,%08lx)\n",debugstr_w(path),y,z);
path = PathFindExtension32W(path);
path = PathFindExtensionW(path);
return *path?(path+1):path;
}
LPCVOID WINAPI PathGetExtension32AW(LPCVOID path,DWORD y,DWORD z)
LPCVOID WINAPI PathGetExtensionAW(LPCVOID path,DWORD y,DWORD z)
{ if (VERSION_OsIsUnicode())
return PathGetExtension32W(path,y,z);
return PathGetExtension32A(path,y,z);
return PathGetExtensionW(path,y,z);
return PathGetExtensionA(path,y,z);
}
/*************************************************************************
* SheGetDirW [SHELL32.281]
*
*/
HRESULT WINAPI SheGetDir32W(LPWSTR u, LPWSTR v)
HRESULT WINAPI SheGetDirW(LPWSTR u, LPWSTR v)
{ FIXME(shell,"%s %s stub\n",debugstr_w(u),debugstr_w(v) );
return 0;
}
@ -726,7 +726,7 @@ HRESULT WINAPI SheGetDir32W(LPWSTR u, LPWSTR v)
* SheChangeDirW [SHELL32.274]
*
*/
HRESULT WINAPI SheChangeDir32W(LPWSTR u)
HRESULT WINAPI SheChangeDirW(LPWSTR u)
{ FIXME(shell,"(%s),stub\n",debugstr_w(u));
return 0;
}
@ -745,28 +745,28 @@ HRESULT WINAPI PathProcessCommand (DWORD u, DWORD v, DWORD w, DWORD x)
* converts csidl to path
*
*/
BOOL32 WINAPI SHGetSpecialFolderPath32A (DWORD x1,LPSTR szPath,DWORD csidl,DWORD x4)
BOOL WINAPI SHGetSpecialFolderPathA (DWORD x1,LPSTR szPath,DWORD csidl,DWORD x4)
{ LPITEMIDLIST pidl;
WARN(shell,"(0x%04lx,%p,csidl=%lu,0x%04lx) semi-stub\n", x1,szPath,csidl,x4);
SHGetSpecialFolderLocation(0, csidl, &pidl);
SHGetPathFromIDList32A (pidl, szPath);
SHGetPathFromIDListA (pidl, szPath);
SHFree (pidl);
return TRUE;
}
BOOL32 WINAPI SHGetSpecialFolderPath32W (DWORD x1,LPWSTR szPath, DWORD csidl,DWORD x4)
BOOL WINAPI SHGetSpecialFolderPathW (DWORD x1,LPWSTR szPath, DWORD csidl,DWORD x4)
{ LPITEMIDLIST pidl;
WARN(shell,"(0x%04lx,%p,csidl=%lu,0x%04lx) semi-stub\n", x1,szPath,csidl,x4);
SHGetSpecialFolderLocation(0, csidl, &pidl);
SHGetPathFromIDList32W (pidl, szPath);
SHGetPathFromIDListW (pidl, szPath);
SHFree (pidl);
return TRUE;
}
BOOL32 WINAPI SHGetSpecialFolderPath32 (DWORD x1,LPVOID szPath,DWORD csidl,DWORD x4)
BOOL WINAPI SHGetSpecialFolderPath (DWORD x1,LPVOID szPath,DWORD csidl,DWORD x4)
{ if (VERSION_OsIsUnicode())
return SHGetSpecialFolderPath32W ( x1, szPath, csidl, x4);
return SHGetSpecialFolderPath32A ( x1, szPath, csidl, x4);
return SHGetSpecialFolderPathW ( x1, szPath, csidl, x4);
return SHGetSpecialFolderPathA ( x1, szPath, csidl, x4);
}

View File

@ -26,17 +26,17 @@ static HRESULT WINAPI IShellFolder_QueryInterface(LPSHELLFOLDER,REFIID,LPVOID*);
static ULONG WINAPI IShellFolder_AddRef(LPSHELLFOLDER);
static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER);
static HRESULT WINAPI IShellFolder_Initialize(LPSHELLFOLDER,LPCITEMIDLIST);
static HRESULT WINAPI IShellFolder_ParseDisplayName(LPSHELLFOLDER,HWND32,LPBC,LPOLESTR32,DWORD*,LPITEMIDLIST*,DWORD*);
static HRESULT WINAPI IShellFolder_EnumObjects(LPSHELLFOLDER,HWND32,DWORD,LPENUMIDLIST*);
static HRESULT WINAPI IShellFolder_ParseDisplayName(LPSHELLFOLDER,HWND,LPBC,LPOLESTR,DWORD*,LPITEMIDLIST*,DWORD*);
static HRESULT WINAPI IShellFolder_EnumObjects(LPSHELLFOLDER,HWND,DWORD,LPENUMIDLIST*);
static HRESULT WINAPI IShellFolder_BindToObject(LPSHELLFOLDER,LPCITEMIDLIST,LPBC,REFIID,LPVOID*);
static HRESULT WINAPI IShellFolder_BindToStorage(LPSHELLFOLDER,LPCITEMIDLIST,LPBC,REFIID,LPVOID*);
static HRESULT WINAPI IShellFolder_CompareIDs(LPSHELLFOLDER,LPARAM,LPCITEMIDLIST,LPCITEMIDLIST);
static HRESULT WINAPI IShellFolder_CreateViewObject(LPSHELLFOLDER,HWND32,REFIID,LPVOID*);
static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER,UINT32,LPCITEMIDLIST*,DWORD*);
static HRESULT WINAPI IShellFolder_GetUIObjectOf(LPSHELLFOLDER,HWND32,UINT32,LPCITEMIDLIST*,REFIID,UINT32*,LPVOID*);
static HRESULT WINAPI IShellFolder_CreateViewObject(LPSHELLFOLDER,HWND,REFIID,LPVOID*);
static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER,UINT,LPCITEMIDLIST*,DWORD*);
static HRESULT WINAPI IShellFolder_GetUIObjectOf(LPSHELLFOLDER,HWND,UINT,LPCITEMIDLIST*,REFIID,UINT*,LPVOID*);
static HRESULT WINAPI IShellFolder_GetDisplayNameOf(LPSHELLFOLDER,LPCITEMIDLIST,DWORD,LPSTRRET);
static HRESULT WINAPI IShellFolder_SetNameOf(LPSHELLFOLDER,HWND32,LPCITEMIDLIST,LPCOLESTR32,DWORD,LPITEMIDLIST*);
static BOOL32 WINAPI IShellFolder_GetFolderPath(LPSHELLFOLDER,LPSTR,DWORD);
static HRESULT WINAPI IShellFolder_SetNameOf(LPSHELLFOLDER,HWND,LPCITEMIDLIST,LPCOLESTR,DWORD,LPITEMIDLIST*);
static BOOL WINAPI IShellFolder_GetFolderPath(LPSHELLFOLDER,LPSTR,DWORD);
/***************************************************************************
* IDropTarget interface definition for the ShellFolder
@ -216,7 +216,7 @@ LPSTR GetNextElement(LPSTR pszNext,LPSTR pszOut,DWORD dwOut)
{ pszTail++;
}
dwCopy=((LPBYTE)pszTail-(LPBYTE)pszNext)/sizeof(CHAR)+1;
lstrcpyn32A(pszOut, pszNext, (dwOut<dwCopy)? dwOut : dwCopy);
lstrcpynA(pszOut, pszNext, (dwOut<dwCopy)? dwOut : dwCopy);
if(*pszTail)
{ pszTail++;
@ -277,7 +277,7 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
*(sf->sMyPath)=0x00;
if(pParent->sMyPath) /* if the parent has a path, get it*/
{ strcpy(sf->sMyPath, pParent->sMyPath);
PathAddBackslash32A (sf->sMyPath);
PathAddBackslashA (sf->sMyPath);
}
sf->pMyPidl = ILCombine(pParent->pMyPidl, pidl);
len = strlen(sf->sMyPath);
@ -374,9 +374,9 @@ static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER this)
*/
static HRESULT WINAPI IShellFolder_ParseDisplayName(
LPSHELLFOLDER this,
HWND32 hwndOwner,
HWND hwndOwner,
LPBC pbcReserved,
LPOLESTR32 lpszDisplayName,
LPOLESTR lpszDisplayName,
DWORD *pchEaten,
LPITEMIDLIST *ppidl,
DWORD *pdwAttributes)
@ -384,14 +384,14 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
LPITEMIDLIST pidlFull=NULL, pidlTemp = NULL, pidlOld = NULL;
LPSTR pszNext=NULL;
CHAR szTemp[MAX_PATH],szElement[MAX_PATH];
BOOL32 bIsFile;
BOOL bIsFile;
TRACE(shell,"(%p)->(HWND=0x%08x,%p,%p=%s,%p,pidl=%p,%p)\n",
this,hwndOwner,pbcReserved,lpszDisplayName,
debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes);
{ hr = E_FAIL;
WideCharToLocal32(szTemp, lpszDisplayName, lstrlen32W(lpszDisplayName) + 1);
WideCharToLocal(szTemp, lpszDisplayName, lstrlenW(lpszDisplayName) + 1);
if(szTemp[0])
{ if (strcmp(szTemp,"Desktop")==0)
{ pidlFull = _ILCreateDesktop();
@ -400,11 +400,11 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
{ pidlFull = _ILCreateMyComputer();
}
else
{ if (!PathIsRoot32A(szTemp))
{ if (!PathIsRootA(szTemp))
{ if (this->sMyPath && strlen (this->sMyPath))
{ if (strcmp(this->sMyPath,"My Computer"))
{ strcpy (szElement,this->sMyPath);
PathAddBackslash32A (szElement);
PathAddBackslashA (szElement);
strcat (szElement, szTemp);
strcpy (szTemp, szElement);
}
@ -412,7 +412,7 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
}
/* check if the lpszDisplayName is Folder or File*/
bIsFile = ! (GetFileAttributes32A(szTemp) & FILE_ATTRIBUTE_DIRECTORY);
bIsFile = ! (GetFileAttributesA(szTemp) & FILE_ATTRIBUTE_DIRECTORY);
pszNext = GetNextElement(szTemp, szElement, MAX_PATH);
pidlFull = _ILCreateMyComputer();
@ -451,7 +451,7 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName(
*/
static HRESULT WINAPI IShellFolder_EnumObjects(
LPSHELLFOLDER this,
HWND32 hwndOwner,
HWND hwndOwner,
DWORD dwFlags,
LPENUMIDLIST* ppEnumIDList)
{ TRACE(shell,"(%p)->(HWND=0x%08x flags=0x%08lx pplist=%p)\n",this,hwndOwner,dwFlags,ppEnumIDList);
@ -608,7 +608,7 @@ static HRESULT WINAPI IShellFolder_CompareIDs(LPSHELLFOLDER this,
* the same as SHCreateShellFolderViewEx ???
*/
static HRESULT WINAPI IShellFolder_CreateViewObject( LPSHELLFOLDER this,
HWND32 hwndOwner, REFIID riid, LPVOID *ppvOut)
HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
{ LPSHELLVIEW pShellView;
char xriid[50];
HRESULT hr;
@ -644,7 +644,7 @@ static HRESULT WINAPI IShellFolder_CreateViewObject( LPSHELLFOLDER this,
* passes ONE element in the array and writing to further elements will
* cause the shell to fail later.
*/
static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER this,UINT32 cidl,LPCITEMIDLIST *apidl,DWORD *rgfInOut)
static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER this,UINT cidl,LPCITEMIDLIST *apidl,DWORD *rgfInOut)
{ LPCITEMIDLIST * pidltemp;
DWORD i;
@ -709,11 +709,11 @@ static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER this,UINT32 cid
*/
static HRESULT WINAPI IShellFolder_GetUIObjectOf(
LPSHELLFOLDER this,
HWND32 hwndOwner,
UINT32 cidl,
HWND hwndOwner,
UINT cidl,
LPCITEMIDLIST * apidl,
REFIID riid,
UINT32 * prgfInOut,
UINT * prgfInOut,
LPVOID * ppvOut)
{
char xclsid[50];
@ -791,7 +791,7 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
CHAR szDrive[MAX_PATH];
DWORD dwVolumeSerialNumber,dwMaximumComponetLength,dwFileSystemFlags;
LPITEMIDLIST pidlTemp=NULL;
BOOL32 bSimplePidl=FALSE;
BOOL bSimplePidl=FALSE;
TRACE(shell,"(%p)->(pidl=%p,0x%08lx,%p)\n",this,pidl,dwFlags,lpName);
pdump(pidl);
@ -821,14 +821,14 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
{ _ILGetDrive( pidl, szTemp, MAX_PATH);
if ( dwFlags==SHGDN_NORMAL || dwFlags==SHGDN_INFOLDER) /* like "A1-dos (C:)" */
{ GetVolumeInformation32A(szTemp,szDrive,MAX_PATH,&dwVolumeSerialNumber,&dwMaximumComponetLength,&dwFileSystemFlags,NULL,0);
{ GetVolumeInformationA(szTemp,szDrive,MAX_PATH,&dwVolumeSerialNumber,&dwMaximumComponetLength,&dwFileSystemFlags,NULL,0);
szTemp[2]=0x00; /* overwrite '\' */
strcat (szDrive," (");
strcat (szDrive,szTemp);
strcat (szDrive,")");
}
else /* like "C:\" */
{ PathAddBackslash32A (szTemp);
{ PathAddBackslashA (szTemp);
strcpy(szDrive,szTemp);
}
}
@ -855,7 +855,7 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
if (this->sMyPath && strlen (this->sMyPath))
{ if (strcmp(this->sMyPath,"My Computer"))
{ strcpy (szText,this->sMyPath);
PathAddBackslash32A (szText);
PathAddBackslashA (szText);
}
}
pidlTemp = ILFindLastID(pidl);
@ -904,9 +904,9 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
*/
static HRESULT WINAPI IShellFolder_SetNameOf(
LPSHELLFOLDER this,
HWND32 hwndOwner,
HWND hwndOwner,
LPCITEMIDLIST pidl, /*simple pidl*/
LPCOLESTR32 lpName,
LPCOLESTR lpName,
DWORD dw,
LPITEMIDLIST *pPidlOut)
{ FIXME(shell,"(%p)->(%u,pidl=%p,%s,%lu,%p),stub!\n",
@ -917,7 +917,7 @@ static HRESULT WINAPI IShellFolder_SetNameOf(
* IShellFolder_GetFolderPath
* FIXME: drive not included
*/
static BOOL32 WINAPI IShellFolder_GetFolderPath(LPSHELLFOLDER this, LPSTR lpszOut, DWORD dwOutSize)
static BOOL WINAPI IShellFolder_GetFolderPath(LPSHELLFOLDER this, LPSTR lpszOut, DWORD dwOutSize)
{ DWORD dwSize;
TRACE(shell,"(%p)->(%p %lu)\n",this, lpszOut, dwOutSize);

View File

@ -32,22 +32,22 @@ static HRESULT WINAPI IShellView_QueryInterface(LPSHELLVIEW,REFIID, LPVOID *);
static ULONG WINAPI IShellView_AddRef(LPSHELLVIEW) ;
static ULONG WINAPI IShellView_Release(LPSHELLVIEW);
/* IOleWindow methods */
static HRESULT WINAPI IShellView_GetWindow(LPSHELLVIEW,HWND32 * lphwnd);
static HRESULT WINAPI IShellView_ContextSensitiveHelp(LPSHELLVIEW,BOOL32 fEnterMode);
static HRESULT WINAPI IShellView_GetWindow(LPSHELLVIEW,HWND * lphwnd);
static HRESULT WINAPI IShellView_ContextSensitiveHelp(LPSHELLVIEW,BOOL fEnterMode);
/* IShellView methods */
static HRESULT WINAPI IShellView_TranslateAccelerator(LPSHELLVIEW,LPMSG32 lpmsg);
static HRESULT WINAPI IShellView_EnableModeless(LPSHELLVIEW,BOOL32 fEnable);
static HRESULT WINAPI IShellView_UIActivate(LPSHELLVIEW,UINT32 uState);
static HRESULT WINAPI IShellView_TranslateAccelerator(LPSHELLVIEW,LPMSG lpmsg);
static HRESULT WINAPI IShellView_EnableModeless(LPSHELLVIEW,BOOL fEnable);
static HRESULT WINAPI IShellView_UIActivate(LPSHELLVIEW,UINT uState);
static HRESULT WINAPI IShellView_Refresh(LPSHELLVIEW);
static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW, IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd);
static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW, IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT * prcView, HWND *phWnd);
static HRESULT WINAPI IShellView_DestroyViewWindow(LPSHELLVIEW);
static HRESULT WINAPI IShellView_GetCurrentInfo(LPSHELLVIEW, LPFOLDERSETTINGS lpfs);
static HRESULT WINAPI IShellView_AddPropertySheetPages(LPSHELLVIEW, DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam);
static HRESULT WINAPI IShellView_SaveViewState(LPSHELLVIEW);
static HRESULT WINAPI IShellView_SelectItem(LPSHELLVIEW, LPCITEMIDLIST pidlItem, UINT32 uFlags);
static HRESULT WINAPI IShellView_GetItemObject(LPSHELLVIEW, UINT32 uItem, REFIID riid,LPVOID *ppv);
static HRESULT WINAPI IShellView_SelectItem(LPSHELLVIEW, LPCITEMIDLIST pidlItem, UINT uFlags);
static HRESULT WINAPI IShellView_GetItemObject(LPSHELLVIEW, UINT uItem, REFIID riid,LPVOID *ppv);
static BOOL32 ShellView_CanDoIDockingWindow(LPSHELLVIEW);
static BOOL ShellView_CanDoIDockingWindow(LPSHELLVIEW);
static struct IShellView_VTable svvt =
{ IShellView_QueryInterface,
@ -81,12 +81,12 @@ static struct IShellView_VTable svvt =
#define TOOLBAR_ID (L"SHELLDLL_DefView")
/*windowsx.h */
#define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp)
#define GET_WM_COMMAND_HWND(wp, lp) (HWND32)(lp)
#define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp)
#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
/* winuser.h */
#define WM_SETTINGCHANGE WM_WININICHANGE
extern void WINAPI _InsertMenuItem (HMENU32 hmenu, UINT32 indexMenu, BOOL32 fByPosition,
UINT32 wID, UINT32 fType, LPSTR dwTypeData, UINT32 fState);
extern void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition,
UINT wID, UINT fType, LPSTR dwTypeData, UINT fState);
typedef struct
{ int idCommand;
@ -105,8 +105,8 @@ MYTOOLINFO g_Tools[] =
{ {IDM_VIEW_FILES, 0, IDS_TB_VIEW_FILES, IDS_MI_VIEW_FILES, 0, TBSTATE_ENABLED, TBSTYLE_BUTTON},
{-1, 0, 0, 0, 0, 0, 0}
};
BOOL32 g_bViewKeys;
BOOL32 g_bShowIDW;
BOOL g_bViewKeys;
BOOL g_bShowIDW;
typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
@ -136,7 +136,7 @@ LPSHELLVIEW IShellView_Constructor( LPSHELLFOLDER pFolder, LPCITEMIDLIST pidl)
* helperfunctions for communication with ICommDlgBrowser
*
*/
static BOOL32 IsInCommDlg(LPSHELLVIEW this)
static BOOL IsInCommDlg(LPSHELLVIEW this)
{ return(this->pCommDlgBrowser != NULL);
}
static HRESULT IncludeObject(LPSHELLVIEW this, LPCITEMIDLIST pidl)
@ -153,7 +153,7 @@ static HRESULT OnDefaultCommand(LPSHELLVIEW this)
}
return S_FALSE;
}
static HRESULT OnStateChange(LPSHELLVIEW this, UINT32 uFlags)
static HRESULT OnStateChange(LPSHELLVIEW this, UINT uFlags)
{ if (IsInCommDlg(this))
{ TRACE(shell,"ICommDlgBrowser::OnStateChange flags=%x\n", uFlags);
return (this->pCommDlgBrowser->lpvtbl->fnOnStateChange(this->pCommDlgBrowser, this, uFlags));
@ -165,8 +165,8 @@ static void SetStyle(LPSHELLVIEW this, DWORD dwAdd, DWORD dwRemove)
TRACE(shell,"(%p)\n", this);
tmpstyle = GetWindowLong32A(this->hWndList, GWL_STYLE);
SetWindowLong32A(this->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove));
tmpstyle = GetWindowLongA(this->hWndList, GWL_STYLE);
SetWindowLongA(this->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove));
}
static void CheckToolbar(LPSHELLVIEW this)
@ -243,7 +243,7 @@ static void MergeToolBar(LPSHELLVIEW this)
*
*/
BOOL32 ShellView_CreateList (LPSHELLVIEW this)
BOOL ShellView_CreateList (LPSHELLVIEW this)
{ DWORD dwStyle;
TRACE(shell,"%p\n",this);
@ -261,13 +261,13 @@ BOOL32 ShellView_CreateList (LPSHELLVIEW this)
/*if (this->FolderSettings.fFlags && FWF_DESKTOP); used from explorer*/
if (this->FolderSettings.fFlags && FWF_SINGLESEL) dwStyle |= LVS_SINGLESEL;
this->hWndList=CreateWindowEx32A( WS_EX_CLIENTEDGE,
WC_LISTVIEW32A,
this->hWndList=CreateWindowExA( WS_EX_CLIENTEDGE,
WC_LISTVIEWA,
NULL,
dwStyle,
0,0,0,0,
this->hWnd,
(HMENU32)ID_LISTVIEW,
(HMENU)ID_LISTVIEW,
shell32_hInstance,
NULL);
@ -288,8 +288,8 @@ int nColumn2=80;
int nColumn3=170;
int nColumn4=60;
BOOL32 ShellView_InitList(LPSHELLVIEW this)
{ LVCOLUMN32A lvColumn;
BOOL ShellView_InitList(LPSHELLVIEW this)
{ LVCOLUMNA lvColumn;
CHAR szString[50];
TRACE(shell,"%p\n",this);
@ -304,19 +304,19 @@ BOOL32 ShellView_InitList(LPSHELLVIEW this)
lvColumn.cx = nColumn1;
strcpy(szString,"File");
/*LoadString32A(shell32_hInstance, IDS_COLUMN1, szString, sizeof(szString));*/
ListView_InsertColumn32A(this->hWndList, 0, &lvColumn);
ListView_InsertColumnA(this->hWndList, 0, &lvColumn);
lvColumn.cx = nColumn2;
strcpy(szString,"Size");
ListView_InsertColumn32A(this->hWndList, 1, &lvColumn);
ListView_InsertColumnA(this->hWndList, 1, &lvColumn);
lvColumn.cx = nColumn3;
strcpy(szString,"Type");
ListView_InsertColumn32A(this->hWndList, 2, &lvColumn);
ListView_InsertColumnA(this->hWndList, 2, &lvColumn);
lvColumn.cx = nColumn4;
strcpy(szString,"Modified");
ListView_InsertColumn32A(this->hWndList, 3, &lvColumn);
ListView_InsertColumnA(this->hWndList, 3, &lvColumn);
ListView_SetImageList(this->hWndList, ShellSmallIconList, LVSIL_SMALL);
ListView_SetImageList(this->hWndList, ShellBigIconList, LVSIL_NORMAL);
@ -329,7 +329,7 @@ BOOL32 ShellView_InitList(LPSHELLVIEW this)
* NOTES
* internal, CALLBACK for DSA_Sort
*/
INT32 CALLBACK ShellView_CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData)
INT CALLBACK ShellView_CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData)
{ int ret;
TRACE(shell,"pidl1=%p pidl2=%p lpsf=%p\n", lParam1, lParam2, (LPVOID) lpData);
@ -352,8 +352,8 @@ static HRESULT ShellView_FillList(LPSHELLVIEW this)
{ LPENUMIDLIST pEnumIDList;
LPITEMIDLIST pidl;
DWORD dwFetched;
UINT32 i;
LVITEM32A lvItem;
UINT i;
LVITEMA lvItem;
HRESULT hRes;
HDPA hdpa;
@ -384,7 +384,7 @@ static HRESULT ShellView_FillList(LPSHELLVIEW this)
pDPA_Sort(hdpa, ShellView_CompareItems, (LPARAM)this->pSFParent);
/*turn the listview's redrawing off*/
SendMessage32A(this->hWndList, WM_SETREDRAW, FALSE, 0);
SendMessageA(this->hWndList, WM_SETREDRAW, FALSE, 0);
for (i=0; i < DPA_GetPtrCount(hdpa); ++i) /* DPA_GetPtrCount is a macro*/
{ pidl = (LPITEMIDLIST)DPA_GetPtr(hdpa, i);
@ -393,18 +393,18 @@ static HRESULT ShellView_FillList(LPSHELLVIEW this)
lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/
lvItem.iItem = ListView_GetItemCount(this->hWndList); /*add the item to the end of the list*/
lvItem.lParam = (LPARAM) pidl; /*set the item's data*/
lvItem.pszText = LPSTR_TEXTCALLBACK32A; /*get text on a callback basis*/
lvItem.pszText = LPSTR_TEXTCALLBACKA; /*get text on a callback basis*/
lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/
ListView_InsertItem32A(this->hWndList, &lvItem);
ListView_InsertItemA(this->hWndList, &lvItem);
}
else
SHFree(pidl); /* the listview has the COPY*/
}
/*turn the listview's redrawing back on and force it to draw*/
SendMessage32A(this->hWndList, WM_SETREDRAW, TRUE, 0);
InvalidateRect32(this->hWndList, NULL, TRUE);
UpdateWindow32(this->hWndList);
SendMessageA(this->hWndList, WM_SETREDRAW, TRUE, 0);
InvalidateRect(this->hWndList, NULL, TRUE);
UpdateWindow(this->hWndList);
pEnumIDList->lpvtbl->fnRelease(pEnumIDList); /* destroy the list*/
pDPA_Destroy(hdpa);
@ -437,7 +437,7 @@ LRESULT ShellView_OnSize(LPSHELLVIEW this, WORD wWidth, WORD wHeight)
/*resize the ListView to fit our window*/
if(this->hWndList)
{ MoveWindow32(this->hWndList, 0, 0, wWidth, wHeight, TRUE);
{ MoveWindow(this->hWndList, 0, 0, wWidth, wHeight, TRUE);
}
return S_OK;
@ -445,15 +445,15 @@ LRESULT ShellView_OnSize(LPSHELLVIEW this, WORD wWidth, WORD wHeight)
/**************************************************************************
* ShellView_BuildFileMenu()
*/
HMENU32 ShellView_BuildFileMenu(LPSHELLVIEW this)
HMENU ShellView_BuildFileMenu(LPSHELLVIEW this)
{ CHAR szText[MAX_PATH];
MENUITEMINFO32A mii;
MENUITEMINFOA mii;
int nTools,i;
HMENU32 hSubMenu;
HMENU hSubMenu;
TRACE(shell,"(%p) semi-stub\n",this);
hSubMenu = CreatePopupMenu32();
hSubMenu = CreatePopupMenu();
if(hSubMenu)
{ /*get the number of items in our global array*/
for(nTools = 0; g_Tools[nTools].idCommand != -1; nTools++){}
@ -476,7 +476,7 @@ HMENU32 ShellView_BuildFileMenu(LPSHELLVIEW this)
{ mii.fType = MFT_SEPARATOR;
}
/* tack this item onto the end of the menu */
InsertMenuItem32A(hSubMenu, (UINT32)-1, TRUE, &mii);
InsertMenuItemA(hSubMenu, (UINT)-1, TRUE, &mii);
}
}
TRACE(shell,"-- return (menu=0x%x)\n",hSubMenu);
@ -485,7 +485,7 @@ HMENU32 ShellView_BuildFileMenu(LPSHELLVIEW this)
/**************************************************************************
* ShellView_MergeFileMenu()
*/
void ShellView_MergeFileMenu(LPSHELLVIEW this, HMENU32 hSubMenu)
void ShellView_MergeFileMenu(LPSHELLVIEW this, HMENU hSubMenu)
{ TRACE(shell,"(%p)->(submenu=0x%08x) stub\n",this,hSubMenu);
if(hSubMenu)
@ -501,8 +501,8 @@ void ShellView_MergeFileMenu(LPSHELLVIEW this, HMENU32 hSubMenu)
* ShellView_MergeViewMenu()
*/
void ShellView_MergeViewMenu(LPSHELLVIEW this, HMENU32 hSubMenu)
{ MENUITEMINFO32A mii;
void ShellView_MergeViewMenu(LPSHELLVIEW this, HMENU hSubMenu)
{ MENUITEMINFOA mii;
TRACE(shell,"(%p)->(submenu=0x%08x)\n",this,hSubMenu);
@ -515,24 +515,24 @@ void ShellView_MergeViewMenu(LPSHELLVIEW this, HMENU32 hSubMenu)
mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA;;
mii.fType = MFT_STRING;
mii.dwTypeData = "View";
mii.hSubMenu = LoadMenuIndirect32A(&_Resource_Men_MENU_001_0_data);
InsertMenuItem32A(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii);
mii.hSubMenu = LoadMenuIndirectA(&_Resource_Men_MENU_001_0_data);
InsertMenuItemA(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii);
}
}
/**************************************************************************
* ShellView_UpdateMenu()
*/
LRESULT ShellView_UpdateMenu(LPSHELLVIEW this, HMENU32 hMenu)
LRESULT ShellView_UpdateMenu(LPSHELLVIEW this, HMENU hMenu)
{ TRACE(shell,"(%p)->(menu=0x%08x)\n",this,hMenu);
CheckMenuItem32(hMenu, IDM_VIEW_FILES, MF_BYCOMMAND | (g_bViewKeys ? MF_CHECKED: MF_UNCHECKED));
CheckMenuItem(hMenu, IDM_VIEW_FILES, MF_BYCOMMAND | (g_bViewKeys ? MF_CHECKED: MF_UNCHECKED));
if(ShellView_CanDoIDockingWindow(this))
{ EnableMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_ENABLED);
CheckMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | (g_bShowIDW ? MF_CHECKED: MF_UNCHECKED));
{ EnableMenuItem(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_ENABLED);
CheckMenuItem(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | (g_bShowIDW ? MF_CHECKED: MF_UNCHECKED));
}
else
{ EnableMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
CheckMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_UNCHECKED);
{ EnableMenuItem(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
CheckMenuItem(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_UNCHECKED);
}
return S_OK;
}
@ -549,7 +549,7 @@ void ShellView_OnDeactivate(LPSHELLVIEW this)
{ if(this->hMenu)
{ IShellBrowser_SetMenuSB(this->pShellBrowser,0, 0, 0);
IShellBrowser_RemoveMenusSB(this->pShellBrowser,this->hMenu);
DestroyMenu32(this->hMenu);
DestroyMenu(this->hMenu);
this->hMenu = 0;
}
@ -560,9 +560,9 @@ void ShellView_OnDeactivate(LPSHELLVIEW this)
/**************************************************************************
* ShellView_OnActivate()
*/
LRESULT ShellView_OnActivate(LPSHELLVIEW this, UINT32 uState)
{ OLEMENUGROUPWIDTHS32 omw = { {0, 0, 0, 0, 0, 0} };
MENUITEMINFO32A mii;
LRESULT ShellView_OnActivate(LPSHELLVIEW this, UINT uState)
{ OLEMENUGROUPWIDTHS omw = { {0, 0, 0, 0, 0, 0} };
MENUITEMINFOA mii;
CHAR szText[MAX_PATH];
TRACE(shell,"%p uState=%x\n",this,uState);
@ -577,7 +577,7 @@ LRESULT ShellView_OnActivate(LPSHELLVIEW this, UINT32 uState)
/*only do this if we are active */
if(uState != SVUIA_DEACTIVATE)
{ /*merge the menus */
this->hMenu = CreateMenu32();
this->hMenu = CreateMenu();
if(this->hMenu)
{ IShellBrowser_InsertMenusSB(this->pShellBrowser, this->hMenu, &omw);
@ -595,7 +595,7 @@ LRESULT ShellView_OnActivate(LPSHELLVIEW this, UINT32 uState)
/*insert our menu into the menu bar*/
if(mii.hSubMenu)
{ InsertMenuItem32A(this->hMenu, FCIDM_MENU_HELP, FALSE, &mii);
{ InsertMenuItemA(this->hMenu, FCIDM_MENU_HELP, FALSE, &mii);
}
/*get the view menu so we can merge with it*/
@ -603,7 +603,7 @@ LRESULT ShellView_OnActivate(LPSHELLVIEW this, UINT32 uState)
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_SUBMENU;
if(GetMenuItemInfo32A(this->hMenu, FCIDM_MENU_VIEW, FALSE, &mii))
if(GetMenuItemInfoA(this->hMenu, FCIDM_MENU_VIEW, FALSE, &mii))
{ ShellView_MergeViewMenu(this, mii.hSubMenu);
}
@ -614,7 +614,7 @@ LRESULT ShellView_OnActivate(LPSHELLVIEW this, UINT32 uState)
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_SUBMENU;
if(GetMenuItemInfo32A(this->hMenu, FCIDM_MENU_FILE, FALSE, &mii))
if(GetMenuItemInfoA(this->hMenu, FCIDM_MENU_FILE, FALSE, &mii))
{ ShellView_MergeFileMenu(this, mii.hSubMenu);
}
}
@ -656,8 +656,8 @@ LRESULT ShellView_OnKillFocus(LPSHELLVIEW this)
/**************************************************************************
* ShellView_AddRemoveDockingWindow()
*/
BOOL32 ShellView_AddRemoveDockingWindow(LPSHELLVIEW this, BOOL32 bAdd)
{ BOOL32 bReturn = FALSE;
BOOL ShellView_AddRemoveDockingWindow(LPSHELLVIEW this, BOOL bAdd)
{ BOOL bReturn = FALSE;
HRESULT hr;
LPSERVICEPROVIDER pSP;
LPDOCKINGWINDOWFRAME pFrame;
@ -716,8 +716,8 @@ BOOL32 ShellView_AddRemoveDockingWindow(LPSHELLVIEW this, BOOL32 bAdd)
/**************************************************************************
* ShellView_CanDoIDockingWindow()
*/
BOOL32 ShellView_CanDoIDockingWindow(LPSHELLVIEW this)
{ BOOL32 bReturn = FALSE;
BOOL ShellView_CanDoIDockingWindow(LPSHELLVIEW this)
{ BOOL bReturn = FALSE;
HRESULT hr;
LPSERVICEPROVIDER pSP;
LPDOCKINGWINDOWFRAME pFrame;
@ -792,7 +792,7 @@ LRESULT ShellView_OnSettingChange(LPSHELLVIEW this, LPCSTR lpszSection)
/**************************************************************************
* ShellView_OnCommand()
*/
LRESULT ShellView_OnCommand(LPSHELLVIEW this,DWORD dwCmdID, DWORD dwCmd, HWND32 hwndCmd)
LRESULT ShellView_OnCommand(LPSHELLVIEW this,DWORD dwCmdID, DWORD dwCmd, HWND hwndCmd)
{ TRACE(shell,"(%p)->(0x%08lx 0x%08lx 0x%08x) stub\n",this, dwCmdID, dwCmd, hwndCmd);
switch(dwCmdID)
{ case IDM_VIEW_FILES:
@ -806,7 +806,7 @@ LRESULT ShellView_OnCommand(LPSHELLVIEW this,DWORD dwCmdID, DWORD dwCmd, HWND32
break;
case IDM_MYFILEITEM:
MessageBeep32(MB_OK);
MessageBeep(MB_OK);
break;
case FCIDM_SHVIEW_SMALLICON:
@ -841,9 +841,9 @@ LRESULT ShellView_OnCommand(LPSHELLVIEW this,DWORD dwCmdID, DWORD dwCmd, HWND32
* RETURNS
* number of selected items
*/
UINT32 ShellView_GetSelections(LPSHELLVIEW this)
{ LVITEM32A lvItem;
UINT32 i;
UINT ShellView_GetSelections(LPSHELLVIEW this)
{ LVITEMA lvItem;
UINT i;
if (this->aSelectedItems)
@ -864,7 +864,7 @@ UINT32 ShellView_GetSelections(LPSHELLVIEW this)
i = 0;
while(ListView_GetItem32A(this->hWndList, &lvItem) && (i < this->uSelected))
while(ListView_GetItemA(this->hWndList, &lvItem) && (i < this->uSelected))
{ if(lvItem.state & LVIS_SELECTED)
{ this->aSelectedItems[i] = (LPITEMIDLIST)lvItem.lParam;
i++;
@ -879,16 +879,16 @@ UINT32 ShellView_GetSelections(LPSHELLVIEW this)
/**************************************************************************
* ShellView_DoContextMenu()
*/
void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
{ UINT32 uCommand;
void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL fDefault)
{ UINT uCommand;
DWORD wFlags;
HMENU32 hMenu;
BOOL32 fExplore = FALSE;
HWND32 hwndTree = 0;
INT32 nMenuIndex;
MENUITEMINFO32A mii;
HMENU hMenu;
BOOL fExplore = FALSE;
HWND hwndTree = 0;
INT nMenuIndex;
MENUITEMINFOA mii;
LPCONTEXTMENU pContextMenu = NULL;
CMINVOKECOMMANDINFO32 cmi;
CMINVOKECOMMANDINFO cmi;
TRACE(shell,"(%p)->(0x%08x 0x%08x 0x%08x) stub\n",this, x, y, fDefault);
@ -900,7 +900,7 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
if(pContextMenu)
{ TRACE(shell,"-- pContextMenu\n");
hMenu = CreatePopupMenu32();
hMenu = CreatePopupMenu();
if( hMenu )
{ /* See if we are in Explore or Open mode. If the browser's tree
@ -922,7 +922,7 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_STATE | MIIM_ID;
while(GetMenuItemInfo32A(hMenu, nMenuIndex, TRUE, &mii)) /*find the default item in the menu*/
while(GetMenuItemInfoA(hMenu, nMenuIndex, TRUE, &mii)) /*find the default item in the menu*/
{ if(mii.fState & MFS_DEFAULT)
{ uCommand = mii.wID;
break;
@ -932,7 +932,7 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
}
else
{ TRACE(shell,"-- track popup\n");
uCommand = TrackPopupMenu32( hMenu,TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,this->hWnd,NULL);
uCommand = TrackPopupMenu( hMenu,TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,this->hWnd,NULL);
}
if(uCommand > 0)
@ -946,11 +946,11 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
ZeroMemory(&cmi, sizeof(cmi));
cmi.cbSize = sizeof(cmi);
cmi.hwnd = this->hWndParent;
cmi.lpVerb = (LPCSTR)MAKEINTRESOURCE32A(uCommand - MENU_OFFSET);
cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand - MENU_OFFSET);
pContextMenu->lpvtbl->fnInvokeCommand(pContextMenu, &cmi);
}
}
DestroyMenu32(hMenu);
DestroyMenu(hMenu);
}
}
if (pContextMenu)
@ -958,10 +958,10 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
}
}
else /* background context menu */
{ hMenu = LoadMenuIndirect32A(&_Resource_Men_MENU_002_0_data);
uCommand = TrackPopupMenu32( GetSubMenu32(hMenu,0),TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,this->hWnd,NULL);
{ hMenu = LoadMenuIndirectA(&_Resource_Men_MENU_002_0_data);
uCommand = TrackPopupMenu( GetSubMenu(hMenu,0),TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,this->hWnd,NULL);
ShellView_OnCommand(this, uCommand, 0,0);
DestroyMenu32(hMenu);
DestroyMenu(hMenu);
}
}
@ -969,13 +969,13 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
* ShellView_OnNotify()
*/
LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT CtlID, LPNMHDR lpnmh)
{ NM_LISTVIEW *lpnmlv = (NM_LISTVIEW*)lpnmh;
NMLVDISPINFO32A *lpdi = (NMLVDISPINFO32A *)lpnmh;
NMLVDISPINFOA *lpdi = (NMLVDISPINFOA *)lpnmh;
LPITEMIDLIST pidl;
DWORD dwCursor;
STRRET str;
UINT32 uFlags;
UINT uFlags;
IExtractIcon *pei;
TRACE(shell,"%p CtlID=%u lpnmh->code=%x\n",this,CtlID,lpnmh->code);
@ -991,7 +991,7 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
ShellView_OnDeactivate(this);
break;
case HDN_ENDTRACK32A:
case HDN_ENDTRACKA:
TRACE(shell,"-- HDN_ENDTRACK32A %p\n",this);
/*nColumn1 = ListView_GetColumnWidth(this->hWndList, 0);
nColumn2 = ListView_GetColumnWidth(this->hWndList, 1);*/
@ -1014,7 +1014,7 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
ShellView_DoContextMenu(this, LOWORD(dwCursor), HIWORD(dwCursor), FALSE);
break;
case LVN_GETDISPINFO32A:
case LVN_GETDISPINFOA:
TRACE(shell,"-- LVN_GETDISPINFO32A %p\n",this);
pidl = (LPITEMIDLIST)lpdi->item.lParam;
@ -1065,7 +1065,7 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
{ if(lpdi->item.mask & LVIF_TEXT) /*is the text being requested?*/
{ if(SUCCEEDED(this->pSFParent->lpvtbl->fnGetDisplayNameOf(this->pSFParent,pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &str)))
{ if(STRRET_WSTR == str.uType)
{ WideCharToLocal32(lpdi->item.pszText, str.u.pOleStr, lpdi->item.cchTextMax);
{ WideCharToLocal(lpdi->item.pszText, str.u.pOleStr, lpdi->item.cchTextMax);
SHFree(str.u.pOleStr);
}
else if(STRRET_CSTRA == str.uType)
@ -1106,9 +1106,9 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
* ShellView_WndProc
*/
LRESULT CALLBACK ShellView_WndProc(HWND32 hWnd, UINT32 uMessage, WPARAM32 wParam, LPARAM lParam)
{ LPSHELLVIEW pThis = (LPSHELLVIEW)GetWindowLong32A(hWnd, GWL_USERDATA);
LPCREATESTRUCT32A lpcs;
LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam)
{ LPSHELLVIEW pThis = (LPSHELLVIEW)GetWindowLongA(hWnd, GWL_USERDATA);
LPCREATESTRUCTA lpcs;
DWORD dwCursor;
TRACE(shell,"(hwnd=%x msg=%x wparm=%x lparm=%lx)\n",hWnd, uMessage, wParam, lParam);
@ -1116,9 +1116,9 @@ LRESULT CALLBACK ShellView_WndProc(HWND32 hWnd, UINT32 uMessage, WPARAM32 wParam
switch (uMessage)
{ case WM_NCCREATE:
{ TRACE(shell,"-- WM_NCCREATE\n");
lpcs = (LPCREATESTRUCT32A)lParam;
lpcs = (LPCREATESTRUCTA)lParam;
pThis = (LPSHELLVIEW)(lpcs->lpCreateParams);
SetWindowLong32A(hWnd, GWL_USERDATA, (LONG)pThis);
SetWindowLongA(hWnd, GWL_USERDATA, (LONG)pThis);
pThis->hWnd = hWnd; /*set the window handle*/
}
break;
@ -1141,7 +1141,7 @@ LRESULT CALLBACK ShellView_WndProc(HWND32 hWnd, UINT32 uMessage, WPARAM32 wParam
case WM_SHOWWINDOW:
TRACE(shell,"-- WM_SHOWWINDOW\n");
UpdateWindow32(pThis->hWndList);
UpdateWindow(pThis->hWndList);
break;
case WM_ACTIVATE:
@ -1156,11 +1156,11 @@ LRESULT CALLBACK ShellView_WndProc(HWND32 hWnd, UINT32 uMessage, WPARAM32 wParam
case WM_INITMENUPOPUP:
TRACE(shell,"-- WM_INITMENUPOPUP\n");
return ShellView_UpdateMenu(pThis, (HMENU32)wParam);
return ShellView_UpdateMenu(pThis, (HMENU)wParam);
case WM_NOTIFY:
TRACE(shell,"-- WM_NOTIFY\n");
return ShellView_OnNotify(pThis,(UINT32)wParam, (LPNMHDR)lParam);
return ShellView_OnNotify(pThis,(UINT)wParam, (LPNMHDR)lParam);
case WM_SETTINGCHANGE:
TRACE(shell,"-- WM_SETTINGCHANGE\n");
@ -1179,7 +1179,7 @@ LRESULT CALLBACK ShellView_WndProc(HWND32 hWnd, UINT32 uMessage, WPARAM32 wParam
TRACE(shell,"-- message %s unhandled\n", SPY_GetMsgName(uMessage));
break;
}
return DefWindowProc32A (hWnd, uMessage, wParam, lParam);
return DefWindowProcA (hWnd, uMessage, wParam, lParam);
}
/**************************************************************************
*
@ -1248,13 +1248,13 @@ static ULONG WINAPI IShellView_Release(LPSHELLVIEW this)
/**************************************************************************
* ShellView_GetWindow
*/
static HRESULT WINAPI IShellView_GetWindow(LPSHELLVIEW this,HWND32 * phWnd)
static HRESULT WINAPI IShellView_GetWindow(LPSHELLVIEW this,HWND * phWnd)
{ TRACE(shell,"(%p)\n",this);
*phWnd = this->hWnd;
return S_OK;
}
static HRESULT WINAPI IShellView_ContextSensitiveHelp(LPSHELLVIEW this,BOOL32 fEnterMode)
static HRESULT WINAPI IShellView_ContextSensitiveHelp(LPSHELLVIEW this,BOOL fEnterMode)
{ FIXME(shell,"(%p) stub\n",this);
return E_NOTIMPL;
}
@ -1264,7 +1264,7 @@ static HRESULT WINAPI IShellView_ContextSensitiveHelp(LPSHELLVIEW this,BOOL32 fE
* FIXME:
* use the accel functions
*/
static HRESULT WINAPI IShellView_TranslateAccelerator(LPSHELLVIEW this,LPMSG32 lpmsg)
static HRESULT WINAPI IShellView_TranslateAccelerator(LPSHELLVIEW this,LPMSG lpmsg)
{ FIXME(shell,"(%p)->(%p: hwnd=%x msg=%x lp=%lx wp=%x) stub\n",this,lpmsg, lpmsg->hwnd, lpmsg->message, lpmsg->lParam, lpmsg->wParam);
@ -1273,11 +1273,11 @@ static HRESULT WINAPI IShellView_TranslateAccelerator(LPSHELLVIEW this,LPMSG32 l
}
return S_FALSE;
}
static HRESULT WINAPI IShellView_EnableModeless(LPSHELLVIEW this,BOOL32 fEnable)
static HRESULT WINAPI IShellView_EnableModeless(LPSHELLVIEW this,BOOL fEnable)
{ FIXME(shell,"(%p) stub\n",this);
return E_NOTIMPL;
}
static HRESULT WINAPI IShellView_UIActivate(LPSHELLVIEW this,UINT32 uState)
static HRESULT WINAPI IShellView_UIActivate(LPSHELLVIEW this,UINT uState)
{ CHAR szName[MAX_PATH];
LRESULT lResult;
int nPartArray[1] = {-1};
@ -1310,7 +1310,7 @@ static HRESULT WINAPI IShellView_UIActivate(LPSHELLVIEW this,UINT32 uState)
(LPARAM)nPartArray, &lResult);
/* set the text for the parts */
IShellBrowser_SendControlMsg(this->pShellBrowser, FCW_STATUS, SB_SETTEXT32A,
IShellBrowser_SendControlMsg(this->pShellBrowser, FCW_STATUS, SB_SETTEXTA,
0, (LPARAM)szName, &lResult);
/*add the docking window if necessary */
@ -1329,8 +1329,8 @@ static HRESULT WINAPI IShellView_Refresh(LPSHELLVIEW this)
return S_OK;
}
static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW this, IShellView *lpPrevView,
LPCFOLDERSETTINGS lpfs, IShellBrowser * psb, RECT32 * prcView, HWND32 *phWnd)
{ WNDCLASS32A wc;
LPCFOLDERSETTINGS lpfs, IShellBrowser * psb, RECT * prcView, HWND *phWnd)
{ WNDCLASSA wc;
/* LRESULT dwResult;*/
*phWnd = 0;
@ -1354,24 +1354,24 @@ static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW this, IShellView *
}
/*if our window class has not been registered, then do so*/
if(!GetClassInfo32A(shell32_hInstance, SV_CLASS_NAME, &wc))
if(!GetClassInfoA(shell32_hInstance, SV_CLASS_NAME, &wc))
{ ZeroMemory(&wc, sizeof(wc));
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = (WNDPROC32) ShellView_WndProc;
wc.lpfnWndProc = (WNDPROC) ShellView_WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = shell32_hInstance;
wc.hIcon = 0;
wc.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wc.hbrBackground = (HBRUSH32) (COLOR_WINDOW + 1);
wc.hCursor = LoadCursorA (0, IDC_ARROWA);
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
wc.lpszMenuName = NULL;
wc.lpszClassName = SV_CLASS_NAME;
if(!RegisterClass32A(&wc))
if(!RegisterClassA(&wc))
return E_FAIL;
}
*phWnd = CreateWindowEx32A(0, SV_CLASS_NAME, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS,
*phWnd = CreateWindowExA(0, SV_CLASS_NAME, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS,
prcView->left, prcView->top, prcView->right - prcView->left, prcView->bottom - prcView->top,
this->hWndParent, 0, shell32_hInstance, (LPVOID)this);
@ -1389,9 +1389,9 @@ static HRESULT WINAPI IShellView_DestroyViewWindow(LPSHELLVIEW this)
/*Make absolutely sure all our UI is cleaned up.*/
IShellView_UIActivate(this, SVUIA_DEACTIVATE);
if(this->hMenu)
{ DestroyMenu32(this->hMenu);
{ DestroyMenu(this->hMenu);
}
DestroyWindow32(this->hWnd);
DestroyWindow(this->hWnd);
IShellBrowser_Release(this->pShellBrowser);
return S_OK;
}
@ -1414,11 +1414,11 @@ static HRESULT WINAPI IShellView_SaveViewState(LPSHELLVIEW this)
{ FIXME(shell,"(%p) stub\n",this);
return S_OK;
}
static HRESULT WINAPI IShellView_SelectItem(LPSHELLVIEW this, LPCITEMIDLIST pidlItem, UINT32 uFlags)
static HRESULT WINAPI IShellView_SelectItem(LPSHELLVIEW this, LPCITEMIDLIST pidlItem, UINT uFlags)
{ FIXME(shell,"(%p)->(pidl=%p, 0x%08x) stub\n",this, pidlItem, uFlags);
return E_NOTIMPL;
}
static HRESULT WINAPI IShellView_GetItemObject(LPSHELLVIEW this, UINT32 uItem, REFIID riid, LPVOID *ppvOut)
static HRESULT WINAPI IShellView_GetItemObject(LPSHELLVIEW this, UINT uItem, REFIID riid, LPVOID *ppvOut)
{ LPUNKNOWN pObj = NULL;
char xriid[50];

View File

@ -23,7 +23,7 @@ DWORD WINAPI GetFileResourceSize16( LPCSTR lpszFileName,
LPCSTR lpszResId = HIWORD( spszResId )? PTR_SEG_TO_LIN( spszResId )
: (LPCSTR)spszResId;
return GetFileResourceSize32( lpszFileName,
return GetFileResourceSize( lpszFileName,
lpszResType, lpszResId, lpdwFileOffset );
}
@ -40,7 +40,7 @@ DWORD WINAPI GetFileResource16( LPCSTR lpszFileName,
LPCSTR lpszResId = HIWORD( spszResId )? PTR_SEG_TO_LIN( spszResId )
: (LPCSTR)spszResId;
return GetFileResource32( lpszFileName, lpszResType, lpszResId,
return GetFileResource( lpszFileName, lpszResType, lpszResId,
dwFileOffset, dwResLen, lpvData );
}
@ -50,7 +50,7 @@ DWORD WINAPI GetFileResource16( LPCSTR lpszFileName,
DWORD WINAPI GetFileVersionInfoSize16( LPCSTR lpszFileName, LPDWORD lpdwHandle )
{
TRACE( ver, "(%s, %p)\n", debugstr_a(lpszFileName), lpdwHandle );
return GetFileVersionInfoSize32A( lpszFileName, lpdwHandle );
return GetFileVersionInfoSizeA( lpszFileName, lpdwHandle );
}
/*************************************************************************
@ -62,7 +62,7 @@ DWORD WINAPI GetFileVersionInfo16( LPCSTR lpszFileName, DWORD handle,
TRACE( ver, "(%s, %08lx, %ld, %p)\n",
debugstr_a(lpszFileName), handle, cbBuf, lpvData );
return GetFileVersionInfo32A( lpszFileName, handle, cbBuf, lpvData );
return GetFileVersionInfoA( lpszFileName, handle, cbBuf, lpvData );
}
/*************************************************************************
@ -73,8 +73,8 @@ DWORD WINAPI VerFindFile16( UINT16 flags, LPCSTR lpszFilename,
LPSTR lpszCurDir, UINT16 *lpuCurDirLen,
LPSTR lpszDestDir, UINT16 *lpuDestDirLen )
{
UINT32 curDirLen, destDirLen;
DWORD retv = VerFindFile32A( flags, lpszFilename, lpszWinDir, lpszAppDir,
UINT curDirLen, destDirLen;
DWORD retv = VerFindFileA( flags, lpszFilename, lpszWinDir, lpszAppDir,
lpszCurDir, &curDirLen, lpszDestDir, &destDirLen );
*lpuCurDirLen = (UINT16)curDirLen;
@ -90,8 +90,8 @@ DWORD WINAPI VerInstallFile16( UINT16 flags,
LPCSTR lpszSrcDir, LPCSTR lpszDestDir, LPCSTR lpszCurDir,
LPSTR lpszTmpFile, UINT16 *lpwTmpFileLen )
{
UINT32 filelen;
DWORD retv = VerInstallFile32A( flags, lpszSrcFilename, lpszDestFilename,
UINT filelen;
DWORD retv = VerInstallFileA( flags, lpszSrcFilename, lpszDestFilename,
lpszSrcDir, lpszDestDir, lpszCurDir,
lpszTmpFile, &filelen);
@ -104,7 +104,7 @@ DWORD WINAPI VerInstallFile16( UINT16 flags,
*/
DWORD WINAPI VerLanguageName16( UINT16 uLang, LPSTR lpszLang, UINT16 cbLang )
{
return VerLanguageName32A( uLang, lpszLang, cbLang );
return VerLanguageNameA( uLang, lpszLang, cbLang );
}
/*************************************************************************
@ -115,13 +115,13 @@ DWORD WINAPI VerQueryValue16( SEGPTR spvBlock, LPCSTR lpszSubBlock,
{
LPVOID lpvBlock = PTR_SEG_TO_LIN( spvBlock );
LPVOID buffer = lpvBlock;
UINT32 buflen;
UINT buflen;
DWORD retv;
TRACE( ver, "(%p, %s, %p, %p)\n",
lpvBlock, debugstr_a(lpszSubBlock), lpspBuffer, lpcb );
retv = VerQueryValue32A( lpvBlock, lpszSubBlock, &buffer, &buflen );
retv = VerQueryValueA( lpvBlock, lpszSubBlock, &buffer, &buflen );
if ( !retv ) return FALSE;
if ( OFFSETOF( spvBlock ) + (buffer - lpvBlock) >= 0x10000 )

View File

@ -174,9 +174,9 @@ typedef struct
( ((VS_VERSION_INFO_STRUCT16 *)ver)->szKey[0] >= ' ' )
#define VersionInfo16_Value( ver ) \
(LPBYTE)( ((DWORD)((ver)->szKey) + (lstrlen32A((ver)->szKey)+1) + 3) & ~3 )
(LPBYTE)( ((DWORD)((ver)->szKey) + (lstrlenA((ver)->szKey)+1) + 3) & ~3 )
#define VersionInfo32_Value( ver ) \
(LPBYTE)( ((DWORD)((ver)->szKey) + 2*(lstrlen32W((ver)->szKey)+1) + 3) & ~3 )
(LPBYTE)( ((DWORD)((ver)->szKey) + 2*(lstrlenW((ver)->szKey)+1) + 3) & ~3 )
#define VersionInfo16_Children( ver ) \
(VS_VERSION_INFO_STRUCT16 *)( VersionInfo16_Value( ver ) + \
@ -223,7 +223,7 @@ void ConvertVersionInfo32To16( VS_VERSION_INFO_STRUCT32 *info32,
}
else if ( bText )
{
info16->wValueLength = lstrlen32W( (LPCWSTR)lpValue ) + 1;
info16->wValueLength = lstrlenW( (LPCWSTR)lpValue ) + 1;
lstrcpyWtoA( VersionInfo16_Value( info16 ), (LPCWSTR)lpValue );
TRACE( ver, "Copied value from %p to %p: %s\n", lpValue,
@ -262,7 +262,7 @@ void ConvertVersionInfo32To16( VS_VERSION_INFO_STRUCT32 *info32,
/***********************************************************************
* GetFileVersionInfoSize32A [VERSION.2]
*/
DWORD WINAPI GetFileVersionInfoSize32A( LPCSTR filename, LPDWORD handle )
DWORD WINAPI GetFileVersionInfoSizeA( LPCSTR filename, LPDWORD handle )
{
VS_FIXEDFILEINFO *vffi;
DWORD len, ret, offset;
@ -270,15 +270,15 @@ DWORD WINAPI GetFileVersionInfoSize32A( LPCSTR filename, LPDWORD handle )
TRACE( ver, "(%s,%p)\n", debugstr_a(filename), handle );
len = GetFileResourceSize32( filename,
MAKEINTRESOURCE32A(VS_FILE_INFO),
MAKEINTRESOURCE32A(VS_VERSION_INFO),
len = GetFileResourceSize( filename,
MAKEINTRESOURCEA(VS_FILE_INFO),
MAKEINTRESOURCEA(VS_VERSION_INFO),
&offset );
if (!len) return 0;
ret = GetFileResource32( filename,
MAKEINTRESOURCE32A(VS_FILE_INFO),
MAKEINTRESOURCE32A(VS_VERSION_INFO),
ret = GetFileResource( filename,
MAKEINTRESOURCEA(VS_FILE_INFO),
MAKEINTRESOURCEA(VS_VERSION_INFO),
offset, sizeof( buf ), buf );
if (!ret) return 0;
@ -308,10 +308,10 @@ DWORD WINAPI GetFileVersionInfoSize32A( LPCSTR filename, LPDWORD handle )
/***********************************************************************
* GetFileVersionInfoSize32W [VERSION.3]
*/
DWORD WINAPI GetFileVersionInfoSize32W( LPCWSTR filename, LPDWORD handle )
DWORD WINAPI GetFileVersionInfoSizeW( LPCWSTR filename, LPDWORD handle )
{
LPSTR fn = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
DWORD ret = GetFileVersionInfoSize32A( fn, handle );
DWORD ret = GetFileVersionInfoSizeA( fn, handle );
HeapFree( GetProcessHeap(), 0, fn );
return ret;
}
@ -319,14 +319,14 @@ DWORD WINAPI GetFileVersionInfoSize32W( LPCWSTR filename, LPDWORD handle )
/***********************************************************************
* GetFileVersionInfo32A [VERSION.1]
*/
DWORD WINAPI GetFileVersionInfo32A( LPCSTR filename, DWORD handle,
DWORD WINAPI GetFileVersionInfoA( LPCSTR filename, DWORD handle,
DWORD datasize, LPVOID data )
{
TRACE( ver, "(%s,%ld,size=%ld,data=%p)\n",
debugstr_a(filename), handle, datasize, data );
if ( !GetFileResource32( filename, MAKEINTRESOURCE32A(VS_FILE_INFO),
MAKEINTRESOURCE32A(VS_VERSION_INFO),
if ( !GetFileResource( filename, MAKEINTRESOURCEA(VS_FILE_INFO),
MAKEINTRESOURCEA(VS_VERSION_INFO),
handle, datasize, data ) )
return FALSE;
@ -345,7 +345,7 @@ DWORD WINAPI GetFileVersionInfo32A( LPCSTR filename, DWORD handle,
/***********************************************************************
* GetFileVersionInfo32W [VERSION.4]
*/
DWORD WINAPI GetFileVersionInfo32W( LPCWSTR filename, DWORD handle,
DWORD WINAPI GetFileVersionInfoW( LPCWSTR filename, DWORD handle,
DWORD datasize, LPVOID data )
{
LPSTR fn = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
@ -354,8 +354,8 @@ DWORD WINAPI GetFileVersionInfo32W( LPCWSTR filename, DWORD handle,
TRACE( ver, "(%s,%ld,size=%ld,data=%p)\n",
debugstr_a(fn), handle, datasize, data );
if ( !GetFileResource32( fn, MAKEINTRESOURCE32A(VS_FILE_INFO),
MAKEINTRESOURCE32A(VS_VERSION_INFO),
if ( !GetFileResource( fn, MAKEINTRESOURCEA(VS_FILE_INFO),
MAKEINTRESOURCEA(VS_VERSION_INFO),
handle, datasize, data ) )
retv = FALSE;
@ -376,13 +376,13 @@ DWORD WINAPI GetFileVersionInfo32W( LPCWSTR filename, DWORD handle,
* VersionInfo16_FindChild [internal]
*/
VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild( VS_VERSION_INFO_STRUCT16 *info,
LPCSTR szKey, UINT32 cbKey )
LPCSTR szKey, UINT cbKey )
{
VS_VERSION_INFO_STRUCT16 *child = VersionInfo16_Children( info );
while ( (DWORD)child < (DWORD)info + info->wLength )
{
if ( !lstrncmpi32A( child->szKey, szKey, cbKey ) )
if ( !lstrncmpiA( child->szKey, szKey, cbKey ) )
return child;
if (!(child->wLength)) return NULL;
@ -396,13 +396,13 @@ VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild( VS_VERSION_INFO_STRUCT16 *inf
* VersionInfo32_FindChild [internal]
*/
VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT32 *info,
LPCWSTR szKey, UINT32 cbKey )
LPCWSTR szKey, UINT cbKey )
{
VS_VERSION_INFO_STRUCT32 *child = VersionInfo32_Children( info );
while ( (DWORD)child < (DWORD)info + info->wLength )
{
if ( !lstrncmpi32W( child->szKey, szKey, cbKey ) )
if ( !lstrncmpiW( child->szKey, szKey, cbKey ) )
return child;
child = VersionInfo32_Next( child );
@ -414,8 +414,8 @@ VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT32 *inf
/***********************************************************************
* VerQueryValue32A [VERSION.12]
*/
DWORD WINAPI VerQueryValue32A( LPVOID pBlock, LPCSTR lpSubBlock,
LPVOID *lplpBuffer, UINT32 *puLen )
DWORD WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
LPVOID *lplpBuffer, UINT *puLen )
{
VS_VERSION_INFO_STRUCT16 *info = (VS_VERSION_INFO_STRUCT16 *)pBlock;
if ( !VersionInfoIs16( info ) )
@ -460,8 +460,8 @@ DWORD WINAPI VerQueryValue32A( LPVOID pBlock, LPCSTR lpSubBlock,
/***********************************************************************
* VerQueryValue32W [VERSION.13]
*/
DWORD WINAPI VerQueryValue32W( LPVOID pBlock, LPCWSTR lpSubBlock,
LPVOID *lplpBuffer, UINT32 *puLen )
DWORD WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock,
LPVOID *lplpBuffer, UINT *puLen )
{
VS_VERSION_INFO_STRUCT32 *info = (VS_VERSION_INFO_STRUCT32 *)pBlock;
if ( VersionInfoIs16( info ) )
@ -503,12 +503,12 @@ DWORD WINAPI VerQueryValue32W( LPVOID pBlock, LPCWSTR lpSubBlock,
return TRUE;
}
extern LPCSTR WINE_GetLanguageName( UINT32 langid );
extern LPCSTR WINE_GetLanguageName( UINT langid );
/***********************************************************************
* VerLanguageName32A [VERSION.9]
*/
DWORD WINAPI VerLanguageName32A( UINT32 wLang, LPSTR szLang, UINT32 nSize )
DWORD WINAPI VerLanguageNameA( UINT wLang, LPSTR szLang, UINT nSize )
{
char buffer[80];
LPCSTR name;
@ -525,7 +525,7 @@ DWORD WINAPI VerLanguageName32A( UINT32 wLang, LPSTR szLang, UINT32 nSize )
"\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x",
wLang );
result = RegQueryValue32A( HKEY_LOCAL_MACHINE, buffer, szLang, (LPDWORD)&nSize );
result = RegQueryValueA( HKEY_LOCAL_MACHINE, buffer, szLang, (LPDWORD)&nSize );
if ( result == ERROR_SUCCESS || result == ERROR_MORE_DATA )
return nSize;
@ -535,14 +535,14 @@ DWORD WINAPI VerLanguageName32A( UINT32 wLang, LPSTR szLang, UINT32 nSize )
*/
name = WINE_GetLanguageName( wLang );
lstrcpyn32A( szLang, name, nSize );
return lstrlen32A( name );
lstrcpynA( szLang, name, nSize );
return lstrlenA( name );
}
/***********************************************************************
* VerLanguageName32W [VERSION.10]
*/
DWORD WINAPI VerLanguageName32W( UINT32 wLang, LPWSTR szLang, UINT32 nSize )
DWORD WINAPI VerLanguageNameW( UINT wLang, LPWSTR szLang, UINT nSize )
{
char buffer[80];
LPWSTR keyname;
@ -561,7 +561,7 @@ DWORD WINAPI VerLanguageName32W( UINT32 wLang, LPWSTR szLang, UINT32 nSize )
wLang );
keyname = HEAP_strdupAtoW( GetProcessHeap(), 0, buffer );
result = RegQueryValue32W( HKEY_LOCAL_MACHINE, keyname, szLang, (LPDWORD)&nSize );
result = RegQueryValueW( HKEY_LOCAL_MACHINE, keyname, szLang, (LPDWORD)&nSize );
HeapFree( GetProcessHeap(), 0, keyname );
if ( result == ERROR_SUCCESS || result == ERROR_MORE_DATA )
@ -574,7 +574,7 @@ DWORD WINAPI VerLanguageName32W( UINT32 wLang, LPWSTR szLang, UINT32 nSize )
name = WINE_GetLanguageName( wLang );
lstrcpynAtoW( szLang, name, nSize );
return lstrlen32A( name );
return lstrlenA( name );
}

View File

@ -95,7 +95,7 @@ static int testFileExistence(
/* Create the full pathname */
strcat(filename, file);
if(OpenFile32(filename, &fileinfo, OF_EXIST) == HFILE_ERROR32)
if(OpenFile(filename, &fileinfo, OF_EXIST) == HFILE_ERROR)
retval = 0;
else
retval = 1;
@ -145,8 +145,8 @@ static int testFileExclusiveExistence(
/* Create the full pathname */
strcat(filename, file);
if(OpenFile32(filename, &fileinfo, OF_EXIST | OF_SHARE_EXCLUSIVE) ==
HFILE_ERROR32)
if(OpenFile(filename, &fileinfo, OF_EXIST | OF_SHARE_EXCLUSIVE) ==
HFILE_ERROR)
retval = 0;
else
retval = 1;
@ -168,15 +168,15 @@ static int testFileExclusiveExistence(
****************************************************************************/
/* VerFindFile32A [VERSION.5] */
DWORD WINAPI VerFindFile32A(
UINT32 flags,
DWORD WINAPI VerFindFileA(
UINT flags,
LPCSTR lpszFilename,
LPCSTR lpszWinDir,
LPCSTR lpszAppDir,
LPSTR lpszCurDir,
UINT32 *lpuCurDirLen,
UINT *lpuCurDirLen,
LPSTR lpszDestDir,
UINT32 *lpuDestDirLen )
UINT *lpuDestDirLen )
{
DWORD retval;
char curDir[256];
@ -217,7 +217,7 @@ DWORD WINAPI VerFindFile32A(
strcpy(destDir, "");
if(flags & VFFF_ISSHAREDFILE) {
GetSystemDirectory32A(destDir, 256);
GetSystemDirectoryA(destDir, 256);
/* Were we given a filename? If so, try to find the file. */
if(lpszFilename) {
@ -240,7 +240,7 @@ DWORD WINAPI VerFindFile32A(
else if(!(flags & VFFF_ISSHAREDFILE)) { /* not a shared file */
if(lpszAppDir) {
char systemDir[256];
GetSystemDirectory32A(systemDir, 256);
GetSystemDirectoryA(systemDir, 256);
strcpy(destDir, lpszAppDir);
@ -316,11 +316,11 @@ DWORD WINAPI VerFindFile32A(
}
/* VerFindFile32W [VERSION.6] */
DWORD WINAPI VerFindFile32W(
UINT32 flags,LPCWSTR filename,LPCWSTR windir,LPCWSTR appdir,
LPWSTR curdir,UINT32 *pcurdirlen,LPWSTR destdir,UINT32 *pdestdirlen )
DWORD WINAPI VerFindFileW(
UINT flags,LPCWSTR filename,LPCWSTR windir,LPCWSTR appdir,
LPWSTR curdir,UINT *pcurdirlen,LPWSTR destdir,UINT *pdestdirlen )
{
UINT32 curdirlen, destdirlen;
UINT curdirlen, destdirlen;
LPSTR wfn,wwd,wad,wdd,wcd;
DWORD ret;
@ -329,7 +329,7 @@ DWORD WINAPI VerFindFile32W(
wad = HEAP_strdupWtoA( GetProcessHeap(), 0, appdir );
wcd = HeapAlloc( GetProcessHeap(), 0, *pcurdirlen );
wdd = HeapAlloc( GetProcessHeap(), 0, *pdestdirlen );
ret = VerFindFile32A(flags,wfn,wwd,wad,wcd,&curdirlen,wdd,&destdirlen);
ret = VerFindFileA(flags,wfn,wwd,wad,wcd,&curdirlen,wdd,&destdirlen);
lstrcpynAtoW(curdir,wcd,*pcurdirlen);
lstrcpynAtoW(destdir,wdd,*pdestdirlen);
*pcurdirlen = strlen(wcd);
@ -351,7 +351,7 @@ _fetch_versioninfo(LPSTR fn,VS_FIXEDFILEINFO **vffi) {
alloclen = 1000;
buf= xmalloc(alloclen);
while (1) {
ret = GetFileVersionInfo32A(fn,0,alloclen,buf);
ret = GetFileVersionInfoA(fn,0,alloclen,buf);
if (!ret) {
free(buf);
return 0;
@ -387,13 +387,13 @@ _error2vif(DWORD error) {
/******************************************************************************
* VerInstallFile32A [VERSION.7]
*/
DWORD WINAPI VerInstallFile32A(
UINT32 flags,LPCSTR srcfilename,LPCSTR destfilename,LPCSTR srcdir,
LPCSTR destdir,LPCSTR curdir,LPSTR tmpfile,UINT32 *tmpfilelen )
DWORD WINAPI VerInstallFileA(
UINT flags,LPCSTR srcfilename,LPCSTR destfilename,LPCSTR srcdir,
LPCSTR destdir,LPCSTR curdir,LPSTR tmpfile,UINT *tmpfilelen )
{
LPCSTR pdest;
char destfn[260],tmpfn[260],srcfn[260];
HFILE32 hfsrc,hfdst;
HFILE hfsrc,hfdst;
DWORD attr,ret,xret,tmplast;
LPBYTE buf1,buf2;
OFSTRUCT ofs;
@ -406,15 +406,15 @@ DWORD WINAPI VerInstallFile32A(
if (!destdir || !*destdir) pdest = srcdir;
else pdest = destdir;
sprintf(destfn,"%s\\%s",pdest,destfilename);
hfsrc=LZOpenFile32A(srcfn,&ofs,OF_READ);
if (hfsrc==HFILE_ERROR32)
hfsrc=LZOpenFileA(srcfn,&ofs,OF_READ);
if (hfsrc==HFILE_ERROR)
return VIF_CANNOTREADSRC;
sprintf(tmpfn,"%s\\%s",pdest,destfilename);
tmplast=strlen(pdest)+1;
attr = GetFileAttributes32A(tmpfn);
attr = GetFileAttributesA(tmpfn);
if (attr!=-1) {
if (attr & FILE_ATTRIBUTE_READONLY) {
LZClose32(hfsrc);
LZClose(hfsrc);
return VIF_WRITEPROT;
}
/* FIXME: check if file currently in use and return VIF_FILEINUSE */
@ -424,7 +424,7 @@ DWORD WINAPI VerInstallFile32A(
if (tmpfile[0]) {
sprintf(tmpfn,"%s\\%s",pdest,tmpfile);
tmplast = strlen(pdest)+1;
attr = GetFileAttributes32A(tmpfn);
attr = GetFileAttributesA(tmpfn);
/* if it exists, it has been copied by the call before.
* we jump over the copy part...
*/
@ -433,19 +433,19 @@ DWORD WINAPI VerInstallFile32A(
if (attr == -1) {
char *s;
GetTempFileName32A(pdest,"ver",0,tmpfn); /* should not fail ... */
GetTempFileNameA(pdest,"ver",0,tmpfn); /* should not fail ... */
s=strrchr(tmpfn,'\\');
if (s)
tmplast = s-tmpfn;
else
tmplast = 0;
hfdst = OpenFile32(tmpfn,&ofs,OF_CREATE);
if (hfdst == HFILE_ERROR32) {
LZClose32(hfsrc);
hfdst = OpenFile(tmpfn,&ofs,OF_CREATE);
if (hfdst == HFILE_ERROR) {
LZClose(hfsrc);
return VIF_CANNOTCREATE; /* | translated dos error */
}
ret = LZCopy32(hfsrc,hfdst);
_lclose32(hfdst);
ret = LZCopy(hfsrc,hfdst);
_lclose(hfdst);
if (((long) ret) < 0) {
/* translate LZ errors into VIF_xxx */
switch (ret) {
@ -468,7 +468,7 @@ DWORD WINAPI VerInstallFile32A(
break;
}
if (ret) {
LZClose32(hfsrc);
LZClose(hfsrc);
return ret;
}
}
@ -481,7 +481,7 @@ DWORD WINAPI VerInstallFile32A(
buf2 = _fetch_versioninfo(tmpfn,&tmpvffi);
if (buf2) {
char *tbuf1,*tbuf2;
UINT32 len1,len2;
UINT len1,len2;
len1=len2=40;
@ -497,8 +497,8 @@ DWORD WINAPI VerInstallFile32A(
(destvffi->dwFileSubtype!=tmpvffi->dwFileSubtype)
)
xret |= VIF_MISMATCH|VIF_DIFFTYPE;
if (VerQueryValue32A(buf1,"\\VarFileInfo\\Translation",(LPVOID*)&tbuf1,&len1) &&
VerQueryValue32A(buf2,"\\VarFileInfo\\Translation",(LPVOID*)&tbuf2,&len2)
if (VerQueryValueA(buf1,"\\VarFileInfo\\Translation",(LPVOID*)&tbuf1,&len1) &&
VerQueryValueA(buf2,"\\VarFileInfo\\Translation",(LPVOID*)&tbuf2,&len2)
) {
/* irgendwas mit tbuf1 und tbuf2 machen
* generiert DIFFLANG|MISMATCH
@ -513,48 +513,48 @@ DWORD WINAPI VerInstallFile32A(
if (xret) {
if (*tmpfilelen<strlen(tmpfn+tmplast)) {
xret|=VIF_BUFFTOOSMALL;
DeleteFile32A(tmpfn);
DeleteFileA(tmpfn);
} else {
strcpy(tmpfile,tmpfn+tmplast);
*tmpfilelen = strlen(tmpfn+tmplast)+1;
xret|=VIF_TEMPFILE;
}
} else {
if (-1!=GetFileAttributes32A(destfn))
if (!DeleteFile32A(destfn)) {
if (-1!=GetFileAttributesA(destfn))
if (!DeleteFileA(destfn)) {
xret|=_error2vif(GetLastError())|VIF_CANNOTDELETE;
DeleteFile32A(tmpfn);
LZClose32(hfsrc);
DeleteFileA(tmpfn);
LZClose(hfsrc);
return xret;
}
if ((!(flags & VIFF_DONTDELETEOLD)) &&
curdir &&
*curdir &&
lstrcmpi32A(curdir,pdest)
lstrcmpiA(curdir,pdest)
) {
char curfn[260];
sprintf(curfn,"%s\\%s",curdir,destfilename);
if (-1!=GetFileAttributes32A(curfn)) {
if (-1!=GetFileAttributesA(curfn)) {
/* FIXME: check if in use ... if it is, VIF_CANNOTDELETECUR */
if (!DeleteFile32A(curfn))
if (!DeleteFileA(curfn))
xret|=_error2vif(GetLastError())|VIF_CANNOTDELETECUR;
}
}
if (!MoveFile32A(tmpfn,destfn)) {
if (!MoveFileA(tmpfn,destfn)) {
xret|=_error2vif(GetLastError())|VIF_CANNOTRENAME;
DeleteFile32A(tmpfn);
DeleteFileA(tmpfn);
}
}
LZClose32(hfsrc);
LZClose(hfsrc);
return xret;
}
/* VerInstallFile32W [VERSION.8] */
DWORD WINAPI VerInstallFile32W(
UINT32 flags,LPCWSTR srcfilename,LPCWSTR destfilename,LPCWSTR srcdir,
LPCWSTR destdir,LPCWSTR curdir,LPWSTR tmpfile,UINT32 *tmpfilelen )
DWORD WINAPI VerInstallFileW(
UINT flags,LPCWSTR srcfilename,LPCWSTR destfilename,LPCWSTR srcdir,
LPCWSTR destdir,LPCWSTR curdir,LPWSTR tmpfile,UINT *tmpfilelen )
{
LPSTR wsrcf,wsrcd,wdestf,wdestd,wtmpf,wcurd;
DWORD ret;
@ -565,7 +565,7 @@ DWORD WINAPI VerInstallFile32W(
wdestd = HEAP_strdupWtoA( GetProcessHeap(), 0, destdir );
wtmpf = HEAP_strdupWtoA( GetProcessHeap(), 0, tmpfile );
wcurd = HEAP_strdupWtoA( GetProcessHeap(), 0, curdir );
ret = VerInstallFile32A(flags,wsrcf,wdestf,wsrcd,wdestd,wcurd,wtmpf,tmpfilelen);
ret = VerInstallFileA(flags,wsrcf,wdestf,wsrcd,wdestd,wcurd,wtmpf,tmpfilelen);
if (!ret)
lstrcpynAtoW(tmpfile,wtmpf,*tmpfilelen);
HeapFree( GetProcessHeap(), 0, wsrcf );

View File

@ -23,22 +23,22 @@
/***********************************************************************
* read_xx_header [internal]
*/
static int read_xx_header( HFILE32 lzfd )
static int read_xx_header( HFILE lzfd )
{
IMAGE_DOS_HEADER mzh;
char magic[3];
LZSeek32( lzfd, 0, SEEK_SET );
if ( sizeof(mzh) != LZRead32( lzfd, &mzh, sizeof(mzh) ) )
LZSeek( lzfd, 0, SEEK_SET );
if ( sizeof(mzh) != LZRead( lzfd, &mzh, sizeof(mzh) ) )
return 0;
if ( mzh.e_magic != IMAGE_DOS_SIGNATURE )
return 0;
LZSeek32( lzfd, mzh.e_lfanew, SEEK_SET );
if ( 2 != LZRead32( lzfd, magic, 2 ) )
LZSeek( lzfd, mzh.e_lfanew, SEEK_SET );
if ( 2 != LZRead( lzfd, magic, 2 ) )
return 0;
LZSeek32( lzfd, mzh.e_lfanew, SEEK_SET );
LZSeek( lzfd, mzh.e_lfanew, SEEK_SET );
if ( magic[0] == 'N' && magic[1] == 'E' )
return IMAGE_OS2_SIGNATURE;
@ -53,7 +53,7 @@ static int read_xx_header( HFILE32 lzfd )
/***********************************************************************
* load_ne_resource [internal]
*/
static BOOL32 find_ne_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
static BOOL find_ne_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid,
DWORD *resLen, DWORD *resOff )
{
IMAGE_OS2_HEADER nehd;
@ -64,8 +64,8 @@ static BOOL32 find_ne_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
DWORD resTabSize;
/* Read in NE header */
nehdoffset = LZSeek32( lzfd, 0, SEEK_CUR );
if ( sizeof(nehd) != LZRead32( lzfd, &nehd, sizeof(nehd) ) ) return 0;
nehdoffset = LZSeek( lzfd, 0, SEEK_CUR );
if ( sizeof(nehd) != LZRead( lzfd, &nehd, sizeof(nehd) ) ) return 0;
resTabSize = nehd.rname_tab_offset - nehd.resource_tab_offset;
if ( !resTabSize )
@ -78,8 +78,8 @@ static BOOL32 find_ne_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
resTab = HeapAlloc( GetProcessHeap(), 0, resTabSize );
if ( !resTab ) return FALSE;
LZSeek32( lzfd, nehd.resource_tab_offset + nehdoffset, SEEK_SET );
if ( resTabSize != LZRead32( lzfd, resTab, resTabSize ) )
LZSeek( lzfd, nehd.resource_tab_offset + nehdoffset, SEEK_SET );
if ( resTabSize != LZRead( lzfd, resTab, resTabSize ) )
{
HeapFree( GetProcessHeap(), 0, resTab );
return FALSE;
@ -113,7 +113,7 @@ static BOOL32 find_ne_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
/***********************************************************************
* load_pe_resource [internal]
*/
static BOOL32 find_pe_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
static BOOL find_pe_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid,
DWORD *resLen, DWORD *resOff )
{
IMAGE_NT_HEADERS pehd;
@ -129,8 +129,8 @@ static BOOL32 find_pe_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
/* Read in PE header */
pehdoffset = LZSeek32( lzfd, 0, SEEK_CUR );
if ( sizeof(pehd) != LZRead32( lzfd, &pehd, sizeof(pehd) ) ) return 0;
pehdoffset = LZSeek( lzfd, 0, SEEK_CUR );
if ( sizeof(pehd) != LZRead( lzfd, &pehd, sizeof(pehd) ) ) return 0;
resDataDir = pehd.OptionalHeader.DataDirectory+IMAGE_FILE_RESOURCE_DIRECTORY;
if ( !resDataDir->Size )
@ -145,13 +145,13 @@ static BOOL32 find_pe_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
nSections * sizeof(IMAGE_SECTION_HEADER) );
if ( !sections ) return FALSE;
LZSeek32( lzfd, pehdoffset +
LZSeek( lzfd, pehdoffset +
sizeof(DWORD) + /* Signature */
sizeof(IMAGE_FILE_HEADER) +
pehd.FileHeader.SizeOfOptionalHeader, SEEK_SET );
if ( nSections * sizeof(IMAGE_SECTION_HEADER) !=
LZRead32( lzfd, sections, nSections * sizeof(IMAGE_SECTION_HEADER) ) )
LZRead( lzfd, sections, nSections * sizeof(IMAGE_SECTION_HEADER) ) )
{
HeapFree( GetProcessHeap(), 0, sections );
return FALSE;
@ -180,8 +180,8 @@ static BOOL32 find_pe_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
return FALSE;
}
LZSeek32( lzfd, sections[i].PointerToRawData, SEEK_SET );
if ( resSectionSize != LZRead32( lzfd, resSection, resSectionSize ) )
LZSeek( lzfd, sections[i].PointerToRawData, SEEK_SET );
if ( resSectionSize != LZRead( lzfd, resSection, resSectionSize ) )
{
HeapFree( GetProcessHeap(), 0, resSection );
HeapFree( GetProcessHeap(), 0, sections );
@ -247,12 +247,12 @@ static BOOL32 find_pe_resource( HFILE32 lzfd, LPCSTR typeid, LPCSTR resid,
/***********************************************************************
* GetFileResourceSize32 [internal]
*/
DWORD WINAPI GetFileResourceSize32( LPCSTR lpszFileName,
DWORD WINAPI GetFileResourceSize( LPCSTR lpszFileName,
LPCSTR lpszResType, LPCSTR lpszResId,
LPDWORD lpdwFileOffset )
{
BOOL32 retv = FALSE;
HFILE32 lzfd;
BOOL retv = FALSE;
HFILE lzfd;
OFSTRUCT ofs;
DWORD reslen;
@ -260,7 +260,7 @@ DWORD WINAPI GetFileResourceSize32( LPCSTR lpszFileName,
debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId,
lpszResId );
lzfd = LZOpenFile32A( lpszFileName, &ofs, OF_READ );
lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
if ( !lzfd ) return 0;
switch ( read_xx_header( lzfd ) )
@ -276,20 +276,20 @@ DWORD WINAPI GetFileResourceSize32( LPCSTR lpszFileName,
break;
}
LZClose32( lzfd );
LZClose( lzfd );
return retv? reslen : 0;
}
/***********************************************************************
* GetFileResource32 [internal]
*/
DWORD WINAPI GetFileResource32( LPCSTR lpszFileName,
DWORD WINAPI GetFileResource( LPCSTR lpszFileName,
LPCSTR lpszResType, LPCSTR lpszResId,
DWORD dwFileOffset,
DWORD dwResLen, LPVOID lpvData )
{
BOOL32 retv = FALSE;
HFILE32 lzfd;
BOOL retv = FALSE;
HFILE lzfd;
OFSTRUCT ofs;
DWORD reslen = dwResLen;
@ -297,7 +297,7 @@ DWORD WINAPI GetFileResource32( LPCSTR lpszFileName,
debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId,
dwFileOffset, dwResLen, lpvData );
lzfd = LZOpenFile32A( lpszFileName, &ofs, OF_READ );
lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
if ( lzfd == 0 ) return 0;
if ( !dwFileOffset )
@ -317,14 +317,14 @@ DWORD WINAPI GetFileResource32( LPCSTR lpszFileName,
if ( !retv )
{
LZClose32( lzfd );
LZClose( lzfd );
return 0;
}
}
LZSeek32( lzfd, dwFileOffset, SEEK_SET );
reslen = LZRead32( lzfd, lpvData, min( reslen, dwResLen ) );
LZClose32( lzfd );
LZSeek( lzfd, dwFileOffset, SEEK_SET );
reslen = LZRead( lzfd, lpvData, min( reslen, dwResLen ) );
LZClose( lzfd );
return reslen;
}

View File

@ -95,7 +95,7 @@ ASPI_DebugPrintCmd(SRB_ExecSCSICmd16 *prb, UINT16 mode)
case ASPI_DOS:
/* translate real mode address */
if (prb->SRB_BufPointer)
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)prb->SRB_BufPointer);
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT)prb->SRB_BufPointer);
break;
case ASPI_WIN16:
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
@ -177,7 +177,7 @@ ASPI_DebugPrintResult(SRB_ExecSCSICmd16 *prb, UINT16 mode)
case ASPI_DOS:
/* translate real mode address */
if (prb->SRB_BufPointer)
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)prb->SRB_BufPointer);
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT)prb->SRB_BufPointer);
break;
case ASPI_WIN16:
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
@ -235,7 +235,7 @@ ASPI_ExecScsiCmd(DWORD ptrPRB, UINT16 mode)
case ASPI_DOS:
/* translate real mode address */
if (ptrPRB)
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)lpPRB->SRB_BufPointer);
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT)lpPRB->SRB_BufPointer);
break;
case ASPI_WIN16:
lpBuf = PTR_SEG_TO_LIN(lpPRB->SRB_BufPointer);

View File

@ -24,7 +24,7 @@
#ifdef linux
static int
ASPI_OpenDevice32(SRB_ExecSCSICmd32 *prb)
ASPI_OpenDevice(SRB_ExecSCSICmd *prb)
{
int fd;
char idstr[20];
@ -80,7 +80,7 @@ ASPI_OpenDevice32(SRB_ExecSCSICmd32 *prb)
static void
ASPI_DebugPrintCmd32(SRB_ExecSCSICmd32 *prb)
ASPI_DebugPrintCmd(SRB_ExecSCSICmd *prb)
{
BYTE cmd;
int i;
@ -137,7 +137,7 @@ ASPI_DebugPrintCmd32(SRB_ExecSCSICmd32 *prb)
}
static void
ASPI_PrintSenseArea32(SRB_ExecSCSICmd32 *prb)
ASPI_PrintSenseArea(SRB_ExecSCSICmd *prb)
{
int i;
BYTE *cdb;
@ -152,7 +152,7 @@ ASPI_PrintSenseArea32(SRB_ExecSCSICmd32 *prb)
}
static void
ASPI_DebugPrintResult32(SRB_ExecSCSICmd32 *prb)
ASPI_DebugPrintResult(SRB_ExecSCSICmd *prb)
{
switch (prb->CDBByte[0]) {
@ -160,13 +160,13 @@ ASPI_DebugPrintResult32(SRB_ExecSCSICmd32 *prb)
TRACE(aspi, "Vendor: '%s'\n", prb->SRB_BufPointer + INQUIRY_VENDOR);
break;
case CMD_TEST_UNIT_READY:
ASPI_PrintSenseArea32(prb);
ASPI_PrintSenseArea(prb);
break;
}
}
static WORD
ASPI_ExecScsiCmd32(SRB_ExecSCSICmd32 *lpPRB)
ASPI_ExecScsiCmd(SRB_ExecSCSICmd *lpPRB)
{
struct sg_header *sg_hd, *sg_reply_hdr;
int status;
@ -174,9 +174,9 @@ ASPI_ExecScsiCmd32(SRB_ExecSCSICmd32 *lpPRB)
int error_code = 0;
int fd;
ASPI_DebugPrintCmd32(lpPRB);
ASPI_DebugPrintCmd(lpPRB);
fd = ASPI_OpenDevice32(lpPRB);
fd = ASPI_OpenDevice(lpPRB);
if (fd == -1) {
ERR(aspi, "Failed: could not open device. Device permissions !?\n");
lpPRB->SRB_Status = SS_ERR;
@ -282,13 +282,13 @@ ASPI_ExecScsiCmd32(SRB_ExecSCSICmd32 *lpPRB)
}
else
if (lpPRB->SRB_Flags & SRB_EVENT_NOTIFY) {
TRACE(aspi, "Setting event %04x\n", (HANDLE32)lpPRB->SRB_PostProc);
SetEvent((HANDLE32)lpPRB->SRB_PostProc); /* FIXME: correct ? */
TRACE(aspi, "Setting event %04x\n", (HANDLE)lpPRB->SRB_PostProc);
SetEvent((HANDLE)lpPRB->SRB_PostProc); /* FIXME: correct ? */
}
}
free(sg_reply_hdr);
free(sg_hd);
ASPI_DebugPrintResult32(lpPRB);
ASPI_DebugPrintResult(lpPRB);
return SS_COMP;
error_exit:
@ -322,7 +322,7 @@ error_exit:
* HIBYTE of LOWORD: status (SS_COMP or SS_FAILED_INIT)
* LOBYTE of LOWORD: # of host adapters.
*/
DWORD WINAPI GetASPI32SupportInfo32()
DWORD WINAPI GetASPI32SupportInfo()
{
return ((SS_COMP << 8) | 1); /* FIXME: get # of host adapters installed */
}
@ -331,7 +331,7 @@ DWORD WINAPI GetASPI32SupportInfo32()
/***********************************************************************
* SendASPI32Command32 (WNASPI32.1)
*/
DWORD __cdecl SendASPI32Command32(LPSRB32 lpSRB)
DWORD __cdecl SendASPI32Command(LPSRB lpSRB)
{
#ifdef linux
switch (lpSRB->common.SRB_Cmd) {
@ -349,7 +349,7 @@ DWORD __cdecl SendASPI32Command32(LPSRB32 lpSRB)
FIXME(aspi, "Not implemented SC_GET_DEV_TYPE\n");
break;
case SC_EXEC_SCSI_CMD:
return ASPI_ExecScsiCmd32(&lpSRB->cmd);
return ASPI_ExecScsiCmd(&lpSRB->cmd);
break;
case SC_RESET_DEV:
FIXME(aspi, "Not implemented SC_RESET_DEV\n");
@ -368,7 +368,7 @@ DWORD __cdecl SendASPI32Command32(LPSRB32 lpSRB)
* GetASPI32DLLVersion32 (WNASPI32.3)
*/
DWORD WINAPI GetASPI32DLLVersion32()
DWORD WINAPI GetASPI32DLLVersion()
{
#ifdef linux
return (DWORD)1;

View File

@ -95,7 +95,7 @@ HANDLER_DEF(ASYNC_sigio) {
*
* Makes the passed filedescriptor async (or not) depending on flag.
*/
static BOOL32 ASYNC_MakeFDAsync(int unixfd,int async) {
static BOOL ASYNC_MakeFDAsync(int unixfd,int async) {
int flags;
#if !defined(FASYNC) && defined(FIOASYNC)

View File

@ -27,8 +27,8 @@ typedef struct
/****************************************************************************
* FindFirstChangeNotification32A (KERNEL32.248)
*/
HANDLE32 WINAPI FindFirstChangeNotification32A( LPCSTR lpPathName,
BOOL32 bWatchSubtree,
HANDLE WINAPI FindFirstChangeNotificationA( LPCSTR lpPathName,
BOOL bWatchSubtree,
DWORD dwNotifyFilter )
{
CHANGE_OBJECT *change;
@ -39,13 +39,13 @@ HANDLE32 WINAPI FindFirstChangeNotification32A( LPCSTR lpPathName,
req.filter = dwNotifyFilter;
CLIENT_SendRequest( REQ_CREATE_CHANGE_NOTIFICATION, -1, 1, &req, sizeof(req) );
CLIENT_WaitSimpleReply( &reply, sizeof(reply), NULL );
if (reply.handle == -1) return INVALID_HANDLE_VALUE32;
if (reply.handle == -1) return INVALID_HANDLE_VALUE;
change = HeapAlloc( SystemHeap, 0, sizeof(CHANGE_OBJECT) );
if (!change)
{
CLIENT_CloseHandle( reply.handle );
return INVALID_HANDLE_VALUE32;
return INVALID_HANDLE_VALUE;
}
change->header.type = K32OBJ_CHANGE;
change->header.refcount = 1;
@ -57,12 +57,12 @@ HANDLE32 WINAPI FindFirstChangeNotification32A( LPCSTR lpPathName,
/****************************************************************************
* FindFirstChangeNotification32W (KERNEL32.249)
*/
HANDLE32 WINAPI FindFirstChangeNotification32W( LPCWSTR lpPathName,
BOOL32 bWatchSubtree,
HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName,
BOOL bWatchSubtree,
DWORD dwNotifyFilter)
{
LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpPathName );
HANDLE32 ret = FindFirstChangeNotification32A( nameA, bWatchSubtree,
HANDLE ret = FindFirstChangeNotificationA( nameA, bWatchSubtree,
dwNotifyFilter );
if (nameA) HeapFree( GetProcessHeap(), 0, nameA );
return ret;
@ -71,7 +71,7 @@ HANDLE32 WINAPI FindFirstChangeNotification32W( LPCWSTR lpPathName,
/****************************************************************************
* FindNextChangeNotification (KERNEL32.252)
*/
BOOL32 WINAPI FindNextChangeNotification( HANDLE32 handle )
BOOL WINAPI FindNextChangeNotification( HANDLE handle )
{
if (HANDLE_GetServerHandle( PROCESS_Current(), handle,
K32OBJ_FILE, 0 ) == -1)
@ -83,7 +83,7 @@ BOOL32 WINAPI FindNextChangeNotification( HANDLE32 handle )
/****************************************************************************
* FindCloseChangeNotification (KERNEL32.247)
*/
BOOL32 WINAPI FindCloseChangeNotification( HANDLE32 handle)
BOOL WINAPI FindCloseChangeNotification( HANDLE handle)
{
return CloseHandle( handle );
}

View File

@ -110,11 +110,11 @@ int DIR_Init(void)
/* Set the environment variables */
SetEnvironmentVariable32A( "PATH", path );
SetEnvironmentVariable32A( "COMSPEC", "c:\\command.com" );
SetEnvironmentVariable32A( "TEMP", tmp_dir.short_name );
SetEnvironmentVariable32A( "windir", DIR_Windows.short_name );
SetEnvironmentVariable32A( "winsysdir", DIR_System.short_name );
SetEnvironmentVariableA( "PATH", path );
SetEnvironmentVariableA( "COMSPEC", "c:\\command.com" );
SetEnvironmentVariableA( "TEMP", tmp_dir.short_name );
SetEnvironmentVariableA( "windir", DIR_Windows.short_name );
SetEnvironmentVariableA( "winsysdir", DIR_System.short_name );
TRACE(dosfs, "WindowsDir = %s (%s)\n",
DIR_Windows.short_name, DIR_Windows.long_name );
@ -133,12 +133,12 @@ int DIR_Init(void)
/***********************************************************************
* GetTempPath32A (KERNEL32.292)
*/
UINT32 WINAPI GetTempPath32A( UINT32 count, LPSTR path )
UINT WINAPI GetTempPathA( UINT count, LPSTR path )
{
UINT32 ret;
if (!(ret = GetEnvironmentVariable32A( "TMP", path, count )))
if (!(ret = GetEnvironmentVariable32A( "TEMP", path, count )))
if (!(ret = GetCurrentDirectory32A( count, path )))
UINT ret;
if (!(ret = GetEnvironmentVariableA( "TMP", path, count )))
if (!(ret = GetEnvironmentVariableA( "TEMP", path, count )))
if (!(ret = GetCurrentDirectoryA( count, path )))
return 0;
if (count && (ret < count - 1) && (path[ret-1] != '\\'))
{
@ -152,14 +152,14 @@ UINT32 WINAPI GetTempPath32A( UINT32 count, LPSTR path )
/***********************************************************************
* GetTempPath32W (KERNEL32.293)
*/
UINT32 WINAPI GetTempPath32W( UINT32 count, LPWSTR path )
UINT WINAPI GetTempPathW( UINT count, LPWSTR path )
{
static const WCHAR tmp[] = { 'T', 'M', 'P', 0 };
static const WCHAR temp[] = { 'T', 'E', 'M', 'P', 0 };
UINT32 ret;
if (!(ret = GetEnvironmentVariable32W( tmp, path, count )))
if (!(ret = GetEnvironmentVariable32W( temp, path, count )))
if (!(ret = GetCurrentDirectory32W( count, path )))
UINT ret;
if (!(ret = GetEnvironmentVariableW( tmp, path, count )))
if (!(ret = GetEnvironmentVariableW( temp, path, count )))
if (!(ret = GetCurrentDirectoryW( count, path )))
return 0;
if (count && (ret < count - 1) && (path[ret-1] != '\\'))
{
@ -173,9 +173,9 @@ UINT32 WINAPI GetTempPath32W( UINT32 count, LPWSTR path )
/***********************************************************************
* DIR_GetWindowsUnixDir
*/
UINT32 DIR_GetWindowsUnixDir( LPSTR path, UINT32 count )
UINT DIR_GetWindowsUnixDir( LPSTR path, UINT count )
{
if (path) lstrcpyn32A( path, DIR_Windows.long_name, count );
if (path) lstrcpynA( path, DIR_Windows.long_name, count );
return strlen( DIR_Windows.long_name );
}
@ -183,9 +183,9 @@ UINT32 DIR_GetWindowsUnixDir( LPSTR path, UINT32 count )
/***********************************************************************
* DIR_GetSystemUnixDir
*/
UINT32 DIR_GetSystemUnixDir( LPSTR path, UINT32 count )
UINT DIR_GetSystemUnixDir( LPSTR path, UINT count )
{
if (path) lstrcpyn32A( path, DIR_System.long_name, count );
if (path) lstrcpynA( path, DIR_System.long_name, count );
return strlen( DIR_System.long_name );
}
@ -197,20 +197,20 @@ BYTE WINAPI GetTempDrive( BYTE ignored )
{
char *buffer;
BYTE ret;
UINT32 len = GetTempPath32A( 0, NULL );
UINT len = GetTempPathA( 0, NULL );
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len + 1 )) )
return DRIVE_GetCurrentDrive() + 'A';
/* FIXME: apparently Windows does something with the ignored byte */
if (!GetTempPath32A( len, buffer )) buffer[0] = 'C';
if (!GetTempPathA( len, buffer )) buffer[0] = 'C';
ret = buffer[0];
HeapFree( GetProcessHeap(), 0, buffer );
return toupper(ret);
}
UINT32 WINAPI WIN16_GetTempDrive( BYTE ignored )
UINT WINAPI WIN16_GetTempDrive( BYTE ignored )
{
/* A closer look at krnl386.exe shows what the SDK doesn't mention:
*
@ -229,16 +229,16 @@ UINT32 WINAPI WIN16_GetTempDrive( BYTE ignored )
*/
UINT16 WINAPI GetWindowsDirectory16( LPSTR path, UINT16 count )
{
return (UINT16)GetWindowsDirectory32A( path, count );
return (UINT16)GetWindowsDirectoryA( path, count );
}
/***********************************************************************
* GetWindowsDirectory32A (KERNEL32.311)
*/
UINT32 WINAPI GetWindowsDirectory32A( LPSTR path, UINT32 count )
UINT WINAPI GetWindowsDirectoryA( LPSTR path, UINT count )
{
if (path) lstrcpyn32A( path, DIR_Windows.short_name, count );
if (path) lstrcpynA( path, DIR_Windows.short_name, count );
return strlen( DIR_Windows.short_name );
}
@ -246,7 +246,7 @@ UINT32 WINAPI GetWindowsDirectory32A( LPSTR path, UINT32 count )
/***********************************************************************
* GetWindowsDirectory32W (KERNEL32.312)
*/
UINT32 WINAPI GetWindowsDirectory32W( LPWSTR path, UINT32 count )
UINT WINAPI GetWindowsDirectoryW( LPWSTR path, UINT count )
{
if (path) lstrcpynAtoW( path, DIR_Windows.short_name, count );
return strlen( DIR_Windows.short_name );
@ -258,16 +258,16 @@ UINT32 WINAPI GetWindowsDirectory32W( LPWSTR path, UINT32 count )
*/
UINT16 WINAPI GetSystemDirectory16( LPSTR path, UINT16 count )
{
return (UINT16)GetSystemDirectory32A( path, count );
return (UINT16)GetSystemDirectoryA( path, count );
}
/***********************************************************************
* GetSystemDirectory32A (KERNEL32.282)
*/
UINT32 WINAPI GetSystemDirectory32A( LPSTR path, UINT32 count )
UINT WINAPI GetSystemDirectoryA( LPSTR path, UINT count )
{
if (path) lstrcpyn32A( path, DIR_System.short_name, count );
if (path) lstrcpynA( path, DIR_System.short_name, count );
return strlen( DIR_System.short_name );
}
@ -275,7 +275,7 @@ UINT32 WINAPI GetSystemDirectory32A( LPSTR path, UINT32 count )
/***********************************************************************
* GetSystemDirectory32W (KERNEL32.283)
*/
UINT32 WINAPI GetSystemDirectory32W( LPWSTR path, UINT32 count )
UINT WINAPI GetSystemDirectoryW( LPWSTR path, UINT count )
{
if (path) lstrcpynAtoW( path, DIR_System.short_name, count );
return strlen( DIR_System.short_name );
@ -288,14 +288,14 @@ UINT32 WINAPI GetSystemDirectory32W( LPWSTR path, UINT32 count )
BOOL16 WINAPI CreateDirectory16( LPCSTR path, LPVOID dummy )
{
TRACE(file,"(%s,%p)\n", path, dummy );
return (BOOL16)CreateDirectory32A( path, NULL );
return (BOOL16)CreateDirectoryA( path, NULL );
}
/***********************************************************************
* CreateDirectory32A (KERNEL32.39)
*/
BOOL32 WINAPI CreateDirectory32A( LPCSTR path,
BOOL WINAPI CreateDirectoryA( LPCSTR path,
LPSECURITY_ATTRIBUTES lpsecattribs )
{
DOS_FULL_NAME full_name;
@ -321,11 +321,11 @@ BOOL32 WINAPI CreateDirectory32A( LPCSTR path,
/***********************************************************************
* CreateDirectory32W (KERNEL32.42)
*/
BOOL32 WINAPI CreateDirectory32W( LPCWSTR path,
BOOL WINAPI CreateDirectoryW( LPCWSTR path,
LPSECURITY_ATTRIBUTES lpsecattribs )
{
LPSTR xpath = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
BOOL32 ret = CreateDirectory32A( xpath, lpsecattribs );
BOOL ret = CreateDirectoryA( xpath, lpsecattribs );
HeapFree( GetProcessHeap(), 0, xpath );
return ret;
}
@ -334,20 +334,20 @@ BOOL32 WINAPI CreateDirectory32W( LPCWSTR path,
/***********************************************************************
* CreateDirectoryEx32A (KERNEL32.40)
*/
BOOL32 WINAPI CreateDirectoryEx32A( LPCSTR template, LPCSTR path,
BOOL WINAPI CreateDirectoryExA( LPCSTR template, LPCSTR path,
LPSECURITY_ATTRIBUTES lpsecattribs)
{
return CreateDirectory32A(path,lpsecattribs);
return CreateDirectoryA(path,lpsecattribs);
}
/***********************************************************************
* CreateDirectoryEx32W (KERNEL32.41)
*/
BOOL32 WINAPI CreateDirectoryEx32W( LPCWSTR template, LPCWSTR path,
BOOL WINAPI CreateDirectoryExW( LPCWSTR template, LPCWSTR path,
LPSECURITY_ATTRIBUTES lpsecattribs)
{
return CreateDirectory32W(path,lpsecattribs);
return CreateDirectoryW(path,lpsecattribs);
}
@ -356,14 +356,14 @@ BOOL32 WINAPI CreateDirectoryEx32W( LPCWSTR template, LPCWSTR path,
*/
BOOL16 WINAPI RemoveDirectory16( LPCSTR path )
{
return (BOOL16)RemoveDirectory32A( path );
return (BOOL16)RemoveDirectoryA( path );
}
/***********************************************************************
* RemoveDirectory32A (KERNEL32.437)
*/
BOOL32 WINAPI RemoveDirectory32A( LPCSTR path )
BOOL WINAPI RemoveDirectoryA( LPCSTR path )
{
DOS_FULL_NAME full_name;
@ -388,10 +388,10 @@ BOOL32 WINAPI RemoveDirectory32A( LPCSTR path )
/***********************************************************************
* RemoveDirectory32W (KERNEL32.438)
*/
BOOL32 WINAPI RemoveDirectory32W( LPCWSTR path )
BOOL WINAPI RemoveDirectoryW( LPCWSTR path )
{
LPSTR xpath = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
BOOL32 ret = RemoveDirectory32A( xpath );
BOOL ret = RemoveDirectoryA( xpath );
HeapFree( GetProcessHeap(), 0, xpath );
return ret;
}
@ -402,7 +402,7 @@ BOOL32 WINAPI RemoveDirectory32W( LPCWSTR path )
*
* Helper function for DIR_SearchPath.
*/
static BOOL32 DIR_TryPath( const DOS_FULL_NAME *dir, LPCSTR name,
static BOOL DIR_TryPath( const DOS_FULL_NAME *dir, LPCSTR name,
DOS_FULL_NAME *full_name )
{
LPSTR p_l = full_name->long_name + strlen(dir->long_name) + 1;
@ -431,16 +431,16 @@ static BOOL32 DIR_TryPath( const DOS_FULL_NAME *dir, LPCSTR name,
*
* Helper function for DIR_SearchPath.
*/
static BOOL32 DIR_TryEnvironmentPath( LPCSTR name, DOS_FULL_NAME *full_name )
static BOOL DIR_TryEnvironmentPath( LPCSTR name, DOS_FULL_NAME *full_name )
{
LPSTR path, next, buffer;
BOOL32 ret = FALSE;
INT32 len = strlen(name);
DWORD size = GetEnvironmentVariable32A( "PATH", NULL, 0 );
BOOL ret = FALSE;
INT len = strlen(name);
DWORD size = GetEnvironmentVariableA( "PATH", NULL, 0 );
if (!size) return FALSE;
if (!(path = HeapAlloc( GetProcessHeap(), 0, size ))) return FALSE;
if (!GetEnvironmentVariable32A( "PATH", path, size )) goto done;
if (!GetEnvironmentVariableA( "PATH", path, size )) goto done;
next = path;
while (!ret && next)
{
@ -469,9 +469,9 @@ done:
*
* Helper function for DIR_SearchPath.
*/
static BOOL32 DIR_TryModulePath( LPCSTR name, DOS_FULL_NAME *full_name )
static BOOL DIR_TryModulePath( LPCSTR name, DOS_FULL_NAME *full_name )
{
PDB32 *pdb = PROCESS_Current();
PDB *pdb = PROCESS_Current();
/* FIXME: for now, GetModuleFileName32A can't return more */
/* than OFS_MAXPATHNAME. This may change with Win32. */
@ -484,7 +484,7 @@ static BOOL32 DIR_TryModulePath( LPCSTR name, DOS_FULL_NAME *full_name )
if (!GetModuleFileName16( GetCurrentTask(), buffer, sizeof(buffer) ))
buffer[0]='\0';
} else {
if (!GetModuleFileName32A( 0, buffer, sizeof(buffer) ))
if (!GetModuleFileNameA( 0, buffer, sizeof(buffer) ))
buffer[0]='\0';
}
if (!(p = strrchr( buffer, '\\' ))) return FALSE;
@ -503,12 +503,12 @@ static BOOL32 DIR_TryModulePath( LPCSTR name, DOS_FULL_NAME *full_name )
* FIXME: should return long path names.
*/
DWORD DIR_SearchPath( LPCSTR path, LPCSTR name, LPCSTR ext,
DOS_FULL_NAME *full_name, BOOL32 win32 )
DOS_FULL_NAME *full_name, BOOL win32 )
{
DWORD len;
LPCSTR p;
LPSTR tmp = NULL;
BOOL32 ret = TRUE;
BOOL ret = TRUE;
/* First check the supplied parameters */
@ -612,20 +612,20 @@ done:
* NOTES
* Should call SetLastError(but currently doesn't).
*/
DWORD WINAPI SearchPath32A( LPCSTR path, LPCSTR name, LPCSTR ext, DWORD buflen,
DWORD WINAPI SearchPathA( LPCSTR path, LPCSTR name, LPCSTR ext, DWORD buflen,
LPSTR buffer, LPSTR *lastpart )
{
LPSTR p, res;
DOS_FULL_NAME full_name;
if (!DIR_SearchPath( path, name, ext, &full_name, TRUE )) return 0;
lstrcpyn32A( buffer, full_name.short_name, buflen );
lstrcpynA( buffer, full_name.short_name, buflen );
res = full_name.long_name +
strlen(DRIVE_GetRoot( full_name.short_name[0] - 'A' ));
while (*res == '/') res++;
if (buflen)
{
if (buflen > 3) lstrcpyn32A( buffer + 3, res, buflen - 3 );
if (buflen > 3) lstrcpynA( buffer + 3, res, buflen - 3 );
for (p = buffer; *p; p++) if (*p == '/') *p = '\\';
if (lastpart) *lastpart = strrchr( buffer, '\\' ) + 1;
}
@ -637,7 +637,7 @@ DWORD WINAPI SearchPath32A( LPCSTR path, LPCSTR name, LPCSTR ext, DWORD buflen,
/***********************************************************************
* SearchPath32W (KERNEL32.448)
*/
DWORD WINAPI SearchPath32W( LPCWSTR path, LPCWSTR name, LPCWSTR ext,
DWORD WINAPI SearchPathW( LPCWSTR path, LPCWSTR name, LPCWSTR ext,
DWORD buflen, LPWSTR buffer, LPWSTR *lastpart )
{
LPWSTR p;

View File

@ -152,7 +152,7 @@ static int DOSFS_ValidDOSName( const char *name, int ignore_case )
* Return FALSE if the name is not a valid DOS name.
* 'buffer' must be at least 12 characters long.
*/
BOOL32 DOSFS_ToDosFCBFormat( LPCSTR name, LPSTR buffer )
BOOL DOSFS_ToDosFCBFormat( LPCSTR name, LPSTR buffer )
{
static const char invalid_chars[] = INVALID_DOS_CHARS;
const char *p = name;
@ -371,7 +371,7 @@ static void DOSFS_CloseDir( DOS_DIR *dir )
/***********************************************************************
* DOSFS_ReadDir
*/
static BOOL32 DOSFS_ReadDir( DOS_DIR *dir, LPCSTR *long_name,
static BOOL DOSFS_ReadDir( DOS_DIR *dir, LPCSTR *long_name,
LPCSTR *short_name )
{
struct dirent *dirent;
@ -407,8 +407,8 @@ static BOOL32 DOSFS_ReadDir( DOS_DIR *dir, LPCSTR *long_name,
* File name can be terminated by '\0', '\\' or '/'.
* 'buffer' must be at least 13 characters long.
*/
static void DOSFS_Hash( LPCSTR name, LPSTR buffer, BOOL32 dir_format,
BOOL32 ignore_case )
static void DOSFS_Hash( LPCSTR name, LPSTR buffer, BOOL dir_format,
BOOL ignore_case )
{
static const char invalid_chars[] = INVALID_DOS_CHARS "~.";
static const char hash_chars[32] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345";
@ -505,13 +505,13 @@ static void DOSFS_Hash( LPCSTR name, LPSTR buffer, BOOL32 dir_format,
* turns out to be larger than that, the function returns FALSE.
* 'short_buf' must be at least 13 characters long.
*/
BOOL32 DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
INT32 long_len, LPSTR short_buf, BOOL32 ignore_case)
BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
INT long_len, LPSTR short_buf, BOOL ignore_case)
{
DOS_DIR *dir;
LPCSTR long_name, short_name;
char dos_name[12], tmp_buf[13];
BOOL32 ret;
BOOL ret;
const char *p = strchr( name, '/' );
int len = p ? (int)(p - name) : strlen(name);
@ -536,11 +536,11 @@ BOOL32 DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
{
if (!ignore_case)
{
if (!lstrncmp32A( long_name, name, len )) break;
if (!lstrncmpA( long_name, name, len )) break;
}
else
{
if (!lstrncmpi32A( long_name, name, len )) break;
if (!lstrncmpiA( long_name, name, len )) break;
}
}
if (dos_name[0])
@ -591,7 +591,7 @@ const DOS_DEVICE *DOSFS_GetDevice( const char *name )
for (i = 0; i < sizeof(DOSFS_Devices)/sizeof(DOSFS_Devices[0]); i++)
{
const char *dev = DOSFS_Devices[i].name;
if (!lstrncmpi32A( dev, name, strlen(dev) ))
if (!lstrncmpiA( dev, name, strlen(dev) ))
{
p = name + strlen( dev );
if (!*p || (*p == '.')) return &DOSFS_Devices[i];
@ -604,7 +604,7 @@ const DOS_DEVICE *DOSFS_GetDevice( const char *name )
/***********************************************************************
* DOSFS_GetDeviceByHandle
*/
const DOS_DEVICE *DOSFS_GetDeviceByHandle( HFILE32 hFile )
const DOS_DEVICE *DOSFS_GetDeviceByHandle( HFILE hFile )
{
struct get_file_info_request req;
struct get_file_info_reply reply;
@ -629,19 +629,19 @@ const DOS_DEVICE *DOSFS_GetDeviceByHandle( HFILE32 hFile )
*
* Open a DOS device. This might not map 1:1 into the UNIX device concept.
*/
HFILE32 DOSFS_OpenDevice( const char *name, DWORD access )
HFILE DOSFS_OpenDevice( const char *name, DWORD access )
{
int i;
const char *p;
if (!name) return (HFILE32)NULL; /* if FILE_DupUnixHandle was used */
if (!name) return (HFILE)NULL; /* if FILE_DupUnixHandle was used */
if (name[0] && (name[1] == ':')) name += 2;
if ((p = strrchr( name, '/' ))) name = p + 1;
if ((p = strrchr( name, '\\' ))) name = p + 1;
for (i = 0; i < sizeof(DOSFS_Devices)/sizeof(DOSFS_Devices[0]); i++)
{
const char *dev = DOSFS_Devices[i].name;
if (!lstrncmpi32A( dev, name, strlen(dev) ))
if (!lstrncmpiA( dev, name, strlen(dev) ))
{
p = name + strlen( dev );
if (!*p || (*p == '.')) {
@ -651,8 +651,8 @@ HFILE32 DOSFS_OpenDevice( const char *name, DWORD access )
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, -1 );
if (!strcmp(DOSFS_Devices[i].name,"CON")) {
HFILE32 to_dup;
HFILE32 handle;
HFILE to_dup;
HFILE handle;
switch (access & (GENERIC_READ|GENERIC_WRITE)) {
case GENERIC_READ:
to_dup = GetStdHandle( STD_INPUT_HANDLE );
@ -662,12 +662,12 @@ HFILE32 DOSFS_OpenDevice( const char *name, DWORD access )
break;
default:
FIXME(dosfs,"can't open CON read/write\n");
return HFILE_ERROR32;
return HFILE_ERROR;
break;
}
if (!DuplicateHandle( GetCurrentProcess(), to_dup, GetCurrentProcess(),
&handle, 0, FALSE, DUPLICATE_SAME_ACCESS ))
handle = HFILE_ERROR32;
handle = HFILE_ERROR;
return handle;
}
if (!strcmp(DOSFS_Devices[i].name,"SCSIMGR$") ||
@ -676,11 +676,11 @@ HFILE32 DOSFS_OpenDevice( const char *name, DWORD access )
return FILE_CreateDevice( i, access, NULL );
}
FIXME(dosfs,"device open %s not supported (yet)\n",DOSFS_Devices[i].name);
return HFILE_ERROR32;
return HFILE_ERROR;
}
}
}
return HFILE_ERROR32;
return HFILE_ERROR;
}
@ -729,10 +729,10 @@ static int DOSFS_GetPathDrive( const char **name )
* The buffers pointed to by 'long_buf' and 'short_buf' must be
* at least MAX_PATHNAME_LEN long.
*/
BOOL32 DOSFS_GetFullName( LPCSTR name, BOOL32 check_last, DOS_FULL_NAME *full )
BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last, DOS_FULL_NAME *full )
{
BOOL32 found;
UINT32 flags;
BOOL found;
UINT flags;
char *p_l, *p_s, *root;
TRACE(dosfs, "%s (last=%d)\n",
@ -741,7 +741,7 @@ BOOL32 DOSFS_GetFullName( LPCSTR name, BOOL32 check_last, DOS_FULL_NAME *full )
if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE;
flags = DRIVE_GetFlags( full->drive );
lstrcpyn32A( full->long_name, DRIVE_GetRoot( full->drive ),
lstrcpynA( full->long_name, DRIVE_GetRoot( full->drive ),
sizeof(full->long_name) );
if (full->long_name[1]) root = full->long_name + strlen(full->long_name);
else root = full->long_name; /* root directory */
@ -755,10 +755,10 @@ BOOL32 DOSFS_GetFullName( LPCSTR name, BOOL32 check_last, DOS_FULL_NAME *full )
}
else /* Relative path */
{
lstrcpyn32A( root + 1, DRIVE_GetUnixCwd( full->drive ),
lstrcpynA( root + 1, DRIVE_GetUnixCwd( full->drive ),
sizeof(full->long_name) - (root - full->long_name) - 1 );
if (root[1]) *root = '/';
lstrcpyn32A( full->short_name + 3, DRIVE_GetDosCwd( full->drive ),
lstrcpynA( full->short_name + 3, DRIVE_GetDosCwd( full->drive ),
sizeof(full->short_name) - 3 );
}
@ -862,7 +862,7 @@ BOOL32 DOSFS_GetFullName( LPCSTR name, BOOL32 check_last, DOS_FULL_NAME *full )
* longpath=NULL: LastError=ERROR_INVALID_PARAMETER, ret=0
* *longpath="" or invalid: LastError=ERROR_BAD_PATHNAME, ret=0
*/
DWORD WINAPI GetShortPathName32A( LPCSTR longpath, LPSTR shortpath,
DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath,
DWORD shortlen )
{
DOS_FULL_NAME full_name;
@ -885,7 +885,7 @@ DWORD WINAPI GetShortPathName32A( LPCSTR longpath, LPSTR shortpath,
SetLastError(ERROR_BAD_PATHNAME);
return 0;
}
lstrcpyn32A( shortpath, full_name.short_name, shortlen );
lstrcpynA( shortpath, full_name.short_name, shortlen );
return strlen( full_name.short_name );
}
@ -893,7 +893,7 @@ DWORD WINAPI GetShortPathName32A( LPCSTR longpath, LPSTR shortpath,
/***********************************************************************
* GetShortPathName32W (KERNEL32.272)
*/
DWORD WINAPI GetShortPathName32W( LPCWSTR longpath, LPWSTR shortpath,
DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath,
DWORD shortlen )
{
DOS_FULL_NAME full_name;
@ -929,7 +929,7 @@ DWORD WINAPI GetShortPathName32W( LPCWSTR longpath, LPWSTR shortpath,
/***********************************************************************
* GetLongPathName32A (KERNEL32.xxx)
*/
DWORD WINAPI GetLongPathName32A( LPCSTR shortpath, LPSTR longpath,
DWORD WINAPI GetLongPathNameA( LPCSTR shortpath, LPSTR longpath,
DWORD longlen )
{
DOS_FULL_NAME full_name;
@ -938,7 +938,7 @@ DWORD WINAPI GetLongPathName32A( LPCSTR shortpath, LPSTR longpath,
DWORD shortpathlen;
if (!DOSFS_GetFullName( shortpath, TRUE, &full_name )) return 0;
lstrcpyn32A( longpath, full_name.short_name, longlen );
lstrcpynA( longpath, full_name.short_name, longlen );
/* Do some hackery to get the long filename.
* FIXME: Would be better if it returned the
* long version of the directories too
@ -948,7 +948,7 @@ DWORD WINAPI GetLongPathName32A( LPCSTR shortpath, LPSTR longpath,
if ((p = strrchr( longpath, '\\' )) != NULL) {
p++;
longlen -= (p-longpath);
lstrcpyn32A( p, longfilename , longlen);
lstrcpynA( p, longfilename , longlen);
}
}
shortpathlen =
@ -960,7 +960,7 @@ DWORD WINAPI GetLongPathName32A( LPCSTR shortpath, LPSTR longpath,
/***********************************************************************
* GetLongPathName32W (KERNEL32.269)
*/
DWORD WINAPI GetLongPathName32W( LPCWSTR shortpath, LPWSTR longpath,
DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath,
DWORD longlen )
{
DOS_FULL_NAME full_name;
@ -984,7 +984,7 @@ DWORD WINAPI GetLongPathName32W( LPCWSTR shortpath, LPWSTR longpath,
* Implementation of GetFullPathName32A/W.
*/
static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
BOOL32 unicode )
BOOL unicode )
{
char buffer[MAX_PATHNAME_LEN];
int drive;
@ -1013,7 +1013,7 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
else /* Relative path or empty path */
{
*p++ = '\\';
lstrcpyn32A( p, DRIVE_GetDosCwd(drive), sizeof(buffer) - 4 );
lstrcpynA( p, DRIVE_GetDosCwd(drive), sizeof(buffer) - 4 );
if ( *p )
{
p += strlen(p);
@ -1059,12 +1059,12 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
*p = '\0';
if (!(DRIVE_GetFlags(drive) & DRIVE_CASE_PRESERVING))
CharUpper32A( buffer );
CharUpperA( buffer );
if (unicode)
lstrcpynAtoW( (LPWSTR)result, buffer, len );
else
lstrcpyn32A( result, buffer, len );
lstrcpynA( result, buffer, len );
TRACE(dosfs, "returning '%s'\n", buffer );
@ -1085,7 +1085,7 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
* NOTES
* if the path closed with '\', *lastpart is 0
*/
DWORD WINAPI GetFullPathName32A( LPCSTR name, DWORD len, LPSTR buffer,
DWORD WINAPI GetFullPathNameA( LPCSTR name, DWORD len, LPSTR buffer,
LPSTR *lastpart )
{
DWORD ret = DOSFS_DoGetFullPathName( name, len, buffer, FALSE );
@ -1107,7 +1107,7 @@ DWORD WINAPI GetFullPathName32A( LPCSTR name, DWORD len, LPSTR buffer,
/***********************************************************************
* GetFullPathName32W (KERNEL32.273)
*/
DWORD WINAPI GetFullPathName32W( LPCWSTR name, DWORD len, LPWSTR buffer,
DWORD WINAPI GetFullPathNameW( LPCWSTR name, DWORD len, LPWSTR buffer,
LPWSTR *lastpart )
{
LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
@ -1115,7 +1115,7 @@ DWORD WINAPI GetFullPathName32W( LPCWSTR name, DWORD len, LPWSTR buffer,
HeapFree( GetProcessHeap(), 0, nameA );
if (ret && lastpart)
{
LPWSTR p = buffer + lstrlen32W(buffer);
LPWSTR p = buffer + lstrlenW(buffer);
if (*p != (WCHAR)'\\')
{
while ((p > buffer + 2) && (*p != (WCHAR)'\\')) p--;
@ -1129,10 +1129,10 @@ DWORD WINAPI GetFullPathName32W( LPCWSTR name, DWORD len, LPWSTR buffer,
/***********************************************************************
* DOSFS_FindNextEx
*/
static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATA32A *entry )
static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAA *entry )
{
BYTE attr = info->attr | FA_UNUSED | FA_ARCHIVE | FA_RDONLY;
UINT32 flags = DRIVE_GetFlags( info->drive );
UINT flags = DRIVE_GetFlags( info->drive );
char *p, buffer[MAX_PATHNAME_LEN];
const char *drive_path;
int drive_root;
@ -1161,7 +1161,7 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATA32A *entry )
while ((*drive_path == '/') || (*drive_path == '\\')) drive_path++;
drive_root = !*drive_path;
lstrcpyn32A( buffer, info->path, sizeof(buffer) - 1 );
lstrcpynA( buffer, info->path, sizeof(buffer) - 1 );
strcat( buffer, "/" );
p = buffer + strlen(buffer);
@ -1197,7 +1197,7 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATA32A *entry )
/* Check the file attributes */
lstrcpyn32A( p, long_name, sizeof(buffer) - (int)(p - buffer) );
lstrcpynA( p, long_name, sizeof(buffer) - (int)(p - buffer) );
if (!FILE_Stat( buffer, &fileinfo ))
{
WARN(dosfs, "can't stat %s\n", buffer);
@ -1220,8 +1220,8 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATA32A *entry )
DOSFS_Hash( long_name, entry->cAlternateFileName, FALSE,
!(flags & DRIVE_CASE_SENSITIVE) );
lstrcpyn32A( entry->cFileName, long_name, sizeof(entry->cFileName) );
if (!(flags & DRIVE_CASE_PRESERVING)) CharLower32A( entry->cFileName );
lstrcpynA( entry->cFileName, long_name, sizeof(entry->cFileName) );
if (!(flags & DRIVE_CASE_PRESERVING)) CharLowerA( entry->cFileName );
TRACE(dosfs, "returning %s (%s) %02lx %ld\n",
entry->cFileName, entry->cAlternateFileName,
entry->dwFileAttributes, entry->nFileSizeLow );
@ -1245,7 +1245,7 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATA32A *entry )
*/
int DOSFS_FindNext( const char *path, const char *short_mask,
const char *long_mask, int drive, BYTE attr,
int skip, WIN32_FIND_DATA32A *entry )
int skip, WIN32_FIND_DATAA *entry )
{
static FIND_FIRST_INFO info = { NULL };
LPCSTR short_name, long_name;
@ -1298,7 +1298,7 @@ int DOSFS_FindNext( const char *path, const char *short_mask,
/*************************************************************************
* FindFirstFile16 (KERNEL.413)
*/
HANDLE16 WINAPI FindFirstFile16( LPCSTR path, WIN32_FIND_DATA32A *data )
HANDLE16 WINAPI FindFirstFile16( LPCSTR path, WIN32_FIND_DATAA *data )
{
DOS_FULL_NAME full_name;
HGLOBAL16 handle;
@ -1336,10 +1336,10 @@ HANDLE16 WINAPI FindFirstFile16( LPCSTR path, WIN32_FIND_DATA32A *data )
/*************************************************************************
* FindFirstFile32A (KERNEL32.123)
*/
HANDLE32 WINAPI FindFirstFile32A( LPCSTR path, WIN32_FIND_DATA32A *data )
HANDLE WINAPI FindFirstFileA( LPCSTR path, WIN32_FIND_DATAA *data )
{
HANDLE32 handle = FindFirstFile16( path, data );
if (handle == INVALID_HANDLE_VALUE16) return INVALID_HANDLE_VALUE32;
HANDLE handle = FindFirstFile16( path, data );
if (handle == INVALID_HANDLE_VALUE16) return INVALID_HANDLE_VALUE;
return handle;
}
@ -1347,13 +1347,13 @@ HANDLE32 WINAPI FindFirstFile32A( LPCSTR path, WIN32_FIND_DATA32A *data )
/*************************************************************************
* FindFirstFile32W (KERNEL32.124)
*/
HANDLE32 WINAPI FindFirstFile32W( LPCWSTR path, WIN32_FIND_DATA32W *data )
HANDLE WINAPI FindFirstFileW( LPCWSTR path, WIN32_FIND_DATAW *data )
{
WIN32_FIND_DATA32A dataA;
WIN32_FIND_DATAA dataA;
LPSTR pathA = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
HANDLE32 handle = FindFirstFile32A( pathA, &dataA );
HANDLE handle = FindFirstFileA( pathA, &dataA );
HeapFree( GetProcessHeap(), 0, pathA );
if (handle != INVALID_HANDLE_VALUE32)
if (handle != INVALID_HANDLE_VALUE)
{
data->dwFileAttributes = dataA.dwFileAttributes;
data->ftCreationTime = dataA.ftCreationTime;
@ -1371,7 +1371,7 @@ HANDLE32 WINAPI FindFirstFile32W( LPCWSTR path, WIN32_FIND_DATA32W *data )
/*************************************************************************
* FindNextFile16 (KERNEL.414)
*/
BOOL16 WINAPI FindNextFile16( HANDLE16 handle, WIN32_FIND_DATA32A *data )
BOOL16 WINAPI FindNextFile16( HANDLE16 handle, WIN32_FIND_DATAA *data )
{
FIND_FIRST_INFO *info;
@ -1401,7 +1401,7 @@ BOOL16 WINAPI FindNextFile16( HANDLE16 handle, WIN32_FIND_DATA32A *data )
/*************************************************************************
* FindNextFile32A (KERNEL32.126)
*/
BOOL32 WINAPI FindNextFile32A( HANDLE32 handle, WIN32_FIND_DATA32A *data )
BOOL WINAPI FindNextFileA( HANDLE handle, WIN32_FIND_DATAA *data )
{
return FindNextFile16( handle, data );
}
@ -1410,10 +1410,10 @@ BOOL32 WINAPI FindNextFile32A( HANDLE32 handle, WIN32_FIND_DATA32A *data )
/*************************************************************************
* FindNextFile32W (KERNEL32.127)
*/
BOOL32 WINAPI FindNextFile32W( HANDLE32 handle, WIN32_FIND_DATA32W *data )
BOOL WINAPI FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *data )
{
WIN32_FIND_DATA32A dataA;
if (!FindNextFile32A( handle, &dataA )) return FALSE;
WIN32_FIND_DATAA dataA;
if (!FindNextFileA( handle, &dataA )) return FALSE;
data->dwFileAttributes = dataA.dwFileAttributes;
data->ftCreationTime = dataA.ftCreationTime;
data->ftLastAccessTime = dataA.ftLastAccessTime;
@ -1450,7 +1450,7 @@ BOOL16 WINAPI FindClose16( HANDLE16 handle )
/*************************************************************************
* FindClose32 (KERNEL32.119)
*/
BOOL32 WINAPI FindClose32( HANDLE32 handle )
BOOL WINAPI FindClose( HANDLE handle )
{
return FindClose16( (HANDLE16)handle );
}
@ -1533,14 +1533,14 @@ void DOSFS_UnixTimeToFileTime( time_t unix_time, FILETIME *filetime,
t *= 10000000;
t += 116444736000000000LL;
t += remainder;
filetime->dwLowDateTime = (UINT32)t;
filetime->dwHighDateTime = (UINT32)(t >> 32);
filetime->dwLowDateTime = (UINT)t;
filetime->dwHighDateTime = (UINT)(t >> 32);
#else /* ISO version */
UINT32 a0; /* 16 bit, low bits */
UINT32 a1; /* 16 bit, medium bits */
UINT32 a2; /* 32 bit, high bits */
UINT a0; /* 16 bit, low bits */
UINT a1; /* 16 bit, medium bits */
UINT a2; /* 32 bit, high bits */
/* Copy the unix time to a2/a1/a0 */
a0 = unix_time & 0xffff;
@ -1593,7 +1593,7 @@ time_t DOSFS_FileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder )
long long int t = filetime->dwHighDateTime;
t <<= 32;
t += (UINT32)filetime->dwLowDateTime;
t += (UINT)filetime->dwLowDateTime;
t -= 116444736000000000LL;
if (t < 0)
{
@ -1608,17 +1608,17 @@ time_t DOSFS_FileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder )
#else /* ISO version */
UINT32 a0; /* 16 bit, low bits */
UINT32 a1; /* 16 bit, medium bits */
UINT32 a2; /* 32 bit, high bits */
UINT32 r; /* remainder of division */
UINT a0; /* 16 bit, low bits */
UINT a1; /* 16 bit, medium bits */
UINT a2; /* 32 bit, high bits */
UINT r; /* remainder of division */
unsigned int carry; /* carry bit for subtraction */
int negative; /* whether a represents a negative value */
/* Copy the time values to a2/a1/a0 */
a2 = (UINT32)filetime->dwHighDateTime;
a1 = ((UINT32)filetime->dwLowDateTime ) >> 16;
a0 = ((UINT32)filetime->dwLowDateTime ) & 0xffff;
a2 = (UINT)filetime->dwHighDateTime;
a1 = ((UINT)filetime->dwLowDateTime ) >> 16;
a0 = ((UINT)filetime->dwLowDateTime ) & 0xffff;
/* Subtract the time difference */
if (a0 >= 32768 ) a0 -= 32768 , carry = 0;
@ -1630,7 +1630,7 @@ time_t DOSFS_FileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder )
a2 -= 27111902 + carry;
/* If a is negative, replace a by (-1-a) */
negative = (a2 >= ((UINT32)1) << 31);
negative = (a2 >= ((UINT)1) << 31);
if (negative)
{
/* Set a to -a - 1 (a is a2/a1/a0) */
@ -1678,7 +1678,7 @@ time_t DOSFS_FileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder )
/***********************************************************************
* DosDateTimeToFileTime (KERNEL32.76)
*/
BOOL32 WINAPI DosDateTimeToFileTime( WORD fatdate, WORD fattime, LPFILETIME ft)
BOOL WINAPI DosDateTimeToFileTime( WORD fatdate, WORD fattime, LPFILETIME ft)
{
struct tm newtm;
@ -1696,7 +1696,7 @@ BOOL32 WINAPI DosDateTimeToFileTime( WORD fatdate, WORD fattime, LPFILETIME ft)
/***********************************************************************
* FileTimeToDosDateTime (KERNEL32.111)
*/
BOOL32 WINAPI FileTimeToDosDateTime( const FILETIME *ft, LPWORD fatdate,
BOOL WINAPI FileTimeToDosDateTime( const FILETIME *ft, LPWORD fatdate,
LPWORD fattime )
{
time_t unixtime = DOSFS_FileTimeToUnixTime( ft, NULL );
@ -1713,7 +1713,7 @@ BOOL32 WINAPI FileTimeToDosDateTime( const FILETIME *ft, LPWORD fatdate,
/***********************************************************************
* LocalFileTimeToFileTime (KERNEL32.373)
*/
BOOL32 WINAPI LocalFileTimeToFileTime( const FILETIME *localft,
BOOL WINAPI LocalFileTimeToFileTime( const FILETIME *localft,
LPFILETIME utcft )
{
struct tm *xtm;
@ -1730,7 +1730,7 @@ BOOL32 WINAPI LocalFileTimeToFileTime( const FILETIME *localft,
/***********************************************************************
* FileTimeToLocalFileTime (KERNEL32.112)
*/
BOOL32 WINAPI FileTimeToLocalFileTime( const FILETIME *utcft,
BOOL WINAPI FileTimeToLocalFileTime( const FILETIME *utcft,
LPFILETIME localft )
{
DWORD remainder;
@ -1760,7 +1760,7 @@ BOOL32 WINAPI FileTimeToLocalFileTime( const FILETIME *utcft,
/***********************************************************************
* FileTimeToSystemTime (KERNEL32.113)
*/
BOOL32 WINAPI FileTimeToSystemTime( const FILETIME *ft, LPSYSTEMTIME syst )
BOOL WINAPI FileTimeToSystemTime( const FILETIME *ft, LPSYSTEMTIME syst )
{
struct tm *xtm;
DWORD remainder;
@ -1782,7 +1782,7 @@ BOOL32 WINAPI FileTimeToSystemTime( const FILETIME *ft, LPSYSTEMTIME syst )
*
* returns array of strings terminated by \0, terminated by \0
*/
DWORD WINAPI QueryDosDevice32A(LPCSTR devname,LPSTR target,DWORD bufsize)
DWORD WINAPI QueryDosDeviceA(LPCSTR devname,LPSTR target,DWORD bufsize)
{
LPSTR s;
char buffer[200];
@ -1790,17 +1790,17 @@ DWORD WINAPI QueryDosDevice32A(LPCSTR devname,LPSTR target,DWORD bufsize)
TRACE(dosfs,"(%s,...)\n",devname?devname:"<null>");
if (!devname) {
/* return known MSDOS devices */
lstrcpy32A(buffer,"CON COM1 COM2 LPT1 NUL ");
lstrcpyA(buffer,"CON COM1 COM2 LPT1 NUL ");
while ((s=strchr(buffer,' ')))
*s='\0';
lstrcpyn32A(target,buffer,bufsize);
lstrcpynA(target,buffer,bufsize);
return strlen(buffer);
}
lstrcpy32A(buffer,"\\DEV\\");
lstrcat32A(buffer,devname);
lstrcpyA(buffer,"\\DEV\\");
lstrcatA(buffer,devname);
if ((s=strchr(buffer,':'))) *s='\0';
lstrcpyn32A(target,buffer,bufsize);
lstrcpynA(target,buffer,bufsize);
return strlen(buffer);
}
@ -1810,11 +1810,11 @@ DWORD WINAPI QueryDosDevice32A(LPCSTR devname,LPSTR target,DWORD bufsize)
*
* returns array of strings terminated by \0, terminated by \0
*/
DWORD WINAPI QueryDosDevice32W(LPCWSTR devname,LPWSTR target,DWORD bufsize)
DWORD WINAPI QueryDosDeviceW(LPCWSTR devname,LPWSTR target,DWORD bufsize)
{
LPSTR devnameA = devname?HEAP_strdupWtoA(GetProcessHeap(),0,devname):NULL;
LPSTR targetA = (LPSTR)HEAP_xalloc(GetProcessHeap(),0,bufsize);
DWORD ret = QueryDosDevice32A(devnameA,targetA,bufsize);
DWORD ret = QueryDosDeviceA(devnameA,targetA,bufsize);
lstrcpynAtoW(target,targetA,bufsize);
if (devnameA) HeapFree(GetProcessHeap(),0,devnameA);
@ -1826,7 +1826,7 @@ DWORD WINAPI QueryDosDevice32W(LPCWSTR devname,LPWSTR target,DWORD bufsize)
/***********************************************************************
* SystemTimeToFileTime (KERNEL32.526)
*/
BOOL32 WINAPI SystemTimeToFileTime( const SYSTEMTIME *syst, LPFILETIME ft )
BOOL WINAPI SystemTimeToFileTime( const SYSTEMTIME *syst, LPFILETIME ft )
{
#ifdef HAVE_TIMEGM
struct tm xtm;
@ -1859,7 +1859,7 @@ BOOL32 WINAPI SystemTimeToFileTime( const SYSTEMTIME *syst, LPFILETIME ft )
return TRUE;
}
BOOL32 WINAPI DefineDosDevice32A(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);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;

View File

@ -53,7 +53,7 @@ typedef struct
char label[12]; /* drive label */
DWORD serial; /* drive serial number */
DRIVETYPE type; /* drive type */
UINT32 flags; /* drive flags */
UINT flags; /* drive flags */
dev_t dev; /* unix device number */
ino_t ino; /* unix inode number */
} DOSDRIVE;
@ -73,7 +73,7 @@ static const char * const DRIVE_Types[] =
typedef struct
{
const char *name;
UINT32 flags;
UINT flags;
} FS_DESCR;
static const FS_DESCR DRIVE_Filesystems[] =
@ -115,7 +115,7 @@ static DRIVETYPE DRIVE_GetDriveType( const char *name )
/***********************************************************************
* DRIVE_GetFSFlags
*/
static UINT32 DRIVE_GetFSFlags( const char *name, const char *value )
static UINT DRIVE_GetFSFlags( const char *name, const char *value )
{
const FS_DESCR *descr;
@ -435,7 +435,7 @@ DRIVETYPE DRIVE_GetType( int drive )
/***********************************************************************
* DRIVE_GetFlags
*/
UINT32 DRIVE_GetFlags( int drive )
UINT DRIVE_GetFlags( int drive )
{
if ((drive < 0) || (drive >= MAX_DOS_DRIVES)) return 0;
return DOSDrives[drive].flags;
@ -456,7 +456,7 @@ int DRIVE_Chdir( int drive, const char *path )
strcpy( buffer, "A:" );
buffer[0] += drive;
TRACE(dosfs, "(%c:,%s)\n", buffer[0], path );
lstrcpyn32A( buffer + 2, path, sizeof(buffer) - 2 );
lstrcpynA( buffer + 2, path, sizeof(buffer) - 2 );
if (!DOSFS_GetFullName( buffer, TRUE, &full_name )) return 0;
if (!FILE_Stat( full_name.long_name, &info )) return 0;
@ -480,7 +480,7 @@ int DRIVE_Chdir( int drive, const char *path )
if (pTask && (pTask->curdrive & 0x80) &&
((pTask->curdrive & ~0x80) == drive))
{
lstrcpyn32A( pTask->curdir, full_name.short_name + 2,
lstrcpynA( pTask->curdir, full_name.short_name + 2,
sizeof(pTask->curdir) );
DRIVE_LastTask = GetCurrentTask();
}
@ -585,7 +585,7 @@ int DRIVE_OpenDevice( int drive, int flags )
*
* Read raw sectors from a device
*/
int DRIVE_RawRead(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL32 fake_success)
int DRIVE_RawRead(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL fake_success)
{
int fd;
@ -616,7 +616,7 @@ int DRIVE_RawRead(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL32
*
* Write raw sectors to a device
*/
int DRIVE_RawWrite(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL32 fake_success)
int DRIVE_RawWrite(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL fake_success)
{
int fd;
@ -690,7 +690,7 @@ BOOL16 WINAPI GetDiskFreeSpace16( LPCSTR root, LPDWORD cluster_sectors,
LPDWORD sector_bytes, LPDWORD free_clusters,
LPDWORD total_clusters )
{
return GetDiskFreeSpace32A( root, cluster_sectors, sector_bytes,
return GetDiskFreeSpaceA( root, cluster_sectors, sector_bytes,
free_clusters, total_clusters );
}
@ -722,7 +722,7 @@ BOOL16 WINAPI GetDiskFreeSpace16( LPCSTR root, LPDWORD cluster_sectors,
* "E:\\TEST" "C:" TRUE (when CurrDir of "C:" set to "\\")
* "E:\\TEST" "C:" FALSE (when CurrDir of "C:" set to "\\TEST")
*/
BOOL32 WINAPI GetDiskFreeSpace32A( LPCSTR root, LPDWORD cluster_sectors,
BOOL WINAPI GetDiskFreeSpaceA( LPCSTR root, LPDWORD cluster_sectors,
LPDWORD sector_bytes, LPDWORD free_clusters,
LPDWORD total_clusters )
{
@ -790,15 +790,15 @@ BOOL32 WINAPI GetDiskFreeSpace32A( LPCSTR root, LPDWORD cluster_sectors,
/***********************************************************************
* GetDiskFreeSpace32W (KERNEL32.207)
*/
BOOL32 WINAPI GetDiskFreeSpace32W( LPCWSTR root, LPDWORD cluster_sectors,
BOOL WINAPI GetDiskFreeSpaceW( LPCWSTR root, LPDWORD cluster_sectors,
LPDWORD sector_bytes, LPDWORD free_clusters,
LPDWORD total_clusters )
{
LPSTR xroot;
BOOL32 ret;
BOOL ret;
xroot = HEAP_strdupWtoA( GetProcessHeap(), 0, root);
ret = GetDiskFreeSpace32A( xroot,cluster_sectors, sector_bytes,
ret = GetDiskFreeSpaceA( xroot,cluster_sectors, sector_bytes,
free_clusters, total_clusters );
HeapFree( GetProcessHeap(), 0, xroot );
return ret;
@ -808,7 +808,7 @@ BOOL32 WINAPI GetDiskFreeSpace32W( LPCWSTR root, LPDWORD cluster_sectors,
/***********************************************************************
* GetDiskFreeSpaceEx32A (KERNEL32.871)
*/
BOOL32 WINAPI GetDiskFreeSpaceEx32A( LPCSTR root,
BOOL WINAPI GetDiskFreeSpaceExA( LPCSTR root,
PULARGE_INTEGER avail,
PULARGE_INTEGER total,
PULARGE_INTEGER totalfree)
@ -842,15 +842,15 @@ BOOL32 WINAPI GetDiskFreeSpaceEx32A( LPCSTR root,
/***********************************************************************
* GetDiskFreeSpaceEx32W (KERNEL32.873)
*/
BOOL32 WINAPI GetDiskFreeSpaceEx32W( LPCWSTR root, PULARGE_INTEGER avail,
BOOL WINAPI GetDiskFreeSpaceExW( LPCWSTR root, PULARGE_INTEGER avail,
PULARGE_INTEGER total,
PULARGE_INTEGER totalfree)
{
LPSTR xroot;
BOOL32 ret;
BOOL ret;
xroot = HEAP_strdupWtoA( GetProcessHeap(), 0, root);
ret = GetDiskFreeSpaceEx32A( xroot, avail, total, totalfree);
ret = GetDiskFreeSpaceExA( xroot, avail, total, totalfree);
HeapFree( GetProcessHeap(), 0, xroot );
return ret;
}
@ -911,7 +911,7 @@ UINT16 WINAPI GetDriveType16(
*
* DRIVE_RAMDISK is unsupported.
*/
UINT32 WINAPI GetDriveType32A(LPCSTR root /* String describing drive */)
UINT WINAPI GetDriveTypeA(LPCSTR root /* String describing drive */)
{
int drive;
TRACE(dosfs, "(%s)\n", debugstr_a(root));
@ -941,10 +941,10 @@ UINT32 WINAPI GetDriveType32A(LPCSTR root /* String describing drive */)
/***********************************************************************
* GetDriveType32W (KERNEL32.209)
*/
UINT32 WINAPI GetDriveType32W( LPCWSTR root )
UINT WINAPI GetDriveTypeW( LPCWSTR root )
{
LPSTR xpath = HEAP_strdupWtoA( GetProcessHeap(), 0, root );
UINT32 ret = GetDriveType32A( xpath );
UINT ret = GetDriveTypeA( xpath );
HeapFree( GetProcessHeap(), 0, xpath );
return ret;
}
@ -955,7 +955,7 @@ UINT32 WINAPI GetDriveType32W( LPCWSTR root )
*/
UINT16 WINAPI GetCurrentDirectory16( UINT16 buflen, LPSTR buf )
{
return (UINT16)GetCurrentDirectory32A( buflen, buf );
return (UINT16)GetCurrentDirectoryA( buflen, buf );
}
@ -967,17 +967,17 @@ UINT16 WINAPI GetCurrentDirectory16( UINT16 buflen, LPSTR buf )
* Despite the API description, return required length including the
* terminating null when buffer too small. This is the real behaviour.
*/
UINT32 WINAPI GetCurrentDirectory32A( UINT32 buflen, LPSTR buf )
UINT WINAPI GetCurrentDirectoryA( UINT buflen, LPSTR buf )
{
UINT32 ret;
UINT ret;
const char *s = DRIVE_GetDosCwd( DRIVE_GetCurrentDrive() );
assert(s);
ret = strlen(s) + 3; /* length of WHOLE current directory */
if (ret >= buflen) return ret + 1;
lstrcpyn32A( buf, "A:\\", MIN( 4, buflen ) );
lstrcpynA( buf, "A:\\", MIN( 4, buflen ) );
if (buflen) buf[0] += DRIVE_GetCurrentDrive();
if (buflen > 3) lstrcpyn32A( buf + 3, s, buflen - 3 );
if (buflen > 3) lstrcpynA( buf + 3, s, buflen - 3 );
return ret;
}
@ -985,10 +985,10 @@ UINT32 WINAPI GetCurrentDirectory32A( UINT32 buflen, LPSTR buf )
/***********************************************************************
* GetCurrentDirectory32W (KERNEL32.197)
*/
UINT32 WINAPI GetCurrentDirectory32W( UINT32 buflen, LPWSTR buf )
UINT WINAPI GetCurrentDirectoryW( UINT buflen, LPWSTR buf )
{
LPSTR xpath = HeapAlloc( GetProcessHeap(), 0, buflen+1 );
UINT32 ret = GetCurrentDirectory32A( buflen, xpath );
UINT ret = GetCurrentDirectoryA( buflen, xpath );
lstrcpyAtoW( buf, xpath );
HeapFree( GetProcessHeap(), 0, xpath );
return ret;
@ -1000,14 +1000,14 @@ UINT32 WINAPI GetCurrentDirectory32W( UINT32 buflen, LPWSTR buf )
*/
BOOL16 WINAPI SetCurrentDirectory16( LPCSTR dir )
{
return SetCurrentDirectory32A( dir );
return SetCurrentDirectoryA( dir );
}
/***********************************************************************
* SetCurrentDirectory32A (KERNEL32.479)
*/
BOOL32 WINAPI SetCurrentDirectory32A( LPCSTR dir )
BOOL WINAPI SetCurrentDirectoryA( LPCSTR dir )
{
int olddrive, drive = DRIVE_GetCurrentDrive();
@ -1038,10 +1038,10 @@ BOOL32 WINAPI SetCurrentDirectory32A( LPCSTR dir )
/***********************************************************************
* SetCurrentDirectory32W (KERNEL32.480)
*/
BOOL32 WINAPI SetCurrentDirectory32W( LPCWSTR dirW )
BOOL WINAPI SetCurrentDirectoryW( LPCWSTR dirW )
{
LPSTR dir = HEAP_strdupWtoA( GetProcessHeap(), 0, dirW );
BOOL32 res = SetCurrentDirectory32A( dir );
BOOL res = SetCurrentDirectoryA( dir );
HeapFree( GetProcessHeap(), 0, dir );
return res;
}
@ -1050,7 +1050,7 @@ BOOL32 WINAPI SetCurrentDirectory32W( LPCWSTR dirW )
/***********************************************************************
* GetLogicalDriveStrings32A (KERNEL32.231)
*/
UINT32 WINAPI GetLogicalDriveStrings32A( UINT32 len, LPSTR buffer )
UINT WINAPI GetLogicalDriveStringsA( UINT len, LPSTR buffer )
{
int drive, count;
@ -1076,7 +1076,7 @@ UINT32 WINAPI GetLogicalDriveStrings32A( UINT32 len, LPSTR buffer )
/***********************************************************************
* GetLogicalDriveStrings32W (KERNEL32.232)
*/
UINT32 WINAPI GetLogicalDriveStrings32W( UINT32 len, LPWSTR buffer )
UINT WINAPI GetLogicalDriveStringsW( UINT len, LPWSTR buffer )
{
int drive, count;
@ -1116,7 +1116,7 @@ DWORD WINAPI GetLogicalDrives(void)
/***********************************************************************
* GetVolumeInformation32A (KERNEL32.309)
*/
BOOL32 WINAPI GetVolumeInformation32A( LPCSTR root, LPSTR label,
BOOL WINAPI GetVolumeInformationA( LPCSTR root, LPSTR label,
DWORD label_len, DWORD *serial,
DWORD *filename_len, DWORD *flags,
LPSTR fsname, DWORD fsname_len )
@ -1139,7 +1139,7 @@ BOOL32 WINAPI GetVolumeInformation32A( LPCSTR root, LPSTR label,
if (!DRIVE_IsValid( drive )) return FALSE;
if (label)
{
lstrcpyn32A( label, DRIVE_GetLabel(drive), label_len );
lstrcpynA( label, DRIVE_GetLabel(drive), label_len );
for (cp = label; *cp; cp++);
while (cp != label && *(cp-1) == ' ') cp--;
*cp = '\0';
@ -1166,9 +1166,9 @@ BOOL32 WINAPI GetVolumeInformation32A( LPCSTR root, LPSTR label,
if (fsname) {
/* Diablo checks that return code ... */
if (DRIVE_GetType(drive)==TYPE_CDROM)
lstrcpyn32A( fsname, "CDFS", fsname_len );
lstrcpynA( fsname, "CDFS", fsname_len );
else
lstrcpyn32A( fsname, "FAT", fsname_len );
lstrcpynA( fsname, "FAT", fsname_len );
}
return TRUE;
}
@ -1177,7 +1177,7 @@ BOOL32 WINAPI GetVolumeInformation32A( LPCSTR root, LPSTR label,
/***********************************************************************
* GetVolumeInformation32W (KERNEL32.310)
*/
BOOL32 WINAPI GetVolumeInformation32W( LPCWSTR root, LPWSTR label,
BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label,
DWORD label_len, DWORD *serial,
DWORD *filename_len, DWORD *flags,
LPWSTR fsname, DWORD fsname_len )
@ -1185,7 +1185,7 @@ BOOL32 WINAPI GetVolumeInformation32W( LPCWSTR root, LPWSTR label,
LPSTR xroot = HEAP_strdupWtoA( GetProcessHeap(), 0, root );
LPSTR xvolname = label ? HeapAlloc(GetProcessHeap(),0,label_len) : NULL;
LPSTR xfsname = fsname ? HeapAlloc(GetProcessHeap(),0,fsname_len) : NULL;
BOOL32 ret = GetVolumeInformation32A( xroot, xvolname, label_len, serial,
BOOL ret = GetVolumeInformationA( xroot, xvolname, label_len, serial,
filename_len, flags, xfsname,
fsname_len );
if (ret)
@ -1199,7 +1199,7 @@ BOOL32 WINAPI GetVolumeInformation32W( LPCWSTR root, LPWSTR label,
return ret;
}
BOOL32 WINAPI SetVolumeLabel32A(LPCSTR rootpath,LPCSTR volname) {
BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname) {
FIXME(dosfs,"(%s,%s),stub!\n",rootpath,volname);
return TRUE;
}

View File

@ -66,7 +66,7 @@ typedef struct
*
* Convert OF_* mode into flags for CreateFile.
*/
static void FILE_ConvertOFMode( INT32 mode, DWORD *access, DWORD *sharing )
static void FILE_ConvertOFMode( INT mode, DWORD *access, DWORD *sharing )
{
switch(mode & 0x03)
{
@ -141,7 +141,7 @@ Legend: Y = open succeeds, N = open fails with error code 05h
For all other cases we barf,set the DOS_ERROR and return TRUE
*/
static BOOL32 FILE_ShareDeny( int mode, int oldmode)
static BOOL FILE_ShareDeny( int mode, int oldmode)
{
int oldsharemode = oldmode & 0x70;
int sharemode = mode & 0x70;
@ -307,7 +307,7 @@ void FILE_SetDosError(void)
*
* Duplicate a Unix handle into a task handle.
*/
HFILE32 FILE_DupUnixHandle( int fd, DWORD access )
HFILE FILE_DupUnixHandle( int fd, DWORD access )
{
FILE_OBJECT *file;
int unix_handle;
@ -317,7 +317,7 @@ HFILE32 FILE_DupUnixHandle( int fd, DWORD access )
if ((unix_handle = dup(fd)) == -1)
{
FILE_SetDosError();
return INVALID_HANDLE_VALUE32;
return INVALID_HANDLE_VALUE;
}
req.access = access;
req.inherit = 1;
@ -328,13 +328,13 @@ HFILE32 FILE_DupUnixHandle( int fd, DWORD access )
CLIENT_SendRequest( REQ_CREATE_FILE, unix_handle, 1,
&req, sizeof(req) );
CLIENT_WaitSimpleReply( &reply, sizeof(reply), NULL );
if (reply.handle == -1) return INVALID_HANDLE_VALUE32;
if (reply.handle == -1) return INVALID_HANDLE_VALUE;
if (!(file = HeapAlloc( SystemHeap, 0, sizeof(FILE_OBJECT) )))
{
CLIENT_CloseHandle( reply.handle );
SetLastError( ERROR_TOO_MANY_OPEN_FILES );
return (HFILE32)NULL;
return (HFILE)NULL;
}
file->header.type = K32OBJ_FILE;
file->header.refcount = 0;
@ -348,9 +348,9 @@ HFILE32 FILE_DupUnixHandle( int fd, DWORD access )
*
* Implementation of CreateFile. Takes a Unix path name.
*/
HFILE32 FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
HFILE FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
LPSECURITY_ATTRIBUTES sa, DWORD creation,
DWORD attributes, HANDLE32 template )
DWORD attributes, HANDLE template )
{
FILE_OBJECT *file;
struct create_file_request req;
@ -382,7 +382,7 @@ HFILE32 FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
CLIENT_WaitSimpleReply( &reply, sizeof(reply), NULL );
}
}
if (reply.handle == -1) return INVALID_HANDLE_VALUE32;
if (reply.handle == -1) return INVALID_HANDLE_VALUE;
/* Now build the FILE_OBJECT */
@ -390,7 +390,7 @@ HFILE32 FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
{
SetLastError( ERROR_OUTOFMEMORY );
CLIENT_CloseHandle( reply.handle );
return (HFILE32)INVALID_HANDLE_VALUE32;
return (HFILE)INVALID_HANDLE_VALUE;
}
file->header.type = K32OBJ_FILE;
file->header.refcount = 0;
@ -404,7 +404,7 @@ HFILE32 FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
*
* Same as FILE_CreateFile but for a device
*/
HFILE32 FILE_CreateDevice( int client_id, DWORD access, LPSECURITY_ATTRIBUTES sa )
HFILE FILE_CreateDevice( int client_id, DWORD access, LPSECURITY_ATTRIBUTES sa )
{
FILE_OBJECT *file;
struct create_device_request req;
@ -415,7 +415,7 @@ HFILE32 FILE_CreateDevice( int client_id, DWORD access, LPSECURITY_ATTRIBUTES sa
req.id = client_id;
CLIENT_SendRequest( REQ_CREATE_DEVICE, -1, 1, &req, sizeof(req) );
CLIENT_WaitSimpleReply( &reply, sizeof(reply), NULL );
if (reply.handle == -1) return INVALID_HANDLE_VALUE32;
if (reply.handle == -1) return INVALID_HANDLE_VALUE;
/* Now build the FILE_OBJECT */
@ -423,7 +423,7 @@ HFILE32 FILE_CreateDevice( int client_id, DWORD access, LPSECURITY_ATTRIBUTES sa
{
SetLastError( ERROR_OUTOFMEMORY );
CLIENT_CloseHandle( reply.handle );
return (HFILE32)INVALID_HANDLE_VALUE32;
return (HFILE)INVALID_HANDLE_VALUE;
}
file->header.type = K32OBJ_FILE;
file->header.refcount = 0;
@ -460,16 +460,16 @@ HFILE32 FILE_CreateDevice( int client_id, DWORD access, LPSECURITY_ATTRIBUTES sa
* Doesn't support character devices, pipes, template files, or a
* lot of the 'attributes' flags yet.
*/
HFILE32 WINAPI CreateFile32A( LPCSTR filename, DWORD access, DWORD sharing,
HFILE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
LPSECURITY_ATTRIBUTES sa, DWORD creation,
DWORD attributes, HANDLE32 template )
DWORD attributes, HANDLE template )
{
DOS_FULL_NAME full_name;
if (!filename)
{
SetLastError( ERROR_INVALID_PARAMETER );
return HFILE_ERROR32;
return HFILE_ERROR;
}
/* If the name starts with '\\?\', ignore the first 4 chars. */
@ -480,7 +480,7 @@ HFILE32 WINAPI CreateFile32A( LPCSTR filename, DWORD access, DWORD sharing,
{
FIXME( file, "UNC name (%s) not supported.\n", filename );
SetLastError( ERROR_PATH_NOT_FOUND );
return HFILE_ERROR32;
return HFILE_ERROR;
}
}
@ -492,32 +492,32 @@ HFILE32 WINAPI CreateFile32A( LPCSTR filename, DWORD access, DWORD sharing,
{
FIXME( file, "UNC name (%s) not supported.\n", filename );
SetLastError( ERROR_PATH_NOT_FOUND );
return HFILE_ERROR32;
return HFILE_ERROR;
}
/* Open a console for CONIN$ or CONOUT$ */
if (!lstrcmpi32A(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa );
if (!lstrcmpi32A(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa );
if (!lstrcmpiA(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa );
if (!lstrcmpiA(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa );
if (DOSFS_GetDevice( filename ))
{
HFILE32 ret;
HFILE ret;
TRACE(file, "opening device '%s'\n", filename );
if (HFILE_ERROR32!=(ret=DOSFS_OpenDevice( filename, access )))
if (HFILE_ERROR!=(ret=DOSFS_OpenDevice( filename, access )))
return ret;
/* Do not silence this please. It is a critical error. -MM */
ERR(file, "Couldn't open device '%s'!\n",filename);
SetLastError( ERROR_FILE_NOT_FOUND );
return HFILE_ERROR32;
return HFILE_ERROR;
}
/* check for filename, don't check for last entry if creating */
if (!DOSFS_GetFullName( filename,
(creation == OPEN_EXISTING) || (creation == TRUNCATE_EXISTING), &full_name ))
return HFILE_ERROR32;
return HFILE_ERROR;
return FILE_CreateFile( full_name.long_name, access, sharing,
sa, creation, attributes, template );
@ -528,12 +528,12 @@ HFILE32 WINAPI CreateFile32A( LPCSTR filename, DWORD access, DWORD sharing,
/*************************************************************************
* CreateFile32W (KERNEL32.48)
*/
HFILE32 WINAPI CreateFile32W( LPCWSTR filename, DWORD access, DWORD sharing,
HFILE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
LPSECURITY_ATTRIBUTES sa, DWORD creation,
DWORD attributes, HANDLE32 template)
DWORD attributes, HANDLE template)
{
LPSTR afn = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
HFILE32 res = CreateFile32A( afn, access, sharing, sa, creation, attributes, template );
HFILE res = CreateFileA( afn, access, sharing, sa, creation, attributes, template );
HeapFree( GetProcessHeap(), 0, afn );
return res;
}
@ -571,7 +571,7 @@ static void FILE_FillInfo( struct stat *st, BY_HANDLE_FILE_INFORMATION *info )
*
* Stat a Unix path name. Return TRUE if OK.
*/
BOOL32 FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
{
struct stat st;
@ -590,7 +590,7 @@ BOOL32 FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
/***********************************************************************
* GetFileInformationByHandle (KERNEL32.219)
*/
DWORD WINAPI GetFileInformationByHandle( HFILE32 hFile,
DWORD WINAPI GetFileInformationByHandle( HFILE hFile,
BY_HANDLE_FILE_INFORMATION *info )
{
struct get_file_info_request req;
@ -622,14 +622,14 @@ DWORD WINAPI GetFileInformationByHandle( HFILE32 hFile,
*/
DWORD WINAPI GetFileAttributes16( LPCSTR name )
{
return GetFileAttributes32A( name );
return GetFileAttributesA( name );
}
/**************************************************************************
* GetFileAttributes32A (KERNEL32.217)
*/
DWORD WINAPI GetFileAttributes32A( LPCSTR name )
DWORD WINAPI GetFileAttributesA( LPCSTR name )
{
DOS_FULL_NAME full_name;
BY_HANDLE_FILE_INFORMATION info;
@ -645,10 +645,10 @@ DWORD WINAPI GetFileAttributes32A( LPCSTR name )
/**************************************************************************
* GetFileAttributes32W (KERNEL32.218)
*/
DWORD WINAPI GetFileAttributes32W( LPCWSTR name )
DWORD WINAPI GetFileAttributesW( LPCWSTR name )
{
LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
DWORD res = GetFileAttributes32A( nameA );
DWORD res = GetFileAttributesA( nameA );
HeapFree( GetProcessHeap(), 0, nameA );
return res;
}
@ -657,7 +657,7 @@ DWORD WINAPI GetFileAttributes32W( LPCWSTR name )
/***********************************************************************
* GetFileSize (KERNEL32.220)
*/
DWORD WINAPI GetFileSize( HFILE32 hFile, LPDWORD filesizehigh )
DWORD WINAPI GetFileSize( HFILE hFile, LPDWORD filesizehigh )
{
BY_HANDLE_FILE_INFORMATION info;
if (!GetFileInformationByHandle( hFile, &info )) return 0;
@ -669,7 +669,7 @@ DWORD WINAPI GetFileSize( HFILE32 hFile, LPDWORD filesizehigh )
/***********************************************************************
* GetFileTime (KERNEL32.221)
*/
BOOL32 WINAPI GetFileTime( HFILE32 hFile, FILETIME *lpCreationTime,
BOOL WINAPI GetFileTime( HFILE hFile, FILETIME *lpCreationTime,
FILETIME *lpLastAccessTime,
FILETIME *lpLastWriteTime )
{
@ -684,7 +684,7 @@ BOOL32 WINAPI GetFileTime( HFILE32 hFile, FILETIME *lpCreationTime,
/***********************************************************************
* CompareFileTime (KERNEL32.28)
*/
INT32 WINAPI CompareFileTime( LPFILETIME x, LPFILETIME y )
INT WINAPI CompareFileTime( LPFILETIME x, LPFILETIME y )
{
if (!x || !y) return -1;
@ -721,22 +721,22 @@ UINT16 WINAPI GetTempFileName16( BYTE drive, LPCSTR prefix, UINT16 unique,
if (drive & TF_FORCEDRIVE)
sprintf(temppath,"%c:", drive & ~TF_FORCEDRIVE );
else
GetTempPath32A( 132, temppath );
return (UINT16)GetTempFileName32A( temppath, prefix, unique, buffer );
GetTempPathA( 132, temppath );
return (UINT16)GetTempFileNameA( temppath, prefix, unique, buffer );
}
/***********************************************************************
* GetTempFileName32A (KERNEL32.290)
*/
UINT32 WINAPI GetTempFileName32A( LPCSTR path, LPCSTR prefix, UINT32 unique,
UINT WINAPI GetTempFileNameA( LPCSTR path, LPCSTR prefix, UINT unique,
LPSTR buffer)
{
static UINT32 unique_temp;
static UINT unique_temp;
DOS_FULL_NAME full_name;
int i;
LPSTR p;
UINT32 num;
UINT num;
if ( !path || !prefix || !buffer ) return 0;
@ -760,9 +760,9 @@ UINT32 WINAPI GetTempFileName32A( LPCSTR path, LPCSTR prefix, UINT32 unique,
{
do
{
HFILE32 handle = CreateFile32A( buffer, GENERIC_WRITE, 0, NULL,
HFILE handle = CreateFileA( buffer, GENERIC_WRITE, 0, NULL,
CREATE_NEW, FILE_ATTRIBUTE_NORMAL, -1 );
if (handle != INVALID_HANDLE_VALUE32)
if (handle != INVALID_HANDLE_VALUE)
{ /* We created it */
TRACE(file, "created %s\n",
buffer);
@ -794,17 +794,17 @@ UINT32 WINAPI GetTempFileName32A( LPCSTR path, LPCSTR prefix, UINT32 unique,
/***********************************************************************
* GetTempFileName32W (KERNEL32.291)
*/
UINT32 WINAPI GetTempFileName32W( LPCWSTR path, LPCWSTR prefix, UINT32 unique,
UINT WINAPI GetTempFileNameW( LPCWSTR path, LPCWSTR prefix, UINT unique,
LPWSTR buffer )
{
LPSTR patha,prefixa;
char buffera[144];
UINT32 ret;
UINT ret;
if (!path) return 0;
patha = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
prefixa = HEAP_strdupWtoA( GetProcessHeap(), 0, prefix );
ret = GetTempFileName32A( patha, prefixa, unique, buffera );
ret = GetTempFileNameA( patha, prefixa, unique, buffera );
lstrcpyAtoW( buffer, buffera );
HeapFree( GetProcessHeap(), 0, patha );
HeapFree( GetProcessHeap(), 0, prefixa );
@ -817,17 +817,17 @@ UINT32 WINAPI GetTempFileName32W( LPCWSTR path, LPCWSTR prefix, UINT32 unique,
*
* Implementation of OpenFile16() and OpenFile32().
*/
static HFILE32 FILE_DoOpenFile( LPCSTR name, OFSTRUCT *ofs, UINT32 mode,
BOOL32 win32 )
static HFILE FILE_DoOpenFile( LPCSTR name, OFSTRUCT *ofs, UINT mode,
BOOL win32 )
{
HFILE32 hFileRet;
HFILE hFileRet;
FILETIME filetime;
WORD filedatetime[2];
DOS_FULL_NAME full_name;
DWORD access, sharing;
char *p;
if (!ofs) return HFILE_ERROR32;
if (!ofs) return HFILE_ERROR;
ofs->cBytes = sizeof(OFSTRUCT);
ofs->nErrCode = 0;
@ -835,7 +835,7 @@ static HFILE32 FILE_DoOpenFile( LPCSTR name, OFSTRUCT *ofs, UINT32 mode,
if (!name) {
ERR(file, "called with `name' set to NULL ! Please debug.\n");
return HFILE_ERROR32;
return HFILE_ERROR;
}
TRACE(file, "%s %04x\n", name, mode );
@ -843,7 +843,7 @@ static HFILE32 FILE_DoOpenFile( LPCSTR name, OFSTRUCT *ofs, UINT32 mode,
/* the watcom 10.6 IDE relies on a valid path returned in ofs->szPathName
Are there any cases where getting the path here is wrong?
Uwe Bonnes 1997 Apr 2 */
if (!GetFullPathName32A( name, sizeof(ofs->szPathName),
if (!GetFullPathNameA( name, sizeof(ofs->szPathName),
ofs->szPathName, NULL )) goto error;
FILE_ConvertOFMode( mode, &access, &sharing );
@ -863,9 +863,9 @@ static HFILE32 FILE_DoOpenFile( LPCSTR name, OFSTRUCT *ofs, UINT32 mode,
if (mode & OF_CREATE)
{
if ((hFileRet = CreateFile32A( name, GENERIC_READ | GENERIC_WRITE,
if ((hFileRet = CreateFileA( name, GENERIC_READ | GENERIC_WRITE,
sharing, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, -1 ))== INVALID_HANDLE_VALUE32)
FILE_ATTRIBUTE_NORMAL, -1 ))== INVALID_HANDLE_VALUE)
goto error;
goto success;
}
@ -890,7 +890,7 @@ static HFILE32 FILE_DoOpenFile( LPCSTR name, OFSTRUCT *ofs, UINT32 mode,
found:
TRACE(file, "found %s = %s\n",
full_name.long_name, full_name.short_name );
lstrcpyn32A( ofs->szPathName, full_name.short_name,
lstrcpynA( ofs->szPathName, full_name.short_name,
sizeof(ofs->szPathName) );
if (mode & OF_SHARE_EXCLUSIVE)
@ -911,7 +911,7 @@ found:
if (GetModuleHandle16(last+1))
{
TRACE(file,"Denying shared open for %s\n",full_name.long_name);
return HFILE_ERROR32;
return HFILE_ERROR;
}
}
@ -924,7 +924,7 @@ found:
hFileRet = FILE_CreateFile( full_name.long_name, access, sharing,
NULL, OPEN_EXISTING, 0, -1 );
if (hFileRet == HFILE_ERROR32) goto not_found;
if (hFileRet == HFILE_ERROR) goto not_found;
GetFileTime( hFileRet, NULL, NULL, &filetime );
FileTimeToDosDateTime( &filetime, &filedatetime[0], &filedatetime[1] );
@ -966,7 +966,7 @@ error: /* We get here if there was an error opening the file */
ofs->nErrCode = GetLastError();
WARN(file, "(%s): return = HFILE_ERROR error= %d\n",
name,ofs->nErrCode );
return HFILE_ERROR32;
return HFILE_ERROR;
}
@ -982,7 +982,7 @@ HFILE16 WINAPI OpenFile16( LPCSTR name, OFSTRUCT *ofs, UINT16 mode )
/***********************************************************************
* OpenFile32 (KERNEL32.396)
*/
HFILE32 WINAPI OpenFile32( LPCSTR name, OFSTRUCT *ofs, UINT32 mode )
HFILE WINAPI OpenFile( LPCSTR name, OFSTRUCT *ofs, UINT mode )
{
return FILE_DoOpenFile( name, ofs, mode, TRUE );
}
@ -994,8 +994,8 @@ HFILE32 WINAPI OpenFile32( LPCSTR name, OFSTRUCT *ofs, UINT32 mode )
* Allocates the default DOS handles for a process. Called either by
* AllocDosHandle below or by the DOSVM stuff.
*/
BOOL32 FILE_InitProcessDosHandles( void ) {
HANDLE32 *ptr;
BOOL FILE_InitProcessDosHandles( void ) {
HANDLE *ptr;
if (!(ptr = HeapAlloc( SystemHeap, HEAP_ZERO_MEMORY,
sizeof(*ptr) * DOS_TABLE_SIZE )))
@ -1015,12 +1015,12 @@ BOOL32 FILE_InitProcessDosHandles( void ) {
* Allocate a DOS handle for a Win32 handle. The Win32 handle is no
* longer valid after this function (even on failure).
*/
HFILE16 FILE_AllocDosHandle( HANDLE32 handle )
HFILE16 FILE_AllocDosHandle( HANDLE handle )
{
int i;
HANDLE32 *ptr = PROCESS_Current()->dos_handles;
HANDLE *ptr = PROCESS_Current()->dos_handles;
if (!handle || (handle == INVALID_HANDLE_VALUE32))
if (!handle || (handle == INVALID_HANDLE_VALUE))
return INVALID_HANDLE_VALUE16;
if (!ptr) {
@ -1048,13 +1048,13 @@ error:
*
* Return the Win32 handle for a DOS handle.
*/
HANDLE32 FILE_GetHandle32( HFILE16 hfile )
HANDLE FILE_GetHandle( HFILE16 hfile )
{
HANDLE32 *table = PROCESS_Current()->dos_handles;
HANDLE *table = PROCESS_Current()->dos_handles;
if ((hfile >= DOS_TABLE_SIZE) || !table || !table[hfile])
{
SetLastError( ERROR_INVALID_HANDLE );
return INVALID_HANDLE_VALUE32;
return INVALID_HANDLE_VALUE;
}
return table[hfile];
}
@ -1067,8 +1067,8 @@ HANDLE32 FILE_GetHandle32( HFILE16 hfile )
*/
HFILE16 FILE_Dup2( HFILE16 hFile1, HFILE16 hFile2 )
{
HANDLE32 *table = PROCESS_Current()->dos_handles;
HANDLE32 new_handle;
HANDLE *table = PROCESS_Current()->dos_handles;
HANDLE new_handle;
if ((hFile1 >= DOS_TABLE_SIZE) || (hFile2 >= DOS_TABLE_SIZE) ||
!table || !table[hFile1])
@ -1097,7 +1097,7 @@ HFILE16 FILE_Dup2( HFILE16 hFile1, HFILE16 hFile2 )
*/
HFILE16 WINAPI _lclose16( HFILE16 hFile )
{
HANDLE32 *table = PROCESS_Current()->dos_handles;
HANDLE *table = PROCESS_Current()->dos_handles;
if (hFile < 5)
{
@ -1120,17 +1120,17 @@ HFILE16 WINAPI _lclose16( HFILE16 hFile )
/***********************************************************************
* _lclose32 (KERNEL32.592)
*/
HFILE32 WINAPI _lclose32( HFILE32 hFile )
HFILE WINAPI _lclose( HFILE hFile )
{
TRACE(file, "handle %d\n", hFile );
return CloseHandle( hFile ) ? 0 : HFILE_ERROR32;
return CloseHandle( hFile ) ? 0 : HFILE_ERROR;
}
/***********************************************************************
* ReadFile (KERNEL32.428)
*/
BOOL32 WINAPI ReadFile( HANDLE32 hFile, LPVOID buffer, DWORD bytesToRead,
BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
LPDWORD bytesRead, LPOVERLAPPED overlapped )
{
struct get_read_fd_request req;
@ -1164,7 +1164,7 @@ BOOL32 WINAPI ReadFile( HANDLE32 hFile, LPVOID buffer, DWORD bytesToRead,
/***********************************************************************
* WriteFile (KERNEL32.578)
*/
BOOL32 WINAPI WriteFile( HANDLE32 hFile, LPCVOID buffer, DWORD bytesToWrite,
BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
LPDWORD bytesWritten, LPOVERLAPPED overlapped )
{
struct get_write_fd_request req;
@ -1206,9 +1206,9 @@ LONG WINAPI WIN16_hread( HFILE16 hFile, SEGPTR buffer, LONG count )
hFile, (DWORD)buffer, count );
/* Some programs pass a count larger than the allocated buffer */
maxlen = GetSelectorLimit( SELECTOROF(buffer) ) - OFFSETOF(buffer) + 1;
maxlen = GetSelectorLimit16( SELECTOROF(buffer) ) - OFFSETOF(buffer) + 1;
if (count > maxlen) count = maxlen;
return _lread32(FILE_GetHandle32(hFile), PTR_SEG_TO_LIN(buffer), count );
return _lread(FILE_GetHandle(hFile), PTR_SEG_TO_LIN(buffer), count );
}
@ -1224,7 +1224,7 @@ UINT16 WINAPI WIN16_lread( HFILE16 hFile, SEGPTR buffer, UINT16 count )
/***********************************************************************
* _lread32 (KERNEL32.596)
*/
UINT32 WINAPI _lread32( HFILE32 handle, LPVOID buffer, UINT32 count )
UINT WINAPI _lread( HFILE handle, LPVOID buffer, UINT count )
{
DWORD result;
if (!ReadFile( handle, buffer, count, &result, NULL )) return -1;
@ -1237,7 +1237,7 @@ UINT32 WINAPI _lread32( HFILE32 handle, LPVOID buffer, UINT32 count )
*/
UINT16 WINAPI _lread16( HFILE16 hFile, LPVOID buffer, UINT16 count )
{
return (UINT16)_lread32(FILE_GetHandle32(hFile), buffer, (LONG)count );
return (UINT16)_lread(FILE_GetHandle(hFile), buffer, (LONG)count );
}
@ -1247,17 +1247,17 @@ UINT16 WINAPI _lread16( HFILE16 hFile, LPVOID buffer, UINT16 count )
HFILE16 WINAPI _lcreat16( LPCSTR path, INT16 attr )
{
TRACE(file, "%s %02x\n", path, attr );
return FILE_AllocDosHandle( _lcreat32( path, attr ) );
return FILE_AllocDosHandle( _lcreat( path, attr ) );
}
/***********************************************************************
* _lcreat32 (KERNEL32.593)
*/
HFILE32 WINAPI _lcreat32( LPCSTR path, INT32 attr )
HFILE WINAPI _lcreat( LPCSTR path, INT attr )
{
TRACE(file, "%s %02x\n", path, attr );
return CreateFile32A( path, GENERIC_READ | GENERIC_WRITE,
return CreateFileA( path, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
CREATE_ALWAYS, attr, -1 );
}
@ -1266,10 +1266,10 @@ HFILE32 WINAPI _lcreat32( LPCSTR path, INT32 attr )
/***********************************************************************
* _lcreat16_uniq (Not a Windows API)
*/
HFILE16 _lcreat16_uniq( LPCSTR path, INT32 attr )
HFILE16 _lcreat16_uniq( LPCSTR path, INT attr )
{
TRACE(file, "%s %02x\n", path, attr );
return FILE_AllocDosHandle( CreateFile32A( path, GENERIC_READ | GENERIC_WRITE,
return FILE_AllocDosHandle( CreateFileA( path, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
CREATE_NEW, attr, -1 ));
}
@ -1278,7 +1278,7 @@ HFILE16 _lcreat16_uniq( LPCSTR path, INT32 attr )
/***********************************************************************
* SetFilePointer (KERNEL32.492)
*/
DWORD WINAPI SetFilePointer( HFILE32 hFile, LONG distance, LONG *highword,
DWORD WINAPI SetFilePointer( HFILE hFile, LONG distance, LONG *highword,
DWORD method )
{
struct set_file_pointer_request req;
@ -1318,14 +1318,14 @@ DWORD WINAPI SetFilePointer( HFILE32 hFile, LONG distance, LONG *highword,
*/
LONG WINAPI _llseek16( HFILE16 hFile, LONG lOffset, INT16 nOrigin )
{
return SetFilePointer( FILE_GetHandle32(hFile), lOffset, NULL, nOrigin );
return SetFilePointer( FILE_GetHandle(hFile), lOffset, NULL, nOrigin );
}
/***********************************************************************
* _llseek32 (KERNEL32.594)
*/
LONG WINAPI _llseek32( HFILE32 hFile, LONG lOffset, INT32 nOrigin )
LONG WINAPI _llseek( HFILE hFile, LONG lOffset, INT nOrigin )
{
return SetFilePointer( hFile, lOffset, NULL, nOrigin );
}
@ -1336,20 +1336,20 @@ LONG WINAPI _llseek32( HFILE32 hFile, LONG lOffset, INT32 nOrigin )
*/
HFILE16 WINAPI _lopen16( LPCSTR path, INT16 mode )
{
return FILE_AllocDosHandle( _lopen32( path, mode ) );
return FILE_AllocDosHandle( _lopen( path, mode ) );
}
/***********************************************************************
* _lopen32 (KERNEL32.595)
*/
HFILE32 WINAPI _lopen32( LPCSTR path, INT32 mode )
HFILE WINAPI _lopen( LPCSTR path, INT mode )
{
DWORD access, sharing;
TRACE(file, "('%s',%04x)\n", path, mode );
FILE_ConvertOFMode( mode, &access, &sharing );
return CreateFile32A( path, access, sharing, NULL, OPEN_EXISTING, 0, -1 );
return CreateFileA( path, access, sharing, NULL, OPEN_EXISTING, 0, -1 );
}
@ -1358,15 +1358,15 @@ HFILE32 WINAPI _lopen32( LPCSTR path, INT32 mode )
*/
UINT16 WINAPI _lwrite16( HFILE16 hFile, LPCSTR buffer, UINT16 count )
{
return (UINT16)_hwrite32( FILE_GetHandle32(hFile), buffer, (LONG)count );
return (UINT16)_hwrite( FILE_GetHandle(hFile), buffer, (LONG)count );
}
/***********************************************************************
* _lwrite32 (KERNEL32.761)
*/
UINT32 WINAPI _lwrite32( HFILE32 hFile, LPCSTR buffer, UINT32 count )
UINT WINAPI _lwrite( HFILE hFile, LPCSTR buffer, UINT count )
{
return (UINT32)_hwrite32( hFile, buffer, (LONG)count );
return (UINT)_hwrite( hFile, buffer, (LONG)count );
}
@ -1375,16 +1375,16 @@ UINT32 WINAPI _lwrite32( HFILE32 hFile, LPCSTR buffer, UINT32 count )
*/
LONG WINAPI _hread16( HFILE16 hFile, LPVOID buffer, LONG count)
{
return _lread32( FILE_GetHandle32(hFile), buffer, count );
return _lread( FILE_GetHandle(hFile), buffer, count );
}
/***********************************************************************
* _hread32 (KERNEL32.590)
*/
LONG WINAPI _hread32( HFILE32 hFile, LPVOID buffer, LONG count)
LONG WINAPI _hread( HFILE hFile, LPVOID buffer, LONG count)
{
return _lread32( hFile, buffer, count );
return _lread( hFile, buffer, count );
}
@ -1393,7 +1393,7 @@ LONG WINAPI _hread32( HFILE32 hFile, LPVOID buffer, LONG count)
*/
LONG WINAPI _hwrite16( HFILE16 hFile, LPCSTR buffer, LONG count )
{
return _hwrite32( FILE_GetHandle32(hFile), buffer, count );
return _hwrite( FILE_GetHandle(hFile), buffer, count );
}
@ -1407,7 +1407,7 @@ LONG WINAPI _hwrite16( HFILE16 hFile, LPCSTR buffer, LONG count )
* o works with console handles
*
*/
LONG WINAPI _hwrite32( HFILE32 handle, LPCSTR buffer, LONG count )
LONG WINAPI _hwrite( HFILE handle, LPCSTR buffer, LONG count )
{
DWORD result;
@ -1416,11 +1416,11 @@ LONG WINAPI _hwrite32( HFILE32 handle, LPCSTR buffer, LONG count )
if (!count)
{
/* Expand or truncate at current position */
if (!SetEndOfFile( handle )) return HFILE_ERROR32;
if (!SetEndOfFile( handle )) return HFILE_ERROR;
return 0;
}
if (!WriteFile( handle, buffer, count, &result, NULL ))
return HFILE_ERROR32;
return HFILE_ERROR;
return result;
}
@ -1430,8 +1430,8 @@ LONG WINAPI _hwrite32( HFILE32 handle, LPCSTR buffer, LONG count )
*/
UINT16 WINAPI SetHandleCount16( UINT16 count )
{
HGLOBAL16 hPDB = GetCurrentPDB();
PDB *pdb = (PDB *)GlobalLock16( hPDB );
HGLOBAL16 hPDB = GetCurrentPDB16();
PDB16 *pdb = (PDB16 *)GlobalLock16( hPDB );
BYTE *files = PTR_SEG_TO_LIN( pdb->fileHandlesPtr );
TRACE(file, "(%d)\n", count );
@ -1446,7 +1446,7 @@ UINT16 WINAPI SetHandleCount16( UINT16 count )
memcpy( pdb->fileHandles, files, 20 );
GlobalFree16( pdb->hFileHandles );
pdb->fileHandlesPtr = (SEGPTR)MAKELONG( 0x18,
GlobalHandleToSel( hPDB ) );
GlobalHandleToSel16( hPDB ) );
pdb->hFileHandles = 0;
pdb->nbFiles = 20;
}
@ -1480,7 +1480,7 @@ UINT16 WINAPI SetHandleCount16( UINT16 count )
/*************************************************************************
* SetHandleCount32 (KERNEL32.494)
*/
UINT32 WINAPI SetHandleCount32( UINT32 count )
UINT WINAPI SetHandleCount( UINT count )
{
return MIN( 256, count );
}
@ -1489,7 +1489,7 @@ UINT32 WINAPI SetHandleCount32( UINT32 count )
/***********************************************************************
* FlushFileBuffers (KERNEL32.133)
*/
BOOL32 WINAPI FlushFileBuffers( HFILE32 hFile )
BOOL WINAPI FlushFileBuffers( HFILE hFile )
{
struct flush_file_request req;
@ -1504,7 +1504,7 @@ BOOL32 WINAPI FlushFileBuffers( HFILE32 hFile )
/**************************************************************************
* SetEndOfFile (KERNEL32.483)
*/
BOOL32 WINAPI SetEndOfFile( HFILE32 hFile )
BOOL WINAPI SetEndOfFile( HFILE hFile )
{
struct truncate_file_request req;
@ -1521,14 +1521,14 @@ BOOL32 WINAPI SetEndOfFile( HFILE32 hFile )
*/
BOOL16 WINAPI DeleteFile16( LPCSTR path )
{
return DeleteFile32A( path );
return DeleteFileA( path );
}
/***********************************************************************
* DeleteFile32A (KERNEL32.71)
*/
BOOL32 WINAPI DeleteFile32A( LPCSTR path )
BOOL WINAPI DeleteFileA( LPCSTR path )
{
DOS_FULL_NAME full_name;
@ -1559,10 +1559,10 @@ BOOL32 WINAPI DeleteFile32A( LPCSTR path )
/***********************************************************************
* DeleteFile32W (KERNEL32.72)
*/
BOOL32 WINAPI DeleteFile32W( LPCWSTR path )
BOOL WINAPI DeleteFileW( LPCWSTR path )
{
LPSTR xpath = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
BOOL32 ret = DeleteFile32A( xpath );
BOOL ret = DeleteFileA( xpath );
HeapFree( GetProcessHeap(), 0, xpath );
return ret;
}
@ -1662,7 +1662,7 @@ int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low )
/***********************************************************************
* GetFileType (KERNEL32.222)
*/
DWORD WINAPI GetFileType( HFILE32 hFile )
DWORD WINAPI GetFileType( HFILE hFile )
{
struct get_file_info_request req;
struct get_file_info_reply reply;
@ -1680,7 +1680,7 @@ DWORD WINAPI GetFileType( HFILE32 hFile )
/**************************************************************************
* MoveFileEx32A (KERNEL32.???)
*/
BOOL32 WINAPI MoveFileEx32A( LPCSTR fn1, LPCSTR fn2, DWORD flag )
BOOL WINAPI MoveFileExA( LPCSTR fn1, LPCSTR fn2, DWORD flag )
{
DOS_FULL_NAME full_name1, full_name2;
int mode=0; /* mode == 1: use copy */
@ -1750,18 +1750,18 @@ BOOL32 WINAPI MoveFileEx32A( LPCSTR fn1, LPCSTR fn2, DWORD flag )
}
else return TRUE;
else /* copy File */
return CopyFile32A(fn1, fn2, (!(flag & MOVEFILE_REPLACE_EXISTING)));
return CopyFileA(fn1, fn2, (!(flag & MOVEFILE_REPLACE_EXISTING)));
}
/**************************************************************************
* MoveFileEx32W (KERNEL32.???)
*/
BOOL32 WINAPI MoveFileEx32W( LPCWSTR fn1, LPCWSTR fn2, DWORD flag )
BOOL WINAPI MoveFileExW( LPCWSTR fn1, LPCWSTR fn2, DWORD flag )
{
LPSTR afn1 = HEAP_strdupWtoA( GetProcessHeap(), 0, fn1 );
LPSTR afn2 = HEAP_strdupWtoA( GetProcessHeap(), 0, fn2 );
BOOL32 res = MoveFileEx32A( afn1, afn2, flag );
BOOL res = MoveFileExA( afn1, afn2, flag );
HeapFree( GetProcessHeap(), 0, afn1 );
HeapFree( GetProcessHeap(), 0, afn2 );
return res;
@ -1773,7 +1773,7 @@ BOOL32 WINAPI MoveFileEx32W( LPCWSTR fn1, LPCWSTR fn2, DWORD flag )
*
* Move file or directory
*/
BOOL32 WINAPI MoveFile32A( LPCSTR fn1, LPCSTR fn2 )
BOOL WINAPI MoveFileA( LPCSTR fn1, LPCSTR fn2 )
{
DOS_FULL_NAME full_name1, full_name2;
struct stat fstat;
@ -1808,7 +1808,7 @@ BOOL32 WINAPI MoveFile32A( LPCSTR fn1, LPCSTR fn2 )
return FALSE;
}
else
return CopyFile32A(fn1, fn2, TRUE); /*fail, if exist */
return CopyFileA(fn1, fn2, TRUE); /*fail, if exist */
}
}
@ -1816,11 +1816,11 @@ BOOL32 WINAPI MoveFile32A( LPCSTR fn1, LPCSTR fn2 )
/**************************************************************************
* MoveFile32W (KERNEL32.390)
*/
BOOL32 WINAPI MoveFile32W( LPCWSTR fn1, LPCWSTR fn2 )
BOOL WINAPI MoveFileW( LPCWSTR fn1, LPCWSTR fn2 )
{
LPSTR afn1 = HEAP_strdupWtoA( GetProcessHeap(), 0, fn1 );
LPSTR afn2 = HEAP_strdupWtoA( GetProcessHeap(), 0, fn2 );
BOOL32 res = MoveFile32A( afn1, afn2 );
BOOL res = MoveFileA( afn1, afn2 );
HeapFree( GetProcessHeap(), 0, afn1 );
HeapFree( GetProcessHeap(), 0, afn2 );
return res;
@ -1830,35 +1830,35 @@ BOOL32 WINAPI MoveFile32W( LPCWSTR fn1, LPCWSTR fn2 )
/**************************************************************************
* CopyFile32A (KERNEL32.36)
*/
BOOL32 WINAPI CopyFile32A( LPCSTR source, LPCSTR dest, BOOL32 fail_if_exists )
BOOL WINAPI CopyFileA( LPCSTR source, LPCSTR dest, BOOL fail_if_exists )
{
HFILE32 h1, h2;
HFILE h1, h2;
BY_HANDLE_FILE_INFORMATION info;
UINT32 count;
BOOL32 ret = FALSE;
UINT count;
BOOL ret = FALSE;
int mode;
char buffer[2048];
if ((h1 = _lopen32( source, OF_READ )) == HFILE_ERROR32) return FALSE;
if ((h1 = _lopen( source, OF_READ )) == HFILE_ERROR) return FALSE;
if (!GetFileInformationByHandle( h1, &info ))
{
CloseHandle( h1 );
return FALSE;
}
mode = (info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 0444 : 0666;
if ((h2 = CreateFile32A( dest, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
if ((h2 = CreateFileA( dest, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
fail_if_exists ? CREATE_NEW : CREATE_ALWAYS,
info.dwFileAttributes, h1 )) == HFILE_ERROR32)
info.dwFileAttributes, h1 )) == HFILE_ERROR)
{
CloseHandle( h1 );
return FALSE;
}
while ((count = _lread32( h1, buffer, sizeof(buffer) )) > 0)
while ((count = _lread( h1, buffer, sizeof(buffer) )) > 0)
{
char *p = buffer;
while (count > 0)
{
INT32 res = _lwrite32( h2, p, count );
INT res = _lwrite( h2, p, count );
if (res <= 0) goto done;
p += res;
count -= res;
@ -1875,11 +1875,11 @@ done:
/**************************************************************************
* CopyFile32W (KERNEL32.37)
*/
BOOL32 WINAPI CopyFile32W( LPCWSTR source, LPCWSTR dest, BOOL32 fail_if_exists)
BOOL WINAPI CopyFileW( LPCWSTR source, LPCWSTR dest, BOOL fail_if_exists)
{
LPSTR sourceA = HEAP_strdupWtoA( GetProcessHeap(), 0, source );
LPSTR destA = HEAP_strdupWtoA( GetProcessHeap(), 0, dest );
BOOL32 ret = CopyFile32A( sourceA, destA, fail_if_exists );
BOOL ret = CopyFileA( sourceA, destA, fail_if_exists );
HeapFree( GetProcessHeap(), 0, sourceA );
HeapFree( GetProcessHeap(), 0, destA );
return ret;
@ -1893,14 +1893,14 @@ BOOL32 WINAPI CopyFile32W( LPCWSTR source, LPCWSTR dest, BOOL32 fail_if_exists)
* the "ex" version of the method and calls the CopyFile method.
* It will have to be fixed eventually.
*/
BOOL32 WINAPI CopyFileEx32A(LPCSTR sourceFilename,
BOOL WINAPI CopyFileExA(LPCSTR sourceFilename,
LPCSTR destFilename,
LPPROGRESS_ROUTINE progressRoutine,
LPVOID appData,
LPBOOL32 cancelFlagPointer,
LPBOOL cancelFlagPointer,
DWORD copyFlags)
{
BOOL32 failIfExists = FALSE;
BOOL failIfExists = FALSE;
/*
* Interpret the only flag that CopyFile can interpret.
@ -1910,23 +1910,23 @@ BOOL32 WINAPI CopyFileEx32A(LPCSTR sourceFilename,
failIfExists = TRUE;
}
return CopyFile32A(sourceFilename, destFilename, failIfExists);
return CopyFileA(sourceFilename, destFilename, failIfExists);
}
/**************************************************************************
* CopyFileEx32W (KERNEL32.859)
*/
BOOL32 WINAPI CopyFileEx32W(LPCWSTR sourceFilename,
BOOL WINAPI CopyFileExW(LPCWSTR sourceFilename,
LPCWSTR destFilename,
LPPROGRESS_ROUTINE progressRoutine,
LPVOID appData,
LPBOOL32 cancelFlagPointer,
LPBOOL cancelFlagPointer,
DWORD copyFlags)
{
LPSTR sourceA = HEAP_strdupWtoA( GetProcessHeap(), 0, sourceFilename );
LPSTR destA = HEAP_strdupWtoA( GetProcessHeap(), 0, destFilename );
BOOL32 ret = CopyFileEx32A(sourceA,
BOOL ret = CopyFileExA(sourceA,
destA,
progressRoutine,
appData,
@ -1943,7 +1943,7 @@ BOOL32 WINAPI CopyFileEx32W(LPCWSTR sourceFilename,
/***********************************************************************
* SetFileTime (KERNEL32.650)
*/
BOOL32 WINAPI SetFileTime( HFILE32 hFile,
BOOL WINAPI SetFileTime( HFILE hFile,
const FILETIME *lpCreationTime,
const FILETIME *lpLastAccessTime,
const FILETIME *lpLastWriteTime )
@ -1970,7 +1970,7 @@ BOOL32 WINAPI SetFileTime( HFILE32 hFile,
/**************************************************************************
* LockFile (KERNEL32.511)
*/
BOOL32 WINAPI LockFile( HFILE32 hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
BOOL WINAPI LockFile( HFILE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh )
{
struct lock_file_request req;
@ -1990,7 +1990,7 @@ BOOL32 WINAPI LockFile( HFILE32 hFile, DWORD dwFileOffsetLow, DWORD dwFileOffset
/**************************************************************************
* UnlockFile (KERNEL32.703)
*/
BOOL32 WINAPI UnlockFile( HFILE32 hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
BOOL WINAPI UnlockFile( HFILE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
DWORD nNumberOfBytesToUnlockLow, DWORD nNumberOfBytesToUnlockHigh )
{
struct unlock_file_request req;
@ -2031,7 +2031,7 @@ static void DOS_RemoveFileLocks(FILE_OBJECT *file);
* how critical that is at this point (FIXME).
*/
static BOOL32 DOS_AddLock(FILE_OBJECT *file, struct flock *f)
static BOOL DOS_AddLock(FILE_OBJECT *file, struct flock *f)
{
DOS_FILE_LOCK *curr;
DWORD processId;
@ -2084,7 +2084,7 @@ static void DOS_RemoveFileLocks(FILE_OBJECT *file)
}
}
static BOOL32 DOS_RemoveLock(FILE_OBJECT *file, struct flock *f)
static BOOL DOS_RemoveLock(FILE_OBJECT *file, struct flock *f)
{
DWORD processId;
DOS_FILE_LOCK **curr;
@ -2112,8 +2112,8 @@ static BOOL32 DOS_RemoveLock(FILE_OBJECT *file, struct flock *f)
/**************************************************************************
* LockFile (KERNEL32.511)
*/
BOOL32 WINAPI LockFile(
HFILE32 hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,
BOOL WINAPI LockFile(
HFILE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,
DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh )
{
struct flock f;
@ -2163,8 +2163,8 @@ BOOL32 WINAPI LockFile(
/**************************************************************************
* UnlockFile (KERNEL32.703)
*/
BOOL32 WINAPI UnlockFile(
HFILE32 hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,
BOOL WINAPI UnlockFile(
HFILE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,
DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh )
{
FILE_OBJECT *file;
@ -2203,7 +2203,7 @@ BOOL32 WINAPI UnlockFile(
/**************************************************************************
* GetFileAttributesEx32A [KERNEL32.874]
*/
BOOL32 WINAPI GetFileAttributesEx32A(
BOOL WINAPI GetFileAttributesExA(
LPCSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFileInformation)
{
@ -2238,13 +2238,13 @@ BOOL32 WINAPI GetFileAttributesEx32A(
/**************************************************************************
* GetFileAttributesEx32W [KERNEL32.875]
*/
BOOL32 WINAPI GetFileAttributesEx32W(
BOOL WINAPI GetFileAttributesExW(
LPCWSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFileInformation)
{
LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpFileName );
BOOL32 res =
GetFileAttributesEx32A( nameA, fInfoLevelId, lpFileInformation);
BOOL res =
GetFileAttributesExA( nameA, fInfoLevelId, lpFileInformation);
HeapFree( GetProcessHeap(), 0, nameA );
return res;
}

View File

@ -36,7 +36,7 @@ typedef struct tagPROFILESECTION
typedef struct
{
BOOL32 changed;
BOOL changed;
PROFILESECTION *section;
char *dos_name;
char *unix_name;
@ -89,7 +89,7 @@ static void PROFILE_CopyEntry( char *buffer, const char *value, int len,
if (!handle_env)
{
lstrcpyn32A( buffer, value, len );
lstrcpynA( buffer, value, len );
if (quote && (len >= strlen(value))) buffer[strlen(buffer)-1] = '\0';
return;
}
@ -102,10 +102,10 @@ static void PROFILE_CopyEntry( char *buffer, const char *value, int len,
const char *env_p;
const char *p2 = strchr( p, '}' );
if (!p2) continue; /* ignore it */
lstrcpyn32A(env_val, p + 2, MIN( sizeof(env_val), (int)(p2-p)-1 ));
lstrcpynA(env_val, p + 2, MIN( sizeof(env_val), (int)(p2-p)-1 ));
if ((env_p = getenv( env_val )) != NULL)
{
lstrcpyn32A( buffer, env_p, len );
lstrcpynA( buffer, env_p, len );
buffer += strlen( buffer );
len -= strlen( buffer );
}
@ -258,7 +258,7 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
*
* Delete a section from a profile tree.
*/
static BOOL32 PROFILE_DeleteSection( PROFILESECTION **section, LPCSTR name )
static BOOL PROFILE_DeleteSection( PROFILESECTION **section, LPCSTR name )
{
while (*section)
{
@ -281,7 +281,7 @@ static BOOL32 PROFILE_DeleteSection( PROFILESECTION **section, LPCSTR name )
*
* Delete a key from a profile tree.
*/
static BOOL32 PROFILE_DeleteKey( PROFILESECTION **section,
static BOOL PROFILE_DeleteKey( PROFILESECTION **section,
LPCSTR section_name, LPCSTR key_name )
{
while (*section)
@ -354,7 +354,7 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section,
*
* Flush the current profile to disk if changed.
*/
static BOOL32 PROFILE_FlushFile(void)
static BOOL PROFILE_FlushFile(void)
{
char *p, buffer[MAX_PATHNAME_LEN];
const char *unix_name;
@ -378,7 +378,7 @@ static BOOL32 PROFILE_FlushFile(void)
strcat( buffer, "/.wine/" );
p = buffer + strlen(buffer);
strcpy( p, strrchr( CurProfile->dos_name, '\\' ) + 1 );
CharLower32A( p );
CharLowerA( p );
file = fopen( buffer, "w" );
unix_name = buffer;
}
@ -405,7 +405,7 @@ static BOOL32 PROFILE_FlushFile(void)
*
* Open a profile file, checking the cached file first.
*/
static BOOL32 PROFILE_Open( LPCSTR filename )
static BOOL PROFILE_Open( LPCSTR filename )
{
DOS_FULL_NAME full_name;
char buffer[MAX_PATHNAME_LEN];
@ -438,7 +438,7 @@ static BOOL32 PROFILE_Open( LPCSTR filename )
}
else
{
GetWindowsDirectory32A( buffer, sizeof(buffer) );
GetWindowsDirectoryA( buffer, sizeof(buffer) );
strcat( buffer, "\\" );
strcat( buffer, filename );
if (!DOSFS_GetFullName( buffer, FALSE, &full_name )) return FALSE;
@ -507,7 +507,7 @@ static BOOL32 PROFILE_Open( LPCSTR filename )
strcat( buffer, "/.wine/" );
p = buffer + strlen(buffer);
strcpy( p, strrchr( newdos_name, '\\' ) + 1 );
CharLower32A( p );
CharLowerA( p );
if ((file = fopen( buffer, "r" )))
{
TRACE(profile, "(%s): found it in %s\n",
@ -547,16 +547,16 @@ static BOOL32 PROFILE_Open( LPCSTR filename )
* Returns all keys of a section.
* If return_values is TRUE, also include the corresponding values.
*/
static INT32 PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
LPSTR buffer, UINT32 len, BOOL32 handle_env,
BOOL32 return_values )
static INT PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
LPSTR buffer, UINT len, BOOL handle_env,
BOOL return_values )
{
PROFILEKEY *key;
while (section)
{
if (section->name && !strcasecmp( section->name, section_name ))
{
UINT32 oldlen = len;
UINT oldlen = len;
for (key = section->key; key; key = key->next)
{
if (len <= 2) break;
@ -598,8 +598,8 @@ static INT32 PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
*
* Get a profile string.
*/
static INT32 PROFILE_GetString( LPCSTR section, LPCSTR key_name,
LPCSTR def_val, LPSTR buffer, UINT32 len )
static INT PROFILE_GetString( LPCSTR section, LPCSTR key_name,
LPCSTR def_val, LPSTR buffer, UINT len )
{
PROFILEKEY *key = NULL;
@ -623,7 +623,7 @@ static INT32 PROFILE_GetString( LPCSTR section, LPCSTR key_name,
*
* Set a profile string.
*/
static BOOL32 PROFILE_SetString( LPCSTR section_name, LPCSTR key_name,
static BOOL PROFILE_SetString( LPCSTR section_name, LPCSTR key_name,
LPCSTR value )
{
if (!key_name) /* Delete a whole section */
@ -849,7 +849,7 @@ int PROFILE_LoadWineIni(void)
}
if ((p = getenv( "HOME" )) != NULL)
{
lstrcpyn32A(buffer, p, MAX_PATHNAME_LEN - sizeof(PROFILE_WineIniName));
lstrcpynA(buffer, p, MAX_PATHNAME_LEN - sizeof(PROFILE_WineIniName));
strcat( buffer, PROFILE_WineIniName );
if ((f = fopen( buffer, "r" )) != NULL)
{
@ -936,18 +936,18 @@ UINT16 WINAPI GetProfileInt16( LPCSTR section, LPCSTR entry, INT16 def_val )
/***********************************************************************
* GetProfileInt32A (KERNEL32.264)
*/
UINT32 WINAPI GetProfileInt32A( LPCSTR section, LPCSTR entry, INT32 def_val )
UINT WINAPI GetProfileIntA( LPCSTR section, LPCSTR entry, INT def_val )
{
return GetPrivateProfileInt32A( section, entry, def_val, "win.ini" );
return GetPrivateProfileIntA( section, entry, def_val, "win.ini" );
}
/***********************************************************************
* GetProfileInt32W (KERNEL32.264)
*/
UINT32 WINAPI GetProfileInt32W( LPCWSTR section, LPCWSTR entry, INT32 def_val )
UINT WINAPI GetProfileIntW( LPCWSTR section, LPCWSTR entry, INT def_val )
{
if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
return GetPrivateProfileInt32W( section, entry, def_val, wininiW );
return GetPrivateProfileIntW( section, entry, def_val, wininiW );
}
/***********************************************************************
@ -963,40 +963,40 @@ INT16 WINAPI GetProfileString16( LPCSTR section, LPCSTR entry, LPCSTR def_val,
/***********************************************************************
* GetProfileString32A (KERNEL32.268)
*/
INT32 WINAPI GetProfileString32A( LPCSTR section, LPCSTR entry, LPCSTR def_val,
LPSTR buffer, UINT32 len )
INT WINAPI GetProfileStringA( LPCSTR section, LPCSTR entry, LPCSTR def_val,
LPSTR buffer, UINT len )
{
return GetPrivateProfileString32A( section, entry, def_val,
return GetPrivateProfileStringA( section, entry, def_val,
buffer, len, "win.ini" );
}
/***********************************************************************
* GetProfileString32W (KERNEL32.269)
*/
INT32 WINAPI GetProfileString32W( LPCWSTR section, LPCWSTR entry,
LPCWSTR def_val, LPWSTR buffer, UINT32 len )
INT WINAPI GetProfileStringW( LPCWSTR section, LPCWSTR entry,
LPCWSTR def_val, LPWSTR buffer, UINT len )
{
if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
return GetPrivateProfileString32W( section, entry, def_val,
return GetPrivateProfileStringW( section, entry, def_val,
buffer, len, wininiW );
}
/***********************************************************************
* GetProfileSection32A (KERNEL32.268)
*/
INT32 WINAPI GetProfileSection32A( LPCSTR section, LPSTR buffer, DWORD len )
INT WINAPI GetProfileSectionA( LPCSTR section, LPSTR buffer, DWORD len )
{
return GetPrivateProfileSection32A( section, buffer, len, "win.ini" );
return GetPrivateProfileSectionA( section, buffer, len, "win.ini" );
}
/***********************************************************************
* GetProfileSection32W (KERNEL32)
*/
INT32 WINAPI GetProfileSection32W( LPCWSTR section, LPWSTR buffer, DWORD len )
INT WINAPI GetProfileSectionW( LPCWSTR section, LPWSTR buffer, DWORD len )
{
if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
return GetPrivateProfileSection32W( section, buffer, len, wininiW );
return GetPrivateProfileSectionW( section, buffer, len, wininiW );
}
@ -1015,20 +1015,20 @@ BOOL16 WINAPI WriteProfileString16( LPCSTR section, LPCSTR entry,
/***********************************************************************
* WriteProfileString32A (KERNEL32.587)
*/
BOOL32 WINAPI WriteProfileString32A( LPCSTR section, LPCSTR entry,
BOOL WINAPI WriteProfileStringA( LPCSTR section, LPCSTR entry,
LPCSTR string )
{
return WritePrivateProfileString32A( section, entry, string, "win.ini" );
return WritePrivateProfileStringA( section, entry, string, "win.ini" );
}
/***********************************************************************
* WriteProfileString32W (KERNEL32.588)
*/
BOOL32 WINAPI WriteProfileString32W( LPCWSTR section, LPCWSTR entry,
BOOL WINAPI WriteProfileStringW( LPCWSTR section, LPCWSTR entry,
LPCWSTR string )
{
if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
return WritePrivateProfileString32W( section, entry, string, wininiW );
return WritePrivateProfileStringW( section, entry, string, wininiW );
}
@ -1038,7 +1038,7 @@ BOOL32 WINAPI WriteProfileString32W( LPCWSTR section, LPCWSTR entry,
UINT16 WINAPI GetPrivateProfileInt16( LPCSTR section, LPCSTR entry,
INT16 def_val, LPCSTR filename )
{
long result=(long)GetPrivateProfileInt32A(section,entry,def_val,filename);
long result=(long)GetPrivateProfileIntA(section,entry,def_val,filename);
if (result > 65535) return 65535;
if (result >= 0) return (UINT16)result;
@ -1049,31 +1049,31 @@ UINT16 WINAPI GetPrivateProfileInt16( LPCSTR section, LPCSTR entry,
/***********************************************************************
* GetPrivateProfileInt32A (KERNEL32.251)
*/
UINT32 WINAPI GetPrivateProfileInt32A( LPCSTR section, LPCSTR entry,
INT32 def_val, LPCSTR filename )
UINT WINAPI GetPrivateProfileIntA( LPCSTR section, LPCSTR entry,
INT def_val, LPCSTR filename )
{
char buffer[20];
char *p;
long result;
GetPrivateProfileString32A( section, entry, "",
GetPrivateProfileStringA( section, entry, "",
buffer, sizeof(buffer), filename );
if (!buffer[0]) return (UINT32)def_val;
if (!buffer[0]) return (UINT)def_val;
result = strtol( buffer, &p, 0 );
if (p == buffer) return 0; /* No digits at all */
return (UINT32)result;
return (UINT)result;
}
/***********************************************************************
* GetPrivateProfileInt32W (KERNEL32.252)
*/
UINT32 WINAPI GetPrivateProfileInt32W( LPCWSTR section, LPCWSTR entry,
INT32 def_val, LPCWSTR filename )
UINT WINAPI GetPrivateProfileIntW( LPCWSTR section, LPCWSTR entry,
INT def_val, LPCWSTR filename )
{
LPSTR sectionA = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
LPSTR entryA = HEAP_strdupWtoA( GetProcessHeap(), 0, entry );
LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
UINT32 res = GetPrivateProfileInt32A(sectionA, entryA, def_val, filenameA);
UINT res = GetPrivateProfileIntA(sectionA, entryA, def_val, filenameA);
HeapFree( GetProcessHeap(), 0, sectionA );
HeapFree( GetProcessHeap(), 0, filenameA );
HeapFree( GetProcessHeap(), 0, entryA );
@ -1087,37 +1087,37 @@ INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry,
LPCSTR def_val, LPSTR buffer,
UINT16 len, LPCSTR filename )
{
return GetPrivateProfileString32A(section,entry,def_val,buffer,len,filename);
return GetPrivateProfileStringA(section,entry,def_val,buffer,len,filename);
}
/***********************************************************************
* GetPrivateProfileString32A (KERNEL32.255)
*/
INT32 WINAPI GetPrivateProfileString32A( LPCSTR section, LPCSTR entry,
INT WINAPI GetPrivateProfileStringA( LPCSTR section, LPCSTR entry,
LPCSTR def_val, LPSTR buffer,
UINT32 len, LPCSTR filename )
UINT len, LPCSTR filename )
{
if (!filename)
filename = "win.ini";
if (PROFILE_Open( filename ))
return PROFILE_GetString( section, entry, def_val, buffer, len );
lstrcpyn32A( buffer, def_val, len );
lstrcpynA( buffer, def_val, len );
return strlen( buffer );
}
/***********************************************************************
* GetPrivateProfileString32W (KERNEL32.256)
*/
INT32 WINAPI GetPrivateProfileString32W( LPCWSTR section, LPCWSTR entry,
INT WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
LPCWSTR def_val, LPWSTR buffer,
UINT32 len, LPCWSTR filename )
UINT len, LPCWSTR filename )
{
LPSTR sectionA = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
LPSTR entryA = HEAP_strdupWtoA( GetProcessHeap(), 0, entry );
LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
LPSTR def_valA = HEAP_strdupWtoA( GetProcessHeap(), 0, def_val );
LPSTR bufferA = HeapAlloc( GetProcessHeap(), 0, len );
INT32 ret = GetPrivateProfileString32A( sectionA, entryA, def_valA,
INT ret = GetPrivateProfileStringA( sectionA, entryA, def_valA,
bufferA, len, filenameA );
lstrcpynAtoW( buffer, bufferA, len );
HeapFree( GetProcessHeap(), 0, sectionA );
@ -1131,7 +1131,7 @@ INT32 WINAPI GetPrivateProfileString32W( LPCWSTR section, LPCWSTR entry,
/***********************************************************************
* GetPrivateProfileSection32A (KERNEL32.255)
*/
INT32 WINAPI GetPrivateProfileSection32A( LPCSTR section, LPSTR buffer,
INT WINAPI GetPrivateProfileSectionA( LPCSTR section, LPSTR buffer,
DWORD len, LPCSTR filename )
{
if (PROFILE_Open( filename ))
@ -1145,14 +1145,14 @@ INT32 WINAPI GetPrivateProfileSection32A( LPCSTR section, LPSTR buffer,
* GetPrivateProfileSection32W (KERNEL32.256)
*/
INT32 WINAPI GetPrivateProfileSection32W (LPCWSTR section, LPWSTR buffer,
INT WINAPI GetPrivateProfileSectionW (LPCWSTR section, LPWSTR buffer,
DWORD len, LPCWSTR filename )
{
LPSTR sectionA = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
LPSTR bufferA = HeapAlloc( GetProcessHeap(), 0, len );
INT32 ret = GetPrivateProfileSection32A( sectionA, bufferA, len,
INT ret = GetPrivateProfileSectionA( sectionA, bufferA, len,
filenameA );
HeapFree( GetProcessHeap(), 0, sectionA );
HeapFree( GetProcessHeap(), 0, filenameA );
@ -1166,13 +1166,13 @@ INT32 WINAPI GetPrivateProfileSection32W (LPCWSTR section, LPWSTR buffer,
BOOL16 WINAPI WritePrivateProfileString16( LPCSTR section, LPCSTR entry,
LPCSTR string, LPCSTR filename )
{
return WritePrivateProfileString32A(section,entry,string,filename);
return WritePrivateProfileStringA(section,entry,string,filename);
}
/***********************************************************************
* WritePrivateProfileString32A (KERNEL32.582)
*/
BOOL32 WINAPI WritePrivateProfileString32A( LPCSTR section, LPCSTR entry,
BOOL WINAPI WritePrivateProfileStringA( LPCSTR section, LPCSTR entry,
LPCSTR string, LPCSTR filename )
{
if (!PROFILE_Open( filename )) return FALSE;
@ -1183,14 +1183,14 @@ BOOL32 WINAPI WritePrivateProfileString32A( LPCSTR section, LPCSTR entry,
/***********************************************************************
* WritePrivateProfileString32W (KERNEL32.583)
*/
BOOL32 WINAPI WritePrivateProfileString32W( LPCWSTR section, LPCWSTR entry,
BOOL WINAPI WritePrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
LPCWSTR string, LPCWSTR filename )
{
LPSTR sectionA = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
LPSTR entryA = HEAP_strdupWtoA( GetProcessHeap(), 0, entry );
LPSTR stringA = HEAP_strdupWtoA( GetProcessHeap(), 0, string );
LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
BOOL32 res = WritePrivateProfileString32A( sectionA, entryA,
BOOL res = WritePrivateProfileStringA( sectionA, entryA,
stringA, filenameA );
HeapFree( GetProcessHeap(), 0, sectionA );
HeapFree( GetProcessHeap(), 0, entryA );
@ -1202,7 +1202,7 @@ BOOL32 WINAPI WritePrivateProfileString32W( LPCWSTR section, LPCWSTR entry,
/***********************************************************************
* WritePrivateProfileSection32A (KERNEL32)
*/
BOOL32 WINAPI WritePrivateProfileSection32A( LPCSTR section,
BOOL WINAPI WritePrivateProfileSectionA( LPCSTR section,
LPCSTR string, LPCSTR filename )
{
char *p =(char*)string;
@ -1223,14 +1223,14 @@ BOOL32 WINAPI WritePrivateProfileSection32A( LPCSTR section,
/***********************************************************************
* WritePrivateProfileSection32W (KERNEL32)
*/
BOOL32 WINAPI WritePrivateProfileSection32W( LPCWSTR section,
BOOL WINAPI WritePrivateProfileSectionW( LPCWSTR section,
LPCWSTR string, LPCWSTR filename)
{
LPSTR sectionA = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
LPSTR stringA = HEAP_strdupWtoA( GetProcessHeap(), 0, string );
LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
BOOL32 res = WritePrivateProfileSection32A( sectionA, stringA, filenameA );
BOOL res = WritePrivateProfileSectionA( sectionA, stringA, filenameA );
HeapFree( GetProcessHeap(), 0, sectionA );
HeapFree( GetProcessHeap(), 0, stringA );
HeapFree( GetProcessHeap(), 0, filenameA );
@ -1241,20 +1241,20 @@ BOOL32 WINAPI WritePrivateProfileSection32W( LPCWSTR section,
/***********************************************************************
* WriteProfileSection32A (KERNEL32.747)
*/
BOOL32 WINAPI WriteProfileSection32A( LPCSTR section, LPCSTR keys_n_values)
BOOL WINAPI WriteProfileSectionA( LPCSTR section, LPCSTR keys_n_values)
{
return WritePrivateProfileSection32A( section, keys_n_values, "win.ini");
return WritePrivateProfileSectionA( section, keys_n_values, "win.ini");
}
/***********************************************************************
* WriteProfileSection32W (KERNEL32.748)
*/
BOOL32 WINAPI WriteProfileSection32W( LPCWSTR section, LPCWSTR keys_n_values)
BOOL WINAPI WriteProfileSectionW( LPCWSTR section, LPCWSTR keys_n_values)
{
if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini");
return (WritePrivateProfileSection32W (section,keys_n_values, wininiW));
return (WritePrivateProfileSectionW (section,keys_n_values, wininiW));
}
/***********************************************************************
@ -1303,7 +1303,7 @@ WORD WINAPI GetProfileSectionNames16( LPSTR buffer, WORD size)
/***********************************************************************
* GetPrivateProfileSectionNames32A (KERNEL32.365)
*/
DWORD WINAPI GetPrivateProfileSectionNames32A( LPSTR buffer, DWORD size,
DWORD WINAPI GetPrivateProfileSectionNamesA( LPSTR buffer, DWORD size,
LPCSTR filename)
{
@ -1314,14 +1314,14 @@ DWORD WINAPI GetPrivateProfileSectionNames32A( LPSTR buffer, DWORD size,
/***********************************************************************
* GetPrivateProfileSectionNames32W (KERNEL32.366)
*/
DWORD WINAPI GetPrivateProfileSectionNames32W( LPWSTR buffer, DWORD size,
DWORD WINAPI GetPrivateProfileSectionNamesW( LPWSTR buffer, DWORD size,
LPCWSTR filename)
{
LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
LPSTR bufferA = HeapAlloc( GetProcessHeap(), 0, size);
INT32 ret = GetPrivateProfileSectionNames16 (bufferA, size, filenameA);
INT ret = GetPrivateProfileSectionNames16 (bufferA, size, filenameA);
lstrcpynAtoW( buffer, bufferA, size);
HeapFree( GetProcessHeap(), 0, bufferA);
HeapFree( GetProcessHeap(), 0, filenameA );
@ -1333,15 +1333,15 @@ DWORD WINAPI GetPrivateProfileSectionNames32W( LPWSTR buffer, DWORD size,
/***********************************************************************
* GetPrivateProfileStruct32A (KERNEL32.370)
*/
BOOL32 WINAPI GetPrivateProfileStruct32A (LPCSTR section, LPCSTR key,
LPVOID buf, UINT32 len, LPCSTR filename)
BOOL WINAPI GetPrivateProfileStructA (LPCSTR section, LPCSTR key,
LPVOID buf, UINT len, LPCSTR filename)
{
PROFILEKEY *k;
if (PROFILE_Open( filename )) {
k=PROFILE_Find ( &CurProfile->section, section, key, FALSE);
if (!k) return FALSE;
lstrcpyn32A( buf, k->value, strlen(k->value));
lstrcpynA( buf, k->value, strlen(k->value));
return TRUE;
}
return FALSE;
@ -1350,15 +1350,15 @@ BOOL32 WINAPI GetPrivateProfileStruct32A (LPCSTR section, LPCSTR key,
/***********************************************************************
* GetPrivateProfileStruct32W (KERNEL32.543)
*/
BOOL32 WINAPI GetPrivateProfileStruct32W (LPCWSTR section, LPCWSTR key,
LPVOID buffer, UINT32 len, LPCWSTR filename)
BOOL WINAPI GetPrivateProfileStructW (LPCWSTR section, LPCWSTR key,
LPVOID buffer, UINT len, LPCWSTR filename)
{
LPSTR sectionA = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
LPSTR keyA = HEAP_strdupWtoA( GetProcessHeap(), 0, key);
LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
LPSTR bufferA = HeapAlloc( GetProcessHeap(), 0, len );
INT32 ret = GetPrivateProfileStruct32A( sectionA, keyA, bufferA,
INT ret = GetPrivateProfileStructA( sectionA, keyA, bufferA,
len, filenameA );
lstrcpynAtoW( buffer, bufferA, len );
HeapFree( GetProcessHeap(), 0, bufferA);
@ -1375,8 +1375,8 @@ BOOL32 WINAPI GetPrivateProfileStruct32W (LPCWSTR section, LPCWSTR key,
/***********************************************************************
* WritePrivateProfileStruct32A (KERNEL32.744)
*/
BOOL32 WINAPI WritePrivateProfileStruct32A (LPCSTR section, LPCSTR key,
LPVOID buf, UINT32 bufsize, LPCSTR filename)
BOOL WINAPI WritePrivateProfileStructA (LPCSTR section, LPCSTR key,
LPVOID buf, UINT bufsize, LPCSTR filename)
{
if ((!section) && (!key) && (!buf)) { /* flush the cache */
PROFILE_FlushFile();
@ -1390,13 +1390,13 @@ BOOL32 WINAPI WritePrivateProfileStruct32A (LPCSTR section, LPCSTR key,
/***********************************************************************
* WritePrivateProfileStruct32W (KERNEL32.544)
*/
BOOL32 WINAPI WritePrivateProfileStruct32W (LPCWSTR section, LPCWSTR key,
LPVOID buf, UINT32 bufsize, LPCWSTR filename)
BOOL WINAPI WritePrivateProfileStructW (LPCWSTR section, LPCWSTR key,
LPVOID buf, UINT bufsize, LPCWSTR filename)
{
LPSTR sectionA = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
LPSTR keyA = HEAP_strdupWtoA( GetProcessHeap(), 0, key);
LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
INT32 ret = WritePrivateProfileStruct32A( sectionA, keyA, buf, bufsize,
INT ret = WritePrivateProfileStructA( sectionA, keyA, buf, bufsize,
filenameA );
HeapFree( GetProcessHeap(), 0, sectionA );
HeapFree( GetProcessHeap(), 0, keyA );
@ -1409,7 +1409,7 @@ BOOL32 WINAPI WritePrivateProfileStruct32W (LPCWSTR section, LPCWSTR key,
/***********************************************************************
* WriteOutProfiles (KERNEL.315)
*/
void WINAPI WriteOutProfiles(void)
void WINAPI WriteOutProfiles16(void)
{
PROFILE_FlushFile();
}

View File

@ -26,8 +26,8 @@ BOOL16 WINAPI PatBlt16( HDC16 hdc, INT16 left, INT16 top,
/***********************************************************************
* PatBlt32 (GDI32.260)
*/
BOOL32 WINAPI PatBlt32( HDC32 hdc, INT32 left, INT32 top,
INT32 width, INT32 height, DWORD rop)
BOOL WINAPI PatBlt( HDC hdc, INT left, INT top,
INT width, INT height, DWORD rop)
{
DC * dc = DC_GetDCPtr( hdc );
if (!dc || !dc->funcs->pPatBlt) return FALSE;
@ -62,8 +62,8 @@ BOOL16 WINAPI BitBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst, INT16 width,
/***********************************************************************
* BitBlt32 (GDI32.10)
*/
BOOL32 WINAPI BitBlt32( HDC32 hdcDst, INT32 xDst, INT32 yDst, INT32 width,
INT32 height, HDC32 hdcSrc, INT32 xSrc, INT32 ySrc,
BOOL WINAPI BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width,
INT height, HDC hdcSrc, INT xSrc, INT ySrc,
DWORD rop )
{
DC *dcDst, *dcSrc;
@ -107,10 +107,10 @@ BOOL16 WINAPI StretchBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst,
/***********************************************************************
* StretchBlt32 (GDI32.350)
*/
BOOL32 WINAPI StretchBlt32( HDC32 hdcDst, INT32 xDst, INT32 yDst,
INT32 widthDst, INT32 heightDst,
HDC32 hdcSrc, INT32 xSrc, INT32 ySrc,
INT32 widthSrc, INT32 heightSrc, DWORD rop )
BOOL WINAPI StretchBlt( HDC hdcDst, INT xDst, INT yDst,
INT widthDst, INT heightDst,
HDC hdcSrc, INT xSrc, INT ySrc,
INT widthSrc, INT heightSrc, DWORD rop )
{
DC *dcDst, *dcSrc;
@ -131,28 +131,28 @@ BOOL32 WINAPI StretchBlt32( HDC32 hdcDst, INT32 xDst, INT32 yDst,
/***********************************************************************
* FastWindowFrame (GDI.400)
*/
BOOL16 WINAPI FastWindowFrame( HDC16 hdc, const RECT16 *rect,
BOOL16 WINAPI FastWindowFrame16( HDC16 hdc, const RECT16 *rect,
INT16 width, INT16 height, DWORD rop )
{
HBRUSH32 hbrush = SelectObject32( hdc, GetStockObject32( GRAY_BRUSH ) );
PatBlt32( hdc, rect->left, rect->top,
HBRUSH hbrush = SelectObject( hdc, GetStockObject( GRAY_BRUSH ) );
PatBlt( hdc, rect->left, rect->top,
rect->right - rect->left - width, height, rop );
PatBlt32( hdc, rect->left, rect->top + height, width,
PatBlt( hdc, rect->left, rect->top + height, width,
rect->bottom - rect->top - height, rop );
PatBlt32( hdc, rect->left + width, rect->bottom,
PatBlt( hdc, rect->left + width, rect->bottom,
rect->right - rect->left - width, -height, rop );
PatBlt32( hdc, rect->right, rect->top, -width,
PatBlt( hdc, rect->right, rect->top, -width,
rect->bottom - rect->top - height, rop );
SelectObject32( hdc, hbrush );
SelectObject( hdc, hbrush );
return TRUE;
}
/***********************************************************************
* MaskBlt32 [GDI32.252]
*/
BOOL32 WINAPI MaskBlt32(HDC32 hdcDest, INT32 nXDest, INT32 nYDest,
INT32 nWidth, INT32 nHeight, HDC32 hdcSource,
INT32 nXSrc, INT32 nYSrc, HBITMAP32 hbmMask,
INT32 xMask, INT32 yMask, DWORD dwRop)
BOOL WINAPI MaskBlt(HDC hdcDest, INT nXDest, INT nYDest,
INT nWidth, INT nHeight, HDC hdcSource,
INT nXSrc, INT nYSrc, HBITMAP hbmMask,
INT xMask, INT yMask, DWORD dwRop)
{
FIXME(bitmap, "(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%ld): stub\n",
hdcDest,nXDest,nYDest,nWidth,nHeight,hdcSource,nXSrc,nYSrc,
@ -164,9 +164,9 @@ BOOL32 WINAPI MaskBlt32(HDC32 hdcDest, INT32 nXDest, INT32 nYDest,
* PlgBlt [GDI.267]
*
*/
BOOL32 WINAPI PlgBlt32( HDC32 hdcDest, const POINT32 *lpPoint,
HDC32 hdcSrc, INT32 nXDest, INT32 nYDest, INT32 nWidth,
INT32 nHeight, HBITMAP32 hbmMask, INT32 xMask, INT32 yMask)
BOOL WINAPI PlgBlt( HDC hdcDest, const POINT *lpPoint,
HDC hdcSrc, INT nXDest, INT nYDest, INT nWidth,
INT nHeight, HBITMAP hbmMask, INT xMask, INT yMask)
{
FIXME(gdi, "PlgBlt, stub\n");
return 1;

Some files were not shown because too many files have changed in this diff Show More