1 /** 2 * Windows API header module 3 * 4 * Translated from MinGW Windows headers 5 * 6 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 7 * Source: $(DRUNTIMESRC core/sys/windows/_lmwksta.d) 8 */ 9 /// Automatically imported and edited from the druntime module 10 /// core.sys.windows.lmwksta for the auto-generated win32 package. 11 module win32.lmwksta; 12 //version (Windows): 13 @system: 14 version (Win32_UseLib) pragma(lib, "netapi32"); 15 16 import win32.lmuseflg; 17 import win32.lmcons, win32.windef; 18 19 version (Win32_UseLib) pragma(lib, "Netapi32"); 20 21 enum { 22 WKSTA_COMPUTERNAME_PARMNUM = 1, 23 WKSTA_LANGROUP_PARMNUM, // = 2 24 WKSTA_VER_MAJOR_PARMNUM = 4, 25 WKSTA_VER_MINOR_PARMNUM, 26 WKSTA_LOGGED_ON_USERS_PARMNUM, 27 WKSTA_LANROOT_PARMNUM, 28 WKSTA_LOGON_DOMAIN_PARMNUM, 29 WKSTA_LOGON_SERVER_PARMNUM, 30 WKSTA_CHARWAIT_PARMNUM, 31 WKSTA_CHARTIME_PARMNUM, 32 WKSTA_CHARCOUNT_PARMNUM, 33 WKSTA_KEEPCONN_PARMNUM, 34 WKSTA_KEEPSEARCH_PARMNUM, 35 WKSTA_MAXCMDS_PARMNUM, 36 WKSTA_NUMWORKBUF_PARMNUM, 37 WKSTA_MAXWRKCACHE_PARMNUM, 38 WKSTA_SESSTIMEOUT_PARMNUM, 39 WKSTA_SIZERROR_PARMNUM, 40 WKSTA_NUMALERTS_PARMNUM, 41 WKSTA_NUMSERVICES_PARMNUM, 42 WKSTA_NUMCHARBUF_PARMNUM, 43 WKSTA_SIZCHARBUF_PARMNUM, // = 23 44 WKSTA_ERRLOGSZ_PARMNUM = 27, 45 WKSTA_PRINTBUFTIME_PARMNUM, 46 WKSTA_SIZWORKBUF_PARMNUM, 47 WKSTA_MAILSLOTS_PARMNUM, 48 WKSTA_NUMDGRAMBUF_PARMNUM, 49 WKSTA_WRKHEURISTICS_PARMNUM, 50 WKSTA_MAXTHREADS_PARMNUM, // = 33 51 WKSTA_LOCKQUOTA_PARMNUM = 41, 52 WKSTA_LOCKINCREMENT_PARMNUM, 53 WKSTA_LOCKMAXIMUM_PARMNUM, 54 WKSTA_PIPEINCREMENT_PARMNUM, 55 WKSTA_PIPEMAXIMUM_PARMNUM, 56 WKSTA_DORMANTFILELIMIT_PARMNUM, 57 WKSTA_CACHEFILETIMEOUT_PARMNUM, 58 WKSTA_USEOPPORTUNISTICLOCKING_PARMNUM, 59 WKSTA_USEUNLOCKBEHIND_PARMNUM, 60 WKSTA_USECLOSEBEHIND_PARMNUM, 61 WKSTA_BUFFERNAMEDPIPES_PARMNUM, 62 WKSTA_USELOCKANDREADANDUNLOCK_PARMNUM, 63 WKSTA_UTILIZENTCACHING_PARMNUM, 64 WKSTA_USERAWREAD_PARMNUM, 65 WKSTA_USERAWWRITE_PARMNUM, 66 WKSTA_USEWRITERAWWITHDATA_PARMNUM, 67 WKSTA_USEENCRYPTION_PARMNUM, 68 WKSTA_BUFFILESWITHDENYWRITE_PARMNUM, 69 WKSTA_BUFFERREADONLYFILES_PARMNUM, 70 WKSTA_FORCECORECREATEMODE_PARMNUM, 71 WKSTA_USE512BYTESMAXTRANSFER_PARMNUM, 72 WKSTA_READAHEADTHRUPUT_PARMNUM, // = 62 73 WKSTA_PLATFORM_ID_PARMNUM = 100, 74 WKSTA_OTH_DOMAINS_PARMNUM = 101, 75 TRANSPORT_QUALITYOFSERVICE_PARMNUM = 201, 76 TRANSPORT_NAME_PARMNUM = 202 77 } 78 79 struct WKSTA_INFO_100{ 80 DWORD wki100_platform_id; 81 LPWSTR wki100_computername; 82 LPWSTR wki100_langroup; 83 DWORD wki100_ver_major; 84 DWORD wki100_ver_minor; 85 } 86 alias WKSTA_INFO_100* PWKSTA_INFO_100, LPWKSTA_INFO_100; 87 88 struct WKSTA_INFO_101{ 89 DWORD wki101_platform_id; 90 LPWSTR wki101_computername; 91 LPWSTR wki101_langroup; 92 DWORD wki101_ver_major; 93 DWORD wki101_ver_minor; 94 LPWSTR wki101_lanroot; 95 } 96 alias WKSTA_INFO_101* PWKSTA_INFO_101, LPWKSTA_INFO_101; 97 98 struct WKSTA_INFO_102{ 99 DWORD wki102_platform_id; 100 LPWSTR wki102_computername; 101 LPWSTR wki102_langroup; 102 DWORD wki102_ver_major; 103 DWORD wki102_ver_minor; 104 LPWSTR wki102_lanroot; 105 DWORD wki102_logged_on_users; 106 } 107 alias WKSTA_INFO_102* PWKSTA_INFO_102, LPWKSTA_INFO_102; 108 109 struct WKSTA_INFO_302{ 110 DWORD wki302_char_wait; 111 DWORD wki302_collection_time; 112 DWORD wki302_maximum_collection_count; 113 DWORD wki302_keep_conn; 114 DWORD wki302_keep_search; 115 DWORD wki302_max_cmds; 116 DWORD wki302_num_work_buf; 117 DWORD wki302_siz_work_buf; 118 DWORD wki302_max_wrk_cache; 119 DWORD wki302_sess_timeout; 120 DWORD wki302_siz_error; 121 DWORD wki302_num_alerts; 122 DWORD wki302_num_services; 123 DWORD wki302_errlog_sz; 124 DWORD wki302_print_buf_time; 125 DWORD wki302_num_char_buf; 126 DWORD wki302_siz_char_buf; 127 LPWSTR wki302_wrk_heuristics; 128 DWORD wki302_mailslots; 129 DWORD wki302_num_dgram_buf; 130 } 131 alias WKSTA_INFO_302* PWKSTA_INFO_302, LPWKSTA_INFO_302; 132 133 struct WKSTA_INFO_402{ 134 DWORD wki402_char_wait; 135 DWORD wki402_collection_time; 136 DWORD wki402_maximum_collection_count; 137 DWORD wki402_keep_conn; 138 DWORD wki402_keep_search; 139 DWORD wki402_max_cmds; 140 DWORD wki402_num_work_buf; 141 DWORD wki402_siz_work_buf; 142 DWORD wki402_max_wrk_cache; 143 DWORD wki402_sess_timeout; 144 DWORD wki402_siz_error; 145 DWORD wki402_num_alerts; 146 DWORD wki402_num_services; 147 DWORD wki402_errlog_sz; 148 DWORD wki402_print_buf_time; 149 DWORD wki402_num_char_buf; 150 DWORD wki402_siz_char_buf; 151 LPWSTR wki402_wrk_heuristics; 152 DWORD wki402_mailslots; 153 DWORD wki402_num_dgram_buf; 154 DWORD wki402_max_threads; 155 } 156 alias WKSTA_INFO_402* PWKSTA_INFO_402, LPWKSTA_INFO_402; 157 158 struct WKSTA_INFO_502{ 159 DWORD wki502_char_wait; 160 DWORD wki502_collection_time; 161 DWORD wki502_maximum_collection_count; 162 DWORD wki502_keep_conn; 163 DWORD wki502_max_cmds; 164 DWORD wki502_sess_timeout; 165 DWORD wki502_siz_char_buf; 166 DWORD wki502_max_threads; 167 DWORD wki502_lock_quota; 168 DWORD wki502_lock_increment; 169 DWORD wki502_lock_maximum; 170 DWORD wki502_pipe_increment; 171 DWORD wki502_pipe_maximum; 172 DWORD wki502_cache_file_timeout; 173 DWORD wki502_dormant_file_limit; 174 DWORD wki502_read_ahead_throughput; 175 DWORD wki502_num_mailslot_buffers; 176 DWORD wki502_num_srv_announce_buffers; 177 DWORD wki502_max_illegal_datagram_events; 178 DWORD wki502_illegal_datagram_event_reset_frequency; 179 BOOL wki502_log_election_packets; 180 BOOL wki502_use_opportunistic_locking; 181 BOOL wki502_use_unlock_behind; 182 BOOL wki502_use_close_behind; 183 BOOL wki502_buf_named_pipes; 184 BOOL wki502_use_lock_read_unlock; 185 BOOL wki502_utilize_nt_caching; 186 BOOL wki502_use_raw_read; 187 BOOL wki502_use_raw_write; 188 BOOL wki502_use_write_raw_data; 189 BOOL wki502_use_encryption; 190 BOOL wki502_buf_files_deny_write; 191 BOOL wki502_buf_read_only_files; 192 BOOL wki502_force_core_create_mode; 193 BOOL wki502_use_512_byte_max_transfer; 194 } 195 alias WKSTA_INFO_502* PWKSTA_INFO_502, LPWKSTA_INFO_502; 196 197 struct WKSTA_INFO_1010 { 198 DWORD wki1010_char_wait; 199 } 200 alias WKSTA_INFO_1010* PWKSTA_INFO_1010, LPWKSTA_INFO_1010; 201 202 struct WKSTA_INFO_1011 { 203 DWORD wki1011_collection_time; 204 } 205 alias WKSTA_INFO_1011* PWKSTA_INFO_1011, LPWKSTA_INFO_1011; 206 207 struct WKSTA_INFO_1012 { 208 DWORD wki1012_maximum_collection_count; 209 } 210 alias WKSTA_INFO_1012* PWKSTA_INFO_1012, LPWKSTA_INFO_1012; 211 212 struct WKSTA_INFO_1027 { 213 DWORD wki1027_errlog_sz; 214 } 215 alias WKSTA_INFO_1027* PWKSTA_INFO_1027, LPWKSTA_INFO_1027; 216 217 struct WKSTA_INFO_1028 { 218 DWORD wki1028_print_buf_time; 219 } 220 alias WKSTA_INFO_1028* PWKSTA_INFO_1028, LPWKSTA_INFO_1028; 221 222 struct WKSTA_INFO_1032 { 223 DWORD wki1032_wrk_heuristics; 224 } 225 alias WKSTA_INFO_1032* PWKSTA_INFO_1032, LPWKSTA_INFO_1032; 226 227 struct WKSTA_INFO_1013 { 228 DWORD wki1013_keep_conn; 229 } 230 alias WKSTA_INFO_1013* PWKSTA_INFO_1013, LPWKSTA_INFO_1013; 231 232 struct WKSTA_INFO_1018 { 233 DWORD wki1018_sess_timeout; 234 } 235 alias WKSTA_INFO_1018* PWKSTA_INFO_1018, LPWKSTA_INFO_1018; 236 237 struct WKSTA_INFO_1023 { 238 DWORD wki1023_siz_char_buf; 239 } 240 alias WKSTA_INFO_1023* PWKSTA_INFO_1023, LPWKSTA_INFO_1023; 241 242 struct WKSTA_INFO_1033 { 243 DWORD wki1033_max_threads; 244 } 245 alias WKSTA_INFO_1033* PWKSTA_INFO_1033, LPWKSTA_INFO_1033; 246 247 struct WKSTA_INFO_1041 { 248 DWORD wki1041_lock_quota; 249 } 250 alias WKSTA_INFO_1041* PWKSTA_INFO_1041, LPWKSTA_INFO_1041; 251 252 struct WKSTA_INFO_1042 { 253 DWORD wki1042_lock_increment; 254 } 255 alias WKSTA_INFO_1042* PWKSTA_INFO_1042, LPWKSTA_INFO_1042; 256 257 struct WKSTA_INFO_1043 { 258 DWORD wki1043_lock_maximum; 259 } 260 alias WKSTA_INFO_1043* PWKSTA_INFO_1043, LPWKSTA_INFO_1043; 261 262 struct WKSTA_INFO_1044 { 263 DWORD wki1044_pipe_increment; 264 } 265 alias WKSTA_INFO_1044* PWKSTA_INFO_1044, LPWKSTA_INFO_1044; 266 267 struct WKSTA_INFO_1045 { 268 DWORD wki1045_pipe_maximum; 269 } 270 alias WKSTA_INFO_1045* PWKSTA_INFO_1045, LPWKSTA_INFO_1045; 271 272 struct WKSTA_INFO_1046 { 273 DWORD wki1046_dormant_file_limit; 274 } 275 alias WKSTA_INFO_1046* PWKSTA_INFO_1046, LPWKSTA_INFO_1046; 276 277 struct WKSTA_INFO_1047 { 278 DWORD wki1047_cache_file_timeout; 279 } 280 alias WKSTA_INFO_1047* PWKSTA_INFO_1047, LPWKSTA_INFO_1047; 281 282 struct WKSTA_INFO_1048 { 283 BOOL wki1048_use_opportunistic_locking; 284 } 285 alias WKSTA_INFO_1048* PWKSTA_INFO_1048, LPWKSTA_INFO_1048; 286 287 struct WKSTA_INFO_1049 { 288 BOOL wki1049_use_unlock_behind; 289 } 290 alias WKSTA_INFO_1049* PWKSTA_INFO_1049, LPWKSTA_INFO_1049; 291 292 struct WKSTA_INFO_1050 { 293 BOOL wki1050_use_close_behind; 294 } 295 alias WKSTA_INFO_1050* PWKSTA_INFO_1050, LPWKSTA_INFO_1050; 296 297 struct WKSTA_INFO_1051 { 298 BOOL wki1051_buf_named_pipes; 299 } 300 alias WKSTA_INFO_1051* PWKSTA_INFO_1051, LPWKSTA_INFO_1051; 301 302 struct WKSTA_INFO_1052 { 303 BOOL wki1052_use_lock_read_unlock; 304 } 305 alias WKSTA_INFO_1052* PWKSTA_INFO_1052, LPWKSTA_INFO_1052; 306 307 struct WKSTA_INFO_1053 { 308 BOOL wki1053_utilize_nt_caching; 309 } 310 alias WKSTA_INFO_1053* PWKSTA_INFO_1053, LPWKSTA_INFO_1053; 311 312 struct WKSTA_INFO_1054 { 313 BOOL wki1054_use_raw_read; 314 } 315 alias WKSTA_INFO_1054* PWKSTA_INFO_1054, LPWKSTA_INFO_1054; 316 317 struct WKSTA_INFO_1055 { 318 BOOL wki1055_use_raw_write; 319 } 320 alias WKSTA_INFO_1055* PWKSTA_INFO_1055, LPWKSTA_INFO_1055; 321 322 struct WKSTA_INFO_1056 { 323 BOOL wki1056_use_write_raw_data; 324 } 325 alias WKSTA_INFO_1056* PWKSTA_INFO_1056, LPWKSTA_INFO_1056; 326 327 struct WKSTA_INFO_1057 { 328 BOOL wki1057_use_encryption; 329 } 330 alias WKSTA_INFO_1057* PWKSTA_INFO_1057, LPWKSTA_INFO_1057; 331 332 struct WKSTA_INFO_1058 { 333 BOOL wki1058_buf_files_deny_write; 334 } 335 alias WKSTA_INFO_1058* PWKSTA_INFO_1058, LPWKSTA_INFO_1058; 336 337 struct WKSTA_INFO_1059 { 338 BOOL wki1059_buf_read_only_files; 339 } 340 alias WKSTA_INFO_1059* PWKSTA_INFO_1059, LPWKSTA_INFO_1059; 341 342 struct WKSTA_INFO_1060 { 343 BOOL wki1060_force_core_create_mode; 344 } 345 alias WKSTA_INFO_1060* PWKSTA_INFO_1060, LPWKSTA_INFO_1060; 346 347 struct WKSTA_INFO_1061 { 348 BOOL wki1061_use_512_byte_max_transfer; 349 } 350 alias WKSTA_INFO_1061* PWKSTA_INFO_1061, LPWKSTA_INFO_1061; 351 352 struct WKSTA_INFO_1062 { 353 DWORD wki1062_read_ahead_throughput; 354 } 355 alias WKSTA_INFO_1062* PWKSTA_INFO_1062, LPWKSTA_INFO_1062; 356 357 struct WKSTA_USER_INFO_0 { 358 LPWSTR wkui0_username; 359 } 360 alias WKSTA_USER_INFO_0* PWKSTA_USER_INFO_0, LPWKSTA_USER_INFO_0; 361 362 struct WKSTA_USER_INFO_1{ 363 LPWSTR wkui1_username; 364 LPWSTR wkui1_logon_domain; 365 LPWSTR wkui1_oth_domains; 366 LPWSTR wkui1_logon_server; 367 } 368 alias WKSTA_USER_INFO_1* PWKSTA_USER_INFO_1, LPWKSTA_USER_INFO_1; 369 370 struct WKSTA_USER_INFO_1101 { 371 LPWSTR wkui1101_oth_domains; 372 } 373 alias WKSTA_USER_INFO_1101* PWKSTA_USER_INFO_1101, LPWKSTA_USER_INFO_1101; 374 375 struct WKSTA_TRANSPORT_INFO_0{ 376 DWORD wkti0_quality_of_service; 377 DWORD wkti0_number_of_vcs; 378 LPWSTR wkti0_transport_name; 379 LPWSTR wkti0_transport_address; 380 BOOL wkti0_wan_ish; 381 } 382 alias WKSTA_TRANSPORT_INFO_0* PWKSTA_TRANSPORT_INFO_0, LPWKSTA_TRANSPORT_INFO_0; 383 384 extern (Windows) { 385 NET_API_STATUS NetWkstaGetInfo(LPWSTR,DWORD,PBYTE*); 386 NET_API_STATUS NetWkstaSetInfo(LPWSTR,DWORD,PBYTE,PDWORD); 387 NET_API_STATUS NetWkstaUserGetInfo(LPWSTR,DWORD,PBYTE*); 388 NET_API_STATUS NetWkstaUserSetInfo(LPWSTR,DWORD,PBYTE,PDWORD); 389 NET_API_STATUS NetWkstaUserEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); 390 NET_API_STATUS NetWkstaTransportAdd(LPWSTR,DWORD,PBYTE,PDWORD); 391 NET_API_STATUS NetWkstaTransportDel(LPWSTR,LPWSTR,DWORD); 392 NET_API_STATUS NetWkstaTransportEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); 393 }