亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? enum.c

?? The Disk sample is used with Classpnp.sys as disk driver. The sample supports Plug and Play, Power M
?? C
?? 第 1 頁 / 共 3 頁
字號:

        partitionEntry->PartitionNumber = 0;
    }

    //
    // Get exclusive access to the child list while repartitioning.
    //

    ClassAcquireChildLock(fdoExtension);

    //
    // Removable media should never have more than one PDO.
    //

    pdoExtension = fdoExtension->CommonExtension.ChildList;

    if(pdoExtension == NULL) {

        PARTITION_INFORMATION_EX tmpPartitionEntry;
        PDEVICE_OBJECT pdo;

        //
        // There is no PDO currently.  Create one and pre-initialize it with
        // a zero length.
        //

        RtlZeroMemory(&tmpPartitionEntry, sizeof(tmpPartitionEntry));

        tmpPartitionEntry.PartitionNumber = 1;

        DebugPrint((1, "DiskUpdateRemovablePartitions: Creating RM partition\n"));

        status = DiskCreatePdo(Fdo,
                               0,
                               &tmpPartitionEntry,
                               partitionStyle,
                               &pdo);

        if(!NT_SUCCESS(status)) {

            DebugPrint((1, "DiskUpdateRemovablePartitions: error %lx creating "
                           "new PDO for RM partition\n",
                           status));

            ClassReleaseChildLock(fdoExtension);
            return;
        }

        //
        // mark the new device as enumerated
        //

        pdoExtension = pdo->DeviceExtension;
        pdoExtension->IsMissing = FALSE;

    }

    pdoData = pdoExtension->CommonExtension.DriverData;

    //
    // Search the partition list for a valid entry.  We're looking for a
    // primary partition since we only support the one.
    //

    for(partitionNumber = 0;
        partitionNumber < partitionCount;
        partitionNumber++) {

        partitionEntry = &(PartitionList->PartitionEntry[partitionNumber]);


        //
        // Is this partition interesting?
        //
        
        if (partitionStyle == PARTITION_STYLE_MBR) {

            if(partitionEntry->Mbr.PartitionType == PARTITION_ENTRY_UNUSED ||
               IsContainerPartition(partitionEntry->Mbr.PartitionType)) {
               
                continue;
            }
        }

        partitionOrdinal++;

        //
        // We have found the first and thus only partition allowed on
        // this disk.  Update the information in the PDO to match the new
        // partition.
        //
        DebugPrint((1, "DiskUpdateRemovablePartitions: Matched %wZ to #%d, "
                       "ordinal %d\n",
                       &pdoExtension->CommonExtension.DeviceName,
                       partitionEntry->PartitionNumber,
                       partitionOrdinal));


        partitionEntry->PartitionNumber = 1;

        pdoData->PartitionStyle = partitionStyle;
        pdoData->PartitionOrdinal = partitionOrdinal;
        ASSERT(partitionEntry->PartitionLength.LowPart != 0x23456789);

        pdoExtension->CommonExtension.StartingOffset =
            partitionEntry->StartingOffset;

        pdoExtension->CommonExtension.PartitionLength =
            partitionEntry->PartitionLength;


        if (partitionStyle == PARTITION_STYLE_MBR) {

            pdoData->Mbr.HiddenSectors = partitionEntry->Mbr.HiddenSectors;
            pdoData->Mbr.BootIndicator = partitionEntry->Mbr.BootIndicator;
            

            //
            // If this partition is being re-written then update the type
            // information as well
            //

            if (partitionEntry->RewritePartition) {
                pdoData->Mbr.PartitionType = partitionEntry->Mbr.PartitionType;
            }

        } else {

            pdoData->Efi.PartitionType = partitionEntry->Gpt.PartitionType;
            pdoData->Efi.PartitionId = partitionEntry->Gpt.PartitionId;
            pdoData->Efi.Attributes = partitionEntry->Gpt.Attributes;

            RtlCopyMemory(
                    pdoData->Efi.PartitionName,
                    partitionEntry->Gpt.Name,
                    sizeof (pdoData->Efi.PartitionName)
                    );
        }

        //
        // Mark this one as found
        //

        pdoExtension->IsMissing = FALSE;
        ClassReleaseChildLock(fdoExtension);
        return;
    }

    //
    // No interesting partition was found. 
    //

    if (partitionStyle == PARTITION_STYLE_MBR) {

        pdoData->Mbr.HiddenSectors = 0;
        pdoData->Mbr.PartitionType = PARTITION_ENTRY_UNUSED;

    } else {

        RtlZeroMemory (&pdoData->Efi,
                       sizeof (pdoData->Efi)
                       );
    }
    
    pdoExtension->CommonExtension.StartingOffset.QuadPart = 0;
    pdoExtension->CommonExtension.PartitionLength.QuadPart = 0;

    ClassReleaseChildLock(fdoExtension);
    return;
}


