source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ntmsapi.h@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 37.5 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _INCL_NTMSAPI_H_
7#define _INCL_NTMSAPI_H_
8
9#include <_mingw_unicode.h>
10
11#pragma pack(8)
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17 /* See http://msdn.microsoft.com/en-us/library/cc245176%28PROT.13%29.aspx */
18 typedef GUID NTMS_GUID;
19 typedef GUID *LPNTMS_GUID;
20 typedef BYTE *PSECURITY_DESCRIPTOR_NTMS;
21 typedef ULONG_PTR NTMS_HANDLE;
22
23
24#define NTMS_NULLGUID {0,0,0,{0,0,0,0,0,0,0,0}}
25#define NTMS_IS_NULLGUID(id) ((id.Data1==0)&&(id.Data2==0)&&(id.Data3==0)&& (id.Data4[0]==0)&&(id.Data4[1]==0)&&(id.Data4[2]==0)&& (id.Data4[3]==0)&&(id.Data4[4]==0)&&(id.Data4[5]==0)&& (id.Data4[6]==0)&&(id.Data4[7]==0))
26
27#define OpenNtmsSession __MINGW_NAME_AW(OpenNtmsSession)
28#define GetNtmsDeviceName __MINGW_NAME_AW(GetNtmsDeviceName)
29#define GetNtmsObjectInformation __MINGW_NAME_AW(GetNtmsObjectInformation)
30#define SetNtmsObjectInformation __MINGW_NAME_AW(SetNtmsObjectInformation)
31#define CreateNtmsMediaPool __MINGW_NAME_AW(CreateNtmsMediaPool)
32#define GetNtmsMediaPoolName __MINGW_NAME_AW(GetNtmsMediaPoolName)
33#define GetNtmsObjectAttribute __MINGW_NAME_AW(GetNtmsObjectAttribute)
34#define SetNtmsObjectAttribute __MINGW_NAME_AW(SetNtmsObjectAttribute)
35#define GetNtmsUIOptions __MINGW_NAME_AW(GetNtmsUIOptions)
36#define SetNtmsUIOptions __MINGW_NAME_AW(SetNtmsUIOptions)
37#define SubmitNtmsOperatorRequest __MINGW_NAME_AW(SubmitNtmsOperatorRequest)
38
39#define CreateNtmsMedia __MINGW_NAME_AW(CreateNtmsMedia)
40#define EjectDiskFromSADrive __MINGW_NAME_AW(EjectDiskFromSADrive)
41#define GetVolumesFromDrive __MINGW_NAME_AW(GetVolumesFromDrive)
42
43#ifndef NTMS_NOREDEF
44
45 enum NtmsObjectsTypes {
46 NTMS_UNKNOWN = 0,
47 NTMS_OBJECT,NTMS_CHANGER,NTMS_CHANGER_TYPE,NTMS_COMPUTER,NTMS_DRIVE,NTMS_DRIVE_TYPE,NTMS_IEDOOR,NTMS_IEPORT,NTMS_LIBRARY,
48 NTMS_LIBREQUEST,NTMS_LOGICAL_MEDIA,NTMS_MEDIA_POOL,NTMS_MEDIA_TYPE,NTMS_PARTITION,NTMS_PHYSICAL_MEDIA,NTMS_STORAGESLOT,
49 NTMS_OPREQUEST,NTMS_UI_DESTINATION,NTMS_NUMBER_OF_OBJECT_TYPES
50 };
51
52 typedef struct _NTMS_ASYNC_IO {
53 NTMS_GUID OperationId;
54 NTMS_GUID EventId;
55 DWORD dwOperationType;
56 DWORD dwResult;
57 DWORD dwAsyncState;
58 HANDLE hEvent;
59 WINBOOL bOnStateChange;
60 } NTMS_ASYNC_IO,*LPNTMS_ASYNC_IO;
61
62 enum NtmsAsyncStatus {
63 NTMS_ASYNCSTATE_QUEUED = 0,NTMS_ASYNCSTATE_WAIT_RESOURCE,NTMS_ASYNCSTATE_WAIT_OPERATOR,NTMS_ASYNCSTATE_INPROCESS,NTMS_ASYNCSTATE_COMPLETE
64 };
65
66 enum NtmsAsyncOperations {
67 NTMS_ASYNCOP_MOUNT = 1
68 };
69#endif
70
71 enum NtmsSessionOptions {
72 NTMS_SESSION_QUERYEXPEDITE = 0x1
73 };
74
75 HANDLE WINAPI OpenNtmsSessionW(LPCWSTR lpServer,LPCWSTR lpApplication,DWORD dwOptions);
76 HANDLE WINAPI OpenNtmsSessionA(LPCSTR lpServer,LPCSTR lpApplication,DWORD dwOptions);
77 DWORD WINAPI CloseNtmsSession(HANDLE hSession);
78
79#ifndef NTMS_NOREDEF
80
81 enum NtmsMountOptions {
82 NTMS_MOUNT_READ = 0x0001,NTMS_MOUNT_WRITE = 0x0002,NTMS_MOUNT_ERROR_NOT_AVAILABLE = 0x0004,NTMS_MOUNT_ERROR_IF_UNAVAILABLE = 0x0004,
83 NTMS_MOUNT_ERROR_OFFLINE = 0x0008,NTMS_MOUNT_ERROR_IF_OFFLINE = 0x0008,NTMS_MOUNT_SPECIFIC_DRIVE = 0x0010,NTMS_MOUNT_NOWAIT = 0x0020
84 };
85
86 enum NtmsDismountOptions {
87 NTMS_DISMOUNT_DEFERRED = 0x0001,NTMS_DISMOUNT_IMMEDIATE = 0x0002
88 };
89
90 enum NtmsMountPriority {
91 NTMS_PRIORITY_DEFAULT = 0,NTMS_PRIORITY_HIGHEST = 15,NTMS_PRIORITY_HIGH = 7,NTMS_PRIORITY_NORMAL = 0,NTMS_PRIORITY_LOW = -7,
92 NTMS_PRIORITY_LOWEST = -15
93 };
94
95 typedef struct _NTMS_MOUNT_INFORMATION {
96 DWORD dwSize;
97 LPVOID lpReserved;
98 } NTMS_MOUNT_INFORMATION,*LPNTMS_MOUNT_INFORMATION;
99#endif
100
101 DWORD WINAPI MountNtmsMedia(HANDLE hSession,LPNTMS_GUID lpMediaId,LPNTMS_GUID lpDriveId,DWORD dwCount,DWORD dwOptions,int dwPriority,DWORD dwTimeout,LPNTMS_MOUNT_INFORMATION lpMountInformation);
102 DWORD WINAPI DismountNtmsMedia(HANDLE hSession,LPNTMS_GUID lpMediaId,DWORD dwCount,DWORD dwOptions);
103
104#ifndef NTMS_NOREDEF
105 enum NtmsAllocateOptions {
106 NTMS_ALLOCATE_NEW = 0x0001,NTMS_ALLOCATE_NEXT = 0x0002,NTMS_ALLOCATE_ERROR_IF_UNAVAILABLE = 0x0004
107 };
108
109 typedef struct _NTMS_ALLOCATION_INFORMATION {
110 DWORD dwSize;
111 LPVOID lpReserved;
112 NTMS_GUID AllocatedFrom;
113 } NTMS_ALLOCATION_INFORMATION,*LPNTMS_ALLOCATION_INFORMATION;
114#endif
115
116 DWORD WINAPI AllocateNtmsMedia(HANDLE hSession,LPNTMS_GUID lpMediaPool,LPNTMS_GUID lpPartition,LPNTMS_GUID lpMediaId,DWORD dwOptions,DWORD dwTimeout,LPNTMS_ALLOCATION_INFORMATION lpAllocateInformation);
117 DWORD WINAPI DeallocateNtmsMedia(HANDLE hSession,LPNTMS_GUID lpMediaId,DWORD dwOptions);
118 DWORD WINAPI SwapNtmsMedia(HANDLE hSession,LPNTMS_GUID lpMediaId1,LPNTMS_GUID lpMediaId2);
119 DWORD WINAPI AddNtmsMediaType(HANDLE hSession,LPNTMS_GUID lpMediaTypeId,LPNTMS_GUID lpLibId);
120 DWORD WINAPI DeleteNtmsMediaType(HANDLE hSession,LPNTMS_GUID lpMediaTypeId,LPNTMS_GUID lpLibId);
121 DWORD WINAPI ChangeNtmsMediaType(HANDLE hSession,LPNTMS_GUID lpMediaId,LPNTMS_GUID lpPoolId);
122 DWORD WINAPI DecommissionNtmsMedia(HANDLE hSession,LPNTMS_GUID lpMediaId);
123 DWORD WINAPI SetNtmsMediaComplete(HANDLE hSession,LPNTMS_GUID lpMediaId);
124 DWORD WINAPI DeleteNtmsMedia(HANDLE hSession,LPNTMS_GUID lpMediaId);
125
126#ifndef NTMS_NOREDEF
127 enum NtmsCreateOptions {
128 NTMS_OPEN_EXISTING = 0x0001,NTMS_CREATE_NEW = 0x0002,NTMS_OPEN_ALWAYS = 0x0003
129 };
130#endif
131
132#ifdef PRE_SEVIL
133 DWORD WINAPI CreateNtmsMediaPool(HANDLE hSession,LPCTSTR lpPoolName,LPNTMS_GUID lpMediaType,DWORD dwAction,LPSECURITY_ATTRIBUTES lpSecurityAttributes,LPNTMS_GUID lpPoolId);
134#endif
135 DWORD WINAPI CreateNtmsMediaPoolA(HANDLE hSession,LPCSTR lpPoolName,LPNTMS_GUID lpMediaType,DWORD dwAction,LPSECURITY_ATTRIBUTES lpSecurityAttributes,LPNTMS_GUID lpPoolId);
136 DWORD WINAPI CreateNtmsMediaPoolW(HANDLE hSession,LPCWSTR lpPoolName,LPNTMS_GUID lpMediaType,DWORD dwAction,LPSECURITY_ATTRIBUTES lpSecurityAttributes,LPNTMS_GUID lpPoolId);
137 DWORD WINAPI GetNtmsMediaPoolNameA(HANDLE hSession,LPNTMS_GUID lpPoolId,LPSTR lpNameBuf,LPDWORD lpdwBufSize);
138 DWORD WINAPI GetNtmsMediaPoolNameW(HANDLE hSession,LPNTMS_GUID lpPoolId,LPWSTR lpNameBuf,LPDWORD lpdwBufSize);
139 DWORD WINAPI MoveToNtmsMediaPool(HANDLE hSession,LPNTMS_GUID lpMediaId,LPNTMS_GUID lpPoolId);
140 DWORD WINAPI DeleteNtmsMediaPool(HANDLE hSession,LPNTMS_GUID lpPoolId);
141 DWORD WINAPI DeleteNtmsLibrary(HANDLE hSession,LPNTMS_GUID lpLibraryId);
142 DWORD WINAPI DeleteNtmsDrive(HANDLE hSession,LPNTMS_GUID lpDriveId);
143
144#define NTMS_OBJECTNAME_LENGTH 64
145#define NTMS_DESCRIPTION_LENGTH 127
146#define NTMS_DEVICENAME_LENGTH 64
147#define NTMS_SERIALNUMBER_LENGTH 32
148#define NTMS_REVISION_LENGTH 32
149#define NTMS_BARCODE_LENGTH 64
150#define NTMS_SEQUENCE_LENGTH 32
151#define NTMS_VENDORNAME_LENGTH 128
152#define NTMS_PRODUCTNAME_LENGTH 128
153#define NTMS_USERNAME_LENGTH 64
154#define NTMS_APPLICATIONNAME_LENGTH 64
155#define NTMS_COMPUTERNAME_LENGTH 64
156#define NTMS_I1_MESSAGE_LENGTH 127
157#define NTMS_MESSAGE_LENGTH 256
158#define NTMS_POOLHIERARCHY_LENGTH 512
159#define NTMS_OMIDLABELID_LENGTH 255
160#define NTMS_OMIDLABELTYPE_LENGTH 64
161#define NTMS_OMIDLABELINFO_LENGTH 256
162
163#ifndef NTMS_NOREDEF
164
165 enum NtmsDriveState {
166 NTMS_DRIVESTATE_DISMOUNTED = 0,NTMS_DRIVESTATE_MOUNTED = 1,NTMS_DRIVESTATE_LOADED = 2,NTMS_DRIVESTATE_UNLOADED = 5,
167 NTMS_DRIVESTATE_BEING_CLEANED = 6,NTMS_DRIVESTATE_DISMOUNTABLE = 7
168 };
169
170#define _NTMS_DRIVEINFORMATION __MINGW_NAME_AW(_NTMS_DRIVEINFORMATION)
171#define NTMS_DRIVEINFORMATION __MINGW_NAME_AW(NTMS_DRIVEINFORMATION)
172
173 typedef struct _NTMS_DRIVEINFORMATIONA {
174 DWORD Number;
175 DWORD State;
176 NTMS_GUID DriveType;
177 CHAR szDeviceName[NTMS_DEVICENAME_LENGTH];
178 CHAR szSerialNumber[NTMS_SERIALNUMBER_LENGTH];
179 CHAR szRevision[NTMS_REVISION_LENGTH];
180 WORD ScsiPort;
181 WORD ScsiBus;
182 WORD ScsiTarget;
183 WORD ScsiLun;
184 DWORD dwMountCount;
185 SYSTEMTIME LastCleanedTs;
186 NTMS_GUID SavedPartitionId;
187 NTMS_GUID Library;
188 GUID Reserved;
189 DWORD dwDeferDismountDelay;
190 } NTMS_DRIVEINFORMATIONA;
191
192 typedef struct _NTMS_DRIVEINFORMATIONW {
193 DWORD Number;
194 DWORD State;
195 NTMS_GUID DriveType;
196 WCHAR szDeviceName[NTMS_DEVICENAME_LENGTH];
197 WCHAR szSerialNumber[NTMS_SERIALNUMBER_LENGTH];
198 WCHAR szRevision[NTMS_REVISION_LENGTH];
199 WORD ScsiPort;
200 WORD ScsiBus;
201 WORD ScsiTarget;
202 WORD ScsiLun;
203 DWORD dwMountCount;
204 SYSTEMTIME LastCleanedTs;
205 NTMS_GUID SavedPartitionId;
206 NTMS_GUID Library;
207 GUID Reserved;
208 DWORD dwDeferDismountDelay;
209 } NTMS_DRIVEINFORMATIONW;
210
211 enum NtmsLibraryType {
212 NTMS_LIBRARYTYPE_UNKNOWN = 0,NTMS_LIBRARYTYPE_OFFLINE = 1,NTMS_LIBRARYTYPE_ONLINE = 2,NTMS_LIBRARYTYPE_STANDALONE = 3
213 };
214
215 enum NtmsLibraryFlags {
216 NTMS_LIBRARYFLAG_FIXEDOFFLINE = 0x01,NTMS_LIBRARYFLAG_CLEANERPRESENT = 0x02,NTMS_LIBRARYFLAG_AUTODETECTCHANGE = 0x04,
217 NTMS_LIBRARYFLAG_IGNORECLEANERUSESREMAINING = 0x08,NTMS_LIBRARYFLAG_RECOGNIZECLEANERBARCODE = 0x10
218 };
219
220 enum NtmsInventoryMethod {
221 NTMS_INVENTORY_NONE = 0,NTMS_INVENTORY_FAST = 1,NTMS_INVENTORY_OMID = 2,NTMS_INVENTORY_DEFAULT = 3,NTMS_INVENTORY_SLOT = 4,
222 NTMS_INVENTORY_STOP = 5,NTMS_INVENTORY_MAX
223 };
224
225 typedef struct _NTMS_LIBRARYINFORMATION {
226 DWORD LibraryType;
227 NTMS_GUID CleanerSlot;
228 NTMS_GUID CleanerSlotDefault;
229 WINBOOL LibrarySupportsDriveCleaning;
230 WINBOOL BarCodeReaderInstalled;
231 DWORD InventoryMethod;
232 DWORD dwCleanerUsesRemaining;
233 DWORD FirstDriveNumber;
234 DWORD dwNumberOfDrives;
235 DWORD FirstSlotNumber;
236 DWORD dwNumberOfSlots;
237 DWORD FirstDoorNumber;
238 DWORD dwNumberOfDoors;
239 DWORD FirstPortNumber;
240 DWORD dwNumberOfPorts;
241 DWORD FirstChangerNumber;
242 DWORD dwNumberOfChangers;
243 DWORD dwNumberOfMedia;
244 DWORD dwNumberOfMediaTypes;
245 DWORD dwNumberOfLibRequests;
246 GUID Reserved;
247 WINBOOL AutoRecovery;
248 DWORD dwFlags;
249 } NTMS_LIBRARYINFORMATION;
250
251#define _NTMS_CHANGERINFORMATION __MINGW_NAME_AW(_NTMS_CHANGERINFORMATION)
252#define NTMS_CHANGERINFORMATION __MINGW_NAME_AW(NTMS_CHANGERINFORMATION)
253
254 typedef struct _NTMS_CHANGERINFORMATIONA {
255 DWORD Number;
256 NTMS_GUID ChangerType;
257 CHAR szSerialNumber[NTMS_SERIALNUMBER_LENGTH];
258 CHAR szRevision[NTMS_REVISION_LENGTH];
259 CHAR szDeviceName[NTMS_DEVICENAME_LENGTH];
260 WORD ScsiPort;
261 WORD ScsiBus;
262 WORD ScsiTarget;
263 WORD ScsiLun;
264 NTMS_GUID Library;
265 } NTMS_CHANGERINFORMATIONA;
266
267 typedef struct _NTMS_CHANGERINFORMATIONW {
268 DWORD Number;
269 NTMS_GUID ChangerType;
270 WCHAR szSerialNumber[NTMS_SERIALNUMBER_LENGTH];
271 WCHAR szRevision[NTMS_REVISION_LENGTH];
272 WCHAR szDeviceName[NTMS_DEVICENAME_LENGTH];
273 WORD ScsiPort;
274 WORD ScsiBus;
275 WORD ScsiTarget;
276 WORD ScsiLun;
277 NTMS_GUID Library;
278 } NTMS_CHANGERINFORMATIONW;
279
280 enum NtmsSlotState {
281 NTMS_SLOTSTATE_UNKNOWN = 0,NTMS_SLOTSTATE_FULL = 1,NTMS_SLOTSTATE_EMPTY = 2,NTMS_SLOTSTATE_NOTPRESENT = 3,NTMS_SLOTSTATE_NEEDSINVENTORY = 4
282 };
283
284 typedef struct _NTMS_STORAGESLOTINFORMATION {
285 DWORD Number;
286 DWORD State;
287 NTMS_GUID Library;
288 } NTMS_STORAGESLOTINFORMATION;
289
290 enum NtmsDoorState {
291 NTMS_DOORSTATE_UNKNOWN = 0,NTMS_DOORSTATE_CLOSED = 1,NTMS_DOORSTATE_OPEN = 2
292 };
293
294 typedef struct _NTMS_IEDOORINFORMATION {
295 DWORD Number;
296 DWORD State;
297 WORD MaxOpenSecs;
298 NTMS_GUID Library;
299 } NTMS_IEDOORINFORMATION;
300
301 enum NtmsPortPosition {
302 NTMS_PORTPOSITION_UNKNOWN = 0,NTMS_PORTPOSITION_EXTENDED = 1,NTMS_PORTPOSITION_RETRACTED = 2
303 };
304
305 enum NtmsPortContent {
306 NTMS_PORTCONTENT_UNKNOWN = 0,NTMS_PORTCONTENT_FULL = 1,NTMS_PORTCONTENT_EMPTY = 2
307 };
308
309 typedef struct _NTMS_IEPORTINFORMATION {
310 DWORD Number;
311 DWORD Content;
312 DWORD Position;
313 WORD MaxExtendSecs;
314 NTMS_GUID Library;
315 } NTMS_IEPORTINFORMATION;
316
317 enum NtmsBarCodeState {
318 NTMS_BARCODESTATE_OK = 1,NTMS_BARCODESTATE_UNREADABLE = 2
319 };
320
321 enum NtmsMediaState {
322 NTMS_MEDIASTATE_IDLE = 0,
323 NTMS_MEDIASTATE_INUSE,NTMS_MEDIASTATE_MOUNTED,NTMS_MEDIASTATE_LOADED,NTMS_MEDIASTATE_UNLOADED,
324 NTMS_MEDIASTATE_OPERROR,NTMS_MEDIASTATE_OPREQ
325 };
326
327#define _NTMS_PMIDINFORMATION __MINGW_NAME_AW(_NTMS_PMIDINFORMATION)
328#define NTMS_PMIDINFORMATION __MINGW_NAME_AW(NTMS_PMIDINFORMATION)
329
330 typedef struct _NTMS_PMIDINFORMATIONA {
331 NTMS_GUID CurrentLibrary;
332 NTMS_GUID MediaPool;
333 NTMS_GUID Location;
334 DWORD LocationType;
335 NTMS_GUID MediaType;
336 NTMS_GUID HomeSlot;
337 CHAR szBarCode[NTMS_BARCODE_LENGTH];
338 DWORD BarCodeState;
339 CHAR szSequenceNumber[NTMS_SEQUENCE_LENGTH];
340 DWORD MediaState;
341 DWORD dwNumberOfPartitions;
342 DWORD dwMediaTypeCode;
343 DWORD dwDensityCode;
344 NTMS_GUID MountedPartition;
345 } NTMS_PMIDINFORMATIONA;
346
347 typedef struct _NTMS_PMIDINFORMATIONW {
348 NTMS_GUID CurrentLibrary;
349 NTMS_GUID MediaPool;
350 NTMS_GUID Location;
351 DWORD LocationType;
352 NTMS_GUID MediaType;
353 NTMS_GUID HomeSlot;
354 WCHAR szBarCode[NTMS_BARCODE_LENGTH];
355 DWORD BarCodeState;
356 WCHAR szSequenceNumber[NTMS_SEQUENCE_LENGTH];
357 DWORD MediaState;
358 DWORD dwNumberOfPartitions;
359 DWORD dwMediaTypeCode;
360 DWORD dwDensityCode;
361 NTMS_GUID MountedPartition;
362 } NTMS_PMIDINFORMATIONW;
363
364 typedef struct _NTMS_LMIDINFORMATION {
365 NTMS_GUID MediaPool;
366 DWORD dwNumberOfPartitions;
367 } NTMS_LMIDINFORMATION;
368
369 enum NtmsPartitionState {
370 NTMS_PARTSTATE_UNKNOWN = 0,
371 NTMS_PARTSTATE_UNPREPARED,NTMS_PARTSTATE_INCOMPATIBLE,NTMS_PARTSTATE_DECOMMISSIONED,
372 NTMS_PARTSTATE_AVAILABLE,NTMS_PARTSTATE_ALLOCATED,NTMS_PARTSTATE_COMPLETE,NTMS_PARTSTATE_FOREIGN,NTMS_PARTSTATE_IMPORT,
373 NTMS_PARTSTATE_RESERVED
374 };
375
376#define NTMS_PARTSTATE_NEW NTMS_PARTSTATE_UNKNOWN
377
378#define _NTMS_PARTITIONINFORMATION __MINGW_NAME_AW(_NTMS_PARTITIONINFORMATION)
379#define NTMS_PARTITIONINFORMATION __MINGW_NAME_AW(NTMS_PARTITIONINFORMATION)
380
381 typedef struct _NTMS_PARTITIONINFORMATIONA {
382 NTMS_GUID PhysicalMedia;
383 NTMS_GUID LogicalMedia;
384 DWORD State;
385 WORD Side;
386 DWORD dwOmidLabelIdLength;
387 BYTE OmidLabelId[NTMS_OMIDLABELID_LENGTH];
388 CHAR szOmidLabelType[NTMS_OMIDLABELTYPE_LENGTH];
389 CHAR szOmidLabelInfo[NTMS_OMIDLABELINFO_LENGTH];
390 DWORD dwMountCount;
391 DWORD dwAllocateCount;
392 LARGE_INTEGER Capacity;
393 } NTMS_PARTITIONINFORMATIONA;
394
395 typedef struct _NTMS_PARTITIONINFORMATIONW {
396 NTMS_GUID PhysicalMedia;
397 NTMS_GUID LogicalMedia;
398 DWORD State;
399 WORD Side;
400 DWORD dwOmidLabelIdLength;
401 BYTE OmidLabelId[NTMS_OMIDLABELID_LENGTH];
402 WCHAR szOmidLabelType[NTMS_OMIDLABELTYPE_LENGTH];
403 WCHAR szOmidLabelInfo[NTMS_OMIDLABELINFO_LENGTH];
404 DWORD dwMountCount;
405 DWORD dwAllocateCount;
406 LARGE_INTEGER Capacity;
407 } NTMS_PARTITIONINFORMATIONW;
408
409 enum NtmsPoolType {
410 NTMS_POOLTYPE_UNKNOWN = 0,NTMS_POOLTYPE_SCRATCH = 1,NTMS_POOLTYPE_FOREIGN = 2,NTMS_POOLTYPE_IMPORT = 3,NTMS_POOLTYPE_APPLICATION = 1000
411 };
412
413 enum NtmsAllocationPolicy {
414 NTMS_ALLOCATE_FROMSCRATCH = 1
415 };
416
417 enum NtmsDeallocationPolicy {
418 NTMS_DEALLOCATE_TOSCRATCH = 1
419 };
420
421 typedef struct _NTMS_MEDIAPOOLINFORMATION {
422 DWORD PoolType;
423 NTMS_GUID MediaType;
424 NTMS_GUID Parent;
425 DWORD AllocationPolicy;
426 DWORD DeallocationPolicy;
427 DWORD dwMaxAllocates;
428 DWORD dwNumberOfPhysicalMedia;
429 DWORD dwNumberOfLogicalMedia;
430 DWORD dwNumberOfMediaPools;
431 } NTMS_MEDIAPOOLINFORMATION;
432
433 enum NtmsReadWriteCharacteristics {
434 NTMS_MEDIARW_UNKNOWN = 0,NTMS_MEDIARW_REWRITABLE = 1,NTMS_MEDIARW_WRITEONCE = 2,NTMS_MEDIARW_READONLY = 3
435 };
436
437 typedef struct _NTMS_MEDIATYPEINFORMATION {
438 DWORD MediaType;
439 DWORD NumberOfSides;
440 DWORD ReadWriteCharacteristics;
441 DWORD DeviceType;
442 } NTMS_MEDIATYPEINFORMATION;
443
444#define _NTMS_DRIVETYPEINFORMATION __MINGW_NAME_AW(_NTMS_DRIVETYPEINFORMATION)
445#define NTMS_DRIVETYPEINFORMATION __MINGW_NAME_AW(NTMS_DRIVETYPEINFORMATION)
446
447 typedef struct _NTMS_DRIVETYPEINFORMATIONA {
448 CHAR szVendor[NTMS_VENDORNAME_LENGTH];
449 CHAR szProduct[NTMS_PRODUCTNAME_LENGTH];
450 DWORD NumberOfHeads;
451 DWORD DeviceType;
452 } NTMS_DRIVETYPEINFORMATIONA;
453
454 typedef struct _NTMS_DRIVETYPEINFORMATIONW {
455 WCHAR szVendor[NTMS_VENDORNAME_LENGTH];
456 WCHAR szProduct[NTMS_PRODUCTNAME_LENGTH];
457 DWORD NumberOfHeads;
458 DWORD DeviceType;
459 } NTMS_DRIVETYPEINFORMATIONW;
460
461#define _NTMS_CHANGERTYPEINFORMATION __MINGW_NAME_AW(_NTMS_CHANGERTYPEINFORMATION)
462#define NTMS_CHANGERTYPEINFORMATION __MINGW_NAME_AW(NTMS_CHANGERTYPEINFORMATION)
463
464 typedef struct _NTMS_CHANGERTYPEINFORMATIONA {
465 CHAR szVendor[NTMS_VENDORNAME_LENGTH];
466 CHAR szProduct[NTMS_PRODUCTNAME_LENGTH];
467 DWORD DeviceType;
468 } NTMS_CHANGERTYPEINFORMATIONA;
469
470 typedef struct _NTMS_CHANGERTYPEINFORMATIONW {
471 WCHAR szVendor[NTMS_VENDORNAME_LENGTH];
472 WCHAR szProduct[NTMS_PRODUCTNAME_LENGTH];
473 DWORD DeviceType;
474 } NTMS_CHANGERTYPEINFORMATIONW;
475
476 enum NtmsLmOperation {
477 NTMS_LM_REMOVE = 0,NTMS_LM_DISABLECHANGER = 1,NTMS_LM_DISABLELIBRARY = 1,NTMS_LM_ENABLECHANGER = 2,NTMS_LM_ENABLELIBRARY = 2,
478 NTMS_LM_DISABLEDRIVE = 3,NTMS_LM_ENABLEDRIVE = 4,NTMS_LM_DISABLEMEDIA = 5,NTMS_LM_ENABLEMEDIA = 6,NTMS_LM_UPDATEOMID = 7,
479 NTMS_LM_INVENTORY = 8,NTMS_LM_DOORACCESS = 9,NTMS_LM_EJECT = 10,NTMS_LM_EJECTCLEANER = 11,NTMS_LM_INJECT = 12,NTMS_LM_INJECTCLEANER = 13,
480 NTMS_LM_PROCESSOMID = 14,NTMS_LM_CLEANDRIVE = 15,NTMS_LM_DISMOUNT = 16,NTMS_LM_MOUNT = 17,NTMS_LM_WRITESCRATCH = 18,NTMS_LM_CLASSIFY = 19,
481 NTMS_LM_RESERVECLEANER = 20,NTMS_LM_RELEASECLEANER = 21,NTMS_LM_MAXWORKITEM
482 };
483
484 enum NtmsLmState {
485 NTMS_LM_QUEUED = 0,NTMS_LM_INPROCESS = 1,NTMS_LM_PASSED = 2,NTMS_LM_FAILED = 3,NTMS_LM_INVALID = 4,NTMS_LM_WAITING = 5,
486 NTMS_LM_DEFERRED = 6,NTMS_LM_DEFFERED = 6,NTMS_LM_CANCELLED = 7,NTMS_LM_STOPPED = 8
487 };
488
489#define _NTMS_LIBREQUESTINFORMATION __MINGW_NAME_AW(_NTMS_LIBREQUESTINFORMATION)
490#define NTMS_LIBREQUESTINFORMATION __MINGW_NAME_AW(NTMS_LIBREQUESTINFORMATION)
491
492 typedef struct _NTMS_LIBREQUESTINFORMATIONA {
493 DWORD OperationCode;
494 DWORD OperationOption;
495 DWORD State;
496 NTMS_GUID PartitionId;
497 NTMS_GUID DriveId;
498 NTMS_GUID PhysMediaId;
499 NTMS_GUID Library;
500 NTMS_GUID SlotId;
501 SYSTEMTIME TimeQueued;
502 SYSTEMTIME TimeCompleted;
503 CHAR szApplication[NTMS_APPLICATIONNAME_LENGTH];
504 CHAR szUser[NTMS_USERNAME_LENGTH];
505 CHAR szComputer[NTMS_COMPUTERNAME_LENGTH];
506 DWORD dwErrorCode;
507 NTMS_GUID WorkItemId;
508 DWORD dwPriority;
509 } NTMS_LIBREQUESTINFORMATIONA;
510
511 typedef struct _NTMS_LIBREQUESTINFORMATIONW {
512 DWORD OperationCode;
513 DWORD OperationOption;
514 DWORD State;
515 NTMS_GUID PartitionId;
516 NTMS_GUID DriveId;
517 NTMS_GUID PhysMediaId;
518 NTMS_GUID Library;
519 NTMS_GUID SlotId;
520 SYSTEMTIME TimeQueued;
521 SYSTEMTIME TimeCompleted;
522 WCHAR szApplication[NTMS_APPLICATIONNAME_LENGTH];
523 WCHAR szUser[NTMS_USERNAME_LENGTH];
524 WCHAR szComputer[NTMS_COMPUTERNAME_LENGTH];
525 DWORD dwErrorCode;
526 NTMS_GUID WorkItemId;
527 DWORD dwPriority;
528 } NTMS_LIBREQUESTINFORMATIONW;
529
530 enum NtmsOpreqCommand {
531 NTMS_OPREQ_UNKNOWN = 0,NTMS_OPREQ_NEWMEDIA,NTMS_OPREQ_CLEANER,NTMS_OPREQ_DEVICESERVICE,NTMS_OPREQ_MOVEMEDIA,
532 NTMS_OPREQ_MESSAGE
533 };
534
535 enum NtmsOpreqState {
536 NTMS_OPSTATE_UNKNOWN = 0,
537 NTMS_OPSTATE_SUBMITTED,NTMS_OPSTATE_ACTIVE,NTMS_OPSTATE_INPROGRESS,NTMS_OPSTATE_REFUSED,
538 NTMS_OPSTATE_COMPLETE
539 };
540
541#define _NTMS_OPREQUESTINFORMATION __MINGW_NAME_AW(_NTMS_OPREQUESTINFORMATION)
542#define NTMS_OPREQUESTINFORMATION __MINGW_NAME_AW(NTMS_OPREQUESTINFORMATION)
543
544 typedef struct _NTMS_OPREQUESTINFORMATIONA {
545 DWORD Request;
546 SYSTEMTIME Submitted;
547 DWORD State;
548 CHAR szMessage[NTMS_MESSAGE_LENGTH];
549 DWORD Arg1Type;
550 NTMS_GUID Arg1;
551 DWORD Arg2Type;
552 NTMS_GUID Arg2;
553 CHAR szApplication[NTMS_APPLICATIONNAME_LENGTH];
554 CHAR szUser[NTMS_USERNAME_LENGTH];
555 CHAR szComputer[NTMS_COMPUTERNAME_LENGTH];
556 } NTMS_OPREQUESTINFORMATIONA;
557
558 typedef struct _NTMS_OPREQUESTINFORMATIONW {
559 DWORD Request;
560 SYSTEMTIME Submitted;
561 DWORD State;
562 WCHAR szMessage[NTMS_MESSAGE_LENGTH];
563 DWORD Arg1Type;
564 NTMS_GUID Arg1;
565 DWORD Arg2Type;
566 NTMS_GUID Arg2;
567 WCHAR szApplication[NTMS_APPLICATIONNAME_LENGTH];
568 WCHAR szUser[NTMS_USERNAME_LENGTH];
569 WCHAR szComputer[NTMS_COMPUTERNAME_LENGTH];
570 } NTMS_OPREQUESTINFORMATIONW;
571
572 typedef struct _NTMS_COMPUTERINFORMATION {
573 DWORD dwLibRequestPurgeTime;
574 DWORD dwOpRequestPurgeTime;
575 DWORD dwLibRequestFlags;
576 DWORD dwOpRequestFlags;
577 DWORD dwMediaPoolPolicy;
578 } NTMS_COMPUTERINFORMATION;
579
580 enum NtmsLibRequestFlags {
581 NTMS_LIBREQFLAGS_NOAUTOPURGE = 0x01,NTMS_LIBREQFLAGS_NOFAILEDPURGE = 0x02
582 };
583
584 enum NtmsOpRequestFlags {
585 NTMS_OPREQFLAGS_NOAUTOPURGE = 0x01,NTMS_OPREQFLAGS_NOFAILEDPURGE = 0x02,NTMS_OPREQFLAGS_NOALERTS = 0x10,NTMS_OPREQFLAGS_NOTRAYICON = 0x20
586 };
587
588 enum NtmsMediaPoolPolicy {
589 NTMS_POOLPOLICY_PURGEOFFLINESCRATCH = 0x01,NTMS_POOLPOLICY_KEEPOFFLINEIMPORT = 0x02
590 };
591
592#define _NTMS_OBJECTINFORMATION __MINGW_NAME_AW(_NTMS_OBJECTINFORMATION)
593#define NTMS_OBJECTINFORMATION __MINGW_NAME_AW(NTMS_OBJECTINFORMATION)
594#define LPNTMS_OBJECTINFORMATION __MINGW_NAME_AW(LPNTMS_OBJECTINFORMATION)
595
596 enum NtmsOperationalState {
597 NTMS_READY = 0,
598 NTMS_INITIALIZING = 10,
599 NTMS_NEEDS_SERVICE = 20,
600 NTMS_NOT_PRESENT = 21
601 };
602
603 typedef struct _RSM_MESSAGE {
604 LPGUID lpguidOperation;
605 DWORD dwNtmsType;
606 DWORD dwState;
607 DWORD dwFlags;
608 DWORD dwPriority;
609 DWORD dwErrorCode;
610 LPWSTR lpszComputerName;
611 LPWSTR lpszApplication;
612 LPWSTR lpszUser;
613 LPWSTR lpszTimeSubmitted;
614 LPWSTR lpszMessage;
615 } RSM_MESSAGE, *LPRSM_MESSAGE;
616
617 typedef struct _NTMS_OBJECTINFORMATIONA {
618 DWORD dwSize;
619 DWORD dwType;
620 SYSTEMTIME Created;
621 SYSTEMTIME Modified;
622 NTMS_GUID ObjectGuid;
623 WINBOOL Enabled;
624 DWORD dwOperationalState;
625 CHAR szName[NTMS_OBJECTNAME_LENGTH];
626 CHAR szDescription[NTMS_DESCRIPTION_LENGTH];
627 union {
628 NTMS_DRIVEINFORMATIONA Drive;
629 NTMS_DRIVETYPEINFORMATIONA DriveType;
630 NTMS_LIBRARYINFORMATION Library;
631 NTMS_CHANGERINFORMATIONA Changer;
632 NTMS_CHANGERTYPEINFORMATIONA ChangerType;
633 NTMS_STORAGESLOTINFORMATION StorageSlot;
634 NTMS_IEDOORINFORMATION IEDoor;
635 NTMS_IEPORTINFORMATION IEPort;
636 NTMS_PMIDINFORMATIONA PhysicalMedia;
637 NTMS_LMIDINFORMATION LogicalMedia;
638 NTMS_PARTITIONINFORMATIONA Partition;
639 NTMS_MEDIAPOOLINFORMATION MediaPool;
640 NTMS_MEDIATYPEINFORMATION MediaType;
641 NTMS_LIBREQUESTINFORMATIONA LibRequest;
642 NTMS_OPREQUESTINFORMATIONA OpRequest;
643 NTMS_COMPUTERINFORMATION Computer;
644 } Info;
645 } NTMS_OBJECTINFORMATIONA,*LPNTMS_OBJECTINFORMATIONA;
646
647 typedef struct _NTMS_OBJECTINFORMATIONW {
648 DWORD dwSize;
649 DWORD dwType;
650 SYSTEMTIME Created;
651 SYSTEMTIME Modified;
652 NTMS_GUID ObjectGuid;
653 WINBOOL Enabled;
654 DWORD dwOperationalState;
655 WCHAR szName[NTMS_OBJECTNAME_LENGTH];
656 WCHAR szDescription[NTMS_DESCRIPTION_LENGTH];
657 union {
658 NTMS_DRIVEINFORMATIONW Drive;
659 NTMS_DRIVETYPEINFORMATIONW DriveType;
660 NTMS_LIBRARYINFORMATION Library;
661 NTMS_CHANGERINFORMATIONW Changer;
662 NTMS_CHANGERTYPEINFORMATIONW ChangerType;
663 NTMS_STORAGESLOTINFORMATION StorageSlot;
664 NTMS_IEDOORINFORMATION IEDoor;
665 NTMS_IEPORTINFORMATION IEPort;
666 NTMS_PMIDINFORMATIONW PhysicalMedia;
667 NTMS_LMIDINFORMATION LogicalMedia;
668 NTMS_PARTITIONINFORMATIONW Partition;
669 NTMS_MEDIAPOOLINFORMATION MediaPool;
670 NTMS_MEDIATYPEINFORMATION MediaType;
671 NTMS_LIBREQUESTINFORMATIONW LibRequest;
672 NTMS_OPREQUESTINFORMATIONW OpRequest;
673 NTMS_COMPUTERINFORMATION Computer;
674 } Info;
675 } NTMS_OBJECTINFORMATIONW,*LPNTMS_OBJECTINFORMATIONW;
676
677#define NTMS_I1_LIBREQUESTINFORMATION __MINGW_NAME_AW(NTMS_I1_LIBREQUESTINFORMATION)
678#define NTMS_I1_PARTITIONINFORMATION __MINGW_NAME_AW(NTMS_I1_PARTITIONINFORMATION)
679#define NTMS_I1_PMIDINFORMATION __MINGW_NAME_AW(NTMS_I1_PMIDINFORMATION)
680#define NTMS_I1_OPREQUESTINFORMATION __MINGW_NAME_AW(NTMS_I1_OPREQUESTINFORMATION)
681#define NTMS_I1_OBJECTINFORMATION __MINGW_NAME_AW(NTMS_I1_OBJECTINFORMATION)
682
683 typedef struct _NTMS_I1_LIBRARYINFORMATION {
684 DWORD LibraryType;
685 NTMS_GUID CleanerSlot;
686 NTMS_GUID CleanerSlotDefault;
687 WINBOOL LibrarySupportsDriveCleaning;
688 WINBOOL BarCodeReaderInstalled;
689 DWORD InventoryMethod;
690 DWORD dwCleanerUsesRemaining;
691 DWORD FirstDriveNumber;
692 DWORD dwNumberOfDrives;
693 DWORD FirstSlotNumber;
694 DWORD dwNumberOfSlots;
695 DWORD FirstDoorNumber;
696 DWORD dwNumberOfDoors;
697 DWORD FirstPortNumber;
698 DWORD dwNumberOfPorts;
699 DWORD FirstChangerNumber;
700 DWORD dwNumberOfChangers;
701 DWORD dwNumberOfMedia;
702 DWORD dwNumberOfMediaTypes;
703 DWORD dwNumberOfLibRequests;
704 GUID Reserved;
705 } NTMS_I1_LIBRARYINFORMATION;
706
707 typedef struct _NTMS_I1_LIBREQUESTINFORMATIONA {
708 DWORD OperationCode;
709 DWORD OperationOption;
710 DWORD State;
711 NTMS_GUID PartitionId;
712 NTMS_GUID DriveId;
713 NTMS_GUID PhysMediaId;
714 NTMS_GUID Library;
715 NTMS_GUID SlotId;
716 SYSTEMTIME TimeQueued;
717 SYSTEMTIME TimeCompleted;
718 CHAR szApplication[NTMS_APPLICATIONNAME_LENGTH];
719 CHAR szUser[NTMS_USERNAME_LENGTH];
720 CHAR szComputer[NTMS_COMPUTERNAME_LENGTH];
721 } NTMS_I1_LIBREQUESTINFORMATIONA;
722
723 typedef struct _NTMS_I1_LIBREQUESTINFORMATIONW {
724 DWORD OperationCode;
725 DWORD OperationOption;
726 DWORD State;
727 NTMS_GUID PartitionId;
728 NTMS_GUID DriveId;
729 NTMS_GUID PhysMediaId;
730 NTMS_GUID Library;
731 NTMS_GUID SlotId;
732 SYSTEMTIME TimeQueued;
733 SYSTEMTIME TimeCompleted;
734 WCHAR szApplication[NTMS_APPLICATIONNAME_LENGTH];
735 WCHAR szUser[NTMS_USERNAME_LENGTH];
736 WCHAR szComputer[NTMS_COMPUTERNAME_LENGTH];
737 } NTMS_I1_LIBREQUESTINFORMATIONW;
738
739 typedef struct _NTMS_I1_PMIDINFORMATIONA {
740 NTMS_GUID CurrentLibrary;
741 NTMS_GUID MediaPool;
742 NTMS_GUID Location;
743 DWORD LocationType;
744 NTMS_GUID MediaType;
745 NTMS_GUID HomeSlot;
746 CHAR szBarCode[NTMS_BARCODE_LENGTH];
747 DWORD BarCodeState;
748 CHAR szSequenceNumber[NTMS_SEQUENCE_LENGTH];
749 DWORD MediaState;
750 DWORD dwNumberOfPartitions;
751 } NTMS_I1_PMIDINFORMATIONA;
752
753 typedef struct _NTMS_I1_PMIDINFORMATIONW {
754 NTMS_GUID CurrentLibrary;
755 NTMS_GUID MediaPool;
756 NTMS_GUID Location;
757 DWORD LocationType;
758 NTMS_GUID MediaType;
759 NTMS_GUID HomeSlot;
760 WCHAR szBarCode[NTMS_BARCODE_LENGTH];
761 DWORD BarCodeState;
762 WCHAR szSequenceNumber[NTMS_SEQUENCE_LENGTH];
763 DWORD MediaState;
764 DWORD dwNumberOfPartitions;
765 } NTMS_I1_PMIDINFORMATIONW;
766
767 typedef struct _NTMS_I1_PARTITIONINFORMATIONA {
768 NTMS_GUID PhysicalMedia;
769 NTMS_GUID LogicalMedia;
770 DWORD State;
771 WORD Side;
772 DWORD dwOmidLabelIdLength;
773 BYTE OmidLabelId[255];
774 CHAR szOmidLabelType[64];
775 CHAR szOmidLabelInfo[256];
776 DWORD dwMountCount;
777 DWORD dwAllocateCount;
778 } NTMS_I1_PARTITIONINFORMATIONA;
779
780 typedef struct _NTMS_I1_PARTITIONINFORMATIONW {
781 NTMS_GUID PhysicalMedia;
782 NTMS_GUID LogicalMedia;
783 DWORD State;
784 WORD Side;
785 DWORD dwOmidLabelIdLength;
786 BYTE OmidLabelId[255];
787 WCHAR szOmidLabelType[64];
788 WCHAR szOmidLabelInfo[256];
789 DWORD dwMountCount;
790 DWORD dwAllocateCount;
791 } NTMS_I1_PARTITIONINFORMATIONW;
792
793 typedef struct _NTMS_I1_OPREQUESTINFORMATIONA {
794 DWORD Request;
795 SYSTEMTIME Submitted;
796 DWORD State;
797 CHAR szMessage[NTMS_I1_MESSAGE_LENGTH];
798 DWORD Arg1Type;
799 NTMS_GUID Arg1;
800 DWORD Arg2Type;
801 NTMS_GUID Arg2;
802 CHAR szApplication[NTMS_APPLICATIONNAME_LENGTH];
803 CHAR szUser[NTMS_USERNAME_LENGTH];
804 CHAR szComputer[NTMS_COMPUTERNAME_LENGTH];
805 } NTMS_I1_OPREQUESTINFORMATIONA;
806
807 typedef struct _NTMS_I1_OPREQUESTINFORMATIONW {
808 DWORD Request;
809 SYSTEMTIME Submitted;
810 DWORD State;
811 WCHAR szMessage[NTMS_I1_MESSAGE_LENGTH];
812 DWORD Arg1Type;
813 NTMS_GUID Arg1;
814 DWORD Arg2Type;
815 NTMS_GUID Arg2;
816 WCHAR szApplication[NTMS_APPLICATIONNAME_LENGTH];
817 WCHAR szUser[NTMS_USERNAME_LENGTH];
818 WCHAR szComputer[NTMS_COMPUTERNAME_LENGTH];
819 } NTMS_I1_OPREQUESTINFORMATIONW;
820
821 typedef struct _NTMS_I1_OBJECTINFORMATIONA {
822 DWORD dwSize;
823 DWORD dwType;
824 SYSTEMTIME Created;
825 SYSTEMTIME Modified;
826 NTMS_GUID ObjectGuid;
827 WINBOOL Enabled;
828 DWORD dwOperationalState;
829 CHAR szName[NTMS_OBJECTNAME_LENGTH];
830 CHAR szDescription[NTMS_DESCRIPTION_LENGTH];
831 union {
832 NTMS_DRIVEINFORMATIONA Drive;
833 NTMS_DRIVETYPEINFORMATIONA DriveType;
834 NTMS_I1_LIBRARYINFORMATION Library;
835 NTMS_CHANGERINFORMATIONA Changer;
836 NTMS_CHANGERTYPEINFORMATIONA ChangerType;
837 NTMS_STORAGESLOTINFORMATION StorageSlot;
838 NTMS_IEDOORINFORMATION IEDoor;
839 NTMS_IEPORTINFORMATION IEPort;
840 NTMS_I1_PMIDINFORMATIONA PhysicalMedia;
841 NTMS_LMIDINFORMATION LogicalMedia;
842 NTMS_I1_PARTITIONINFORMATIONA Partition;
843 NTMS_MEDIAPOOLINFORMATION MediaPool;
844 NTMS_MEDIATYPEINFORMATION MediaType;
845 NTMS_I1_LIBREQUESTINFORMATIONA LibRequest;
846 NTMS_I1_OPREQUESTINFORMATIONA OpRequest;
847 } Info;
848 } NTMS_I1_OBJECTINFORMATIONA,*LPNTMS_I1_OBJECTINFORMATIONA;
849
850 typedef struct _NTMS_I1_OBJECTINFORMATIONW {
851 DWORD dwSize;
852 DWORD dwType;
853 SYSTEMTIME Created;
854 SYSTEMTIME Modified;
855 NTMS_GUID ObjectGuid;
856 WINBOOL Enabled;
857 DWORD dwOperationalState;
858 WCHAR szName[NTMS_OBJECTNAME_LENGTH];
859 WCHAR szDescription[NTMS_DESCRIPTION_LENGTH];
860 union {
861 NTMS_DRIVEINFORMATIONW Drive;
862 NTMS_DRIVETYPEINFORMATIONW DriveType;
863 NTMS_I1_LIBRARYINFORMATION Library;
864 NTMS_CHANGERINFORMATIONW Changer;
865 NTMS_CHANGERTYPEINFORMATIONW ChangerType;
866 NTMS_STORAGESLOTINFORMATION StorageSlot;
867 NTMS_IEDOORINFORMATION IEDoor;
868 NTMS_IEPORTINFORMATION IEPort;
869 NTMS_I1_PMIDINFORMATIONW PhysicalMedia;
870 NTMS_LMIDINFORMATION LogicalMedia;
871 NTMS_I1_PARTITIONINFORMATIONW Partition;
872 NTMS_MEDIAPOOLINFORMATION MediaPool;
873 NTMS_MEDIATYPEINFORMATION MediaType;
874 NTMS_I1_LIBREQUESTINFORMATIONW LibRequest;
875 NTMS_I1_OPREQUESTINFORMATIONW OpRequest;
876 } Info;
877 } NTMS_I1_OBJECTINFORMATIONW,*LPNTMS_I1_OBJECTINFORMATIONW;
878#endif
879
880#ifndef NTMS_NOREDEF
881
882 enum NtmsCreateNtmsMediaOptions {
883 NTMS_ERROR_ON_DUPLICATE = 0x0001
884 };
885#endif
886
887#ifdef PRE_SEVIL
888 DWORD WINAPI GetNtmsObjectInformation(HANDLE hSession,LPNTMS_GUID lpObjectId,LPNTMS_OBJECTINFORMATION lpInfo);
889 DWORD WINAPI SetNtmsObjectInformation(HANDLE hSession,LPNTMS_GUID lpObjectId,LPNTMS_OBJECTINFORMATION lpInfo);
890#endif
891 DWORD WINAPI GetNtmsObjectInformationA(HANDLE hSession,LPNTMS_GUID lpObjectId,LPNTMS_OBJECTINFORMATIONA lpInfo);
892 DWORD WINAPI GetNtmsObjectInformationW(HANDLE hSession,LPNTMS_GUID lpObjectId,LPNTMS_OBJECTINFORMATIONW lpInfo);
893 DWORD WINAPI SetNtmsObjectInformationA(HANDLE hSession,LPNTMS_GUID lpObjectId,LPNTMS_OBJECTINFORMATIONA lpInfo);
894 DWORD WINAPI SetNtmsObjectInformationW(HANDLE hSession,LPNTMS_GUID lpObjectId,LPNTMS_OBJECTINFORMATIONW lpInfo);
895 DWORD WINAPI CreateNtmsMediaA(HANDLE hSession,LPNTMS_OBJECTINFORMATIONA lpMedia,LPNTMS_OBJECTINFORMATIONA lpList,DWORD dwOptions);
896 DWORD WINAPI CreateNtmsMediaW(HANDLE hSession,LPNTMS_OBJECTINFORMATIONW lpMedia,LPNTMS_OBJECTINFORMATIONW lpList,DWORD dwOptions);
897 enum NtmsEnumerateOption {
898 NTMS_ENUM_DEFAULT = 0,NTMS_ENUM_ROOTPOOL = 1
899 };
900 DWORD WINAPI EnumerateNtmsObject(HANDLE hSession,const LPNTMS_GUID lpContainerId,LPNTMS_GUID lpList,LPDWORD lpdwListSize,DWORD dwType,DWORD dwOptions);
901 DWORD WINAPI DisableNtmsObject(HANDLE hSession,DWORD dwType,LPNTMS_GUID lpObjectId);
902 DWORD WINAPI EnableNtmsObject(HANDLE hSession,DWORD dwType,LPNTMS_GUID lpObjectId);
903 enum NtmsEjectOperation {
904 NTMS_EJECT_START = 0,NTMS_EJECT_STOP = 1,NTMS_EJECT_QUEUE = 2,NTMS_EJECT_FORCE = 3,NTMS_EJECT_IMMEDIATE = 4,NTMS_EJECT_ASK_USER = 5
905 };
906 DWORD WINAPI EjectNtmsMedia(HANDLE hSession,LPNTMS_GUID lpMediaId,LPNTMS_GUID lpEjectOperation,DWORD dwAction);
907 enum NtmsInjectOperation {
908 NTMS_INJECT_START = 0,NTMS_INJECT_STOP = 1,NTMS_INJECT_RETRACT = 2,NTMS_INJECT_STARTMANY = 3
909 };
910 DWORD WINAPI InjectNtmsMedia(HANDLE hSession,LPNTMS_GUID lpLibraryId,LPNTMS_GUID lpInjectOperation,DWORD dwAction);
911 DWORD WINAPI AccessNtmsLibraryDoor(HANDLE hSession,LPNTMS_GUID lpLibraryId,DWORD dwAction);
912 DWORD WINAPI CleanNtmsDrive(HANDLE hSession,LPNTMS_GUID lpDriveId);
913 DWORD WINAPI DismountNtmsDrive(HANDLE hSession,LPNTMS_GUID lpDriveId);
914 DWORD WINAPI InventoryNtmsLibrary(HANDLE hSession,LPNTMS_GUID lpLibraryId,DWORD dwAction);
915 DWORD WINAPI IdentifyNtmsSlot(HANDLE hSession,LPNTMS_GUID lpSlotId,DWORD dwOption);
916
917#define NTMS_OMID_TYPE_RAW_LABEL 0x01
918#define NTMS_OMID_TYPE_FILESYSTEM_INFO 0x02
919
920 typedef struct {
921 WCHAR FileSystemType[64];
922 WCHAR VolumeName[256];
923 DWORD SerialNumber;
924 } NTMS_FILESYSTEM_INFO;
925
926 DWORD WINAPI UpdateNtmsOmidInfo(HANDLE hSession,LPNTMS_GUID lpMediaId,DWORD labelType,DWORD numberOfBytes,LPVOID lpBuffer);
927 DWORD WINAPI CancelNtmsLibraryRequest(HANDLE hSession,LPNTMS_GUID lpRequestId);
928 DWORD WINAPI GetNtmsRequestOrder(HANDLE hSession,LPNTMS_GUID lpRequestId,LPDWORD lpdwOrderNumber);
929 DWORD WINAPI SetNtmsRequestOrder(HANDLE hSession,LPNTMS_GUID lpRequestId,DWORD dwOrderNumber);
930 DWORD WINAPI DeleteNtmsRequests(HANDLE hSession,LPNTMS_GUID lpRequestId,DWORD dwType,DWORD dwCount);
931 DWORD WINAPI ReserveNtmsCleanerSlot (HANDLE hSession,LPNTMS_GUID lpLibrary,LPNTMS_GUID lpSlot);
932 DWORD WINAPI ReleaseNtmsCleanerSlot (HANDLE hSession,LPNTMS_GUID lpLibrary);
933 DWORD WINAPI InjectNtmsCleaner (HANDLE hSession,LPNTMS_GUID lpLibrary,LPNTMS_GUID lpInjectOperation,DWORD dwNumberOfCleansLeft,DWORD dwAction);
934 DWORD WINAPI EjectNtmsCleaner (HANDLE hSession,LPNTMS_GUID lpLibrary,LPNTMS_GUID lpEjectOperation,DWORD dwAction);
935 DWORD WINAPI BeginNtmsDeviceChangeDetection(HANDLE hSession,LPHANDLE lpDetectHandle);
936 DWORD WINAPI SetNtmsDeviceChangeDetection(HANDLE hSession,HANDLE DetectHandle,LPNTMS_GUID lpRequestId,DWORD dwType,DWORD dwCount);
937 DWORD WINAPI EndNtmsDeviceChangeDetection(HANDLE hSession,HANDLE DetectHandle);
938
939#ifndef NTMS_NOREDEF
940 enum NtmsDriveType {
941 NTMS_UNKNOWN_DRIVE = 0
942 };
943#endif
944
945 DWORD WINAPI GetNtmsObjectSecurity(HANDLE hSession,LPNTMS_GUID lpObjectId,DWORD dwType,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR lpSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded);
946 DWORD WINAPI SetNtmsObjectSecurity(HANDLE hSession,LPNTMS_GUID lpObjectId,DWORD dwType,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR lpSecurityDescriptor);
947 enum NtmsAccessMask {
948 NTMS_USE_ACCESS = 0x1,
949 NTMS_MODIFY_ACCESS = 0x2,
950 NTMS_CONTROL_ACCESS = 0x4 /* Hmm, could be 3, too. */
951 };
952
953#define NTMS_GENERIC_READ NTMS_USE_ACCESS
954#define NTMS_GENERIC_WRITE NTMS_USE_ACCESS | NTMS_MODIFY_ACCESS
955#define NTMS_GENERIC_EXECUTE NTMS_USE_ACCESS | NTMS_MODIFY_ACCESS | NTMS_CONTROL_ACCESS
956#define NTMS_GENERIC_ALL NTMS_USE_ACCESS | NTMS_MODIFY_ACCESS | NTMS_CONTROL_ACCESS
957
958#define NTMS_MAXATTR_LENGTH 0x10000
959#define NTMS_MAXATTR_NAMELEN 32
960
961 DWORD WINAPI GetNtmsObjectAttributeA(HANDLE hSession,LPNTMS_GUID lpObjectId,DWORD dwType,LPCSTR lpAttributeName,LPVOID lpAttributeData,LPDWORD lpAttributeSize);
962 DWORD WINAPI GetNtmsObjectAttributeW(HANDLE hSession,LPNTMS_GUID lpObjectId,DWORD dwType,LPCWSTR lpAttributeName,LPVOID lpAttributeData,LPDWORD lpAttributeSize);
963 DWORD WINAPI SetNtmsObjectAttributeA(HANDLE hSession,LPNTMS_GUID lpObjectId,DWORD dwType,LPCSTR lpAttributeName,LPVOID lpAttributeData,DWORD dwAttributeSize);
964 DWORD WINAPI SetNtmsObjectAttributeW(HANDLE hSession,LPNTMS_GUID lpObjectId,DWORD dwType,LPCWSTR lpAttributeName,LPVOID lpAttributeData,DWORD AttributeSize);
965
966 enum NtmsUITypes {
967 NTMS_UITYPE_INVALID = 0,
968 NTMS_UITYPE_INFO,NTMS_UITYPE_REQ,NTMS_UITYPE_ERR,NTMS_UITYPE_MAX
969 };
970
971 enum NtmsUIOperations {
972 NTMS_UIDEST_ADD = 1,
973 NTMS_UIDEST_DELETE,NTMS_UIDEST_DELETEALL,
974 NTMS_UIOPERATION_MAX
975 };
976
977 DWORD WINAPI GetNtmsUIOptionsA(HANDLE hSession,const LPNTMS_GUID lpObjectId,DWORD dwType,LPSTR lpszDestination,LPDWORD lpdwBufSize);
978 DWORD WINAPI GetNtmsUIOptionsW(HANDLE hSession,const LPNTMS_GUID lpObjectId,DWORD dwType,LPWSTR lpszDestination,LPDWORD lpdwBufSize);
979 DWORD WINAPI SetNtmsUIOptionsA(HANDLE hSession,const LPNTMS_GUID lpObjectId,DWORD dwType,DWORD dwOperation,LPCSTR lpszDestination);
980 DWORD WINAPI SetNtmsUIOptionsW(HANDLE hSession,const LPNTMS_GUID lpObjectId,DWORD dwType,DWORD dwOperation,LPCWSTR lpszDestination);
981 DWORD WINAPI SubmitNtmsOperatorRequestW(HANDLE hSession,DWORD dwRequest,LPCWSTR lpMessage,LPNTMS_GUID lpArg1Id,LPNTMS_GUID lpArg2Id,LPNTMS_GUID lpRequestId);
982 DWORD WINAPI SubmitNtmsOperatorRequestA(HANDLE hSession,DWORD dwRequest,LPCSTR lpMessage,LPNTMS_GUID lpArg1Id,LPNTMS_GUID lpArg2Id,LPNTMS_GUID lpRequestId);
983 DWORD WINAPI WaitForNtmsOperatorRequest(HANDLE hSession,LPNTMS_GUID lpRequestId,DWORD dwTimeout);
984 DWORD WINAPI CancelNtmsOperatorRequest(HANDLE hSession,LPNTMS_GUID lpRequestId);
985 DWORD WINAPI SatisfyNtmsOperatorRequest(HANDLE hSession,LPNTMS_GUID lpRequestId);
986
987#ifndef NTMS_NOREDEF
988 enum NtmsNotificationOperations {
989 NTMS_OBJ_UPDATE = 1,
990 NTMS_OBJ_INSERT,NTMS_OBJ_DELETE,NTMS_EVENT_SIGNAL,NTMS_EVENT_COMPLETE
991 };
992
993 typedef struct _NTMS_NOTIFICATIONINFORMATION {
994 DWORD dwOperation;
995 NTMS_GUID ObjectId;
996 } NTMS_NOTIFICATIONINFORMATION,*LPNTMS_NOTIFICATIONINFORMATION;
997#endif
998
999 DWORD WINAPI ImportNtmsDatabase(HANDLE hSession);
1000 DWORD WINAPI ExportNtmsDatabase(HANDLE hSession);
1001 DWORD WINAPI ImportNtmsDatabase(HANDLE hSession);
1002 DWORD WINAPI ExportNtmsDatabase(HANDLE hSession);
1003 HANDLE WINAPI OpenNtmsNotification(HANDLE hSession,DWORD dwType);
1004 DWORD WINAPI WaitForNtmsNotification(HANDLE hNotification,LPNTMS_NOTIFICATIONINFORMATION lpNotificationInformation,DWORD dwTimeout);
1005 DWORD WINAPI CloseNtmsNotification(HANDLE hNotification);
1006 DWORD WINAPI EjectDiskFromSADriveW(LPCWSTR lpComputerName,LPCWSTR lpAppName,LPCWSTR lpDeviceName,HWND hWnd,LPCWSTR lpTitle,LPCWSTR lpMessage,DWORD dwOptions);
1007 DWORD WINAPI EjectDiskFromSADriveA(LPCSTR lpComputerName,LPCSTR lpAppName,LPCSTR lpDeviceName,HWND hWnd,LPCSTR lpTitle,LPCSTR lpMessage,DWORD dwOptions);
1008 DWORD WINAPI GetVolumesFromDriveW(LPWSTR pszDriveName,LPWSTR *VolumeNameBufferPtr,LPWSTR *DriveLetterBufferPtr);
1009 DWORD WINAPI GetVolumesFromDriveA(LPSTR pszDriveName,LPSTR *VolumeNameBufferPtr,LPSTR *DriveLetterBufferPtr);
1010
1011#ifdef __cplusplus
1012}
1013#endif
1014
1015#pragma pack()
1016#endif
Note: See TracBrowser for help on using the repository browser.