[pso] [tema5][win]creare IRP
Mihnea Muraru
mmihnea at gmail.com
Sun Aug 26 12:48:49 EEST 2007
Salut!
La tema 5 pe windows ma lovesc de urmatorul comportament:
Obtin mai intai device-ul asociat PhysicalDrive1, folosind
IoGetDeviceObjectPointer si trimitandu-i ca nume symlink-ul:
UNICODE_STRING devName, physName1, physName2;
PDEVICE_OBJECT physDev1, physDev2;
PFILE_OBJECT physFile1 = NULL, physFile2 = NULL;
RtlInitUnicodeString(&physName1, L"\\??\\PhysicalDrive1");
IoGetDeviceObjectPointer(&physName1, STANDARD_RIGHTS_ALL, &physFile1,
&physDev1);
Functia intoarce succes, dar, mai departe, IoBuildSynchronousFsdRequest
intoarce NULL (parametrii sunt initializati):
irp = IoBuildSynchronousFsdRequest(MajorFunction, physDev1, Buffer,
Length, StartingOffset, &event, IoStatusBlock);
Am incercat de curiozitate sa trimit in loc de physDev1, insusi device-ul
inregistrat de driver (SoftwareRaid) si functia a reusit sa creeze pachetul.
Care ar putea fi problema?
Exista vreo functie asemanatoare GetLastError?
Mihnea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20070826/1125c5a6/attachment.html
More information about the pso
mailing list