VOID
DiskUpdatePartitions(
    IN PDEVICE_OBJECT Fdo,
    IN OUT PDRIVE_LAYOUT_INFORMATION_EX PartitionList
    )

/*++

Routine Description:

    This routine will synchronize the information held in the partition list
    with the device objects hanging off this Fdo.  Any new partition objects
    will be created, any non-existant ones will be marked as un-enumerated.

    This will be done in several stages:

        * Clear state (partition number) from every entry in the partition
          list

        * Set IsMissing flag on every child of this FDO

        * For each child of the FDO:
            if a matching partition exists in the partition list,
            update the partition number in the table, update the
            ordinal in the object and mark the object as enumerated

        * For each un-enumerated device object
            zero out the partition information to invalidate the device
            delete the symbolic link if any

        * For each un-matched entry in the partition list:
            create a new partition object
            update the partition number in the list entry
            create a new symbolic link if necessary

Arguments:

    Fdo - a pointer to the functional device object this partition list is for

    PartitionList - a pointer to the partition list being updated

Return Value:

    none

--*/

{
    PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension;

    PPHYSICAL_DEVICE_EXTENSION oldChildList = NULL;
    PPHYSICAL_DEVICE_EXTENSION pdoExtension = NULL;

    ULONG partitionCount;

    ULONG partitionNumber;
    ULONG partitionOrdinal;
    ULONG newPartitionNumber;

    PPARTITION_INFORMATION_EX partitionEntry;
    PDISK_DATA pdoData;
    PARTITION_STYLE partitionStyle;

    NTSTATUS status;

    PAGED_CODE();

    //
    // Get exclusive access to the child list.
    //

    ClassAcquireChildLock(fdoExtension);

    partitionStyle = PartitionList->PartitionStyle;

    partitionCount = PartitionList->PartitionCount;

    //
    // Pull all the child device objects off the children list.  We'll
    // add them back later.
    //

    oldChildList = fdoExtension->CommonExtension.ChildList;
    fdoExtension->CommonExtension.ChildList = NULL;

    //
    // Clear the partition numbers from the list entries
    //

    for(partitionNumber = 0;
        partitionNumber < partitionCount;
        partitionNumber++) {

        partitionEntry = &(PartitionList->PartitionEntry[partitionNumber]);
        partitionEntry->PartitionNumber = 0;
    }

    //
    // Now match each child partition to it's entry (if any) in the partition
    // list.
    //

    while(oldChildList != NULL) {

        pdoExtension = oldChildList;
        pdoData = pdoExtension->CommonExtension.DriverData;

        //
        // Check all partition entries for a match on offset and length
        //

        partitionOrdinal = 0;

        for(partitionNumber = 0;
            partitionNumber < partitionCount;
            partitionNumber++) {

            partitionEntry = &(PartitionList->PartitionEntry[partitionNumber]);

            //
            // Is this an interesting partition entry?
            //

            if (partitionStyle == PARTITION_STYLE_MBR) {

                if((partitionEntry->Mbr.PartitionType == PARTITION_ENTRY_UNUSED) ||
                   (IsContainerPartition(partitionEntry->Mbr.PartitionType))) {

                    continue;
                }
            }

            partitionOrdinal++;

            if(partitionEntry->PartitionNumber) {

                //
                // This partition has already been found - skip it
                //

                continue;
            }

            //
            // Let's see if the partition information matches
            //

            if(partitionEntry->StartingOffset.QuadPart !=
               pdoExtension->CommonExtension.StartingOffset.QuadPart) {
                continue;
            }

            if(partitionEntry->PartitionLength.QuadPart !=
               pdoExtension->CommonExtension.PartitionLength.QuadPart) {
                continue;
            }

            //
            // Yep - it matches.  Update the information in the entry
            //

            partitionEntry->PartitionNumber = pdoExtension->CommonExtension.PartitionNumber;

            if (partitionStyle == PARTITION_STYLE_MBR) {

                pdoData->Mbr.HiddenSectors = partitionEntry->Mbr.HiddenSectors;

            }

            break;
        }

        if(partitionNumber != partitionCount) {

            DebugPrint((1, "DiskUpdatePartitions: Matched %wZ to #%d, ordinal "
                           "%d\n",
                           &pdoExtension->CommonExtension.DeviceName,
                           partitionEntry->PartitionNumber,
                           partitionOrdinal));

            ASSERT(partitionEntry->PartitionLength.LowPart != 0x23456789);
            // ASSERT(pdoExtension->CommonExtension.PartitionLength.QuadPart != 0);

            pdoData->PartitionStyle = partitionStyle;
            
            //
            // we found a match - update the information in the device object
            // extension and driverdata
            //

            pdoData->PartitionOrdinal = partitionOrdinal;

            //
            // If this partition is being re-written then update the type
            // information as well
            //


            if (partitionStyle == PARTITION_STYLE_MBR) {

                if(partitionEntry->RewritePartition) {
                    pdoData->Mbr.PartitionType = partitionEntry->Mbr.PartitionType;
                }

            } else {

                DebugPrint((1, "DiskUpdatePartitions: EFI Partition %ws\n",
                          pdoData->Efi.PartitionName
                          ));
                          
                pdoData->Efi.PartitionType = partitionEntry->Gpt.PartitionType;
                pdoData->Efi.PartitionId = partitionEntry->Gpt.PartitionId;
                pdoData->Efi.Attributes = partitionEntry->Gpt.Attributes;

                RtlCopyMemory(
                    pdoData->Efi.PartitionName,
                    partitionEntry->Gpt.Name,
                    sizeof (pdoData->Efi.PartitionName)
                    );
            }

            //
            // Mark this one as found.
            //

            pdoExtension->IsMissing = FALSE;

            //
            // Pull it out of the old child list and add it into the
            // real one.
            //

            oldChildList = pdoExtension->CommonExtension.ChildList;

            pdoExtension->CommonExtension.ChildList =
                fdoExtension->CommonExtension.ChildList;

            fdoExtension->CommonExtension.ChildList = pdoExtension;

        } else {

            PDEVICE_OBJECT nextPdo;

            DebugPrint ((1, "DiskUpdatePartitions: Deleting %wZ\n",
                            &pdoExtension->CommonExtension.DeviceName));

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人吸女人奶水| 9人人澡人人爽人人精品| caoporm超碰国产精品| 欧美一卡二卡在线| 亚洲午夜免费福利视频| 国产成人av电影在线| 欧美日本在线播放| 亚洲制服丝袜一区| 成人国产一区二区三区精品| 91福利在线播放| 国产精品女主播av| 国产成人99久久亚洲综合精品| 日韩欧美卡一卡二| 美女一区二区在线观看| 在线91免费看| 天天亚洲美女在线视频| 99国产精品久久久久| 久久久777精品电影网影网 | 欧美性感一区二区三区| 国产日韩欧美一区二区三区综合 | 中文字幕综合网| 丰满亚洲少妇av| 图片区日韩欧美亚洲| 久久亚洲捆绑美女| 亚洲成人自拍偷拍| 欧美久久久久久蜜桃| 国产精品一卡二卡| 亚洲国产你懂的| 欧美成人免费网站| 久久国产精品99精品国产 | 精品国产一区二区三区久久影院| 一区二区激情小说| 一本到高清视频免费精品| 日韩美女啊v在线免费观看| 国产成人亚洲精品青草天美| 91麻豆精品国产91久久久久久久久 | 日本成人在线电影网| 久久综合999| 成人ar影院免费观看视频| 亚洲精品日日夜夜| 日韩美女天天操| 精品国产免费久久| 成人av在线播放网址| 蜜臀精品一区二区三区在线观看| 亚洲特黄一级片| 国产午夜精品美女毛片视频| 欧美日本在线一区| 一本在线高清不卡dvd| 国产精品影视网| 免费美女久久99| 日本色综合中文字幕| 亚洲制服欧美中文字幕中文字幕| 国产精品亲子伦对白| 欧美va亚洲va在线观看蝴蝶网| 欧美美女黄视频| 欧美视频一二三区| 91高清视频在线| 在线亚洲免费视频| 色噜噜狠狠一区二区三区果冻| www.亚洲免费av| 成人黄色软件下载| 国产福利一区二区三区| 国产超碰在线一区| 国产激情91久久精品导航| 韩国v欧美v日本v亚洲v| 99这里只有精品| 欧美偷拍一区二区| 色综合久久88色综合天天6| 亚洲va韩国va欧美va| 欧美大白屁股肥臀xxxxxx| 久久久久国产精品麻豆ai换脸| 久久亚洲二区三区| 日韩欧美国产电影| 欧美精品 日韩| 91视频一区二区三区| 国产成人福利片| 色综合天天综合在线视频| 欧美日韩一级片在线观看| 久久久久久久久久美女| 一区二区成人在线| 国产精品一级黄| 欧美日韩久久久一区| 日本一区二区三区在线不卡| 亚洲影视资源网| 成人综合婷婷国产精品久久蜜臀| 国产精品女同互慰在线看| 成人欧美一区二区三区小说| 久久新电视剧免费观看| 欧美精品一区二区三区在线播放| 日韩欧美一二三四区| 在线播放欧美女士性生活| 欧美成人精品1314www| 亚洲精品老司机| 日韩一区二区三区电影在线观看 | 久久精品国产**网站演员| 中文字幕国产一区二区| 欧美色大人视频| 国内一区二区视频| 一区二区在线电影| 精品国产亚洲一区二区三区在线观看| 成人app软件下载大全免费| 亚洲不卡av一区二区三区| 久久久久久久久岛国免费| 欧美色图免费看| 成人免费高清在线| 美国精品在线观看| 亚洲精品国产第一综合99久久| 日韩西西人体444www| av电影在线不卡| 国产麻豆精品一区二区| 亚洲高清一区二区三区| 国产精品私人影院| 欧美不卡一区二区三区| 日本乱人伦aⅴ精品| 国产成人综合在线播放| 日本中文字幕一区二区视频| 亚洲私人影院在线观看| 久久视频一区二区| 欧美精选一区二区| 在线观看网站黄不卡| 国产精品小仙女| 蜜桃视频免费观看一区| 亚洲与欧洲av电影| 国产精品成人免费| 亚洲精品一线二线三线| 欧美顶级少妇做爰| 91成人免费在线| 成人免费高清视频| 国产成人精品影视| 九一九一国产精品| 午夜视频在线观看一区二区| 亚洲色图欧洲色图| 国产精品色哟哟| 久久久亚洲综合| 日韩午夜在线观看视频| 欧美日本视频在线| 在线精品观看国产| 色琪琪一区二区三区亚洲区| 成人免费视频网站在线观看| 国产一区二三区好的| 蜜桃av噜噜一区| 免费人成在线不卡| 日本一区中文字幕| 日韩成人一级大片| 日韩精品91亚洲二区在线观看| 夜夜亚洲天天久久| 亚洲一区二区在线免费观看视频| 亚洲乱码国产乱码精品精小说| 亚洲欧洲性图库| 亚洲欧洲三级电影| 亚洲欧美日韩在线| 国产精品看片你懂得| 中文av字幕一区| 国产精品亲子伦对白| 国产精品二三区| 日韩一区日韩二区| 亚洲人妖av一区二区| 一区二区中文视频| 亚洲靠逼com| 亚洲第一电影网| 日本欧美在线观看| 日韩av中文在线观看| 蜜臀久久99精品久久久画质超高清| 奇米一区二区三区| 美女精品一区二区| 九九热在线视频观看这里只有精品| 蜜桃精品视频在线| 国产自产v一区二区三区c| 国产一区福利在线| 成人永久aaa| 一本色道亚洲精品aⅴ| 欧美性受极品xxxx喷水| 欧美日韩国产三级| 日韩午夜激情免费电影| 精品福利视频一区二区三区| 久久久欧美精品sm网站| 国产色综合久久| 亚洲少妇屁股交4| 亚洲香蕉伊在人在线观| 蜜桃精品视频在线观看| 国产福利一区二区| 色悠悠亚洲一区二区| 欧美私模裸体表演在线观看| 91精品国产综合久久久久久| 26uuu精品一区二区在线观看| 中文字幕乱码一区二区免费| 亚洲欧美另类久久久精品2019| 亚洲午夜影视影院在线观看| 免费高清不卡av| 国产aⅴ综合色| 97se亚洲国产综合自在线观| 91超碰这里只有精品国产| 久久久久久久性| 亚洲伦在线观看| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产福利电影一区二区三区| 日本高清不卡在线观看| 日韩欧美电影一二三| 国产精品不卡一区二区三区| 午夜精品久久一牛影视|