* enabled _DISABLE_TIDENTS for most ReactOS OS components.
* fixed all errors that resulted from this change
* a few small bugfixes along the way
svn path=/trunk/; revision=5449
-# $Id: Makefile,v 1.10 2003/06/19 16:00:03 gvg Exp $
+# $Id: Makefile,v 1.11 2003/08/07 04:03:22 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -I./include -I$(PATH_TO_TOP)/ntoskrnl/include -g
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_NAME_UP = halx86up
STDCALL
EnumResourceTypesA(
HINSTANCE hModule,
- ENUMRESTYPEPROC lpEnumFunc,
+ ENUMRESTYPEPROCA lpEnumFunc,
LONG lParam
);
EnumResourceNamesA(
HINSTANCE hModule,
LPCSTR lpType,
- ENUMRESNAMEPROC lpEnumFunc,
+ ENUMRESNAMEPROCA lpEnumFunc,
LONG lParam
);
HINSTANCE hModule,
LPCSTR lpType,
LPCSTR lpName,
- ENUMRESLANGPROC lpEnumFunc,
+ ENUMRESLANGPROCA lpEnumFunc,
LONG lParam
);
HANDLE STDCALL CreateWaitableTimerA( LPSECURITY_ATTRIBUTES Attributes,
BOOL ManualReset,
- LPCTSTR Name );
+ LPCSTR Name );
HWINSTA
STDCALL
WINBOOL
STDCALL
EnumWindowStationsA(
- ENUMWINDOWSTATIONPROC lpEnumFunc,
+ ENUMWINDOWSTATIONPROCA lpEnumFunc,
LPARAM lParam);
WINBOOL
STDCALL
EnumPropsExA(
HWND hWnd,
- PROPENUMPROCEX lpEnumFunc,
+ PROPENUMPROCEXA lpEnumFunc,
LPARAM lParam);
int
STDCALL
EnumPropsA(
HWND hWnd,
- PROPENUMPROC lpEnumFunc);
+ PROPENUMPROCA lpEnumFunc);
WINBOOL
STDCALL
int
STDCALL
-EnumICMProfilesA(HDC,ICMENUMPROC,LPARAM);
+EnumICMProfilesA(HDC,ICMENUMPROCA,LPARAM);
int
STDCALL
WINBOOL
STDCALL
EnumCalendarInfoA(
- CALINFO_ENUMPROC lpCalInfoEnumProc,
+ CALINFO_ENUMPROCA lpCalInfoEnumProc,
LCID Locale,
CALID Calendar,
CALTYPE CalType);
WINBOOL
STDCALL
EnumTimeFormatsA(
- TIMEFMT_ENUMPROC lpTimeFmtEnumProc,
+ TIMEFMT_ENUMPROCA lpTimeFmtEnumProc,
LCID Locale,
DWORD dwFlags);
WINBOOL
STDCALL
EnumDateFormatsA(
- DATEFMT_ENUMPROC lpDateFmtEnumProc,
+ DATEFMT_ENUMPROCA lpDateFmtEnumProc,
LCID Locale,
DWORD dwFlags);
WINBOOL
STDCALL
EnumSystemLocalesA(
- LOCALE_ENUMPROC lpLocaleEnumProc,
+ LOCALE_ENUMPROCA lpLocaleEnumProc,
DWORD dwFlags);
WINBOOL
STDCALL
EnumSystemCodePagesA(
- CODEPAGE_ENUMPROC lpCodePageEnumProc,
+ CODEPAGE_ENUMPROCA lpCodePageEnumProc,
DWORD dwFlags);
WINBOOL
/* ----------------------------------------------- */
WINBOOL STDCALL LogonUserA (LPSTR, LPSTR, LPSTR, DWORD, DWORD, HANDLE *);
-WINBOOL STDCALL CreateProcessAsUserA (HANDLE, LPCTSTR, LPTSTR,
+WINBOOL STDCALL CreateProcessAsUserA (HANDLE, LPCSTR, LPSTR,
SECURITY_ATTRIBUTES*, SECURITY_ATTRIBUTES*, WINBOOL, DWORD, LPVOID,
- LPCTSTR, STARTUPINFOA*, PROCESS_INFORMATION*);
+ LPCSTR, STARTUPINFOA*, PROCESS_INFORMATION*);
+
+DWORD WINAPI
+SHGetFileInfoA (LPCSTR, DWORD, SHFILEINFO FAR *, UINT, UINT);
+
+WINBOOL WINAPI
+SHGetPathFromIDListA (LPCITEMIDLIST, LPSTR);
#ifdef __cplusplus
}
#define APIENTRY STDCALL
#define WINGDIAPI
-
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
typedef wchar_t *LPTCH;
typedef wchar_t *LPTSTR;
typedef char *LPTCH;
typedef char *LPTSTR;
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#ifndef RC_INVOKED
typedef CONST CHAR *LPCCH;
typedef CHAR *LPCH;
typedef COLORREF *LPCOLORREF;
-
+
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
typedef const wchar_t *LPCTSTR;
#else
typedef const char *LPCTSTR;
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
typedef const wchar_t *LPCWCH;
typedef DWORD *LPDWORD;
typedef char *PSTR;
typedef char *PSZ;
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
typedef wchar_t *PTBYTE;
typedef wchar_t *PTCH;
typedef char *PTCHAR;
typedef char *PTSTR;
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/*
typedef PWSTR;
typedef DWORD SERVICE_STATUS_HANDLE;
/* typedef SPHANDLE; */
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
typedef wchar_t TBYTE;
#ifndef _TCHAR_DEFINED
#endif /* _TCHAR_DEFINED */
typedef BYTE BCHAR;
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
typedef unsigned int WPARAM;
/* typedef YIELDPROC; */
#define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
#define MAKEINTATOM(i) (LPTSTR) ((DWORD) ((WORD) (i)))
+#ifndef _DISABLE_TIDENTS
#define MAKEINTRESOURCE(i) (LPTSTR) ((ULONG_PTR) ((WORD) (i)))
+#endif /* _DISABLE_TIDENTS */
#define MAKEINTRESOURCEA(i) (LPSTR) ((ULONG_PTR) ((WORD) (i)))
#define MAKEINTRESOURCEW(i) (LPWSTR) ((ULONG_PTR) ((WORD) (i)))
#define IS_INTRESOURCE(n) ((((ULONG_PTR) (n)) >> 16) == 0)
#define INDEXTOOVERLAYMASK(i) ((i) << 8)
#define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
-#ifdef UNICODE
-#ifndef _T
-#define _T(quote) L##quote
-#endif
-#ifndef _TEXT
-#define TEXT(quote) L##quote
-#endif
-#else
-#ifndef _T
-#define _T(quote) quote
-#endif
-#ifndef _TEXT
-#define TEXT(quote) quote
-#endif
-#endif
-
+#ifndef _DISABLE_TIDENTS
+# ifdef UNICODE
+# ifndef _T
+# define _T(quote) L##quote
+# endif /* _T */
+# ifndef _TEXT
+# define TEXT(quote) L##quote
+# endif /* _TEXT */
+# else /* UNICODE */
+# ifndef _T
+# define _T(quote) quote
+# endif /* _T */
+# ifndef _TEXT
+# define TEXT(quote) quote
+# endif /* _TEXT */
+# endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#ifndef RC_INVOKED
typedef UINT CALLBACK (*LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
typedef WINBOOL CALLBACK (*DLGPROC) (HWND, UINT, WPARAM, LPARAM);
typedef int CALLBACK (*PFNPROPSHEETCALLBACK) (HWND, UINT, LPARAM);
-typedef VOID CALLBACK (*LPSERVICE_MAIN_FUNCTION) (DWORD, LPTSTR*);
+typedef VOID CALLBACK (*LPSERVICE_MAIN_FUNCTIONA) (DWORD, LPSTR*);
+typedef VOID CALLBACK (*LPSERVICE_MAIN_FUNCTIONW) (DWORD, LPWSTR*);
typedef int CALLBACK (*PFNTVCOMPARE) (LPARAM, LPARAM, LPARAM);
typedef LRESULT CALLBACK (*WNDPROC) (HWND, UINT, WPARAM, LPARAM);
typedef int CALLBACK (*FARPROC)(void);
typedef FARPROC PROC;
-typedef WINBOOL CALLBACK (*ENUMRESTYPEPROC) (HANDLE, LPTSTR, LONG);
-typedef WINBOOL CALLBACK (*ENUMRESNAMEPROC) (HANDLE, LPCTSTR, LPTSTR, LONG);
-typedef WINBOOL CALLBACK (*ENUMRESLANGPROC) (HANDLE, LPCTSTR, LPCTSTR, WORD, LONG);
+typedef WINBOOL CALLBACK (*ENUMRESTYPEPROCA) (HANDLE, LPSTR, LONG);
+typedef WINBOOL CALLBACK (*ENUMRESTYPEPROCW) (HANDLE, LPWSTR, LONG);
+typedef WINBOOL CALLBACK (*ENUMRESNAMEPROCA) (HANDLE, LPCSTR, LPSTR, LONG);
+typedef WINBOOL CALLBACK (*ENUMRESNAMEPROCW) (HANDLE, LPCWSTR, LPWSTR, LONG);
+typedef WINBOOL CALLBACK (*ENUMRESLANGPROCA) (HANDLE, LPCSTR, LPCSTR, WORD, LONG);
+typedef WINBOOL CALLBACK (*ENUMRESLANGPROCW) (HANDLE, LPCWSTR, LPCWSTR, WORD, LONG);
typedef FARPROC DESKTOPENUMPROC;
typedef WINBOOL CALLBACK (*ENUMWINDOWSPROC) (HWND, LPARAM);
-typedef WINBOOL CALLBACK (*ENUMWINDOWSTATIONPROC) (LPTSTR, LPARAM);
+typedef WINBOOL CALLBACK (*ENUMWINDOWSTATIONPROCA) (LPSTR, LPARAM);
+typedef WINBOOL CALLBACK (*ENUMWINDOWSTATIONPROCW) (LPWSTR, LPARAM);
typedef VOID CALLBACK (*SENDASYNCPROC) (HWND, UINT, DWORD, LRESULT);
typedef VOID CALLBACK (*TIMERPROC) (HWND, UINT, UINT, DWORD);
typedef FARPROC GRAYSTRINGPROC;
typedef WINBOOL CALLBACK (*DRAWSTATEPROC) (HDC, LPARAM, WPARAM, int, int);
-typedef WINBOOL CALLBACK (*PROPENUMPROCEX) (HWND, LPCTSTR, HANDLE, DWORD);
-typedef WINBOOL CALLBACK (*PROPENUMPROC) (HWND, LPCTSTR, HANDLE);
+typedef WINBOOL CALLBACK (*PROPENUMPROCEXA) (HWND, LPCSTR, HANDLE, DWORD);
+typedef WINBOOL CALLBACK (*PROPENUMPROCEXW) (HWND, LPCWSTR, HANDLE, DWORD);
+typedef WINBOOL CALLBACK (*PROPENUMPROCA) (HWND, LPCSTR, HANDLE);
+typedef WINBOOL CALLBACK (*PROPENUMPROCW) (HWND, LPCWSTR, HANDLE);
typedef LRESULT CALLBACK (*HOOKPROC) (int, WPARAM, LPARAM);
typedef VOID CALLBACK (*ENUMOBJECTSPROC) (LPVOID, LPARAM);
typedef VOID CALLBACK (*LINEDDAPROC) (int, int, LPARAM);
typedef WINBOOL CALLBACK (*ABORTPROC) (HDC, int);
typedef UINT CALLBACK (*LPPAGEPAINTHOOK) (HWND, UINT, WPARAM, LPARAM );
typedef UINT CALLBACK (*LPPAGESETUPHOOK) (HWND, UINT, WPARAM, LPARAM );
-typedef int CALLBACK (*ICMENUMPROC) (LPTSTR, LPARAM);
+typedef int CALLBACK (*ICMENUMPROCA) (LPSTR, LPARAM);
+typedef int CALLBACK (*ICMENUMPROCW) (LPWSTR, LPARAM);
typedef LONG (*EDITWORDBREAKPROCEX) (char *, LONG, BYTE, INT);
typedef int CALLBACK (*PFNLVCOMPARE) (LPARAM, LPARAM, LPARAM);
-typedef WINBOOL CALLBACK (*LOCALE_ENUMPROC) (LPTSTR);
-typedef WINBOOL CALLBACK (*CODEPAGE_ENUMPROC) (LPTSTR);
-typedef WINBOOL CALLBACK (*DATEFMT_ENUMPROC) (LPTSTR);
-typedef WINBOOL CALLBACK (*TIMEFMT_ENUMPROC) (LPTSTR);
-typedef WINBOOL CALLBACK (*CALINFO_ENUMPROC) (LPTSTR);
+typedef WINBOOL CALLBACK (*LOCALE_ENUMPROCA) (LPSTR);
+typedef WINBOOL CALLBACK (*LOCALE_ENUMPROCW) (LPWSTR);
+typedef WINBOOL CALLBACK (*CODEPAGE_ENUMPROCA) (LPSTR);
+typedef WINBOOL CALLBACK (*CODEPAGE_ENUMPROCW) (LPWSTR);
+typedef WINBOOL CALLBACK (*DATEFMT_ENUMPROCA) (LPSTR);
+typedef WINBOOL CALLBACK (*DATEFMT_ENUMPROCW) (LPWSTR);
+typedef WINBOOL CALLBACK (*TIMEFMT_ENUMPROCA) (LPSTR);
+typedef WINBOOL CALLBACK (*TIMEFMT_ENUMPROCW) (LPWSTR);
+typedef WINBOOL CALLBACK (*CALINFO_ENUMPROCA) (LPSTR);
+typedef WINBOOL CALLBACK (*CALINFO_ENUMPROCW) (LPWSTR);
typedef WINBOOL CALLBACK (*PHANDLER_ROUTINE) (DWORD);
typedef VOID CALLBACK (*LPHANDLER_FUNCTION) (DWORD);
-typedef UINT CALLBACK (*PFNGETPROFILEPATH) (LPCTSTR, LPSTR, UINT);
-typedef UINT CALLBACK (*PFNRECONCILEPROFILE) (LPCTSTR, LPCTSTR, DWORD);
-typedef WINBOOL CALLBACK (*PFNPROCESSPOLICIES) (HWND, LPCTSTR, LPCTSTR, LPCTSTR, DWORD);
+typedef UINT CALLBACK (*PFNGETPROFILEPATHA) (LPCSTR, LPSTR, UINT);
+typedef UINT CALLBACK (*PFNGETPROFILEPATHW) (LPCWSTR, LPWSTR, UINT);
+typedef UINT CALLBACK (*PFNRECONCILEPROFILEA) (LPCSTR, LPCSTR, DWORD);
+typedef UINT CALLBACK (*PFNRECONCILEPROFILEW) (LPCWSTR, LPCWSTR, DWORD);
+typedef WINBOOL CALLBACK (*PFNPROCESSPOLICIESA) (HWND, LPCSTR, LPCSTR, LPCSTR, DWORD);
+typedef WINBOOL CALLBACK (*PFNPROCESSPOLICIESW) (HWND, LPCWSTR, LPCWSTR, LPCWSTR, DWORD);
+
+#ifndef _DISABLE_TIDENTS
+#ifdef UNICODE
+#define LPSERVICE_MAIN_FUNCTION LPSERVICE_MAIN_FUNCTIONW
+#define ENUMRESTYPEPROC ENUMRESTYPEPROCW
+#define ENUMRESNAMEPROC ENUMRESNAMEPROCW
+#define ENUMRESLANGPROC ENUMRESLANGPROCW
+#define ENUMWINDOWSTATIONPROC ENUMWINDOWSTATIONPROCW
+#define PROPENUMPROCEX PROPENUMPROCEXW
+#define PROPENUMPROC PROPENUMPROCW
+#define ICMENUMPROC ICMENUMPROCW
+#define LOCALE_ENUMPROC LOCALE_ENUMPROCW
+#define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCW
+#define DATEFMT_ENUMPROC DATEFMT_ENUMPROCW
+#define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCW
+#define CALINFO_ENUMPROC CALINFO_ENUMPROCW
+#define PFNGETPROFILEPATH PFNGETPROFILEPATHW
+#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
+#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
+#else /* UNICODE */
+#define LPSERVICE_MAIN_FUNCTION LPSERVICE_MAIN_FUNCTIONA
+#define ENUMRESTYPEPROC ENUMRESTYPEPROCA
+#define ENUMRESNAMEPROC ENUMRESNAMEPROCA
+#define ENUMRESLANGPROC ENUMRESLANGPROCA
+#define ENUMWINDOWSTATIONPROC ENUMWINDOWSTATIONPROCA
+#define PROPENUMPROCEX PROPENUMPROCEXA
+#define PROPENUMPROC PROPENUMPROCA
+#define ICMENUMPROC ICMENUMPROCA
+#define LOCALE_ENUMPROC LOCALE_ENUMPROCA
+#define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCA
+#define DATEFMT_ENUMPROC DATEFMT_ENUMPROCA
+#define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCA
+#define CALINFO_ENUMPROC CALINFO_ENUMPROCA
+#define PFNGETPROFILEPATH PFNGETPROFILEPATHA
+#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
+#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
+#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
#define SC_GROUP_IDENTIFIERW L'+'
#define SC_GROUP_IDENTIFIERA '+'
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEW
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEW
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* ---------------------------------- */
/* From ddeml.h in old Cygnus headers */
/* EnumProtocols */
/* EnumResLangProc */
-#define RT_ACCELERATOR (MAKEINTRESOURCE(9))
-#define RT_BITMAP (MAKEINTRESOURCE(2))
-#define RT_DIALOG (MAKEINTRESOURCE(5))
-#define RT_FONT (MAKEINTRESOURCE(8))
-#define RT_FONTDIR (MAKEINTRESOURCE(7))
-#define RT_MENU (MAKEINTRESOURCE(4))
-#define RT_RCDATA (MAKEINTRESOURCE(10))
-#define RT_STRING (MAKEINTRESOURCE(6))
-#define RT_MESSAGETABLE (MAKEINTRESOURCE(11))
-#define RT_CURSOR (MAKEINTRESOURCE(1))
-#define RT_GROUP_CURSOR (MAKEINTRESOURCE(12))
-#define RT_ICON (MAKEINTRESOURCE(3))
-#define RT_GROUP_ICON (MAKEINTRESOURCE(13))
-#define RT_VERSION (MAKEINTRESOURCE(16))
+#define RT_ACCELERATORA (MAKEINTRESOURCEA(9))
+#define RT_BITMAPA (MAKEINTRESOURCEA(2))
+#define RT_DIALOGA (MAKEINTRESOURCEA(5))
+#define RT_FONTA (MAKEINTRESOURCEA(8))
+#define RT_FONTDIRA (MAKEINTRESOURCEA(7))
+#define RT_MENUA (MAKEINTRESOURCEA(4))
+#define RT_RCDATAA (MAKEINTRESOURCEA(10))
+#define RT_STRINGA (MAKEINTRESOURCEA(6))
+#define RT_MESSAGETABLEA (MAKEINTRESOURCEA(11))
+#define RT_CURSORA (MAKEINTRESOURCEA(1))
+#define RT_GROUP_CURSORA (MAKEINTRESOURCEA(12))
+#define RT_ICONA (MAKEINTRESOURCEA(3))
+#define RT_GROUP_ICONA (MAKEINTRESOURCEA(13))
+#define RT_VERSIONA (MAKEINTRESOURCEA(16))
+
+#define RT_ACCELERATORW (MAKEINTRESOURCEW(9))
+#define RT_BITMAPW (MAKEINTRESOURCEW(2))
+#define RT_DIALOGW (MAKEINTRESOURCEW(5))
+#define RT_FONTW (MAKEINTRESOURCEW(8))
+#define RT_FONTDIRW (MAKEINTRESOURCEW(7))
+#define RT_MENUW (MAKEINTRESOURCEW(4))
+#define RT_RCDATAW (MAKEINTRESOURCEW(10))
+#define RT_STRINGW (MAKEINTRESOURCEW(6))
+#define RT_MESSAGETABLEW (MAKEINTRESOURCEW(11))
+#define RT_CURSORW (MAKEINTRESOURCEW(1))
+#define RT_GROUP_CURSORW (MAKEINTRESOURCEW(12))
+#define RT_ICONW (MAKEINTRESOURCEW(3))
+#define RT_GROUP_ICONW (MAKEINTRESOURCEW(13))
+#define RT_VERSIONW (MAKEINTRESOURCEW(16))
+
+#ifndef _DISABLE_TIDENT
+#ifdef UNICODE
+#define RT_ACCELERATOR RT_ACCELERATORW
+#define RT_BITMAP RT_BITMAPW
+#define RT_DIALOG RT_DIALOGW
+#define RT_FONT RT_FONTW
+#define RT_FONTDIR RT_FONTDIRW
+#define RT_MENU RT_MENUW
+#define RT_RCDATA RT_RCDATAW
+#define RT_STRING RT_STRINGW
+#define RT_MESSAGETABLE RT_MESSAGETABLEW
+#define RT_CURSOR RT_CURSORW
+#define RT_GROUP_CURSOR RT_GROUP_CURSORW
+#define RT_ICON RT_ICONW
+#define RT_GROUP_ICON RT_GROUP_ICONW
+#define RT_VERSION RT_VERSIONW
+#else /* UNICODE */
+#define RT_ACCELERATOR RT_ACCELERATORA
+#define RT_BITMAP RT_BITMAPA
+#define RT_DIALOG RT_DIALOGA
+#define RT_FONT RT_FONTA
+#define RT_FONTDIR RT_FONTDIRA
+#define RT_MENU RT_MENUA
+#define RT_RCDATA RT_RCDATAA
+#define RT_STRING RT_STRINGA
+#define RT_MESSAGETABLE RT_MESSAGETABLEA
+#define RT_CURSOR RT_CURSORA
+#define RT_GROUP_CURSOR RT_GROUP_CURSORA
+#define RT_ICON RT_ICONA
+#define RT_GROUP_ICON RT_GROUP_ICONA
+#define RT_VERSION RT_VERSIONA
+#endif /* UNICODE */
+#endif /* _DISABLE_TIDENT */
/* EnumServicesStatus */
#define SERVICE_WIN32 (48)
#define HANDLE_FLAG_PROTECT_FROM_CLOSE (2)
/* GetIconInfo */
-#define IDC_ARROW (MAKEINTRESOURCE(32512))
-#define IDC_IBEAM (MAKEINTRESOURCE(32513))
-#define IDC_WAIT (MAKEINTRESOURCE(32514))
-#define IDC_CROSS (MAKEINTRESOURCE(32515))
-#define IDC_UPARROW (MAKEINTRESOURCE(32516))
-#define IDC_SIZENWSE (MAKEINTRESOURCE(32642))
-#define IDC_SIZENESW (MAKEINTRESOURCE(32643))
-#define IDC_SIZEWE (MAKEINTRESOURCE(32644))
-#define IDC_SIZENS (MAKEINTRESOURCE(32645))
-#define IDC_SIZEALL (MAKEINTRESOURCE(32646))
-#define IDC_NO (MAKEINTRESOURCE(32648))
-#define IDC_APPSTARTING (MAKEINTRESOURCE(32650))
-#define IDC_HELP (MAKEINTRESOURCE(32651))
-#define IDI_APPLICATION (MAKEINTRESOURCE(32512))
-#define IDI_HAND (MAKEINTRESOURCE(32513))
-#define IDI_QUESTION (MAKEINTRESOURCE(32514))
-#define IDI_EXCLAMATION (MAKEINTRESOURCE(32515))
-#define IDI_ASTERISK (MAKEINTRESOURCE(32516))
-#define IDI_WINLOGO (MAKEINTRESOURCE(32517))
-#define IDC_SIZE (MAKEINTRESOURCE(32640))
-#define IDC_ICON (MAKEINTRESOURCE(32641))
+#define IDC_ARROW (MAKEINTRESOURCEW(32512))
+#define IDC_IBEAM (MAKEINTRESOURCEW(32513))
+#define IDC_WAIT (MAKEINTRESOURCEW(32514))
+#define IDC_CROSS (MAKEINTRESOURCEW(32515))
+#define IDC_UPARROW (MAKEINTRESOURCEW(32516))
+#define IDC_SIZENWSE (MAKEINTRESOURCEW(32642))
+#define IDC_SIZENESW (MAKEINTRESOURCEW(32643))
+#define IDC_SIZEWE (MAKEINTRESOURCEW(32644))
+#define IDC_SIZENS (MAKEINTRESOURCEW(32645))
+#define IDC_SIZEALL (MAKEINTRESOURCEW(32646))
+#define IDC_NO (MAKEINTRESOURCEW(32648))
+#define IDC_APPSTARTING (MAKEINTRESOURCEW(32650))
+#define IDC_HELP (MAKEINTRESOURCEW(32651))
+#define IDI_APPLICATION (MAKEINTRESOURCEW(32512))
+#define IDI_HAND (MAKEINTRESOURCEW(32513))
+#define IDI_QUESTION (MAKEINTRESOURCEW(32514))
+#define IDI_EXCLAMATION (MAKEINTRESOURCEW(32515))
+#define IDI_ASTERISK (MAKEINTRESOURCEW(32516))
+#define IDI_WINLOGO (MAKEINTRESOURCEW(32517))
+#define IDC_SIZE (MAKEINTRESOURCEW(32640))
+#define IDC_ICON (MAKEINTRESOURCEW(32641))
/* GetMapMode */
#define MM_ANISOTROPIC (8)
#define WC_LISTVIEWA "SysListView32"
#define WC_TABCONTROLA "SysTabControl32"
#define WC_TREEVIEWA "SysTreeView32"
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define ANIMATE_CLASS ANIMATE_CLASSW
#define HOTKEY_CLASS HOTKEY_CLASSW
#define WC_TABCONTROL WC_TABCONTROLA
#define WC_TREEVIEW WC_TREEVIEWA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* Header control styles */
#define HDS_BUTTONS (2)
#define LVIS_STATEIMAGEMASK (61440)
#define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L)
#define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKW
#else
#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* LV_ITEM structure */
#define LVIF_TEXT (1)
#define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
#define SETRGBSTRINGA "commdlg_SetRGBColor"
#define SHAREVISTRINGA "commdlg_ShareViolation"
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define COLOROKSTRING COLOROKSTRINGW
#define FILEOKSTRING FILEOKSTRINGW
#define LBSELCHSTRING LBSELCHSTRINGA
#define SETRGBSTRING SETRGBSTRINGA
#define SHAREVISTRING SHAREVISTRINGA
-#endif
+#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* LBSELCHSTRING message */
#define CD_LBSELCHANGE (0)
/* Define the approprate declaration based upon UNICODE or ASCII */
+#ifndef _DISABLE_TIDENTS
/* UNICODE */
#ifdef UNICODE
#define DdeQueryString DdeQueryStringW
#define LogonUser LogonUserW
#define CreateProcessAsUser CreateProcessAsUserW
+#define SHGetFileInfo SHGetFileInfoW
+#define SHGetPathFromIDList SHGetPathFromIDListW
/* ASCII */
#else
#define DdeQueryString DdeQueryStringA
#define LogonUser LogonUserA
#define CreateProcessAsUser CreateProcessAsUserA
+#define SHGetFileInfo SHGetFileInfoA
+#define SHGetPathFromIDList SHGetPathFromIDListA
#endif /* UNICODE and ASCII defines */
+#endif /* _DISABLE_TIDENTS */
HWND STDCALL GetAncestor(HWND hWnd, UINT GaFlags);
WINBOOL STDCALL AbnormalTermination(VOID);
LPBOOL AccessStatus
);
-WINBOOL STDCALL AccessCheckAndAuditAlarm(
- LPCTSTR SubsystemName,
- LPVOID HandleId,
- LPTSTR ObjectTypeName,
- LPTSTR ObjectName,
- PSECURITY_DESCRIPTOR SecurityDescriptor,
- DWORD DesiredAccess,
- PGENERIC_MAPPING GenericMapping,
- WINBOOL ObjectCreation,
- LPDWORD GrantedAccess,
- LPBOOL AccessStatus,
- LPBOOL pfGenerateOnClose
- );
-
#ifndef __NTDRIVER__
LONG
STDCALL
#define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define CommDlg_OpenSave_GetSpec CommDlg_OpenSave_GetSpecW
#else
#define CommDlg_OpenSave_GetSpec CommDlg_OpenSave_GetSpecA
#endif /* !UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
#define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define CommDlg_OpenSave_GetFilePath CommDlg_OpenSave_GetFilePathW
#else
#define CommDlg_OpenSave_GetFilePath CommDlg_OpenSave_GetFilePathA
#endif /* !UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
#define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define CommDlg_OpenSave_GetFolderPath CommDlg_OpenSave_GetFolderPathW
#else
#define CommDlg_OpenSave_GetFolderPath CommDlg_OpenSave_GetFolderPathA
#endif /* !UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
There doesn't seem to be any difference.
*/
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define wglUseFontBitmaps wglUseFontBitmapsW
#define wglUseFontOutlines wglUseFontOutlinesW
#define wglUseFontBitmaps wglUseFontBitmapsA
#define wglUseFontOutlines wglUseFontOutlinesA
#endif /* !UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* ------------------------------------- */
/* From shellapi.h in old Cygnus headers */
SHGetDesktopFolder (LPSHELLFOLDER);
*/
-DWORD WINAPI
-SHGetFileInfo (LPCTSTR, DWORD, SHFILEINFO FAR *, UINT, UINT);
-
/* Define when IUnknown is defined.
HRESULT WINAPI
SHGetInstanceExplorer (IUnknown **);
SHGetMalloc (LPMALLOC *);
*/
-WINBOOL WINAPI
-SHGetPathFromIDList (LPCITEMIDLIST, LPTSTR);
-
HRESULT WINAPI
SHGetSpecialFolderLocation (HWND, int, LPITEMIDLIST *);
/* Animation Control */
#define ACM_OPENW (1127)
#define ACM_OPENA (1124)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define ACM_OPEN ACM_OPENW
#else
#define ACM_OPEN ACM_OPENA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define ACM_PLAY (1125)
#define ACM_STOP (1126)
#define ACN_START (1)
#define HDM_GETITEMA (4611)
#define HDM_INSERTITEMA (4609)
#define HDM_SETITEMA (4612)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define HDM_GETITEM HDM_GETITEMW
#define HDM_INSERTITEM HDM_INSERTITEMW
#define HDM_INSERTITEM HDM_INSERTITEMA
#define HDM_SETITEM HDM_SETITEMA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define HDM_GETITEMCOUNT (4608)
#define HDM_HITTEST (4614)
#define HDM_LAYOUT (4613)
#define HDN_ITEMCLICKA (-302)
#define HDN_ITEMDBLCLICKA (-303)
#define HDN_TRACKA (-308)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define HDN_BEGINTRACK HDN_BEGINTRACKW
#define HDN_DIVIDERDBLCLICK HDN_DIVIDERDBLCLICKW
#define HDN_ITEMDBLCLICK HDN_ITEMDBLCLICKA
#define HDN_TRACK HDN_TRACKA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* Hot key control */
#define HKM_GETHOTKEY (1026)
#define LVM_SETCOLUMNA (4122)
#define LVM_SETITEMA (4102)
#define LVM_SETITEMTEXTA (4142)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define LVM_EDITLABEL LVM_EDITLABELW
#define LVM_FINDITEM LVM_FINDITEMW
#define LVM_SETITEM LVM_SETITEMA
#define LVM_SETITEMTEXT LVM_SETITEMTEXTA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define LVM_GETITEMCOUNT (4100)
#define LVM_GETITEMPOSITION (4112)
#define LVM_GETITEMRECT (4110)
#define LVN_ENDLABELEDITA (-106)
#define LVN_GETDISPINFOA (-150)
#define LVN_SETDISPINFOA (-151)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITW
#define LVN_ENDLABELEDIT LVN_ENDLABELEDITW
#define LVN_GETDISPINFO LVN_GETDISPINFOA
#define LVN_SETDISPINFO LVN_SETDISPINFOA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define LVN_INSERTITEM (-102)
#define LVN_ITEMCHANGED (-101)
#define LVN_ITEMCHANGING (-100)
#define PSM_SETTITLEW (1144)
#define PSM_SETFINISHTEXTA (1139)
#define PSM_SETTITLEA (1135)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define PSM_SETFINISHTEXT PSM_SETFINISHTEXTW
#define PSM_SETTITLE PSM_SETTITLEW
#define PSM_SETFINISHTEXT PSM_SETFINISHTEXTA
#define PSM_SETTITLE PSM_SETTITLEA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define PSM_SETWIZBUTTONS (1136)
#define PSM_UNCHANGED (1133)
#define SB_GETTEXTA (1026)
#define SB_GETTEXTLENGTHA (1027)
#define SB_SETTEXTA (1025)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define SB_GETTEXT SB_GETTEXTW
#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHW
#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHA
#define SB_SETTEXT SB_SETTEXTA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define SB_SETMINHEIGHT (1032)
#define SB_SETPARTS (1028)
#define SB_SIMPLE (1033)
#define TB_ADDSTRINGA (1052)
#define TB_GETBUTTONTEXTA (1069)
#define TB_SAVERESTOREA (1050)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define TB_ADDSTRING TB_ADDSTRINGW
#define TB_GETBUTTONTEXT TB_GETBUTTONTEXTW
#define TB_GETBUTTONTEXT TB_GETBUTTONTEXTA
#define TB_SAVERESTORE TB_SAVERESTOREA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define TB_GETITEMRECT (1053)
#define TB_GETROWS (1064)
#define TB_GETSTATE (1042)
#define TBN_ENDDRAG (-702)
#define TBN_GETBUTTONINFOW (-720)
#define TBN_GETBUTTONINFOA (-700)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define TBN_GETBUTTONINFO TBN_GETBUTTONINFOW
#else
#define TBN_GETBUTTONINFO TBN_GETBUTTONINFOA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define TBN_QUERYDELETE (-707)
#define TBN_QUERYINSERT (-706)
#define TBN_RESET (-705)
#define TCM_GETITEMA (4869)
#define TCM_INSERTITEMA (4871)
#define TCM_SETITEMA (4870)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define TCM_GETITEM TCM_GETITEM
#define TCM_INSERTITEM TCM_INSERTITEMW
#define TCM_INSERTITEM TCM_INSERTITEMA
#define TCM_SETITEM TCM_SETITEMA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define TCM_GETITEMCOUNT (4868)
#define TCM_GETITEMRECT (4874)
#define TCM_GETROWCOUNT (4908)
#define TTM_NEWTOOLRECTA (1030)
#define TTM_SETTOOLINFOA (1033)
#define TTM_UPDATETIPTEXTA (1036)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define TTM_ADDTOOL TTM_ADDTOOLW
#define TTM_DELTOOL TTM_DELTOOLW
#define TTM_SETTOOLINFO TTM_SETTOOLINFOA
#define TTM_UPDATETIPTEXT TTM_UPDATETIPTEXTA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define TTM_GETTOOLCOUNT (1037)
#define TTM_RELAYEVENT (1031)
#define TTM_SETDELAYTIME (1027)
/* Tool tip control notification */
#define TTN_NEEDTEXTW (-530)
#define TTN_NEEDTEXTA (-520)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define TTN_NEEDTEXT TTN_NEEDTEXTW
#else
#define TTN_NEEDTEXT TTN_NEEDTEXTA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define TTN_POP (-522)
#define TTN_SHOW (-521)
#define TVM_GETITEMA (4364)
#define TVM_INSERTITEMA (4352)
#define TVM_SETITEMA (4365)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define TVM_EDITLABEL TVM_EDITLABELW
#define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGW
#define TVM_INSERTITEM TVM_INSERTITEMA
#define TVM_SETITEM TVM_SETITEMA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
#define TVM_SELECTITEM (4363)
#define TVM_SETIMAGELIST (4361)
#define TVM_SETINDENT (4359)
#define TVN_SELCHANGEDA (-402)
#define TVN_SELCHANGINGA (-401)
#define TVN_SETDISPINFOA (-404)
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define TVN_BEGINDRAG TVN_BEGINDRAGW
#define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITW
#define TVN_SELCHANGING TVN_SELCHANGINGA
#define TVN_SETDISPINFO TVN_SETDISPINFOA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* Up/down control */
#define UDM_GETACCEL (1132)
#include <ntos/disk.h>
#include <ntos/gditypes.h>
-// NOTE - change the following to an #if 0 to verify you aren't
-// accidentally using generic struct pointers in your A/W-specific
-// structs
-#if 1
+// NOTE - _DISABLE_TIDENTS exists to keep ReactOS's source from
+// accidentally utilitizing ANSI/UNICODE-generic structs, defines
+// or functions.
+#ifndef _DISABLE_TIDENTS
# ifdef UNICODE
# define typedef_tident(ident) typedef ident##W ident;
# else
# define typedef_tident(ident)
#endif
+
typedef struct _VALENT_A {
LPSTR ve_valuename;
DWORD ve_valuelen;
typedef struct tagEXTLOGFONTA {
LOGFONTA elfLogFont;
- BCHAR elfFullName[LF_FULLFACESIZE];
- BCHAR elfStyle[LF_FACESIZE];
+ CHAR elfFullName[LF_FULLFACESIZE];
+ CHAR elfStyle[LF_FACESIZE];
DWORD elfVersion;
DWORD elfStyleSize;
DWORD elfMatch;
typedef struct tagENUMLOGFONTA {
LOGFONTA elfLogFont;
- BCHAR elfFullName[LF_FULLFACESIZE];
- BCHAR elfStyle[LF_FACESIZE];
+ CHAR elfFullName[LF_FULLFACESIZE];
+ CHAR elfStyle[LF_FACESIZE];
} ENUMLOGFONTA, *LPENUMLOGFONTA;
typedef struct tagENUMLOGFONTW {
typedef struct tagENUMLOGFONTEXA {
LOGFONTA elfLogFont;
- BCHAR elfFullName[LF_FULLFACESIZE];
- BCHAR elfStyle[LF_FACESIZE];
- BCHAR elfScript[LF_FACESIZE];
+ CHAR elfFullName[LF_FULLFACESIZE];
+ CHAR elfStyle[LF_FACESIZE];
+ CHAR elfScript[LF_FACESIZE];
} ENUMLOGFONTEXA, *LPENUMLOGFONTEXA;
typedef struct tagENUMLOGFONTEXW {
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
- BCHAR tmFirstChar;
- BCHAR tmLastChar;
- BCHAR tmDefaultChar;
- BCHAR tmBreakChar;
+ CHAR tmFirstChar;
+ CHAR tmLastChar;
+ CHAR tmDefaultChar;
+ CHAR tmBreakChar;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
typedef_tident(NM_TREEVIEW)
typedef_tident(LPNM_TREEVIEW)
+
typedef struct _NM_UPDOWN {
NMHDR hdr;
int iPos;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
- BCHAR tmFirstChar;
- BCHAR tmLastChar;
- BCHAR tmDefaultChar;
- BCHAR tmBreakChar;
+ CHAR tmFirstChar;
+ CHAR tmLastChar;
+ CHAR tmDefaultChar;
+ CHAR tmBreakChar;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
typedef struct _SERVICE_TABLE_ENTRYA {
LPSTR lpServiceName;
- LPSERVICE_MAIN_FUNCTION lpServiceProc;
+ LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
} SERVICE_TABLE_ENTRYA, *LPSERVICE_TABLE_ENTRYA;
typedef struct _SERVICE_TABLE_ENTRYW {
LPWSTR lpServiceName;
- LPSERVICE_MAIN_FUNCTION lpServiceProc;
+ LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
} SERVICE_TABLE_ENTRYW, *LPSERVICE_TABLE_ENTRYW;
typedef_tident(SERVICE_TABLE_ENTRY)
#endif /* WIN32_LEAN_AND_MEAN */
#endif /* _GNU_H_WINDOWS32_STRUCTURES */
-
STDCALL
EnumResourceTypesW(
HINSTANCE hModule,
- ENUMRESTYPEPROC lpEnumFunc,
+ ENUMRESTYPEPROCW lpEnumFunc,
LONG lParam
);
EnumResourceNamesW(
HINSTANCE hModule,
LPCWSTR lpType,
- ENUMRESNAMEPROC lpEnumFunc,
+ ENUMRESNAMEPROCW lpEnumFunc,
LONG lParam
);
HINSTANCE hModule,
LPCWSTR lpType,
LPCWSTR lpName,
- ENUMRESLANGPROC lpEnumFunc,
+ ENUMRESLANGPROCW lpEnumFunc,
LONG lParam
);
WINBOOL
STDCALL
EnumWindowStationsW(
- ENUMWINDOWSTATIONPROC lpEnumFunc,
+ ENUMWINDOWSTATIONPROCW lpEnumFunc,
LPARAM lParam);
WINBOOL
STDCALL
EnumPropsExW(
HWND hWnd,
- PROPENUMPROCEX lpEnumFunc,
+ PROPENUMPROCEXW lpEnumFunc,
LPARAM lParam);
int
STDCALL
EnumPropsW(
HWND hWnd,
- PROPENUMPROC lpEnumFunc);
+ PROPENUMPROCW lpEnumFunc);
WINBOOL
STDCALL
int
STDCALL
-EnumICMProfilesW(HDC,ICMENUMPROC,LPARAM);
+EnumICMProfilesW(HDC,ICMENUMPROCW,LPARAM);
HPROPSHEETPAGE
STDCALL
WINBOOL
STDCALL
EnumCalendarInfoW(
- CALINFO_ENUMPROC lpCalInfoEnumProc,
+ CALINFO_ENUMPROCW lpCalInfoEnumProc,
LCID Locale,
CALID Calendar,
CALTYPE CalType);
WINBOOL
STDCALL
EnumTimeFormatsW(
- TIMEFMT_ENUMPROC lpTimeFmtEnumProc,
+ TIMEFMT_ENUMPROCW lpTimeFmtEnumProc,
LCID Locale,
DWORD dwFlags);
WINBOOL
STDCALL
EnumDateFormatsW(
- DATEFMT_ENUMPROC lpDateFmtEnumProc,
+ DATEFMT_ENUMPROCW lpDateFmtEnumProc,
LCID Locale,
DWORD dwFlags);
WINBOOL
STDCALL
EnumSystemLocalesW(
- LOCALE_ENUMPROC lpLocaleEnumProc,
+ LOCALE_ENUMPROCW lpLocaleEnumProc,
DWORD dwFlags);
WINBOOL
STDCALL
EnumSystemCodePagesW(
- CODEPAGE_ENUMPROC lpCodePageEnumProc,
+ CODEPAGE_ENUMPROCW lpCodePageEnumProc,
DWORD dwFlags);
WINBOOL
DWORD, LPVOID, LPCWSTR, STARTUPINFOW*,
PROCESS_INFORMATION*);
+DWORD WINAPI
+SHGetFileInfoW (LPCWSTR, DWORD, SHFILEINFO FAR *, UINT, UINT);
+
+WINBOOL WINAPI
+SHGetPathFromIDListW (LPCITEMIDLIST, LPWSTR);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
INT
STDCALL
-W32kEnumICMProfiles(HDC hDC,
- ICMENUMPROC EnumICMProfilesFunc,
- LPARAM lParam);
+W32kEnumICMProfiles(HDC hDC,
+ LPWSTR lpstrBuffer,
+ UINT cch );
HCOLORSPACE
STDCALL
LONG STDCALL
NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi);
+
INT STDCALL
NtUserReleaseDC(HWND hWnd, HDC hDc);
DWORD Unknown4,
DWORD Unknown5);
+
DWORD
STDCALL
NtUserRegisterHotKey(
WCHAR szProtocol[WSAPROTOCOL_LEN + 1];
} WSAPROTOCOL_INFOW, FAR * LPWSAPROTOCOL_INFOW;
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
typedef WSAPROTOCOL_INFOW WSAPROTOCOL_INFO;
typedef LPWSAPROTOCOL_INFOW LPWSAPROTOCOL_INFO;
typedef WSAPROTOCOL_INFOA WSAPROTOCOL_INFO;
typedef LPWSAPROTOCOL_INFOA LPWSAPROTOCOL_INFO;
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* WinSock 2 extended commands for WSAIoctl() */
LPWSTR lpszIdentifier;
} WSANAMESPACE_INFOW, *PWSANAMESPACE_INFOW, *LPWSANAMESPACE_INFOW;
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
typedef WSANAMESPACE_INFOW WSANAMESPACE_INFO;
typedef PWSANAMESPACE_INFOW PWSANAMESPACE_INFO;
typedef PWSANAMESPACE_INFOA PWSANAMESPACE_INFO;
typedef LPWSANAMESPACE_INFOA LPWSANAMESPACE_INFO;
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
typedef enum _WSAEcomparator
LPBLOB lpBlob;
} WSAQUERYSETW, *PWSAQUERYSETW, *LPWSAQUERYSETW;
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
typedef WSAQUERYSETW WSAQUERYSET;
typedef PWSAQUERYSETW PWSAQUERYSET;
typedef PWSAQUERYSETA PWSAQUERYSET;
typedef LPWSAQUERYSETA LPWSAQUERYSET;
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
typedef enum _WSAESETSERVICEOP {
LPVOID lpValue;
} WSANSCLASSINFOW, *PWSANSCLASSINFOW, *LPWSANSCLASSINFOW;
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
typedef WSANSCLASSINFOW WSANSCLASSINFO;
typedef PWSANSCLASSINFOW PWSANSCLASSINFO;
typedef PWSANSCLASSINFOA PWSANSCLASSINFO;
typedef LPWSANSCLASSINFOA LPWSANSCLASSINFO;
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
typedef struct _WSAServiceClassInfoA {
LPGUID lpServiceClassId;
LPWSANSCLASSINFOW lpClassInfos;
} WSASERVICECLASSINFOW, *PWSASERVICECLASSINFOW, *LPWSASERVICECLASSINFOW;
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
typedef WSASERVICECLASSINFOW WSASERVICECLASSINFO;
typedef PWSASERVICECLASSINFOW PWSASERVICECLASSINFO;
typedef PWSASERVICECLASSINFOA PWSASERVICECLASSINFO;
typedef LPWSASERVICECLASSINFOA LPWSASERVICECLASSINFO;
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* WinSock 2 DLL prototypes */
IN DWORD dwProcessId,
OUT LPWSAPROTOCOL_INFOW lpProtocolInfo);
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define WSADuplicateSocket WSADuplicateSocketA
#else /* UNICODE */
#define WSADuplicateSocket WSADuplicateSocketW
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
OUT LPWSAPROTOCOL_INFOW lpProtocolBuffer,
IN OUT LPDWORD lpdwBufferLength);
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define WSAEnumProtocols WSAEnumProtocolsA
#else /* UNICODE */
#define WSAEnumProtocols WSAEnumProtocolsW
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
IN GROUP g,
IN DWORD dwFlags);
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define WSASocket WSASocketW
#else /* UNICODE */
#define WSASocket WSASocketA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
OUT LPWSTR lpszAddressString,
IN OUT LPDWORD lpdwAddressStringLength);
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define WSAAddressToString WSAAddressToStringW
#else /* UNICODE */
#define WSAAddressToString WSAAddressToStringA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
IN OUT LPDWORD lpdwBufferLength,
OUT LPWSANAMESPACE_INFOW lpnspBuffer);
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersW
#else /* UNICODE */
#define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
IN OUT LPDWORD lpdwBufferLength,
OUT LPWSASERVICECLASSINFOW lpServiceClassInfo);
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define WSAGetServiceClassInfo WSAGetServiceClassInfoW
#else /* UNICODE */
#define WSAGetServiceClassInfo WSAGetServiceClassInfoA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
OUT LPWSTR lpszServiceClassName,
IN OUT LPDWORD lpdwBufferLength);
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define WSAGetServiceClassNameByClassId WSAGetServiceClassNameByClassIdW
#else /* UNICODE */
#define WSAGetServiceClassNameByClassId WSAGetServiceClassNameByClassIdA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
WSAInstallServiceClassW(
IN LPWSASERVICECLASSINFOW lpServiceClassInfo);
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define WSAInstallServiceClass WSAInstallServiceClassW
#else /* UNICODE */
#define WSAInstallServiceClass WSAInstallServiceClassA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
-WSALookupServiceBegin(
- IN LPWSAQUERYSET lpqsRestrictions,
+WSALookupServiceBeginA(
+ IN LPWSAQUERYSETA lpqsRestrictions,
IN DWORD dwControlFlags,
OUT LPHANDLE lphLookup);
+INT
+WSAAPI
+WSALookupServiceBeginW(
+ IN LPWSAQUERYSETW lpqsRestrictions,
+ IN DWORD dwControlFlags,
+ OUT LPHANDLE lphLookup);
+
+#ifndef _DISABLE_TIDENTS
+#ifdef UNICODE
+#define WSALookupServiceBegin WSALookupServiceBeginW
+#else /* UNICODE */
+#define WSALookupServiceBegin WSALookupServiceBeginA
+#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
+
INT
WSAAPI
WSALookupServiceEnd(
INT
WSAAPI
-WSALookupServiceNext(
- IN HANDLE hLookup,
- IN DWORD dwControlFlags,
- IN OUT LPDWORD lpdwBufferLength,
- OUT LPWSAQUERYSET lpqsResults);
+WSALookupServiceNextA(
+ IN HANDLE hLookup,
+ IN DWORD dwControlFlags,
+ IN OUT LPDWORD lpdwBufferLength,
+ OUT LPWSAQUERYSETA lpqsResults);
+
+INT
+WSAAPI
+WSALookupServiceNextW(
+ IN HANDLE hLookup,
+ IN DWORD dwControlFlags,
+ IN OUT LPDWORD lpdwBufferLength,
+ OUT LPWSAQUERYSETW lpqsResults);
+
+#ifndef _DISABLE_TIDENTS
+#ifdef UNICODE
+#define WSALookupServiceNext WSALookupServiceNextW
+#else /* UNICODE */
+#define WSALookupServiceNext WSALookupServiceNextA
+#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
INT
WSAAPI
-WSASetService(
- IN LPWSAQUERYSET lpqsRegInfo,
+WSASetServiceA(
+ IN LPWSAQUERYSETA lpqsRegInfo,
+ IN WSAESETSERVICEOP essOperation,
+ IN DWORD dwControlFlags);
+
+INT
+WSAAPI
+WSASetServiceW(
+ IN LPWSAQUERYSETW lpqsRegInfo,
IN WSAESETSERVICEOP essOperation,
- IN DWORD dwControlFlags);
+ IN DWORD dwControlFlags);
+
+#ifndef _DISABLE_TIDENTS
+#ifdef UNICODE
+#define WSASetService WSASetServiceW
+#else /* UNICODE */
+#define WSASetService WSASetServiceA
+#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
INT
WSAAPI
OUT LPSOCKADDR lpAddress,
IN OUT LPINT lpAddressLength);
+#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define WSAStringToAddress WSAStringToAddressW
#else /* UNICODE */
#define WSAStringToAddress WSAStringToAddressA
#endif /* UNICODE */
+#endif /* _DISABLE_TIDENTS */
/* WinSock 1.1 compatible name resolution APIs */
IN HANDLE hLookup,
IN DWORD dwControlFlags,
IN OUT LPDWORD lpdwBufferLength,
- OUT LPWSAQUERYSET lpqsResults);
+ OUT LPWSAQUERYSETW lpqsResults);
typedef INT (WSPAPI * LPNSPREMOVESERVICECLASS)(
IN LPGUID lpProviderId,
-# $Id: makefile,v 1.28 2003/07/20 00:04:06 ekohl Exp $
+# $Id: makefile,v 1.29 2003/08/07 04:03:22 royce Exp $
PATH_TO_TOP = ../..
-Werror \
-fno-builtin
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS = ntdll.a kernel32.a
-/* $Id: scm.c,v 1.18 2003/07/21 03:40:58 royce Exp $
+/* $Id: scm.c,v 1.19 2003/08/07 04:03:22 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
LPCWSTR lpDatabaseName,
DWORD dwDesiredAccess)
{
- HANDLE hPipe;
- DWORD dwMode;
- DWORD dwWait;
- BOOL fSuccess;
- HANDLE hStartEvent;
- LPWSTR lpszPipeName = L"\\\\.\\pipe\\Ntsvcs";
-
- DPRINT("OpenSCManagerW(%x, %x, %d)\n", lpMachineName, lpDatabaseName, dwDesiredAccess);
+ HANDLE hPipe;
+ DWORD dwMode;
+ DWORD dwWait;
+ BOOL fSuccess;
+ HANDLE hStartEvent;
+ LPWSTR lpszPipeName = L"\\\\.\\pipe\\Ntsvcs";
+
+ DPRINT("OpenSCManagerW(%x, %x, %d)\n", lpMachineName, lpDatabaseName, dwDesiredAccess);
- if (lpMachineName == NULL || wcslen(lpMachineName) == 0) {
- if (lpDatabaseName != NULL && wcscmp(lpDatabaseName, SERVICES_ACTIVE_DATABASEW) != 0) {
- DPRINT("OpenSCManagerW() - Invalid parameters.\n");
- return NULL;
- }
+ if (lpMachineName == NULL || wcslen(lpMachineName) == 0)
+ {
+ if (lpDatabaseName != NULL && wcscmp(lpDatabaseName, SERVICES_ACTIVE_DATABASEW) != 0)
+ {
+ DPRINT("OpenSCManagerW() - Invalid parameters.\n");
+ return NULL;
+ }
- DPRINT("OpenSCManagerW() - OpenEvent(\"SvcctrlStartEvent_A3725DX\")\n");
+ DPRINT("OpenSCManagerW() - OpenEvent(\"SvcctrlStartEvent_A3725DX\")\n");
- // Only connect to scm when event "SvcctrlStartEvent_A3725DX" is signaled
- hStartEvent = OpenEvent(SYNCHRONIZE, FALSE, _T("SvcctrlStartEvent_A3725DX"));
- if (hStartEvent == NULL) {
- SetLastError(ERROR_DATABASE_DOES_NOT_EXIST);
- DPRINT("OpenSCManagerW() - Failed to Open Event \"SvcctrlStartEvent_A3725DX\".\n");
- return NULL;
- }
+ // Only connect to scm when event "SvcctrlStartEvent_A3725DX" is signaled
+ hStartEvent = OpenEventW(SYNCHRONIZE, FALSE, L"SvcctrlStartEvent_A3725DX");
+ if (hStartEvent == NULL)
+ {
+ SetLastError(ERROR_DATABASE_DOES_NOT_EXIST);
+ DPRINT("OpenSCManagerW() - Failed to Open Event \"SvcctrlStartEvent_A3725DX\".\n");
+ return NULL;
+ }
- DPRINT("OpenSCManagerW() - Waiting forever on event handle: %x\n", hStartEvent);
+ DPRINT("OpenSCManagerW() - Waiting forever on event handle: %x\n", hStartEvent);
#if 1
- dwWait = WaitForSingleObject(hStartEvent, INFINITE);
- if (dwWait == WAIT_FAILED) {
- DPRINT("OpenSCManagerW() - Wait For Start Event failed.\n");
- SetLastError(ERROR_ACCESS_DENIED);
- return NULL;
- }
+ dwWait = WaitForSingleObject(hStartEvent, INFINITE);
+ if (dwWait == WAIT_FAILED)
+ {
+ DPRINT("OpenSCManagerW() - Wait For Start Event failed.\n");
+ SetLastError(ERROR_ACCESS_DENIED);
+ return NULL;
+ }
#else
- {
- DWORD Count;
-
- /* wait for event creation (by SCM) for max. 20 seconds */
- for (Count = 0; Count < 20; Count++)
- {
- dwWait = WaitForSingleObject(hStartEvent, 1000);
- if (dwWait == WAIT_FAILED) {
- DPRINT("OpenSCManagerW() - Wait For Start Event failed.\n");
- Sleep(1000);
- } else {
- break;
- }
- }
-
- if (dwWait == WAIT_FAILED)
- {
- DbgPrint("WL: Failed to wait on event \"SvcctrlStartEvent_A3725DX\"\n");
- }
-
- }
+ {
+ DWORD Count;
+
+ /* wait for event creation (by SCM) for max. 20 seconds */
+ for (Count = 0; Count < 20; Count++)
+ {
+ dwWait = WaitForSingleObject(hStartEvent, 1000);
+ if (dwWait == WAIT_FAILED)
+ {
+ DPRINT("OpenSCManagerW() - Wait For Start Event failed.\n");
+ Sleep(1000);
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ if (dwWait == WAIT_FAILED)
+ {
+ DbgPrint("WL: Failed to wait on event \"SvcctrlStartEvent_A3725DX\"\n");
+ }
+
+ }
#endif
- DPRINT("OpenSCManagerW() - Closing handle to event...\n");
-
- CloseHandle(hStartEvent);
-
- // Try to open a named pipe; wait for it, if necessary
- while (1) {
- DWORD dwLastError;
- DPRINT("OpenSCManagerW() - attempting to open named pipe to SCM.\n");
- hPipe = CreateFileW(lpszPipeName, // pipe name
- dwDesiredAccess,
- 0, // no sharing
- NULL, // no security attributes
- OPEN_EXISTING, // opens existing pipe
- 0, // default attributes
- NULL); // no template file
-
- DPRINT("OpenSCManagerW() - handle to named pipe: %x\n", hPipe);
- // Break if the pipe handle is valid
- if (hPipe != INVALID_HANDLE_VALUE) {
- break;
- }
-
- // Exit if an error other than ERROR_PIPE_BUSY occurs
- dwLastError = GetLastError();
- if (dwLastError != ERROR_PIPE_BUSY) {
- DPRINT("OpenSCManagerW() - returning at 4, dwLastError %d\n", dwLastError);
- return NULL;
- }
-
- // All pipe instances are busy, so wait for 20 seconds
- if (!WaitNamedPipeW(lpszPipeName, 20000)) {
- DPRINT("OpenSCManagerW() - Failed on WaitNamedPipeW(...).\n");
- return NULL;
- }
- }
-
- // The pipe connected; change to message-read mode
- dwMode = PIPE_READMODE_MESSAGE;
- fSuccess = SetNamedPipeHandleState(
- hPipe, // pipe handle
- &dwMode, // new pipe mode
- NULL, // don't set maximum bytes
- NULL); // don't set maximum time
- if (!fSuccess) {
- CloseHandle(hPipe);
- DPRINT("OpenSCManagerW() - Failed on SetNamedPipeHandleState(...).\n");
- return NULL;
- }
+ DPRINT("OpenSCManagerW() - Closing handle to event...\n");
+
+ CloseHandle(hStartEvent);
+
+ // Try to open a named pipe; wait for it, if necessary
+ while (1)
+ {
+ DWORD dwLastError;
+ DPRINT("OpenSCManagerW() - attempting to open named pipe to SCM.\n");
+ hPipe = CreateFileW(lpszPipeName, // pipe name
+ dwDesiredAccess,
+ 0, // no sharing
+ NULL, // no security attributes
+ OPEN_EXISTING, // opens existing pipe
+ 0, // default attributes
+ NULL); // no template file
+
+ DPRINT("OpenSCManagerW() - handle to named pipe: %x\n", hPipe);
+ // Break if the pipe handle is valid
+ if (hPipe != INVALID_HANDLE_VALUE)
+ {
+ break;
+ }
+
+ // Exit if an error other than ERROR_PIPE_BUSY occurs
+ dwLastError = GetLastError();
+ if (dwLastError != ERROR_PIPE_BUSY)
+ {
+ DPRINT("OpenSCManagerW() - returning at 4, dwLastError %d\n", dwLastError);
+ return NULL;
+ }
+
+ // All pipe instances are busy, so wait for 20 seconds
+ if (!WaitNamedPipeW(lpszPipeName, 20000))
+ {
+ DPRINT("OpenSCManagerW() - Failed on WaitNamedPipeW(...).\n");
+ return NULL;
+ }
+ }
+
+ // The pipe connected; change to message-read mode
+ dwMode = PIPE_READMODE_MESSAGE;
+ fSuccess = SetNamedPipeHandleState(
+ hPipe, // pipe handle
+ &dwMode, // new pipe mode
+ NULL, // don't set maximum bytes
+ NULL); // don't set maximum time
+ if (!fSuccess)
+ {
+ CloseHandle(hPipe);
+ DPRINT("OpenSCManagerW() - Failed on SetNamedPipeHandleState(...).\n");
+ return NULL;
+ }
#if 0
- // Send a message to the pipe server
- lpvMessage = (argc > 1) ? argv[1] : "default message";
-
- fSuccess = WriteFile(
- hPipe, // pipe handle
- lpvMessage, // message
- strlen(lpvMessage) + 1, // message length
- &cbWritten, // bytes written
- NULL); // not overlapped
- if (!fSuccess) {
- CloseHandle(hPipe);
- DPRINT("OpenSCManagerW() - Failed to write to pipe.\n");
- return NULL;
- }
-
- do {
- DPRINT("OpenSCManagerW() - in I/O loop to SCM...\n");
- // Read from the pipe
- fSuccess = ReadFile(
- hPipe, // pipe handle
- chBuf, // buffer to receive reply
- 512, // size of buffer
- &cbRead, // number of bytes read
- NULL); // not overlapped
-
- if (!fSuccess && GetLastError() != ERROR_MORE_DATA) {
- break;
- }
-
- // Reply from the pipe is written to STDOUT.
- if (!WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), chBuf, cbRead, &cbWritten, NULL)) {
- break;
- }
- } while(!fSuccess); // repeat loop if ERROR_MORE_DATA
-
- DPRINT("OpenSCManagerW() - I/O loop completed.\n");
- //CloseHandle(hPipe);
+ // Send a message to the pipe server
+ lpvMessage = (argc > 1) ? argv[1] : "default message";
+
+ fSuccess = WriteFile(
+ hPipe, // pipe handle
+ lpvMessage, // message
+ strlen(lpvMessage) + 1, // message length
+ &cbWritten, // bytes written
+ NULL); // not overlapped
+ if (!fSuccess)
+ {
+ CloseHandle(hPipe);
+ DPRINT("OpenSCManagerW() - Failed to write to pipe.\n");
+ return NULL;
+ }
+
+ do
+ {
+ DPRINT("OpenSCManagerW() - in I/O loop to SCM...\n");
+ // Read from the pipe
+ fSuccess = ReadFile(
+ hPipe, // pipe handle
+ chBuf, // buffer to receive reply
+ 512, // size of buffer
+ &cbRead, // number of bytes read
+ NULL); // not overlapped
+
+ if (!fSuccess && GetLastError() != ERROR_MORE_DATA)
+ {
+ break;
+ }
+
+ // Reply from the pipe is written to STDOUT.
+ if (!WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), chBuf, cbRead, &cbWritten, NULL))
+ {
+ break;
+ }
+ } while(!fSuccess); // repeat loop if ERROR_MORE_DATA
+
+ DPRINT("OpenSCManagerW() - I/O loop completed.\n");
+ //CloseHandle(hPipe);
#endif
- DPRINT("OpenSCManagerW() - success, returning handle to pipe %x\n", hPipe);
- return hPipe;
- } else {
- /* FIXME: Connect to remote SCM */
- DPRINT("OpenSCManagerW() - FIXME: Connect to remote SCM not implemented.\n");
- return NULL;
+ DPRINT("OpenSCManagerW() - success, returning handle to pipe %x\n", hPipe);
+ return hPipe;
+ }
+ else
+ {
+ /* FIXME: Connect to remote SCM */
+ DPRINT("OpenSCManagerW() - FIXME: Connect to remote SCM not implemented.\n");
+ return NULL;
}
}
-/* $Id: sctrl.c,v 1.10 2003/07/10 15:05:55 chorns Exp $
+/* $Id: sctrl.c,v 1.11 2003/08/07 04:03:22 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
{
DWORD ThreadId;
UNICODE_STRING ServiceName;
- LPSERVICE_MAIN_FUNCTION MainFunction;
+ LPSERVICE_MAIN_FUNCTIONW MainFunction;
LPHANDLER_FUNCTION HandlerFunction;
SERVICE_STATUS ServiceStatus;
} ACTIVE_SERVICE, *PACTIVE_SERVICE;
DWORD WINAPI
ScServiceMainStub(LPVOID Context)
{
- LPSERVICE_MAIN_FUNCTION lpServiceProc = (LPSERVICE_MAIN_FUNCTION)Context;
+ LPSERVICE_MAIN_FUNCTIONW lpServiceProc = (LPSERVICE_MAIN_FUNCTIONW)Context;
/* FIXME: Send argc and argv (from command line) as arguments */
BOOL STDCALL
StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA lpServiceStartTable)
{
+ // FIXME how to deal with diffs between ANSI/UNICODE
+#if 0
LPSERVICE_TABLE_ENTRYW ServiceStartTableW;
ANSI_STRING ServiceNameA;
UNICODE_STRING ServiceNameW;
RtlFreeHeap(RtlGetProcessHeap(), 0, ServiceStartTableW);
return b;
+#else
+ UNIMPLEMENTED;
+ return 0;
+#endif
}
-# $Id: makefile,v 1.60 2003/07/24 15:59:46 gvg Exp $
+# $Id: makefile,v 1.61 2003/08/07 04:03:22 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -D_MSVCRT_LIB_
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = string.a kernel32.a ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o
HANDLE fh;
WIN32_FIND_DATAA wfd;
- fh = FindFirstFile(path, &wfd);
+ fh = FindFirstFileA(path, &wfd);
if (fh == INVALID_HANDLE_VALUE) {
__set_errno(ENOFILE);
return -1;
buffer->st_size = wfd.nFileSizeLow;
buffer->st_nlink = 1;
- if (FindNextFile(fh, &wfd)) {
+ if (FindNextFileA(fh, &wfd)) {
__set_errno(ENOFILE);
FindClose(fh);
return -1;
-# $Id: makefile,v 1.1 2003/04/13 03:24:27 hyperion Exp $
+# $Id: makefile,v 1.2 2003/08/07 04:03:22 royce Exp $
PATH_TO_TOP = ../..
TARGET_NAME = epsapi
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_OBJECTS = \
enum/drivers.o \
enum/modules.o \
-# $Id: makefile,v 1.18 2003/04/14 01:19:06 hyperion Exp $
+# $Id: makefile,v 1.19 2003/08/07 04:03:22 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -fno-builtin
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostdlib -nostartfiles
TARGET_SDKLIBS = vfatlib.a ntdll.a kernel32.a
-# $Id: Makefile,v 1.4 2003/05/18 21:17:33 guido Exp $
+# $Id: Makefile,v 1.5 2003/08/07 04:03:22 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = $(CFLAGS_DBG) -Iinclude -Wall
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
ROS_OBJECTS = rosglue.o i386/setjmplongjmp.o
TARGET_OBJECTS = objs/*.o $(ROS_OBJECTS)
-# $Id: Makefile,v 1.1 2003/04/05 19:40:41 chorns Exp $
+# $Id: Makefile,v 1.2 2003/08/07 04:03:22 royce Exp $
PATH_TO_TOP = ../../..
TARGET_NAME = vfatlib
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_OBJECTS = \
vfatlib.o
-# $Id: makefile,v 1.31 2003/08/04 00:28:44 royce Exp $
+# $Id: makefile,v 1.32 2003/08/07 04:03:22 royce Exp $
PATH_TO_TOP = ../..
-Werror \
-fno-builtin
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
MAIN_OBJECTS = main/dllmain.o
-/* $Id: stubsa.c,v 1.22 2003/08/05 15:41:02 weiden Exp $
+/* $Id: stubsa.c,v 1.23 2003/08/07 04:03:22 royce Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
STDCALL
EnumICMProfilesA(
HDC a0,
- ICMENUMPROC a1,
+ ICMENUMPROCA a1,
LPARAM a2
)
{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ /*
+ * FIXME - call W32kEnumICMProfiles with NULL for lpstrBuffer
+ * to find out how big a buffer we need. Then allocate that buffer
+ * and call W32kEnumICMProfiles again to have the buffer filled.
+ *
+ * Finally, step through the buffer ( MULTI-SZ recommended for format ),
+ * and convert each string to ANSI, calling the user's callback function
+ * until we run out of strings or the user returns FALSE
+ */
+
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return 0;
}
-/* $Id: stubsw.c,v 1.18 2003/08/05 15:41:02 weiden Exp $
+/* $Id: stubsw.c,v 1.19 2003/08/07 04:03:22 royce Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
int
STDCALL
EnumICMProfilesW(
- HDC a0,
- ICMENUMPROC a1,
- LPARAM a2
+ HDC hDC,
+ ICMENUMPROCW lpEnumICMProfilesFunc,
+ LPARAM lParam
)
{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ /*
+ * FIXME - call W32kEnumICMProfiles with NULL for lpstrBuffer
+ * to find out how big a buffer we need. Then allocate that buffer
+ * and call W32kEnumICMProfiles again to have the buffer filled.
+ *
+ * Finally, step through the buffer ( MULTI-SZ recommended for format ),
+ * and call the user's callback function until we run out of strings or
+ * the user returns FALSE
+ */
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return 0;
}
static BOOL
-MetricsCharConvert(WCHAR w, BCHAR *b)
+MetricsCharConvert(WCHAR w, CHAR *b)
{
UNICODE_STRING WString;
WCHAR WBuf[2];
return lErr;
// Determine the size of the largest name of any adapter and the number of adapters.
- lErr = RegQueryInfoKey(hAdapters, NULL, NULL, NULL, NULL, &dwAdapterLen, NULL, NULL, NULL, NULL, NULL, NULL);
+ lErr = RegQueryInfoKeyW(hAdapters, NULL, NULL, NULL, NULL, &dwAdapterLen, NULL, NULL, NULL, NULL, NULL, NULL);
if(lErr != ERROR_SUCCESS)
{
RegCloseKey(hAdapters);
return lErr;
}
- dwAdapterLen++; // RegQueryInfoKey return value does not include terminating null.
+ dwAdapterLen++; // RegQueryInfoKeyW return value does not include terminating null.
strAdapter = (wchar_t*) malloc(dwAdapterLen * sizeof(wchar_t));
// TODO UINT DhcpEnabled
// TODO PIP_ADDR_STRING CurrentIpAddress
// IP_ADDR_STRING IpAddressList
- dwSize = 16; lErr = RegQueryValueEx(hIpConfig, _T("IPAddress"), NULL, NULL, (BYTE*) &pCurrentAdapter->IpAddressList.IpAddress, &dwSize);
- dwSize = 16; lErr = RegQueryValueEx(hIpConfig, _T("SubnetMask"), NULL, NULL, (BYTE*) &pCurrentAdapter->IpAddressList.IpMask, &dwSize);
+ dwSize = 16; lErr = RegQueryValueExW(hIpConfig, L"IPAddress", NULL, NULL, (BYTE*) &pCurrentAdapter->IpAddressList.IpAddress, &dwSize);
+ dwSize = 16; lErr = RegQueryValueExW(hIpConfig, L"SubnetMask", NULL, NULL, (BYTE*) &pCurrentAdapter->IpAddressList.IpMask, &dwSize);
if(strstr(pCurrentAdapter->IpAddressList.IpAddress.String, "0.0.0.0") != 0)
{
- dwSize = 16; lErr = RegQueryValueEx(hIpConfig, _T("DhcpIPAddress"), NULL, NULL, (BYTE*) &pCurrentAdapter->IpAddressList.IpAddress, &dwSize);
- dwSize = 16; lErr = RegQueryValueEx(hIpConfig, _T("DhcpSubnetMask"), NULL, NULL, (BYTE*) &pCurrentAdapter->IpAddressList.IpMask, &dwSize);
+ dwSize = 16; lErr = RegQueryValueExW(hIpConfig, L"DhcpIPAddress", NULL, NULL, (BYTE*) &pCurrentAdapter->IpAddressList.IpAddress, &dwSize);
+ dwSize = 16; lErr = RegQueryValueExW(hIpConfig, L"DhcpSubnetMask", NULL, NULL, (BYTE*) &pCurrentAdapter->IpAddressList.IpMask, &dwSize);
}
// TODO IP_ADDR_STRING GatewayList
// IP_ADDR_STRING DhcpServer
- dwSize = 16; lErr = RegQueryValueEx(hIpConfig, _T("DhcpServer"), NULL, NULL, (BYTE*) &pCurrentAdapter->DhcpServer.IpAddress, &dwSize);
- dwSize = 16; lErr = RegQueryValueEx(hIpConfig, _T("DhcpSubnetMask"), NULL, NULL, (BYTE*) &pCurrentAdapter->DhcpServer.IpMask, &dwSize);
+ dwSize = 16; lErr = RegQueryValueExW(hIpConfig, L"DhcpServer", NULL, NULL, (BYTE*) &pCurrentAdapter->DhcpServer.IpAddress, &dwSize);
+ dwSize = 16; lErr = RegQueryValueExW(hIpConfig, L"DhcpSubnetMask", NULL, NULL, (BYTE*) &pCurrentAdapter->DhcpServer.IpMask, &dwSize);
// TODO BOOL HaveWins
// TODO IP_ADDR_STRING PrimaryWinsServer
// TODO IP_ADDR_STRING SecondaryWinsServer
WINAPI
GetNetworkParams(PFIXED_INFO pFixedInfo, PULONG pOutBufLen)
{
- DWORD result = ERROR_SUCCESS;
- DWORD dwSize;
- HKEY hKey;
- LONG errCode;
-
- if (pFixedInfo == NULL || pOutBufLen == NULL) return ERROR_INVALID_PARAMETER;
-
- if (*pOutBufLen < sizeof(FIXED_INFO)) {
- *pOutBufLen = sizeof(FIXED_INFO);
- return ERROR_BUFFER_OVERFLOW;
+ DWORD result = ERROR_SUCCESS;
+ DWORD dwSize;
+ HKEY hKey;
+ LONG errCode;
+
+ if (pFixedInfo == NULL || pOutBufLen == NULL) return ERROR_INVALID_PARAMETER;
+
+ if (*pOutBufLen < sizeof(FIXED_INFO))
+ {
+ *pOutBufLen = sizeof(FIXED_INFO);
+ return ERROR_BUFFER_OVERFLOW;
+ }
+ memset(pFixedInfo, 0, sizeof(FIXED_INFO));
+
+ errCode = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", 0, KEY_READ, &hKey);
+ if (errCode == ERROR_SUCCESS)
+ {
+ dwSize = sizeof(pFixedInfo->HostName);
+ errCode = RegQueryValueExA(hKey, "Hostname", NULL, NULL, (LPBYTE)&pFixedInfo->HostName, &dwSize);
+ dwSize = sizeof(pFixedInfo->DomainName);
+ errCode = RegQueryValueExA(hKey, "Domain", NULL, NULL, (LPBYTE)&pFixedInfo->DomainName, &dwSize);
+ if (errCode != ERROR_SUCCESS)
+ {
+ dwSize = sizeof(pFixedInfo->DomainName);
+ errCode = RegQueryValueExA(hKey, "DhcpDomain", NULL, NULL, (LPBYTE)&pFixedInfo->DomainName, &dwSize);
}
- memset(pFixedInfo, 0, sizeof(FIXED_INFO));
-
- errCode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"), 0, KEY_READ, &hKey);
- if (errCode == ERROR_SUCCESS) {
- dwSize = sizeof(pFixedInfo->HostName);
- errCode = RegQueryValueExA(hKey, "Hostname", NULL, NULL, (LPBYTE)&pFixedInfo->HostName, &dwSize);
- dwSize = sizeof(pFixedInfo->DomainName);
- errCode = RegQueryValueExA(hKey, "Domain", NULL, NULL, (LPBYTE)&pFixedInfo->DomainName, &dwSize);
- if (errCode != ERROR_SUCCESS) {
- dwSize = sizeof(pFixedInfo->DomainName);
- errCode = RegQueryValueExA(hKey, "DhcpDomain", NULL, NULL, (LPBYTE)&pFixedInfo->DomainName, &dwSize);
- }
- dwSize = sizeof(pFixedInfo->EnableRouting);
- errCode = RegQueryValueEx(hKey, _T("IPEnableRouter"), NULL, NULL, (LPBYTE)&pFixedInfo->EnableRouting, &dwSize);
- RegCloseKey(hKey);
- } else {
- result = ERROR_NO_DATA; // No adapter information exists for the local computer
- }
-
- errCode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Services\\NetBT\\Parameters"), 0, KEY_READ, &hKey);
- if (errCode == ERROR_SUCCESS) {
- dwSize = sizeof(pFixedInfo->ScopeId);
- errCode = RegQueryValueExA(hKey, "ScopeId", NULL, NULL, (LPBYTE)&pFixedInfo->ScopeId, &dwSize);
- if (errCode != ERROR_SUCCESS) {
- dwSize = sizeof(pFixedInfo->ScopeId);
- errCode = RegQueryValueExA(hKey, "DhcpScopeId", NULL, NULL, (LPBYTE)&pFixedInfo->ScopeId, &dwSize);
- }
- dwSize = sizeof(pFixedInfo->NodeType);
- errCode = RegQueryValueEx(hKey, _T("NodeType"), NULL, NULL, (LPBYTE)&pFixedInfo->NodeType, &dwSize);
- if (errCode != ERROR_SUCCESS) {
- dwSize = sizeof(pFixedInfo->NodeType);
- errCode = RegQueryValueExA(hKey, "DhcpNodeType", NULL, NULL, (LPBYTE)&pFixedInfo->NodeType, &dwSize);
- }
- dwSize = sizeof(pFixedInfo->EnableProxy);
- errCode = RegQueryValueEx(hKey, _T("EnableProxy"), NULL, NULL, (LPBYTE)&pFixedInfo->EnableProxy, &dwSize);
- dwSize = sizeof(pFixedInfo->EnableDns);
- errCode = RegQueryValueEx(hKey, _T("EnableDNS"), NULL, NULL, (LPBYTE)&pFixedInfo->EnableDns, &dwSize);
- RegCloseKey(hKey);
- } else {
- result = ERROR_NO_DATA; // No adapter information exists for the local computer
- }
-
- return result;
+ dwSize = sizeof(pFixedInfo->EnableRouting);
+ errCode = RegQueryValueExW(hKey, L"IPEnableRouter", NULL, NULL, (LPBYTE)&pFixedInfo->EnableRouting, &dwSize);
+ RegCloseKey(hKey);
+ }
+ else
+ {
+ result = ERROR_NO_DATA; // No adapter information exists for the local computer
+ }
+
+ errCode = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\NetBT\\Parameters", 0, KEY_READ, &hKey);
+ if (errCode == ERROR_SUCCESS)
+ {
+ dwSize = sizeof(pFixedInfo->ScopeId);
+ errCode = RegQueryValueExA(hKey, "ScopeId", NULL, NULL, (LPBYTE)&pFixedInfo->ScopeId, &dwSize);
+ if (errCode != ERROR_SUCCESS)
+ {
+ dwSize = sizeof(pFixedInfo->ScopeId);
+ errCode = RegQueryValueExA(hKey, "DhcpScopeId", NULL, NULL, (LPBYTE)&pFixedInfo->ScopeId, &dwSize);
+ }
+ dwSize = sizeof(pFixedInfo->NodeType);
+ errCode = RegQueryValueExW(hKey, L"NodeType", NULL, NULL, (LPBYTE)&pFixedInfo->NodeType, &dwSize);
+ if (errCode != ERROR_SUCCESS)
+ {
+ dwSize = sizeof(pFixedInfo->NodeType);
+ errCode = RegQueryValueExA(hKey, "DhcpNodeType", NULL, NULL, (LPBYTE)&pFixedInfo->NodeType, &dwSize);
+ }
+ dwSize = sizeof(pFixedInfo->EnableProxy);
+ errCode = RegQueryValueExW(hKey, L"EnableProxy", NULL, NULL, (LPBYTE)&pFixedInfo->EnableProxy, &dwSize);
+ dwSize = sizeof(pFixedInfo->EnableDns);
+ errCode = RegQueryValueExW(hKey, L"EnableDNS", NULL, NULL, (LPBYTE)&pFixedInfo->EnableDns, &dwSize);
+ RegCloseKey(hKey);
+ }
+ else
+ {
+ result = ERROR_NO_DATA; // No adapter information exists for the local computer
+ }
+
+ return result;
}
TARGET_CFLAGS = -DUNICODE -D_UNICODE
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -DUNICODE
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o
-# $Id: makefile,v 1.1 2003/07/31 16:47:08 royce Exp $
+# $Id: makefile,v 1.2 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -I$(PATH_TO_TOP)/ntoskrnl/include
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS =
-/* $Id: find.c,v 1.37 2003/07/10 18:50:51 chorns Exp $
+/* $Id: find.c,v 1.38 2003/08/07 04:03:23 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
HANDLE
STDCALL
FindFirstFileA (
- LPCTSTR lpFileName,
+ LPCSTR lpFileName,
LPWIN32_FIND_DATAA lpFindFileData
)
{
-# $Id: makefile,v 1.67 2003/06/08 21:00:04 ekohl Exp $
+# $Id: makefile,v 1.68 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_BASE = 0x77f00000
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS = rosrtl.a ntdll.a
-/* $Id: error.c,v 1.19 2003/07/10 18:50:51 chorns Exp $
+/* $Id: error.c,v 1.20 2003/08/07 04:03:23 royce Exp $
*
* reactos/lib/kernel32/misc/error.c
*
BEEP_SET_PARAMETERS BeepSetParameters;
DWORD dwReturned;
- hBeep = CreateFile("\\\\.\\Beep",
+ hBeep = CreateFileA("\\\\.\\Beep",
FILE_GENERIC_READ | FILE_GENERIC_WRITE,
0,
NULL,
-/* $Id: errormsg.c,v 1.6 2003/07/10 18:50:51 chorns Exp $
+/* $Id: errormsg.c,v 1.7 2003/08/07 04:03:23 royce Exp $
*
* reactos/lib/kernel32/misc/errormsg.c
*
#define TRACE DPRINT
#define FIXME DPRINT
-#define strlenW lstrlen
-#define strlen lstrlen
-
//#define MAKEINTRESOURCE(i) (LPTSTR) ((DWORD) ((WORD) (i)))
//#define MAKEINTRESOURCEA(i) (LPTSTR) ((DWORD) ((WORD) (i)))
//#define MAKEINTRESOURCEW(i) (LPTSTR) ((DWORD) ((WORD) (i)))
{
if (retval) {
lstrcpynAtoW( buffer, buffer2, buflen );
- retval = strlenW( buffer );
+ retval = lstrlenW( buffer );
}
HeapFree( GetProcessHeap(), 0, buffer2 );
}
from = NULL;
if (dwFlags & FORMAT_MESSAGE_FROM_STRING)
{
- from = RtlAllocateHeap(RtlGetProcessHeap(), 0, strlen((LPSTR)lpSource)+1 );
+ from = RtlAllocateHeap(RtlGetProcessHeap(), 0, lstrlenA((LPSTR)lpSource)+1 );
strcpy( from, (LPSTR)lpSource );
}
else {
f++;
if (NULL!=(x=strchr(f,'!'))) {
*x='\0';
- fmtstr=RtlAllocateHeap(RtlGetProcessHeap(),0,strlen(f)+2);
+ fmtstr=RtlAllocateHeap(RtlGetProcessHeap(),0,lstrlenA(f)+2);
sprintf(fmtstr,"%%%s",f);
f=x+1;
} else {
- fmtstr=RtlAllocateHeap(RtlGetProcessHeap(),0,strlen(f)+2);
+ fmtstr=RtlAllocateHeap(RtlGetProcessHeap(),0,lstrlenA(f)+2);
sprintf(fmtstr,"%%%s",f);
- f+=strlen(f); /*at \0*/
+ f+=lstrlenA(f); /*at \0*/
}
} else {
if(!args) break;
}
*t='\0';
}
- talloced = strlen(target)+1;
+ talloced = lstrlenA(target)+1;
if (nSize && talloced<nSize) {
target = (char*)RtlReAllocateHeap(RtlGetProcessHeap(),HEAP_ZERO_MEMORY,target,nSize);
}
}
RtlFreeHeap(RtlGetProcessHeap(),0,target);
if (from) RtlFreeHeap(RtlGetProcessHeap(),0,from);
- //TRACE("-- returning %d\n", (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) ? strlen(*(LPSTR*)lpBuffer):strlen(lpBuffer));
+ //TRACE("-- returning %d\n", (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) ? lstrlenA(*(LPSTR*)lpBuffer):lstrlenA(lpBuffer));
return (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) ?
- strlen(*(LPSTR*)lpBuffer):
- strlen(lpBuffer);
+ lstrlenA(*(LPSTR*)lpBuffer):
+ lstrlenA(lpBuffer);
#else
return 0;
#endif /* __i386__ */
f++;
if (NULL!=(x=strchr(f,'!'))) {
*x='\0';
- fmtstr=RtlAllocateHeap(RtlGetProcessHeap(), 0, strlen(f)+2);
+ fmtstr=RtlAllocateHeap(RtlGetProcessHeap(), 0, lstrlenA(f)+2);
sprintf(fmtstr,"%%%s",f);
f=x+1;
} else {
- fmtstr=RtlAllocateHeap(RtlGetProcessHeap(),0,strlen(f));
+ fmtstr=RtlAllocateHeap(RtlGetProcessHeap(),0,lstrlenA(f));
sprintf(fmtstr,"%%%s",f);
- f+=strlen(f); /*at \0*/
+ f+=lstrlenA(f); /*at \0*/
}
} else {
if(!args) break;
else
argliststart=(*(DWORD**)args)+insertnr-1;
- if (fmtstr[strlen(fmtstr)-1]=='s' && argliststart[0]) {
+ if (fmtstr[lstrlenA(fmtstr)-1]=='s' && argliststart[0]) {
DWORD xarr[3];
xarr[0]=(DWORD)HEAP_strdupWtoA(RtlGetProcessHeap(),0,(LPWSTR)(*(argliststart+0)));
/* possible invalid pointers */
xarr[1]=*(argliststart+1);
xarr[2]=*(argliststart+2);
- sprintfbuf=RtlAllocateHeap(RtlGetProcessHeap(),0,strlenW((LPWSTR)argliststart[0])*2+1);
+ sprintfbuf=RtlAllocateHeap(RtlGetProcessHeap(),0,lstrlenW((LPWSTR)argliststart[0])*2+1);
/* CMF - This makes a BIG assumption about va_list */
vsprintf(sprintfbuf, fmtstr, (va_list) xarr);
}
*t='\0';
}
- talloced = strlen(target)+1;
+ talloced = lstrlenA(target)+1;
if (nSize && talloced<nSize)
target = (char*)RtlReAllocateHeap(RtlGetProcessHeap(),HEAP_ZERO_MEMORY,target,nSize);
if (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) {
RtlFreeHeap(RtlGetProcessHeap(),0,target);
if (from) RtlFreeHeap(RtlGetProcessHeap(),0,from);
return (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) ?
- strlenW(*(LPWSTR*)lpBuffer):
- strlenW(lpBuffer);
+ lstrlenW(*(LPWSTR*)lpBuffer):
+ lstrlenW(lpBuffer);
#else
return 0;
#endif /* __i386__ */
-/* $Id: mbchars.c,v 1.3 2003/07/10 18:50:51 chorns Exp $
+/* $Id: mbchars.c,v 1.4 2003/08/07 04:03:23 royce Exp $
*
*/
#include <windows.h>
//if (-1 == cchMultiByte)
if (cchMultiByte < 0)
{
- InStringLength = lstrlen(lpMultiByteStr) + 1;
+ InStringLength = lstrlenA(lpMultiByteStr) + 1;
}
else
{
-/* $Id: res.c,v 1.15 2003/07/10 18:50:51 chorns Exp $
+/* $Id: res.c,v 1.16 2003/08/07 04:03:23 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT : ReactOS user mode libraries
NTSTATUS Status;
if ( hModule == NULL )
- hModule = GetModuleHandle(NULL);
+ hModule = (HINSTANCE)GetModuleHandleW(NULL);
if ( !IS_INTRESOURCE(lpName) && lpName[0] == L'#' ) {
lpName = MAKEINTRESOURCEW(wcstoul(lpName + 1, NULL, 10));
if (hModule == NULL)
{
- hModule = GetModuleHandle(NULL);
+ hModule = (HINSTANCE)GetModuleHandleW(NULL);
}
Status = LdrAccessResource (hModule, hResInfo, &Data, NULL);
WINBOOL
STDCALL
EnumResourceLanguagesW (
- HINSTANCE hModule,
- LPCWSTR lpType,
- LPCWSTR lpName,
- ENUMRESLANGPROC lpEnumFunc,
- LONG lParam
+ HINSTANCE hModule,
+ LPCWSTR lpType,
+ LPCWSTR lpName,
+ ENUMRESLANGPROCW lpEnumFunc,
+ LONG lParam
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumResourceLanguagesA (
- HINSTANCE hModule,
- LPCSTR lpType,
- LPCSTR lpName,
- ENUMRESLANGPROC lpEnumFunc,
- LONG lParam
+ HINSTANCE hModule,
+ LPCSTR lpType,
+ LPCSTR lpName,
+ ENUMRESLANGPROCA lpEnumFunc,
+ LONG lParam
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumResourceNamesW (
- HINSTANCE hModule,
- LPCWSTR lpType,
- ENUMRESNAMEPROC lpEnumFunc,
- LONG lParam
+ HINSTANCE hModule,
+ LPCWSTR lpType,
+ ENUMRESNAMEPROCW lpEnumFunc,
+ LONG lParam
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumResourceNamesA (
- HINSTANCE hModule,
- LPCSTR lpType,
- ENUMRESNAMEPROC lpEnumFunc,
- LONG lParam
+ HINSTANCE hModule,
+ LPCSTR lpType,
+ ENUMRESNAMEPROCA lpEnumFunc,
+ LONG lParam
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumResourceTypesW (
- HINSTANCE hModule,
- ENUMRESTYPEPROC lpEnumFunc,
- LONG lParam
+ HINSTANCE hModule,
+ ENUMRESTYPEPROCW lpEnumFunc,
+ LONG lParam
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumResourceTypesA (
- HINSTANCE hModule,
- ENUMRESTYPEPROC lpEnumFunc,
- LONG lParam
+ HINSTANCE hModule,
+ ENUMRESTYPEPROCA lpEnumFunc,
+ LONG lParam
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-/* $Id: stubs.c,v 1.53 2003/08/05 15:41:02 weiden Exp $
+/* $Id: stubs.c,v 1.54 2003/08/07 04:03:23 royce Exp $
*
* KERNEL32.DLL stubs (unimplemented functions)
* Remove from this file, if you implement them.
WINBOOL
STDCALL
EnumCalendarInfoW (
- CALINFO_ENUMPROC lpCalInfoEnumProc,
+ CALINFO_ENUMPROCW lpCalInfoEnumProc,
LCID Locale,
CALID Calendar,
CALTYPE CalType
WINBOOL
STDCALL
EnumCalendarInfoA (
- CALINFO_ENUMPROC lpCalInfoEnumProc,
- LCID Locale,
- CALID Calendar,
- CALTYPE CalType
+ CALINFO_ENUMPROCA lpCalInfoEnumProc,
+ LCID Locale,
+ CALID Calendar,
+ CALTYPE CalType
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumDateFormatsW (
- DATEFMT_ENUMPROC lpDateFmtEnumProc,
- LCID Locale,
- DWORD dwFlags
+ DATEFMT_ENUMPROCW lpDateFmtEnumProc,
+ LCID Locale,
+ DWORD dwFlags
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumDateFormatsA (
- DATEFMT_ENUMPROC lpDateFmtEnumProc,
- LCID Locale,
- DWORD dwFlags
+ DATEFMT_ENUMPROCA lpDateFmtEnumProc,
+ LCID Locale,
+ DWORD dwFlags
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumSystemCodePagesW (
- CODEPAGE_ENUMPROC lpCodePageEnumProc,
- DWORD dwFlags
+ CODEPAGE_ENUMPROCW lpCodePageEnumProc,
+ DWORD dwFlags
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumSystemCodePagesA (
- CODEPAGE_ENUMPROC lpCodePageEnumProc,
- DWORD dwFlags
+ CODEPAGE_ENUMPROCA lpCodePageEnumProc,
+ DWORD dwFlags
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumSystemLocalesW (
- LOCALE_ENUMPROC lpLocaleEnumProc,
- DWORD dwFlags
+ LOCALE_ENUMPROCW lpLocaleEnumProc,
+ DWORD dwFlags
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumSystemLocalesA (
- LOCALE_ENUMPROC lpLocaleEnumProc,
- DWORD dwFlags
+ LOCALE_ENUMPROCA lpLocaleEnumProc,
+ DWORD dwFlags
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
WINBOOL
STDCALL
EnumTimeFormatsW (
- TIMEFMT_ENUMPROC lpTimeFmtEnumProc,
+ TIMEFMT_ENUMPROCW lpTimeFmtEnumProc,
LCID Locale,
DWORD dwFlags
)
WINBOOL
STDCALL
EnumTimeFormatsA (
- TIMEFMT_ENUMPROC lpTimeFmtEnumProc,
- LCID Locale,
- DWORD dwFlags
+ TIMEFMT_ENUMPROCA lpTimeFmtEnumProc,
+ LCID Locale,
+ DWORD dwFlags
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
TARGET_BASE=0x76380000
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a
TARGET_OBJECTS = lzexpand_main.o
-# $Id: makefile,v 1.9 2003/04/14 01:19:07 hyperion Exp $
+# $Id: makefile,v 1.10 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_BASE = 0x777a0000
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_CFLAGS = \
-# $Id: Makefile,v 1.38 2003/07/16 21:54:22 royce Exp $
+# $Id: Makefile,v 1.39 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -D_MSVCRT_LIB_
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CLEAN = \
-/* $Id: cpp.c,v 1.1 2003/04/30 22:07:30 gvg Exp $
+/* $Id: cpp.c,v 1.2 2003/08/07 04:03:23 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS C runtime
{
if (trylevel < 0 || trylevel >= descr->unwind_count)
{
- OutputDebugString( "invalid trylevel\n" );
+ OutputDebugStringA ( "invalid trylevel\n" );
_exit(1);
}
handler = descr->unwind_table[trylevel].handler;
if (descr->magic != CXX_FRAME_MAGIC)
{
- OutputDebugString( "invalid frame magic\n" );
+ OutputDebugStringA ( "invalid frame magic\n" );
return ExceptionContinueSearch;
}
if (rec->ExceptionFlags & (EH_UNWINDING|EH_EXIT_UNWIND))
s = strpbrk(name, "*?");
if (s && flag) {
- hFile = FindFirstFile(name, &fd);
+ hFile = FindFirstFileA(name, &fd);
if (hFile != INVALID_HANDLE_VALUE) {
while(s != name && *s != '/' && *s != '\\')
s--;
first = FALSE;
}
}
- while(FindNextFile(hFile, &fd));
+ while(FindNextFileA(hFile, &fd));
FindClose(hFile);
}
}
-# $Id: makefile,v 1.91 2003/07/24 19:53:11 hbirr Exp $
+# $Id: makefile,v 1.92 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -g -D__NTDLL__
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_ASFLAGS = -I $(PATH_TO_TOP)/include
TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \
-# $Id: makefile,v 1.6 2001/09/02 09:10:47 chorns Exp $
+# $Id: makefile,v 1.7 2003/08/07 04:03:23 royce Exp $
#
# Jurgen Van Gael [jurgen.vangael@student.kuleuven.ac.be]
#
TARGET_CFLAGS = -fno-rtti -I./include
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a user32.a gdi32.a msvcrt.a
TARGET_OBJECTS = \
-# $Id: makefile,v 1.3 2001/08/21 20:13:07 chorns Exp $
+# $Id: makefile,v 1.4 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_BASE = 0x76260000
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = dllmain.o stubs.o
-# $Id: makefile,v 1.7 2003/04/14 01:19:07 hyperion Exp $
+# $Id: makefile,v 1.8 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -I./include
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_BASE = 0x68F70000
-# $Id: makefile,v 1.8 2003/07/22 20:10:04 hyperion Exp $
+# $Id: makefile,v 1.9 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -Wall -Werror
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_OBJECTS = $(THREAD_OBJECTS) $(MISC_OBJECTS)
DEP_OBJECTS = $(TARGET_OBJECTS)
-# $Id: Makefile,v 1.5 2001/07/15 21:18:55 rex Exp $
+# $Id: Makefile,v 1.6 2003/08/07 04:03:23 royce Exp $
#
# ReactOS Operating System
#
CFLAGS = $(CFLAGS)
+# require os code to explicitly request A/W version of structs/functions
+CFLAGS += -D_DISABLE_TIDENTS
+
midl:
DLLTARGET=$(TARGET).dll
-# $Id: Makefile,v 1.2 2000/10/11 20:50:33 dwelch Exp $
+# $Id: Makefile,v 1.3 2003/08/07 04:03:23 royce Exp $
#
# ReactOS Operating System
#
CFLAGS =
+# require os code to explicitly request A/W version of structs/functions
+CFLAGS += -D_DISABLE_TIDENTS
+
all: midl$(EXE_POSTFIX)
idl.tab.o: idl.y
-# $Id: Makefile,v 1.10 2003/02/02 19:24:15 hyperion Exp $
+# $Id: Makefile,v 1.11 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
-fno-builtin \
-D__SECUR32__
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_OBJECTS = lsa.o dllmain.o
TARGET_CFLAGS = -DUNICODE
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o
-# $Id: Makefile,v 1.4 2003/06/09 20:23:06 hbirr Exp $
+# $Id: Makefile,v 1.5 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -Wall -Werror
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
ifeq ($(DBG), 1)
TARGET_CFLAGS += -g
else
-# $Id: Makefile,v 1.1 2003/05/02 18:07:55 ekohl Exp $
+# $Id: Makefile,v 1.2 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_CFLAGS = -Wall -Werror -fno-builtin
+
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
TARGET_LFLAGS = -nostartfiles -nostdlib
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: install.c,v 1.1 2003/05/02 18:07:55 ekohl Exp $
+/* $Id: install.c,v 1.2 2003/08/07 04:03:23 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
DWORD STDCALL
InstallReactOS (HINSTANCE hInstance)
{
- OutputDebugString ("InstallReactOS() called\n");
+ OutputDebugStringA ("InstallReactOS() called\n");
if (!InitializeSetupActionLog (FALSE))
{
- OutputDebugString ("InitializeSetupActionLog() failed\n");
+ OutputDebugStringA ("InitializeSetupActionLog() failed\n");
}
LogItem (SEVERITY_INFORMATION,
-# $Id: Makefile,v 1.1 2003/04/22 03:20:25 hyperion Exp $
+# $Id: Makefile,v 1.2 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_NAME = tgetopt
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_OBJECTS = getopt.o _wgetopt.o
DEP_OBJECTS = $(TARGET_OBJECTS)
-# $Id: Makefile,v 1.1 2003/07/22 04:00:28 sedwards Exp $
+# $Id: Makefile,v 1.2 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
TARGET_NAME = twain_32
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_BASE=0x76380000
TARGET_SDKLIBS = ntdll.a
-# $Id: Makefile,v 1.22 2003/07/27 11:54:42 dwelch Exp $
+# $Id: Makefile,v 1.23 2003/08/07 04:03:23 royce Exp $
PATH_TO_TOP = ../..
-Werror \
-fno-builtin
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
CONTROLS_OBJECTS = \
-/* $Id: scrollbar.c,v 1.10 2003/07/26 15:48:47 dwelch Exp $
+/* $Id: scrollbar.c,v 1.11 2003/08/07 04:03:23 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
vertical = TRUE;
break;
case SB_CTL:
- vertical = (GetWindowLong(hwnd,GWL_STYLE)&SBS_VERT) != 0;
+ vertical = (GetWindowLongW(hwnd,GWL_STYLE)&SBS_VERT) != 0;
break;
#ifdef DBG
default:
(actual resource ids) start from 1. See (1) and (2)
*/
/* TODO: some sort of cache, here, would be great */
- hrsStringTable = FindResource
+ hrsStringTable = FindResourceW
(
(HMODULE)hInstance,
- MAKEINTRESOURCE((uID / 16) + 1), /* (2) */
+ MAKEINTRESOURCEW((uID / 16) + 1), /* (2) */
RT_STRING
);
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: winhelp.c,v 1.4 2003/07/10 21:04:31 chorns Exp $
+/* $Id: winhelp.c,v 1.5 2003/08/07 04:03:24 royce Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/winhelp.c
lpwh->ofsData = 0;
}
GlobalUnlock(hwh);
- return SendMessage(hDest, WM_WINHELP, (WPARAM)hWnd, (LPARAM)hwh);
+ return SendMessageA(hDest, WM_WINHELP, (WPARAM)hWnd, (LPARAM)hwh);
}
-/* $Id: winsta.c,v 1.8 2003/07/10 21:04:31 chorns Exp $
+/* $Id: winsta.c,v 1.9 2003/08/07 04:03:24 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
* @unimplemented
*/
WINBOOL STDCALL
-EnumWindowStationsA(ENUMWINDOWSTATIONPROC lpEnumFunc,
+EnumWindowStationsA(ENUMWINDOWSTATIONPROCA lpEnumFunc,
LPARAM lParam)
{
UNIMPLEMENTED;
* @unimplemented
*/
WINBOOL STDCALL
-EnumWindowStationsW(ENUMWINDOWSTATIONPROC lpEnumFunc,
+EnumWindowStationsW(ENUMWINDOWSTATIONPROCW lpEnumFunc,
LPARAM lParam)
{
UNIMPLEMENTED;
FrameRect@12
FreeDDElParam@8
GetActiveWindow@0
-GetAltTabInfo@20
GetAltTabInfoA@20
GetAltTabInfoW@20
GetAncestor@8
FrameRect=FrameRect@12
FreeDDElParam=FreeDDElParam@8
GetActiveWindow=GetActiveWindow@0
-GetAltTabInfo=GetAltTabInfo@20
GetAltTabInfoA=GetAltTabInfoA@20
GetAltTabInfoW=GetAltTabInfoW@20
GetAncestor=GetAncestor@8
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bitmap.c,v 1.11 2003/07/10 21:04:31 chorns Exp $
+/* $Id: bitmap.c,v 1.12 2003/08/07 04:03:24 royce Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
{
if (hinst == NULL)
{
- hinst = GetModuleHandle(L"USER32");
+ hinst = GetModuleHandleW(L"USER32");
}
hResource = FindResourceW(hinst, lpszName, RT_GROUP_ICON);
if (hResource == NULL)
id = LookupIconIdFromDirectoryEx((PBYTE) IconResDir, TRUE,
width, height, fuLoad & (LR_DEFAULTCOLOR | LR_MONOCHROME));
- h2Resource = FindResource(hinst,
- MAKEINTRESOURCE(id),
- MAKEINTRESOURCE(RT_ICON));
+ h2Resource = FindResourceW(hinst,
+ MAKEINTRESOURCEW(id),
+ MAKEINTRESOURCEW(RT_ICON));
hResource = LoadResource(hinst, h2Resource);
if (hResource == NULL)
}
else
{
- hFile = CreateFile(lpszName,
+ hFile = CreateFileW(lpszName,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
return(NULL);
}
- hSection = CreateFileMapping(hFile,
+ hSection = CreateFileMappingW(hFile,
NULL,
PAGE_READONLY,
0,
{
if (hInstance == NULL)
{
- hInstance = GetModuleHandle(L"USER32");
+ hInstance = GetModuleHandleW(L"USER32");
}
hResource = FindResourceW(hInstance, lpszName, RT_BITMAP);
if (hResource == NULL)
}
else
{
- hFile = CreateFile(lpszName,
+ hFile = CreateFileW(lpszName,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
{
return(NULL);
}
- hSection = CreateFileMapping(hFile,
+ hSection = CreateFileMappingW(hFile,
NULL,
PAGE_READONLY,
0,
-/* $Id: class.c,v 1.25 2003/08/06 16:47:35 weiden Exp $
+/* $Id: class.c,v 1.26 2003/08/07 04:03:24 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
#include <string.h>
#include <stdlib.h>
#include <debug.h>
+#include <window.h> /* for IS_ATOM */
/* copied from menu.c */
NTSTATUS
/*
- * @implemented
+ * @unimplemented
*/
DWORD STDCALL
GetClassLongA(HWND hWnd, int nIndex)
{
+ /*
+ * FIXME - for GCL_MENUNAME, we need to allocate a buffer
+ * in thread-local storage and convert the results back
+ * to that. Subsequent calls should be sure and clean that
+ * up
+ */
return(NtUserGetClassLong(hWnd, nIndex, TRUE));
}
RegisterClassA(CONST WNDCLASSA *lpWndClass)
{
WNDCLASSEXA Class;
-
- if(!lpWndClass) return (ATOM)0;
- RtlMoveMemory ( &Class.style, lpWndClass, sizeof(WNDCLASSA));
+ if ( !lpWndClass ) return (ATOM)0;
+
+ RtlMoveMemory ( &Class.style, lpWndClass, sizeof(WNDCLASSA) );
+
Class.cbSize = sizeof(WNDCLASSEXA);
Class.hIconSm = INVALID_HANDLE_VALUE;
- return RegisterClassExA(&Class);
+
+ return RegisterClassExA ( &Class );
}
/*
NTSTATUS Status;
LPWSTR ClassName = NULL;
LPWSTR MenuName = NULL;
-
+
if(!lpwcx || (lpwcx->cbSize != sizeof(WNDCLASSEXA)))
return (ATOM)0;
-
+
if(!lpwcx->lpszClassName) return (ATOM)0;
-
+
hHeap = RtlGetProcessHeap();
RtlMoveMemory(&wndclass, lpwcx, sizeof(WNDCLASSEXW));
-
- if(HIWORD(lpwcx->lpszClassName))
+
+ if ( !IS_ATOM(lpwcx->lpszClassName) )
{
Status = HEAP_strdupA2W (hHeap, &ClassName, (LPCSTR)lpwcx->lpszClassName, NULL);
if (!NT_SUCCESS (Status))
}
wndclass.lpszClassName = ClassName;
}
-
- if(HIWORD(lpwcx->lpszMenuName))
+
+ if ( !IS_ATOM(lpwcx->lpszMenuName) )
{
Status = HEAP_strdupA2W (hHeap, &MenuName, (LPCSTR)lpwcx->lpszMenuName, NULL);
if (!NT_SUCCESS (Status))
wndclass.lpszMenuName = MenuName;
}
- Atom = NtUserRegisterClassExWOW(&wndclass,
- FALSE,
- 0,
- 0,
- 0);
+ Atom = NtUserRegisterClassExWOW (
+ &wndclass,
+ FALSE,
+ 0,
+ 0,
+ 0);
/* free strings if neccessary */
if(MenuName) RtlFreeHeap (hHeap, 0, MenuName);
LPWSTR ClassName = NULL;
LPWSTR MenuName = NULL;
ULONG len;
-
+
if(!lpwcx || (lpwcx->cbSize != sizeof(WNDCLASSEXA)))
return (ATOM)0;
-
+
if(!lpwcx->lpszClassName) return (ATOM)0;
-
+
hHeap = RtlGetProcessHeap();
RtlMoveMemory(&wndclass, lpwcx, sizeof(WNDCLASSEXW));
-
+
/* copy strings if needed */
-
- if(HIWORD(lpwcx->lpszClassName))
+
+ if ( !IS_ATOM(lpwcx->lpszClassName) )
{
len = lstrlenW(lpwcx->lpszClassName);
ClassName = RtlAllocateHeap (hHeap, 0, (len + 1) * sizeof(WCHAR));
SetLastError(RtlNtStatusToDosError(STATUS_NO_MEMORY));
return 0;
}
- memcpy(&ClassName, &lpwcx->lpszClassName, len);
-
+ RtlMoveMemory(&ClassName, &lpwcx->lpszClassName, len);
+
wndclass.lpszClassName = ClassName;
}
-
- if(HIWORD(lpwcx->lpszMenuName))
+
+ if ( !IS_ATOM(lpwcx->lpszMenuName) )
{
len = lstrlenW(lpwcx->lpszMenuName);
MenuName = RtlAllocateHeap (hHeap, 0, (len + 1) * sizeof(WCHAR));
SetLastError(RtlNtStatusToDosError(STATUS_NO_MEMORY));
return 0;
}
- memcpy(&MenuName, &lpwcx->lpszMenuName, len);
-
+ RtlMoveMemory(&MenuName, &lpwcx->lpszMenuName, len);
+
wndclass.lpszMenuName = MenuName;
}
- Atom = NtUserRegisterClassExWOW(&wndclass,
- TRUE,
- 0,
- 0,
- 0);
+ Atom = NtUserRegisterClassExWOW (
+ &wndclass,
+ TRUE,
+ 0,
+ 0,
+ 0);
/* free strings if neccessary */
if(MenuName) RtlFreeHeap (hHeap, 0, MenuName);
RegisterClassW(CONST WNDCLASSW *lpWndClass)
{
WNDCLASSEXW Class;
-
- if(!lpWndClass) return (ATOM)0;
- RtlMoveMemory(&Class.style, lpWndClass, sizeof(WNDCLASSW));
+ if ( !lpWndClass ) return (ATOM)0;
+
+ RtlMoveMemory ( &Class.style, lpWndClass, sizeof(WNDCLASSW) );
Class.cbSize = sizeof(WNDCLASSEXW);
Class.hIconSm = INVALID_HANDLE_VALUE;
- return RegisterClassExW(&Class);
+ return RegisterClassExW ( &Class );
}
/*
- * @mplemented
+ * @unimplemented
*/
DWORD
STDCALL
int nIndex,
LONG dwNewLong)
{
+ /* FIXME - handle GCL_MENUNAME special case */
return(NtUserSetClassLong(hWnd, nIndex, dwNewLong, TRUE));
}
/*
- * @implemented
+ * @unimplemented
*/
DWORD
STDCALL
int nIndex,
LONG dwNewLong)
{
+ /* FIXME - handle GCL_MENUNAME special case */
return(NtUserSetClassLong(hWnd, nIndex, dwNewLong, FALSE));
}
-/* $Id: defwnd.c,v 1.62 2003/08/06 18:43:57 weiden Exp $
+/* $Id: defwnd.c,v 1.63 2003/08/07 04:03:24 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
/* FUNCTIONS *****************************************************************/
-BOOL IsMaxBoxActive(HWND hWnd)
+BOOL
+IsMaxBoxActive(HWND hWnd)
{
- ULONG uStyle = GetWindowLong( hWnd, GWL_STYLE );
+ ULONG uStyle = GetWindowLongW( hWnd, GWL_STYLE );
return (uStyle & WS_MAXIMIZEBOX);
}
-BOOL IsCloseBoxActive( HWND hWnd )
+BOOL
+IsCloseBoxActive( HWND hWnd )
{
- ULONG uStyle = GetWindowLong(hWnd, GWL_STYLE );
+ ULONG uStyle = GetWindowLongW(hWnd, GWL_STYLE );
return ( uStyle & WS_SYSMENU );
}
-BOOL IsMinBoxActive( HWND hWnd )
+BOOL
+IsMinBoxActive( HWND hWnd )
{
- ULONG uStyle = GetWindowLong( hWnd, GWL_STYLE );
+ ULONG uStyle = GetWindowLongW( hWnd, GWL_STYLE );
return (uStyle & WS_MINIMIZEBOX);
}
-INT UIGetFrameSizeX( HWND hWnd )
+INT
+UIGetFrameSizeX( HWND hWnd )
{
- ULONG uStyle = GetWindowLong( hWnd, GWL_STYLE );
+ ULONG uStyle = GetWindowLongW( hWnd, GWL_STYLE );
if ( uStyle & WS_THICKFRAME )
return GetSystemMetrics( SM_CXSIZEFRAME );
return GetSystemMetrics( SM_CXFRAME );
}
-INT UIGetFrameSizeY( HWND hWnd )
+INT
+UIGetFrameSizeY( HWND hWnd )
{
- ULONG uStyle = GetWindowLong( hWnd, GWL_STYLE );
+ ULONG uStyle = GetWindowLongW( hWnd, GWL_STYLE );
if ( uStyle & WS_THICKFRAME )
return GetSystemMetrics( SM_CYSIZEFRAME );
(ExStyle & WS_EX_DLGMODALFRAME));
}
-void UserGetInsideRectNC( HWND hWnd, RECT *rect )
+void
+UserGetInsideRectNC( HWND hWnd, RECT *rect )
{
RECT WindowRect;
ULONG Style;
ULONG ExStyle;
- Style = GetWindowLong(hWnd, GWL_STYLE);
- ExStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
+ Style = GetWindowLongW(hWnd, GWL_STYLE);
+ ExStyle = GetWindowLongW(hWnd, GWL_EXSTYLE);
GetWindowRect(hWnd, &WindowRect);
rect->top = rect->left = 0;
rect->right = WindowRect.right - WindowRect.left;
}
}
-VOID UserDrawSysMenuButton( HWND hWnd, HDC hDC, BOOL down )
+VOID
+UserDrawSysMenuButton( HWND hWnd, HDC hDC, BOOL down )
{
RECT Rect;
HDC hDcMem;
HBITMAP hSavedBitmap;
- hbSysMenu = LoadBitmap(0, MAKEINTRESOURCE(OBM_CLOSE));
+ hbSysMenu = (HBITMAP)LoadBitmapW(0, MAKEINTRESOURCEW(OBM_CLOSE));
UserGetInsideRectNC(hWnd, &Rect);
hDcMem = CreateCompatibleDC(hDC);
hSavedBitmap = SelectObject(hDcMem, hbSysMenu);
BitBlt(hDC, Rect.left + 2, Rect.top +
2, 16, 16, hDcMem,
- (GetWindowLong(hWnd, GWL_STYLE) & WS_CHILD) ?
+ (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD) ?
GetSystemMetrics(SM_CXSIZE): 0, 0, SRCCOPY);
SelectObject(hDcMem, hSavedBitmap);
DeleteDC(hDcMem);
/* FIXME: Cache bitmaps, then just bitblt instead of calling DFC() (and
wasting precious CPU cycles) every time */
-static void UserDrawCaptionButton( HWND hWnd, HDC hDC, BOOL bDown, ULONG Type )
+static void
+UserDrawCaptionButton( HWND hWnd, HDC hDC, BOOL bDown, ULONG Type )
{
+ RECT rect;
+ INT iBmpWidth = GetSystemMetrics(SM_CXSIZE) - 2;
+ INT iBmpHeight = GetSystemMetrics(SM_CYSIZE) - 4;
- RECT rect;
- INT iBmpWidth = GetSystemMetrics(SM_CXSIZE) - 2;
- INT iBmpHeight = GetSystemMetrics(SM_CYSIZE) - 4;
-
- INT OffsetX = UIGetFrameSizeX( hWnd );
- INT OffsetY = UIGetFrameSizeY( hWnd );
+ INT OffsetX = UIGetFrameSizeX( hWnd );
+ INT OffsetY = UIGetFrameSizeY( hWnd );
- if(!(GetWindowLong( hWnd, GWL_STYLE ) & WS_SYSMENU))
- {
- return;
- }
+ if(!(GetWindowLongW( hWnd, GWL_STYLE ) & WS_SYSMENU))
+ {
+ return;
+ }
- GetWindowRect( hWnd, &rect );
-
- rect.right = rect.right - rect.left;
- rect.bottom = rect.bottom - rect.top;
- rect.left = rect.top = 0;
+ GetWindowRect( hWnd, &rect );
- switch(Type)
- {
- case DFCS_CAPTIONMIN:
- {
- if ((GetWindowLong( hWnd, GWL_EXSTYLE ) & WS_EX_TOOLWINDOW) == TRUE)
- return; /* ToolWindows don't have min/max buttons */
-
- SetRect(&rect,
- rect.right - OffsetX - (iBmpWidth*3) - 5,
- OffsetY + 2,
- rect.right - (iBmpWidth * 2) - OffsetX - 5,
- rect.top + iBmpHeight + OffsetY + 2 );
- DrawFrameControl( hDC, &rect, DFC_CAPTION,
- DFCS_CAPTIONMIN | (bDown ? DFCS_PUSHED : 0) |
- (IsMinBoxActive(hWnd) ? 0 : DFCS_INACTIVE) );
- break;
- }
- case DFCS_CAPTIONMAX:
- {
- if ((GetWindowLong( hWnd, GWL_EXSTYLE ) & WS_EX_TOOLWINDOW) == TRUE)
- return; /* ToolWindows don't have min/max buttons */
- SetRect(&rect,
- rect.right - OffsetX - (iBmpWidth*2) - 5,
- OffsetY + 2,
- rect.right - iBmpWidth - OffsetX - 5,
- rect.top + iBmpHeight + OffsetY + 2 );
-
- DrawFrameControl( hDC, &rect, DFC_CAPTION,
- (IsZoomed(hWnd) ? DFCS_CAPTIONRESTORE : DFCS_CAPTIONMAX) |
- (bDown ? DFCS_PUSHED : 0) |
- (IsMaxBoxActive(hWnd) ? 0 : DFCS_INACTIVE) );
- break;
- }
- case DFCS_CAPTIONCLOSE:
- {
- SetRect(&rect,
- rect.right - OffsetX - iBmpWidth - 3,
- OffsetY + 2,
- rect.right - OffsetX - 3,
- rect.top + iBmpHeight + OffsetY + 2 );
-
- DrawFrameControl( hDC, &rect, DFC_CAPTION,
- (DFCS_CAPTIONCLOSE |
- (bDown ? DFCS_PUSHED : 0) |
- (IsCloseBoxActive(hWnd) ? 0 : DFCS_INACTIVE)) );
- }
- }
-}
+ rect.right = rect.right - rect.left;
+ rect.bottom = rect.bottom - rect.top;
+ rect.left = rect.top = 0;
-static void UserDrawCaptionNC( HDC hDC, RECT *rect, HWND hWnd,
- DWORD style, BOOL active )
-{
- RECT r = *rect;
- WCHAR buffer[256];
- /* FIXME: Implement and Use DrawCaption() */
- SelectObject( hDC, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION) );
-
- PatBlt(hDC,rect->left + GetSystemMetrics(SM_CXFRAME), rect->top +
- GetSystemMetrics(SM_CYFRAME), rect->right - (GetSystemMetrics(SM_CXFRAME) * 2), (rect->top +
- GetSystemMetrics(SM_CYCAPTION)) - 1, PATCOPY );
-
- if (style & WS_SYSMENU)
+ switch(Type)
+ {
+ case DFCS_CAPTIONMIN:
{
- UserDrawSysMenuButton( hWnd, hDC, FALSE);
- r.left += GetSystemMetrics(SM_CXSIZE) + 1;
- UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONCLOSE);
- r.right -= GetSystemMetrics(SM_CXSMSIZE) + 1;
- UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONMIN);
- UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONMAX);
+ if ((GetWindowLongW( hWnd, GWL_EXSTYLE ) & WS_EX_TOOLWINDOW) == TRUE)
+ return; /* ToolWindows don't have min/max buttons */
+
+ SetRect(&rect,
+ rect.right - OffsetX - (iBmpWidth*3) - 5,
+ OffsetY + 2,
+ rect.right - (iBmpWidth * 2) - OffsetX - 5,
+ rect.top + iBmpHeight + OffsetY + 2 );
+ DrawFrameControl( hDC, &rect, DFC_CAPTION,
+ DFCS_CAPTIONMIN | (bDown ? DFCS_PUSHED : 0) |
+ (IsMinBoxActive(hWnd) ? 0 : DFCS_INACTIVE) );
+ break;
}
- if (GetWindowTextW( hWnd, buffer, sizeof(buffer)/sizeof(buffer[0]) ))
+ case DFCS_CAPTIONMAX:
{
- NONCLIENTMETRICSW nclm;
- HFONT hFont, hOldFont;
-
- nclm.cbSize = sizeof(nclm);
- SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, 0, &nclm, 0);
- SetTextColor(hDC, SysColours[ active ? COLOR_CAPTIONTEXT : COLOR_INACTIVECAPTIONTEXT]);
- SetBkMode( hDC, TRANSPARENT );
- if (style & WS_EX_TOOLWINDOW)
- hFont = CreateFontIndirectW(&nclm.lfSmCaptionFont);
- else
- hFont = CreateFontIndirectW(&nclm.lfCaptionFont);
- hOldFont = SelectObject(hDC, hFont);
- TextOutW(hDC, r.left + (GetSystemMetrics(SM_CXDLGFRAME) * 2), rect->top + (nclm.lfCaptionFont.lfHeight / 2), buffer, wcslen(buffer));
- DeleteObject (SelectObject (hDC, hOldFont));
+ if ((GetWindowLongW( hWnd, GWL_EXSTYLE ) & WS_EX_TOOLWINDOW) == TRUE)
+ return; /* ToolWindows don't have min/max buttons */
+ SetRect(&rect,
+ rect.right - OffsetX - (iBmpWidth*2) - 5,
+ OffsetY + 2,
+ rect.right - iBmpWidth - OffsetX - 5,
+ rect.top + iBmpHeight + OffsetY + 2 );
+
+ DrawFrameControl( hDC, &rect, DFC_CAPTION,
+ (IsZoomed(hWnd) ? DFCS_CAPTIONRESTORE : DFCS_CAPTIONMAX) |
+ (bDown ? DFCS_PUSHED : 0) |
+ (IsMaxBoxActive(hWnd) ? 0 : DFCS_INACTIVE) );
+ break;
}
+ case DFCS_CAPTIONCLOSE:
+ {
+ SetRect(&rect,
+ rect.right - OffsetX - iBmpWidth - 3,
+ OffsetY + 2,
+ rect.right - OffsetX - 3,
+ rect.top + iBmpHeight + OffsetY + 2 );
+
+ DrawFrameControl( hDC, &rect, DFC_CAPTION,
+ (DFCS_CAPTIONCLOSE |
+ (bDown ? DFCS_PUSHED : 0) |
+ (IsCloseBoxActive(hWnd) ? 0 : DFCS_INACTIVE)) );
+ }
+ }
+}
+
+static void
+UserDrawCaptionNC (
+ HDC hDC,
+ RECT *rect,
+ HWND hWnd,
+ DWORD style,
+ BOOL active )
+{
+ RECT r = *rect;
+ WCHAR buffer[256];
+ /* FIXME: Implement and Use DrawCaption() */
+ SelectObject( hDC, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION) );
+
+ PatBlt(hDC,rect->left + GetSystemMetrics(SM_CXFRAME), rect->top +
+ GetSystemMetrics(SM_CYFRAME), rect->right - (GetSystemMetrics(SM_CXFRAME) * 2), (rect->top +
+ GetSystemMetrics(SM_CYCAPTION)) - 1, PATCOPY );
+
+ if (style & WS_SYSMENU)
+ {
+ UserDrawSysMenuButton( hWnd, hDC, FALSE);
+ r.left += GetSystemMetrics(SM_CXSIZE) + 1;
+ UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONCLOSE);
+ r.right -= GetSystemMetrics(SM_CXSMSIZE) + 1;
+ UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONMIN);
+ UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONMAX);
+ }
+ if (GetWindowTextW( hWnd, buffer, sizeof(buffer)/sizeof(buffer[0]) ))
+ {
+ NONCLIENTMETRICSW nclm;
+ HFONT hFont, hOldFont;
+
+ nclm.cbSize = sizeof(nclm);
+ SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, 0, &nclm, 0);
+ SetTextColor(hDC, SysColours[ active ? COLOR_CAPTIONTEXT : COLOR_INACTIVECAPTIONTEXT]);
+ SetBkMode( hDC, TRANSPARENT );
+ if (style & WS_EX_TOOLWINDOW)
+ hFont = CreateFontIndirectW(&nclm.lfSmCaptionFont);
+ else
+ hFont = CreateFontIndirectW(&nclm.lfCaptionFont);
+ hOldFont = SelectObject(hDC, hFont);
+ TextOutW(hDC, r.left + (GetSystemMetrics(SM_CXDLGFRAME) * 2), rect->top + (nclm.lfCaptionFont.lfHeight / 2), buffer, wcslen(buffer));
+ DeleteObject (SelectObject (hDC, hOldFont));
+ }
}
}
-void SCROLL_DrawScrollBar (HWND hWnd, HDC hDC, INT nBar, BOOL arrows, BOOL interior);
+void
+SCROLL_DrawScrollBar (HWND hWnd, HDC hDC, INT nBar, BOOL arrows, BOOL interior);
VOID
DefWndDoPaintNC(HWND hWnd, HRGN clip)
int wFrame = 0;
Active = GetWindowLongW(hWnd, GWL_STYLE) & WIN_NCACTIVATED;
- Style = GetWindowLong(hWnd, GWL_STYLE);
- ExStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
+ Style = GetWindowLongW(hWnd, GWL_STYLE);
+ ExStyle = GetWindowLongW(hWnd, GWL_EXSTYLE);
hDC = GetDCEx(hWnd, (clip > (HRGN)1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW |
((clip > (HRGN)1) ? (DCX_INTERSECTRGN | DCX_KEEPCLIPRGN) : 0));
DefWndHitTestNC(HWND hWnd, POINT Point)
{
RECT WindowRect;
- ULONG Style = GetWindowLong(hWnd, GWL_STYLE);
- ULONG ExStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
+ ULONG Style = GetWindowLongW(hWnd, GWL_STYLE);
+ ULONG ExStyle = GetWindowLongW(hWnd, GWL_EXSTYLE);
GetWindowRect(hWnd, &WindowRect);
if (!PtInRect(&WindowRect, Point))
}
case HTSYSMENU:
{
- if (GetWindowLong(hWnd, GWL_STYLE) & WS_SYSMENU)
+ if (GetWindowLongW(hWnd, GWL_STYLE) & WS_SYSMENU)
{
- if (!(GetWindowLong(hWnd, GWL_STYLE) & WS_MINIMIZE))
+ if (!(GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE))
{
HDC hDC = GetWindowDC(hWnd);
UserDrawSysMenuButton(hWnd, hDC, TRUE);
case HTCLIENT:
{
- HICON hCursor = (HICON)GetClassLong(hWnd, GCL_HCURSOR);
+ HICON hCursor = (HICON)GetClassLongW(hWnd, GCL_HCURSOR);
if (hCursor)
{
SetCursor(hCursor);
POINT pt;
MSG msg;
RECT rectWindow;
- ULONG Style = GetWindowLong(hWnd, GWL_STYLE);
+ ULONG Style = GetWindowLongW(hWnd, GWL_STYLE);
GetWindowRect(hWnd, &rectWindow);
{
while(!hittest)
{
- GetMessage(&msg, NULL, 0, 0);
+ GetMessageW(&msg, NULL, 0, 0);
switch(msg.message)
{
case WM_MOUSEMOVE:
HCURSOR hDragCursor = 0, hOldCursor = 0;
POINT minTrack, maxTrack;
POINT capturePoint, pt;
- ULONG Style = GetWindowLong(hwnd, GWL_STYLE);
- ULONG ExStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+ ULONG Style = GetWindowLongW(hwnd, GWL_STYLE);
+ ULONG ExStyle = GetWindowLongW(hwnd, GWL_EXSTYLE);
BOOL thickframe = UserHasThickFrameStyle(Style, ExStyle);
BOOL iconic = Style & WS_MINIMIZE;
BOOL moved = FALSE;
if( iconic ) /* create a cursor for dragging */
{
- HICON hIcon = (HICON)GetClassLong(hwnd, GCL_HICON);
- if(!hIcon) hIcon = (HICON)SendMessage( hwnd, WM_QUERYDRAGICON, 0, 0L);
+ HICON hIcon = (HICON)GetClassLongW(hwnd, GCL_HICON);
+ if(!hIcon) hIcon = (HICON)SendMessageW( hwnd, WM_QUERYDRAGICON, 0, 0L);
if( hIcon ) hDragCursor = CursorIconToCursor( hIcon, TRUE );
if( !hDragCursor ) iconic = FALSE;
}
{
int dx = 0, dy = 0;
- GetMessage(&msg, 0, 0, 0);
+ GetMessageW(&msg, 0, 0, 0);
/* Exit on button-up, Return, or Esc */
if ((msg.message == WM_LBUTTONUP) ||
Result |= WVR_HREDRAW;
}
- if (!(GetWindowLong(hWnd, GWL_STYLE) & WS_MINIMIZE))
+ if (!(GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE))
{
- DefWndAdjustRect(&TmpRect, GetWindowLong(hWnd, GWL_STYLE),
- FALSE, GetWindowLong(hWnd, GWL_EXSTYLE));
+ DefWndAdjustRect(&TmpRect, GetWindowLongW(hWnd, GWL_STYLE),
+ FALSE, GetWindowLongW(hWnd, GWL_EXSTYLE));
Rect->left -= TmpRect.left;
Rect->top -= TmpRect.top;
Rect->right -= TmpRect.right;
Rect->bottom -= TmpRect.bottom;
- if (UserHasMenu(hWnd, GetWindowLong(hWnd, GWL_EXSTYLE)))
+ if (UserHasMenu(hWnd, GetWindowLongW(hWnd, GWL_EXSTYLE)))
{
Rect->top += MenuGetMenuBarHeight(hWnd,
Rect->right - Rect->left,
case WM_CONTEXTMENU:
{
- if (GetWindowLong(hWnd, GWL_STYLE) & WS_CHILD)
+ if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
{
if (bUnicode)
{
Pt.x = SLOWORD(lParam);
Pt.y = SHIWORD(lParam);
- if (GetWindowLong(hWnd, GWL_STYLE) & WS_CHILD)
+ if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
{
ScreenToClient(GetParent(hWnd), &Pt);
}
GetSystemMetrics(SM_CYICON)) / 2;
DrawIcon(hDC, x, y, hIcon);
}
- if (GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_CLIENTEDGE)
+ if (GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_CLIENTEDGE)
{
RECT WindowRect;
GetClientRect(hWnd, &WindowRect);
case WM_MOUSEACTIVATE:
{
- if (GetWindowLong(hWnd, GWL_STYLE) & WS_CHILD)
+ if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
{
LONG Ret;
if (bUnicode)
{
/* Check if the window is minimized. */
if (LOWORD(lParam) != WA_INACTIVE &&
- !(GetWindowLong(hWnd, GWL_STYLE) & WS_MINIMIZE))
+ !(GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE))
{
SetFocus(hWnd);
}
case WM_MOUSEWHEEL:
{
- if (GetWindowLong(hWnd, GWL_STYLE & WS_CHILD))
+ if (GetWindowLongW(hWnd, GWL_STYLE & WS_CHILD))
{
if (bUnicode)
{
case WM_SETCURSOR:
{
- if (GetWindowLong(hWnd, GWL_STYLE) & WS_CHILD)
+ if (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
{
if (LOWORD(lParam) < HTLEFT || LOWORD(lParam) > HTBOTTOMRIGHT)
{
}
for (Len = 1; Len < 64; Len++)
{
- if ((hIcon = LoadIconW(NULL, MAKEINTRESOURCE(Len))) != NULL)
+ if ((hIcon = LoadIconW(NULL, MAKEINTRESOURCEW(Len))) != NULL)
{
return((LRESULT)hIcon);
}
if (WindowTextAtom != 0)
{
WindowTextAtom =
- (LPWSTR)(DWORD)GlobalAddAtom(L"USER32!WindowTextAtomW");
+ (LPWSTR)(DWORD)GlobalAddAtomW(L"USER32!WindowTextAtomW");
}
if (WindowTextAtom != 0 &&
(WindowText = GetPropW(hWnd, WindowTextAtom)) == NULL)
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: menu.c,v 1.20 2003/08/06 18:43:57 weiden Exp $
+/* $Id: menu.c,v 1.21 2003/08/07 04:03:24 royce Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/menu.c
return FALSE;
}
- hMenuFont = CreateFontIndirect(&ncm.lfMenuFont);
+ hMenuFont = CreateFontIndirectW(&ncm.lfMenuFont);
if(hMenuFont == NULL)
{
- DbgPrint("MenuInit(): CreateFontIndirect(hMenuFont) failed!\n");
+ DbgPrint("MenuInit(): CreateFontIndirectW(hMenuFont) failed!\n");
return FALSE;
}
ncm.lfMenuFont.lfWeight = max(ncm.lfMenuFont.lfWeight + 300, 1000);
- hMenuFontBold = CreateFontIndirect(&ncm.lfMenuFont);
+ hMenuFontBold = CreateFontIndirectW(&ncm.lfMenuFont);
if(hMenuFontBold == NULL)
{
- DbgPrint("MenuInit(): CreateFontIndirect(hMenuFontBold) failed!\n");
+ DbgPrint("MenuInit(): CreateFontIndirectW(hMenuFontBold) failed!\n");
return FALSE;
}
}
int nPos)
{
MENUITEMINFOW mi;
- mi.cbSize = sizeof(MENUITEMINFO);
+ mi.cbSize = sizeof(mi);
mi.fMask = MIIM_SUBMENU;
if(NtUserMenuItemInfo(hMenu, (UINT)nPos, MF_BYPOSITION, &mi, FALSE))
{
NTSTATUS Status;
HANDLE hHeap = RtlGetProcessHeap();
- if((lpmii->cbSize == sizeof(MENUITEMINFO)) ||
- (lpmii->cbSize == sizeof(MENUITEMINFO) - sizeof(HBITMAP)))
+ if((lpmii->cbSize == sizeof(MENUITEMINFOA)) ||
+ (lpmii->cbSize == sizeof(MENUITEMINFOA) - sizeof(HBITMAP)))
{
memcpy(&mi, lpmii, lpmii->cbSize);
ULONG len = 0;
HANDLE hHeap = RtlGetProcessHeap();
- if((lpmii->cbSize == sizeof(MENUITEMINFO)) ||
- (lpmii->cbSize == sizeof(MENUITEMINFO) - sizeof(HBITMAP)))
+ // while we could just pass 'lpmii' to win32k, we make a copy so that
+ // if a bad user passes bad data, we crash his process instead of the
+ // entire kernel
+
+ if((lpmii->cbSize == sizeof(MENUITEMINFOW)) ||
+ (lpmii->cbSize == sizeof(MENUITEMINFOW) - sizeof(HBITMAP)))
{
memcpy(&mi, lpmii, lpmii->cbSize);
IsMenu(
HMENU hMenu)
{
+ DWORD ret;
SetLastError(ERROR_SUCCESS);
- DWORD ret = NtUserBuildMenuItemList(hMenu, NULL, 0, 0);
+ ret = NtUserBuildMenuItemList(hMenu, NULL, 0, 0);
return ((ret == -1) || (GetLastError() == ERROR_INVALID_MENU_HANDLE));
}
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: messagebox.c,v 1.9 2003/07/28 23:23:17 ekohl Exp $
+/* $Id: messagebox.c,v 1.10 2003/08/07 04:03:24 royce Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/messagebox.c
#define MSGBOX_IDTEXT 100
#define IDS_ERROR 2
-#define RT_DIALOGA MAKEINTRESOURCEA(5)
-#define RT_DIALOGW MAKEINTRESOURCEW(5)
#define IDI_HANDA MAKEINTRESOURCEA(32513)
#define IDI_HANDW MAKEINTRESOURCEW(32513)
#define IDI_QUESTIONA MAKEINTRESOURCEA(32514)
if(lpmb->dwStyle & MB_RIGHT)
{
hItem = GetDlgItem(hwnd, MSGBOX_IDTEXT);
- SetWindowLong(hItem, GWL_STYLE,
- GetWindowLong(hItem, GWL_STYLE) | SS_RIGHT);
+ SetWindowLongW(hItem, GWL_STYLE,
+ GetWindowLongW(hItem, GWL_STYLE) | SS_RIGHT);
}
/* handle modal MessageBoxes */
DWORD Style, ExStyle;
GetWindowRect(hwnd, rect);
- Style = GetWindowLong(hwnd, GWL_STYLE);
- ExStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+ Style = GetWindowLongW(hwnd, GWL_STYLE);
+ ExStyle = GetWindowLongW(hwnd, GWL_EXSTYLE);
rect->top = rect->left = 0;
rect->right = rect->right - rect->left;
int has_menu;
/* FIXME: Determine has_menu */
- Style = GetWindowLong(hwnd, GWL_STYLE);
- ExStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+ Style = GetWindowLongW(hwnd, GWL_STYLE);
+ ExStyle = GetWindowLongW(hwnd, GWL_EXSTYLE);
GetWindowRect(hwnd, &WindowRect);
GetClientRect(hwnd, &ClientRect);
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: prop.c,v 1.8 2003/07/10 21:04:32 chorns Exp $
+/* $Id: prop.c,v 1.9 2003/08/07 04:03:24 royce Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
* @unimplemented
*/
int STDCALL
-EnumPropsA(HWND hWnd, PROPENUMPROC lpEnumFunc)
+EnumPropsA(HWND hWnd, PROPENUMPROCA lpEnumFunc)
{
UNIMPLEMENTED;
return 0;
* @unimplemented
*/
int STDCALL
-EnumPropsExA(HWND hWnd, PROPENUMPROCEX lpEnumFunc, LPARAM lParam)
+EnumPropsExA(HWND hWnd, PROPENUMPROCEXA lpEnumFunc, LPARAM lParam)
{
UNIMPLEMENTED;
return 0;
* @unimplemented
*/
int STDCALL
-EnumPropsExW(HWND hWnd, PROPENUMPROCEX lpEnumFunc, LPARAM lParam)
+EnumPropsExW(HWND hWnd, PROPENUMPROCEXW lpEnumFunc, LPARAM lParam)
{
UNIMPLEMENTED;
return 0;
* @unimplemented
*/
int STDCALL
-EnumPropsW(HWND hWnd, PROPENUMPROC lpEnumFunc)
+EnumPropsW(HWND hWnd, PROPENUMPROCW lpEnumFunc)
{
UNIMPLEMENTED;
return 0;
-/* $Id: window.c,v 1.51 2003/08/05 15:41:03 weiden Exp $
+/* $Id: window.c,v 1.52 2003/08/07 04:03:24 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
if (CallbackArgs->Proc == NULL)
{
/* FIXME: handle ANSI windows vs Unicode windows */
- CallbackArgs->Proc = (WNDPROC)GetWindowLong(CallbackArgs->Wnd,
+ CallbackArgs->Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd,
GWL_WNDPROC);
}
Result = CallWindowProcW(CallbackArgs->Proc, CallbackArgs->Wnd,
}
-/*
- * @unimplemented
- */
-WINBOOL STDCALL
-GetAltTabInfo(HWND hwnd,
- int iItem,
- PALTTABINFO pati,
- LPTSTR pszItemText,
- UINT cchItemText)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-
/*
* @unimplemented
*/
/*
- * @unimplemented
+ * @implemented
*/
int STDCALL
-GetWindowTextW(HWND hWnd,
- LPWSTR lpString,
- int nMaxCount)
+GetWindowTextW(
+ HWND hWnd,
+ LPWSTR lpString,
+ int nMaxCount)
{
- UNIMPLEMENTED;
- return 0;
+ return(SendMessageW(hWnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString));
}
DWORD STDCALL
WINBOOL STDCALL
IsWindowVisible(HWND hWnd)
{
- while (GetWindowLong(hWnd, GWL_STYLE) & WS_CHILD)
+ while (GetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD)
{
- if (!(GetWindowLong(hWnd, GWL_STYLE) & WS_VISIBLE))
+ if (!(GetWindowLongW(hWnd, GWL_STYLE) & WS_VISIBLE))
{
return(FALSE);
}
hWnd = GetAncestor(hWnd, GA_PARENT);
}
- return(GetWindowLong(hWnd, GWL_STYLE) & WS_VISIBLE);
+ return(GetWindowLongW(hWnd, GWL_STYLE) & WS_VISIBLE);
}
WINBOOL STDCALL
IsZoomed(HWND hWnd)
{
- ULONG uStyle = GetWindowLong(hWnd, GWL_STYLE);
+ ULONG uStyle = GetWindowLongW(hWnd, GWL_STYLE);
return (uStyle & WS_MAXIMIZE);
}
*/
UINT
RealGetWindowClass(HWND hwnd,
- LPTSTR pszType,
+ PVOID pszType,
UINT cchType)
{
+ /*
+ * FIXME - I don't think this function should exist...
+ * see RealGetWindowClassA & RealGetWindowClassW
+ */
UNIMPLEMENTED;
return 0;
}
-/* $Id: winpos.c,v 1.7 2003/07/27 11:54:41 dwelch Exp $
+/* $Id: winpos.c,v 1.8 2003/08/07 04:03:24 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
lpPos->IconTitle = hWnd = NULL; /*ICONTITLE_Create( pWnd );*/
if( bShow )
{
- ULONG Style = GetWindowLong(hWnd, GWL_STYLE);
+ ULONG Style = GetWindowLongW(hWnd, GWL_STYLE);
if( !(Style & WS_VISIBLE) )
{
SendMessageA( hWnd, WM_SHOWWINDOW, TRUE, 0 );
MINMAXINFO MinMax;
INT XInc, YInc;
INTERNALPOS* Pos;
- ULONG Style = GetWindowLong(hWnd, GWL_STYLE);
- ULONG ExStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
+ ULONG Style = GetWindowLongW(hWnd, GWL_STYLE);
+ ULONG ExStyle = GetWindowLongW(hWnd, GWL_EXSTYLE);
/* Get default values. */
MinMax.ptMaxSize.x = GetSystemMetrics(SM_CXSCREEN);
MinMax.ptMaxPosition.y -= YInc;
}
- SendMessage(hWnd, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax);
+ SendMessageW(hWnd, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax);
MinMax.ptMaxTrackSize.x = max(MinMax.ptMaxTrackSize.x,
MinMax.ptMinTrackSize.x);
-# $Id: makefile,v 1.11 2003/02/02 19:24:16 hyperion Exp $
+# $Id: makefile,v 1.12 2003/08/07 04:03:24 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -fno-builtin
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostdlib -nostartfiles
TARGET_SDKLIBS = kernel32.a ntdll.a
-# $Id: Makefile,v 1.3 2003/02/21 14:47:34 robd Exp $
+# $Id: Makefile,v 1.4 2003/08/07 04:03:24 royce Exp $
PATH_TO_TOP = ../..
#TARGET_CFLAGS = -g -D__NTDLL__
TARGET_CFLAGS = -D__NTDLL__
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \
-Wl,--section-alignment,0x1000 \
-nostartfiles
TARGET_CFLAGS =
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = \
-# $Id: Makefile,v 1.1 2003/04/30 20:44:06 gvg Exp $
+# $Id: Makefile,v 1.2 2003/08/07 04:03:24 royce Exp $
PATH_TO_TOP = ../..
-DLE \
-DDBG
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS = kernel32.a
-# $Id: makefile,v 1.11 2003/04/14 01:19:07 hyperion Exp $
+# $Id: makefile,v 1.12 2003/08/07 04:03:24 royce Exp $
PATH_TO_TOP = ../..
-DLE \
-DDBG
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
return FALSE;
}
- Event = CreateEvent(NULL, TRUE, FALSE, NULL);
+ Event = CreateEventW(NULL, TRUE, FALSE, NULL);
if (Event == INVALID_HANDLE_VALUE)
WSASetLastError(WSA_INVALID_HANDLE);
-
+
return (WSAEVENT)Event;
}
-fno-builtin \
-DUNICODE
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS = ntdll.a kernel32.a ws2_32.a
TARGET_CFLAGS = -DUNICODE
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o
-# $Id: Makefile,v 1.1 2003/04/03 22:44:19 gvg Exp $
+# $Id: Makefile,v 1.2 2003/08/07 04:03:24 royce Exp $
PATH_TO_TOP = ../..
-DLE \
-DDBG
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS = kernel32.a
-/* $Id: stubs.c,v 1.2 2003/07/10 21:41:56 chorns Exp $
+/* $Id: stubs.c,v 1.3 2003/08/07 04:03:24 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS WinSock DLL
LPDWORD BytesReceived,
LPOVERLAPPED Overlapped)
{
- OutputDebugString(L"w32sock AcceptEx stub called\n");
+ OutputDebugStringW(L"w32sock AcceptEx stub called\n");
return FALSE;
}
LPVOID ProtocolBuffer,
LPDWORD BufferLength)
{
- OutputDebugString(L"w32sock EnumProtocolsA stub called\n");
+ OutputDebugStringW(L"w32sock EnumProtocolsA stub called\n");
return SOCKET_ERROR;
}
LPVOID ProtocolBuffer,
LPDWORD BufferLength)
{
- OutputDebugString(L"w32sock EnumProtocolsW stub called\n");
+ OutputDebugStringW(L"w32sock EnumProtocolsW stub called\n");
return SOCKET_ERROR;
}
LPSOCKADDR* RemoteSockaddr,
LPINT RemoteSockaddrLength)
{
- OutputDebugString(L"w32sock GetAcceptExSockaddrs stub called\n");
+ OutputDebugStringW(L"w32sock GetAcceptExSockaddrs stub called\n");
}
LPSTR AliasBuffer,
LPDWORD AliasBufferLength)
{
- OutputDebugString(L"w32sock GetAddressByNameA stub called\n");
+ OutputDebugStringW(L"w32sock GetAddressByNameA stub called\n");
return SOCKET_ERROR;
}
LPWSTR AliasBuffer,
LPDWORD AliasBufferLength)
{
- OutputDebugString(L"w32sock GetAddressByNameW stub called\n");
+ OutputDebugStringW(L"w32sock GetAddressByNameW stub called\n");
return SOCKET_ERROR;
}
LPSTR ServiceName,
DWORD NameLength)
{
- OutputDebugString(L"w32sock GetNameByTypeA stub called\n");
+ OutputDebugStringW(L"w32sock GetNameByTypeA stub called\n");
return SOCKET_ERROR;
}
LPWSTR ServiceName,
DWORD NameLength)
{
- OutputDebugString(L"w32sock GetNameByTypeW stub called\n");
+ OutputDebugStringW(L"w32sock GetNameByTypeW stub called\n");
return SOCKET_ERROR;
}
LPDWORD BufferSize,
LPVOID /* Really LPSERVICE_ASYNC_INFO */ ServiceAsyncInfo)
{
- OutputDebugString(L"w32sock GetServiceA stub called\n");
+ OutputDebugStringW(L"w32sock GetServiceA stub called\n");
return SOCKET_ERROR;
}
LPDWORD BufferSize,
LPVOID /* Really LPSERVICE_ASYNC_INFO */ ServiceAsyncInfo)
{
- OutputDebugString(L"w32sock GetServiceW stub called\n");
+ OutputDebugStringW(L"w32sock GetServiceW stub called\n");
return SOCKET_ERROR;
}
GetTypeByNameA(LPSTR ServiceName,
LPGUID ServiceType)
{
- OutputDebugString(L"w32sock GetTypeByNameA stub called\n");
+ OutputDebugStringW(L"w32sock GetTypeByNameA stub called\n");
return SOCKET_ERROR;
}
GetTypeByNameW(LPWSTR ServiceName,
LPGUID ServiceType)
{
- OutputDebugString(L"w32sock GetTypeByNameW stub called\n");
+ OutputDebugStringW(L"w32sock GetTypeByNameW stub called\n");
return SOCKET_ERROR;
}
LPVOID /* Really LPSERVICE_ASYNC_INFOA */ ServiceAsyncInfo,
LPDWORD dwStatusFlags)
{
- OutputDebugString(L"w32sock SetServiceA stub called\n");
+ OutputDebugStringW(L"w32sock SetServiceA stub called\n");
return SOCKET_ERROR;
}
LPVOID /* Really LPSERVICE_ASYNC_INFOW */ ServiceAsyncInfo,
LPDWORD dwStatusFlags)
{
- OutputDebugString(L"w32sock SetServiceW stub called\n");
+ OutputDebugStringW(L"w32sock SetServiceW stub called\n");
return SOCKET_ERROR;
}
LPVOID /* really LPTRANSMIT_FILE_BUFFERS */ TransmitBuffers,
DWORD Flags)
{
- OutputDebugString(L"w32sock TransmitFile stub called\n");
+ OutputDebugStringW(L"w32sock TransmitFile stub called\n");
return FALSE;
}
char *Buf,
int BufLen)
{
- OutputDebugString(L"w32sock WSAAsyncGetHostByAddr stub called\n");
+ OutputDebugStringW(L"w32sock WSAAsyncGetHostByAddr stub called\n");
return NULL;
}
char *Buf,
int BufLen)
{
- OutputDebugString(L"w32sock WSAAsyncGetHostByName stub called\n");
+ OutputDebugStringW(L"w32sock WSAAsyncGetHostByName stub called\n");
return NULL;
}
char *Buf,
int Buflen)
{
- OutputDebugString(L"w32sock WSAAsyncGetProtoByName stub called\n");
+ OutputDebugStringW(L"w32sock WSAAsyncGetProtoByName stub called\n");
return NULL;
}
char *Buf,
int BufLen)
{
- OutputDebugString(L"w32sock WSAAsyncGetProtoByNumber stub called\n");
+ OutputDebugStringW(L"w32sock WSAAsyncGetProtoByNumber stub called\n");
return NULL;
}
char *Buf,
int BufLen)
{
- OutputDebugString(L"w32sock WSAAsyncGetServByName stub called\n");
+ OutputDebugStringW(L"w32sock WSAAsyncGetServByName stub called\n");
return NULL;
}
char *Buf,
int BufLen)
{
- OutputDebugString(L"w32sock WSAAsyncGetServByPort stub called\n");
+ OutputDebugStringW(L"w32sock WSAAsyncGetServByPort stub called\n");
return NULL;
}
UINT Msg,
LONG Event)
{
- OutputDebugString(L"w32sock WSAAsyncSelect stub called\n");
+ OutputDebugStringW(L"w32sock WSAAsyncSelect stub called\n");
return SOCKET_ERROR;
}
STDCALL
WSACancelAsyncRequest(HANDLE AsyncTaskHandle)
{
- OutputDebugString(L"w32sock WSACancelAsyncRequest stub called\n");
+ OutputDebugStringW(L"w32sock WSACancelAsyncRequest stub called\n");
return SOCKET_ERROR;
}
STDCALL
WSACancelBlockingCall()
{
- OutputDebugString(L"w32sock WSACancelBlockingCall stub called\n");
+ OutputDebugStringW(L"w32sock WSACancelBlockingCall stub called\n");
return SOCKET_ERROR;
}
STDCALL
WSACleanup()
{
- OutputDebugString(L"w32sock WSACleanup stub called\n");
+ OutputDebugStringW(L"w32sock WSACleanup stub called\n");
return SOCKET_ERROR;
}
STDCALL
WSAGetLastError(void)
{
- OutputDebugString(L"w32sock WSAGetLastError stub called\n");
+ OutputDebugStringW(L"w32sock WSAGetLastError stub called\n");
return WSANOTINITIALISED;
}
STDCALL
WSAIsBlocking(VOID)
{
- OutputDebugString(L"w32sock WSAIsBlocking stub called\n");
+ OutputDebugStringW(L"w32sock WSAIsBlocking stub called\n");
return FALSE;
}
int Len,
int *Flags)
{
- OutputDebugString(L"w32sock WSARecvEx stub called\n");
+ OutputDebugStringW(L"w32sock WSARecvEx stub called\n");
return SOCKET_ERROR;
}
STDCALL
WSASetBlockingHook(FARPROC BlockFunc)
{
- OutputDebugString(L"w32sock WSASetBlockingHook stub called\n");
+ OutputDebugStringW(L"w32sock WSASetBlockingHook stub called\n");
return NULL;
}
void
STDCALL WSASetLastError(int Error)
{
- OutputDebugString(L"w32sock WSASetLastError stub called\n");
+ OutputDebugStringW(L"w32sock WSASetLastError stub called\n");
}
WSAStartup(WORD VersionRequested,
LPWSADATA WSAData)
{
- OutputDebugString(L"w32sock WSAStartup stub called\n");
+ OutputDebugStringW(L"w32sock WSAStartup stub called\n");
return WSASYSNOTREADY;
}
STDCALL
WSAUnhookBlockingHook(void)
{
- OutputDebugString(L"w32sock WSAUnhookBlockingHook stub called\n");
+ OutputDebugStringW(L"w32sock WSAUnhookBlockingHook stub called\n");
return SOCKET_ERROR;
}
STDCALL
WSApSetPostRoutine(LPVOID /* really LPWPUPOSTMESSAGE */ PostRoutine)
{
- OutputDebugString(L"w32sock WSApSetPostRoutine stub called\n");
+ OutputDebugStringW(L"w32sock WSApSetPostRoutine stub called\n");
return SOCKET_ERROR;
}
__WSAFDIsSet(SOCKET Sock,
fd_set *Set)
{
- OutputDebugString(L"w32sock __WSAFDIsSet stub called\n");
+ OutputDebugStringW(L"w32sock __WSAFDIsSet stub called\n");
return 0;
}
struct sockaddr *Addr,
int *AddrLen)
{
- OutputDebugString(L"w32sock accept stub called\n");
+ OutputDebugStringW(L"w32sock accept stub called\n");
return INVALID_SOCKET;
}
CONST LPSOCKADDR Name,
INT NameLen)
{
- OutputDebugString(L"w32sock bind stub called\n");
+ OutputDebugStringW(L"w32sock bind stub called\n");
return SOCKET_ERROR;
}
STDCALL
closesocket(SOCKET Sock)
{
- OutputDebugString(L"w32sock closesocket stub called\n");
+ OutputDebugStringW(L"w32sock closesocket stub called\n");
return SOCKET_ERROR;
}
CONST LPSOCKADDR Name,
INT NameLen)
{
- OutputDebugString(L"w32sock connect stub called\n");
+ OutputDebugStringW(L"w32sock connect stub called\n");
return SOCKET_ERROR;
}
unsigned char *ExpandDomNam,
int Length)
{
- OutputDebugString(L"w32sock dn_expand stub called\n");
+ OutputDebugStringW(L"w32sock dn_expand stub called\n");
return SOCKET_ERROR;
}
INT Len,
INT Type)
{
- OutputDebugString(L"w32sock gethostbyaddr stub called\n");
+ OutputDebugStringW(L"w32sock gethostbyaddr stub called\n");
return NULL;
}
STDCALL
gethostbyname(const char *Name)
{
- OutputDebugString(L"w32sock gethostbyname stub called\n");
+ OutputDebugStringW(L"w32sock gethostbyname stub called\n");
return NULL;
}
gethostname(char *Name,
int NameLen)
{
- OutputDebugString(L"w32sock gethostname stub called\n");
+ OutputDebugStringW(L"w32sock gethostname stub called\n");
return SOCKET_ERROR;
}
STDCALL
getnetbyname(char *Name)
{
- OutputDebugString(L"w32sock getnetbyname stub called\n");
+ OutputDebugStringW(L"w32sock getnetbyname stub called\n");
return NULL;
}
struct sockaddr *Name,
int *NameLen)
{
- OutputDebugString(L"w32sock getpeername stub called\n");
+ OutputDebugStringW(L"w32sock getpeername stub called\n");
return SOCKET_ERROR;
}
STDCALL
getprotobyname(CONST CHAR *Name)
{
- OutputDebugString(L"w32sock getprotobyname stub called\n");
+ OutputDebugStringW(L"w32sock getprotobyname stub called\n");
return NULL;
}
STDCALL
getprotobynumber(INT Number)
{
- OutputDebugString(L"w32sock getprotobynumber stub called\n");
+ OutputDebugStringW(L"w32sock getprotobynumber stub called\n");
return NULL;
}
getservbyname(const char *Name,
const char *Proto)
{
- OutputDebugString(L"w32sock getservbyname stub called\n");
+ OutputDebugStringW(L"w32sock getservbyname stub called\n");
return NULL;
}
getservbyport(int Port,
const char *Proto)
{
- OutputDebugString(L"w32sock getservbyport stub called\n");
+ OutputDebugStringW(L"w32sock getservbyport stub called\n");
return NULL;
}
struct sockaddr *Name,
int *NameLen)
{
- OutputDebugString(L"w32sock getsockname stub called\n");
+ OutputDebugStringW(L"w32sock getsockname stub called\n");
return SOCKET_ERROR;
}
char *OptVal,
int *OptLen)
{
- OutputDebugString(L"w32sock getsockopt stub called\n");
+ OutputDebugStringW(L"w32sock getsockopt stub called\n");
return SOCKET_ERROR;
}
STDCALL
inet_addr(CONST CHAR *cp)
{
- OutputDebugString(L"w32sock inet_addr stub called\n");
+ OutputDebugStringW(L"w32sock inet_addr stub called\n");
return INADDR_NONE;
}
STDCALL
inet_network(const char *cp)
{
- OutputDebugString(L"w32sock inet_network stub called\n");
+ OutputDebugStringW(L"w32sock inet_network stub called\n");
return INADDR_NONE;
}
STDCALL
inet_ntoa(struct in_addr in)
{
- OutputDebugString(L"w32sock inet_ntoa stub called\n");
+ OutputDebugStringW(L"w32sock inet_ntoa stub called\n");
return NULL;
}
LONG Cmd,
ULONG *Argp)
{
- OutputDebugString(L"w32sock ioctlsocket stub called\n");
+ OutputDebugStringW(L"w32sock ioctlsocket stub called\n");
return SOCKET_ERROR;
}
listen(SOCKET Sock,
int BackLog)
{
- OutputDebugString(L"w32sock listen stub called\n");
+ OutputDebugStringW(L"w32sock listen stub called\n");
return SOCKET_ERROR;
}
char *Cmd,
int *Fd2p)
{
- OutputDebugString(L"w32sock rcmd stub called\n");
+ OutputDebugStringW(L"w32sock rcmd stub called\n");
return INVALID_SOCKET;
}
int Len,
int Flags)
{
- OutputDebugString(L"w32sock recv stub called\n");
+ OutputDebugStringW(L"w32sock recv stub called\n");
return SOCKET_ERROR;
}
struct sockaddr *From,
int *FromLen)
{
- OutputDebugString(L"w32sock recvfrom stub called\n");
+ OutputDebugStringW(L"w32sock recvfrom stub called\n");
return SOCKET_ERROR;
}
char *Cmd,
int *Fd2p)
{
- OutputDebugString(L"w32sock rexec stub called\n");
+ OutputDebugStringW(L"w32sock rexec stub called\n");
return INVALID_SOCKET;
}
STDCALL
rresvport(int *port)
{
- OutputDebugString(L"w32sock rresvport stub called\n");
+ OutputDebugStringW(L"w32sock rresvport stub called\n");
return INVALID_SOCKET;
}
STDCALL
s_perror(const char *str)
{
- OutputDebugString(L"w32sock s_perror stub called\n");
+ OutputDebugStringW(L"w32sock s_perror stub called\n");
}
LPFD_SET ExceptFds,
CONST LPTIMEVAL TimeOut)
{
- OutputDebugString(L"w32sock select stub called\n");
+ OutputDebugStringW(L"w32sock select stub called\n");
return SOCKET_ERROR;
}
int Len,
int Flags)
{
- OutputDebugString(L"w32sock send stub called\n");
+ OutputDebugStringW(L"w32sock send stub called\n");
return SOCKET_ERROR;
}
CONST LPSOCKADDR To,
INT ToLen)
{
- OutputDebugString(L"w32sock sendto stub called\n");
+ OutputDebugStringW(L"w32sock sendto stub called\n");
return SOCKET_ERROR;
}
STDCALL
sethostname(char *Name, int NameLen)
{
- OutputDebugString(L"w32sock sethostname stub called\n");
+ OutputDebugStringW(L"w32sock sethostname stub called\n");
return SOCKET_ERROR;
}
const char *OptVal,
int OptLen)
{
- OutputDebugString(L"w32sock setsockopt stub called\n");
+ OutputDebugStringW(L"w32sock setsockopt stub called\n");
return SOCKET_ERROR;
}
shutdown(SOCKET Sock,
int How)
{
- OutputDebugString(L"w32sock shutdown stub called\n");
+ OutputDebugStringW(L"w32sock shutdown stub called\n");
return SOCKET_ERROR;
}
int Type,
int Protocol)
{
- OutputDebugString(L"w32sock socket stub called\n");
+ OutputDebugStringW(L"w32sock socket stub called\n");
return INVALID_SOCKET;
}
-# $Id: Makefile,v 1.4 2003/04/14 01:19:08 hyperion Exp $
+# $Id: Makefile,v 1.5 2003/08/07 04:03:24 royce Exp $
PATH_TO_TOP = ../..
-MMD -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-Wstrict-prototypes -Wmissing-prototypes
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_OBJECTS = \
adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o \
inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
-# $Id: Makefile,v 1.102 2003/07/20 22:10:38 ekohl Exp $
+# $Id: Makefile,v 1.103 2003/08/07 04:03:24 royce Exp $
#
# ReactOS Operating System
#
# ASFLAGS += -D__USE_W32API -D_NTOSKRNL_
# CFLAGS += -D__USE_W32API -D_NTOSKRNL_
+# require os code to explicitly request A/W version of structs/functions
+CFLAGS += -D_DISABLE_TIDENTS
+
#
# Build configuration
#
-# $Id: makefile,v 1.21 2003/01/07 17:37:22 robd Exp $
+# $Id: makefile,v 1.22 2003/08/07 04:03:24 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -D__NTAPP__
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
OBJECTS_API = \
api/process.o \
api/wapi.o \
-# $Id: makefile,v 1.1 2002/10/28 13:59:59 robd Exp $
+# $Id: makefile,v 1.2 2003/08/07 04:03:24 royce Exp $
PATH_TO_TOP = ../..
TARGET_INSTALLDIR = system32
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_SDKLIBS = ntdll.a kernel32.a user32.a gdi32.a advapi32.a
TARGET_OBJECTS = $(TARGET_NAME).o
-/* $Id: ntvdm.c,v 1.2 2003/01/12 01:54:40 robd Exp $
+/* $Id: ntvdm.c,v 1.3 2003/08/07 04:03:24 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
vsprintf(buffer, fmt, ap);
va_end(ap);
- OutputDebugString(buffer);
+ OutputDebugStringA(buffer);
}
/*
StartVDM(PVDM_CONTROL_BLOCK vdm)
{
BOOL Result;
- STARTUPINFO StartupInfo;
+ STARTUPINFOA StartupInfo;
StartupInfo.cb = sizeof(StartupInfo);
StartupInfo.lpReserved = NULL;
StartupInfo.cbReserved2 = 0;
StartupInfo.lpReserved2 = 0;
- Result = CreateProcess(vdm->CommandLine,
+ Result = CreateProcessA(vdm->CommandLine,
NULL,
NULL,
NULL,
NTSTATUS Status;
BOOL vdmStarted = FALSE;
- CHAR WelcomeMsg[] = "ReactOS Virtual DOS Machine support.\n";
- CHAR PromptMsg[] = "Type r<cr> to run, s<cr> to shutdown or q<cr> to quit now.";
+ WCHAR WelcomeMsg[] = L"ReactOS Virtual DOS Machine support.\n";
+ WCHAR PromptMsg[] = L"Type r<cr> to run, s<cr> to shutdown or q<cr> to quit now.";
CHAR InputBuffer[255];
AllocConsole();
- SetConsoleTitle("ntvdm");
-
- WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
- WelcomeMsg, strlen(WelcomeMsg), // wcslen(WelcomeMsg),
+ SetConsoleTitleW(L"ntvdm");
+
+ WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE),
+ WelcomeMsg, lstrlenW(WelcomeMsg), // wcslen(WelcomeMsg),
&Result, NULL);
if (!CreateVDM(&VdmCB)) {
//SetLastError();
return 3;
}
-
- GetSystemDirectory(VdmCB.CommandLine, MAX_PATH);
+
+ GetSystemDirectoryA(VdmCB.CommandLine, MAX_PATH);
strcat(VdmCB.CommandLine, "\\hello.exe");
- GetWindowsDirectory(VdmCB.CurrentDirectory, MAX_PATH);
+ GetWindowsDirectoryA(VdmCB.CurrentDirectory, MAX_PATH);
for (;;) {
- WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
- PromptMsg, strlen(PromptMsg), // wcslen(PromptMsg),
+ WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE),
+ PromptMsg, lstrlenW(PromptMsg), // wcslen(PromptMsg),
&Result, NULL);
i = 0;
do {
- ReadConsole(GetStdHandle(STD_INPUT_HANDLE),
+ ReadConsoleA(GetStdHandle(STD_INPUT_HANDLE),
&InputBuffer[i], 1,
&Result, NULL);
if (++i >= (sizeof(InputBuffer) - 1)) {
-# $Id: makefile,v 1.9 2001/08/21 20:13:17 chorns Exp $
+# $Id: makefile,v 1.10 2003/08/07 04:03:24 royce Exp $
PATH_TO_TOP = ../..
TARGET_CFLAGS = -D__NTAPP__
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_OBJECTS = $(TARGET_NAME).o init.o smapi.o
include $(PATH_TO_TOP)/rules.mak
#endif /* __WIN32K_CLASS_H */
-/* EOF */
+/* EOF */
\ No newline at end of file
#endif /* __WIN32K_MENU_H */
-/* EOF */
-
+/* EOF */
\ No newline at end of file
-# $Id: makefile,v 1.71 2003/07/31 23:15:07 weiden Exp $
+# $Id: makefile,v 1.72 2003/08/07 04:03:25 royce Exp $
PATH_TO_TOP = ../..
-DUNICODE \
-Wall
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS
+
TARGET_LFLAGS =\
$(PATH_TO_TOP)/dk/nkm/lib/freetype.a \
$(PATH_TO_TOP)/dk/w32/lib/rosrtl.a \
# Automatic dependency tracking
DEP_OBJECTS := $(TARGET_OBJECTS)
DEP_EXCLUDE_FILTER := main/svctabm.d
-#include $(PATH_TO_TOP)/tools/depend.mk
+include $(PATH_TO_TOP)/tools/depend.mk
main/svctabm.o: main/svctab.c
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: class.c,v 1.23 2003/08/06 16:47:35 weiden Exp $
+/* $Id: class.c,v 1.24 2003/08/07 04:03:25 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
}
RTL_ATOM STDCALL
-NtUserRegisterClassExWOW(CONST WNDCLASSEXW *lpwcx,
- BOOL bUnicodeClass,
- DWORD Unknown3,
- DWORD Unknown4,
- DWORD Unknown5)
+NtUserRegisterClassExWOW(
+ CONST WNDCLASSEXW *lpwcx,
+ BOOL bUnicodeClass,
+ DWORD Unknown3,
+ DWORD Unknown4,
+ DWORD Unknown5)
+
/*
* FUNCTION:
* Registers a new class with the window manager
* ARGUMENTS:
- * lpcxw = Win32 extended window class structure (unicode)
- * bUnicodeClass = Wether to send ANSI or unicode strings
+ * lpwcx = Win32 extended window class structure
+ * bUnicodeClass = Whether to send ANSI or unicode strings
* to window procedures
* RETURNS:
* Atom identifying the new class
*/
{
- PWINSTATION_OBJECT WinStaObject;
- PWNDCLASS_OBJECT ClassObject;
- NTSTATUS Status;
- RTL_ATOM Atom;
- DPRINT("About to open window station handle (0x%X)\n",
- PROCESS_WINDOW_STATION());
- Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
- KernelMode,
- 0,
- &WinStaObject);
- if (!NT_SUCCESS(Status))
- {
- DPRINT("Validation of window station handle (0x%X) failed\n",
- PROCESS_WINDOW_STATION());
- return((RTL_ATOM)0);
- }
- if (!IS_ATOM(lpwcx->lpszClassName))
+ PWINSTATION_OBJECT WinStaObject;
+ PWNDCLASS_OBJECT ClassObject;
+ NTSTATUS Status;
+ RTL_ATOM Atom;
+ DPRINT("About to open window station handle (0x%X)\n",
+ PROCESS_WINDOW_STATION());
+ Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
+ KernelMode,
+ 0,
+ &WinStaObject);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT("Validation of window station handle (0x%X) failed\n",
+ PROCESS_WINDOW_STATION());
+ return((RTL_ATOM)0);
+ }
+ if (!IS_ATOM(lpwcx->lpszClassName))
+ {
+ Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable,
+ (LPWSTR)lpwcx->lpszClassName,
+ &Atom);
+ if (!NT_SUCCESS(Status))
{
- Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable,
- (LPWSTR)lpwcx->lpszClassName,
- &Atom);
- if (!NT_SUCCESS(Status))
- {
- ObDereferenceObject(WinStaObject);
- DPRINT("Failed adding class name (%wS) to atom table\n",
- lpwcx->lpszClassName);
- SetLastNtError(Status);
- return((RTL_ATOM)0);
- }
- }
- else
- {
- Atom = (RTL_ATOM)(ULONG)lpwcx->lpszClassName;
- }
- ClassObject = W32kCreateClass(lpwcx, bUnicodeClass, Atom);
- if (ClassObject == NULL)
+ ObDereferenceObject(WinStaObject);
+ DPRINT("Failed adding class name (%wS) to atom table\n",
+ lpwcx->lpszClassName);
+ SetLastNtError(Status);
+ return((RTL_ATOM)0);
+ }
+ }
+ else
+ {
+ Atom = (RTL_ATOM)(ULONG)lpwcx->lpszClassName;
+ }
+ ClassObject = W32kCreateClass(lpwcx, bUnicodeClass, Atom);
+ if (ClassObject == NULL)
+ {
+ if (!IS_ATOM(lpwcx->lpszClassName))
{
- if (!IS_ATOM(lpwcx->lpszClassName))
- {
- RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Atom);
- }
- ObDereferenceObject(WinStaObject);
- DPRINT("Failed creating window class object\n");
- SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
- return((RTL_ATOM)0);
- }
- ExAcquireFastMutex(&PsGetWin32Process()->ClassListLock);
- InsertTailList(&PsGetWin32Process()->ClassListHead, &ClassObject->ListEntry);
- ExReleaseFastMutex(&PsGetWin32Process()->ClassListLock);
- ObDereferenceObject(WinStaObject);
- return(Atom);
+ RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Atom);
+ }
+ ObDereferenceObject(WinStaObject);
+ DPRINT("Failed creating window class object\n");
+ SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
+ return((RTL_ATOM)0);
+ }
+ ExAcquireFastMutex(&PsGetWin32Process()->ClassListLock);
+ InsertTailList(&PsGetWin32Process()->ClassListHead, &ClassObject->ListEntry);
+ ExReleaseFastMutex(&PsGetWin32Process()->ClassListLock);
+ ObDereferenceObject(WinStaObject);
+ return(Atom);
}
ULONG FASTCALL
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: icm.c,v 1.7 2003/08/05 15:41:03 weiden Exp $ */
+/* $Id: icm.c,v 1.8 2003/08/07 04:03:25 royce Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
INT
STDCALL
-W32kEnumICMProfiles(HDC hDC,
- ICMENUMPROC EnumICMProfilesFunc,
- LPARAM lParam)
+W32kEnumICMProfiles(HDC hDC,
+ LPWSTR lpstrBuffer,
+ UINT cch )
{
+ /*
+ * FIXME - build list of file names into lpstrBuffer.
+ * (MULTI-SZ would probably be best format)
+ * return (needed) length of buffer in bytes
+ */
UNIMPLEMENTED;
+ return 0;
}
HCOLORSPACE