home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Programming / nsis-2.46-setup.exe / Include / WinCore.nsh < prev    next >
Encoding:
Text File  |  2009-02-04  |  8.3 KB  |  214 lines

  1. /*
  2.  
  3. WinCore.nsh & Win\*.nsh - Collection of common windows defines
  4.  
  5. !define __WIN_NOINC_xxx to exclude a windows header file
  6. !define __WIN_MS_xxx to exclude specific things (The original #ifdef xxx checks can be found in the official Microsoft headers)
  7.  
  8. */
  9.  
  10. !ifndef __WIN_WINDOWS__INC
  11. !define __WIN_WINDOWS__INC
  12. !verbose push
  13. !verbose 3
  14.  
  15.  
  16. !define __WIN_PTRSIZE 4 ;will we ever see a 64 bit version?
  17.  
  18.  
  19. !include Win\WinDef.nsh
  20. !include Win\WinError.nsh
  21. !include Win\WinNT.nsh
  22. !include Win\WinUser.nsh
  23.  
  24. !ifndef __WIN_MS_NOWINMESSAGES
  25. !include WinMessages.nsh
  26. !endif
  27.  
  28.  
  29.  
  30.  
  31.  
  32. /**************************************************
  33. WinBase.h
  34. **************************************************/
  35. !ifndef __WIN_NOINC_WINBASE
  36. !define INVALID_HANDLE_VALUE -1
  37. !define INVALID_FILE_SIZE 0xFFFFFFFF
  38. !define INVALID_SET_FILE_POINTER -1
  39. !define INVALID_FILE_ATTRIBUTES -1
  40.  
  41. !define WAIT_FAILED 0xFFFFFFFF
  42. !define WAIT_OBJECT_0       0 ;((STATUS_WAIT_0 ) + 0 )
  43.  
  44. !define WAIT_ABANDONED         0x80 ;((STATUS_ABANDONED_WAIT_0 ) + 0 )
  45. !define WAIT_ABANDONED_0       0x80 ;((STATUS_ABANDONED_WAIT_0 ) + 0 )
  46.  
  47. !define DRIVE_UNKNOWN     0
  48. !define DRIVE_NO_ROOT_DIR 1
  49. !define DRIVE_REMOVABLE   2
  50. !define DRIVE_FIXED       3
  51. !define DRIVE_REMOTE      4
  52. !define DRIVE_CDROM       5
  53. !define DRIVE_RAMDISK     6
  54.  
  55. !define FILE_TYPE_UNKNOWN   0x0000
  56. !define FILE_TYPE_DISK      0x0001
  57. !define FILE_TYPE_CHAR      0x0002
  58. !define FILE_TYPE_PIPE      0x0003
  59. !define FILE_TYPE_REMOTE    0x8000
  60.  
  61. !define STD_INPUT_HANDLE   -10
  62. !define STD_OUTPUT_HANDLE  -11
  63. !define STD_ERROR_HANDLE   -12
  64.  
  65. #define IGNORE              0       ; Ignore signal
  66. !define INFINITE            0xFFFFFFFF  ; Infinite timeout
  67.  
  68. !endif /* __WIN_NOINC_WINBASE */
  69.  
  70.  
  71.  
  72.  
  73.  
  74. /**************************************************
  75. WinGDI.h
  76. **************************************************/
  77. !ifndef __WIN_MS_NOGDI & __WIN_NOINC_WINGDI
  78. !define HORZRES       8 
  79. !define VERTRES       10
  80. !define BITSPIXEL     12
  81. !define LOGPIXELSX    88
  82. !define LOGPIXELSY    90
  83. !define COLORRES     108
  84. !define VREFRESH     116
  85. !define DESKTOPVERTRES 117
  86. !define DESKTOPHORZRES 118
  87. !endif /* __WIN_MS_NOGDI & __WIN_NOINC_WINGDI */
  88.  
  89.  
  90.  
  91.  
  92.  
  93. /**************************************************
  94. WinReg.h
  95. **************************************************/
  96. !ifndef __WIN_NOINC_WINREG
  97. !ifndef __WIN_NOHKEY & HKEY_CLASSES_ROOT & HKEY_CURRENT_USER & HKEY_LOCAL_MACHINE & HKEY_USERS
  98. !define HKEY_CLASSES_ROOT        0x80000000
  99. !define HKEY_CURRENT_USER        0x80000001
  100. !define HKEY_LOCAL_MACHINE       0x80000002
  101. !define HKEY_USERS               0x80000003
  102. !define HKEY_PERFORMANCE_DATA    0x80000004
  103. !define HKEY_PERFORMANCE_TEXT    0x80000050
  104. !define HKEY_PERFORMANCE_NLSTEXT 0x80000060
  105. !define HKEY_CURRENT_CONFIG      0x80000005
  106. !define HKEY_DYN_DATA            0x80000006
  107. !ifndef __WIN_NOSHORTHKEY & HKCR & HKCU & HKLM
  108. !define HKCR ${HKEY_CLASSES_ROOT}
  109. !define HKCU ${HKEY_CURRENT_USER}
  110. !define HKLM ${HKEY_LOCAL_MACHINE}
  111. !endif
  112. !endif
  113. !endif /* __WIN_NOINC_WINREG */
  114.  
  115.  
  116.  
  117.  
  118.  
  119. /**************************************************
  120. WindowsX.h
  121. **************************************************/
  122. !ifndef __WIN_NOINC_WINDOWSX
  123. !ifndef GET_X_LPARAM & GET_Y_LPARAM
  124. !macro _Win_GET_X_LPARAM _outvar _in
  125. IntOp ${_outvar} "${_in}" << 16   ;We can't just use LOWORD, we need to keep the sign,
  126. IntOp ${_outvar} ${_outvar} >> 16 ;so we let NSIS sign extend for us
  127. !macroend
  128. !define GET_X_LPARAM "!insertmacro _Win_GET_X_LPARAM "
  129. !macro _Win_GET_Y_LPARAM _outvar _in
  130. IntOp ${_outvar} "${_in}" >> 16
  131. !macroend
  132. !define GET_Y_LPARAM "!insertmacro _Win_GET_Y_LPARAM "
  133. !endif
  134. !endif /* __WIN_NOINC_WINDOWSX */
  135.  
  136.  
  137.  
  138.  
  139.  
  140. /**************************************************
  141. ShlObj.h
  142. **************************************************/
  143. !ifndef __WIN_NOINC_SHLOBJ
  144. !ifndef __WIN_NOSHELLFOLDERCSIDL
  145. !define CSIDL_DESKTOP                 0x0000
  146. !define CSIDL_INTERNET                0x0001 ;Internet Explorer (icon on desktop)
  147. !define CSIDL_PROGRAMS                0x0002 ;Start Menu\Programs
  148. !define CSIDL_CONTROLS                0x0003 ;My Computer\Control Panel
  149. !define CSIDL_PRINTERS                0x0004 ;My Computer\Printers
  150. !define CSIDL_PERSONAL                0x0005 ;My Documents
  151. !define CSIDL_FAVORITES               0x0006 ;<user name>\Favorites
  152. !define CSIDL_STARTUP                 0x0007 ;Start Menu\Programs\Startup
  153. !define CSIDL_RECENT                  0x0008 ;<user name>\Recent
  154. !define CSIDL_SENDTO                  0x0009 ;<user name>\SendTo
  155. !define CSIDL_BITBUCKET               0x000a ;<desktop>\Recycle Bin
  156. !define CSIDL_STARTMENU               0x000b ;<user name>\Start Menu
  157. !define CSIDL_MYDOCUMENTS             0x000c ;logical "My Documents" desktop icon
  158. !define CSIDL_MYMUSIC                 0x000d ;"My Music" folder
  159. !define CSIDL_MYVIDEO                 0x000e ;"My Videos" folder
  160. !define CSIDL_DESKTOPDIRECTORY        0x0010 ;<user name>\Desktop
  161. !define CSIDL_DRIVES                  0x0011 ;My Computer
  162. !define CSIDL_NETWORK                 0x0012 ;Network Neighborhood
  163. !define CSIDL_NETHOOD                 0x0013 ;<user name>\nethood
  164. !define CSIDL_FONTS                   0x0014 ;windows\fonts
  165. !define CSIDL_TEMPLATES               0x0015
  166. !define CSIDL_COMMON_STARTMENU        0x0016 ;All Users\Start Menu
  167. !define CSIDL_COMMON_PROGRAMS         0x0017 ;All Users\Start Menu\Programs
  168. !define CSIDL_COMMON_STARTUP          0x0018 ;All Users\Startup
  169. !define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019 ;All Users\Desktop
  170. !define CSIDL_APPDATA                 0x001a ;<user name>\Application Data
  171. !define CSIDL_PRINTHOOD               0x001b ;<user name>\PrintHood
  172. !define CSIDL_LOCAL_APPDATA           0x001c ;<user name>\Local Settings\Applicaiton Data (non roaming)
  173. !define CSIDL_ALTSTARTUP              0x001d ;non localized startup
  174. !define CSIDL_COMMON_ALTSTARTUP       0x001e ;non localized common startup
  175. !define CSIDL_COMMON_FAVORITES        0x001f
  176. !define CSIDL_INTERNET_CACHE          0x0020
  177. !define CSIDL_COOKIES                 0x0021
  178. !define CSIDL_HISTORY                 0x0022
  179. !define CSIDL_COMMON_APPDATA          0x0023 ;All Users\Application Data
  180. !define CSIDL_WINDOWS                 0x0024 ;GetWindowsDirectory
  181. !define CSIDL_SYSTEM                  0x0025 ;GetSystemDirectory
  182. !define CSIDL_PROGRAM_FILES           0x0026 ;C:\Program Files
  183. !define CSIDL_MYPICTURES              0x0027
  184. !define CSIDL_PROFILE                 0x0028 ;USERPROFILE
  185. !define CSIDL_SYSTEMX86               0x0029 ;x86 system directory on RISC
  186. !define CSIDL_PROGRAM_FILESX86        0x002a ;x86 C:\Program Files on RISC
  187. !define CSIDL_PROGRAM_FILES_COMMON    0x002b ;C:\Program Files\Common
  188. !define CSIDL_PROGRAM_FILES_COMMONX86 0x002c ;x86 Program Files\Common on RISC
  189. !define CSIDL_COMMON_TEMPLATES        0x002d ;All Users\Templates
  190. !define CSIDL_COMMON_DOCUMENTS        0x002e ;All Users\Documents
  191. !define CSIDL_COMMON_ADMINTOOLS       0x002f ;All Users\Start Menu\Programs\Administrative Tools
  192. !define CSIDL_ADMINTOOLS              0x0030 ;<user name>\Start Menu\Programs\Administrative Tools
  193. !define CSIDL_CONNECTIONS             0x0031 ;Network and Dial-up Connections
  194. !define CSIDL_COMMON_MUSIC            0x0035 ;All Users\My Music
  195. !define CSIDL_COMMON_PICTURES         0x0036 ;All Users\My Pictures
  196. !define CSIDL_COMMON_VIDEO            0x0037 ;All Users\My Video
  197. !define CSIDL_RESOURCES               0x0038 ;Resource Direcotry
  198. !define CSIDL_RESOURCES_LOCALIZED     0x0039 ;Localized Resource Direcotry
  199. !define CSIDL_COMMON_OEM_LINKS        0x003a ;Links to All Users OEM specific apps
  200. !define CSIDL_CDBURN_AREA             0x003b ;USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
  201. !define CSIDL_COMPUTERSNEARME         0x003d ;Computers Near Me (computered from Workgroup membership)
  202. !define CSIDL_FLAG_CREATE             0x8000 ;combine with CSIDL_ value to force folder creation in SHGetFolderPath()
  203. !define CSIDL_FLAG_DONT_VERIFY        0x4000 ;combine with CSIDL_ value to return an unverified folder path
  204. !define CSIDL_FLAG_NO_ALIAS           0x1000 ;combine with CSIDL_ value to insure non-alias versions of the pidl
  205. !define CSIDL_FLAG_PER_USER_INIT      0x0800 ;combine with CSIDL_ value to indicate per-user init (eg. upgrade)
  206. !define CSIDL_FLAG_MASK               0xFF00
  207. !endif /* __WIN_NOSHELLFOLDERCSIDL */
  208. !endif /* __WIN_NOINC_SHLOBJ */
  209.  
  210.  
  211.  
  212.  
  213. !verbose pop
  214. !endif /* __WIN_WINDOWS__INC */