Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.4 KiB

  1. #ifdef WIN32
  2. #ifdef UNICODE
  3. #define FROM_OLE_STRING(str) str
  4. #define TO_OLE_STRING(str) str
  5. #else
  6. #define FROM_OLE_STRING(str) ConvertToAnsi(str)
  7. char* ConvertToAnsi(OLECHAR FAR* szW);
  8. #define TO_OLE_STRING(str) ConvertToUnicode(str)
  9. OLECHAR* ConvertToUnicode(char FAR* szA);
  10. // Maximum length of string that can be converted between Ansi & Unicode
  11. #define STRCONVERT_MAXLEN 500
  12. #endif
  13. #else // WIN16
  14. //#include <tchar.h>
  15. #define APIENTRY far pascal
  16. #define TCHAR char
  17. #define TEXT(sz) sz
  18. #define FROM_OLE_STRING(str) str
  19. #define TO_OLE_STRING(str) str
  20. #define LPTSTR LPSTR
  21. #define LPCTSTR LPCSTR
  22. // Windows NT defines the following in windowsx.h
  23. #define GET_WM_COMMAND_ID(w,l) (w)
  24. #define GET_WM_COMMAND_CMD(w,l) HIWORD(l)
  25. #define GET_WM_COMMAND_HWND(w,l) LOWORD(l)
  26. #endif
  27. // MAX len of string table entries
  28. #define STR_LEN 100
  29. // String table constants
  30. #define IDS_PROGNAME 1
  31. #define IDS_RESULT 2
  32. #define IDS_ERROR 3
  33. // Function prototypes
  34. int PASCAL WinMain (HINSTANCE, HINSTANCE, LPSTR, int);
  35. BOOL InitApplication (HINSTANCE);
  36. BOOL InitInstance (HINSTANCE, int);
  37. void DisplayError(IRegWizCtrl FAR* phello);
  38. #ifdef WIN16
  39. LRESULT __export CALLBACK MainWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  40. #else
  41. LRESULT CALLBACK MainWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  42. #endif