Window XP驱动开发(十二) 驱动的应用程序端 (原理分析)

 

 

转载请标明是引用于 http://blog.csdn.net/chenyujing1234 

欢迎大家提出意见,一起讨论!

 在看这篇文章时可参考我的另一篇文章:

<< Window XP驱动开发(九) USB WDM驱动开发实例 bulkusb >>

1、 INF 文件基础


所有的USB设备在设备描述符中都有一个厂商ID(VID)和产品ID(PID)来向Windows 报告。Windows 使用VID和PID来寻找匹配的设备驱动程序INF文件就是连接VID和PID和指定的驱动程序的连接。

2、 注册表

INF文件是用来当设备首次连接到系统上时,把设备和它的驱动程序联系在一起。这个信息然后存储在注册表中以便于后来的设备能快速而不需要用户干预地完成连接。大多数的USB信息存储在系统注册表在
\HKEY_LOCAL_MACHINE\Enum\USB的下面。
系统注册表可以用工具regedit.exe来查看和修改,此工具在操作系统中。但修改注册表时要小心。

 3.  用户态和GPD的接口


所有的用户态是通过I/O控制调用来访问EZ_USB GPD的。一个用户态程序首先通过调用一个Win32 函数CreateFile( )来获得设备驱动程序的句柄。用户态应用然后用Win32 函数DeviceIoControl( )通过CreateFile( )函数返回的句柄,来提交I/O控制代码和相关的输入输出缓冲区到驱动程序

4、符号连接

EZ_USB GPD 可以和多个EZ_USB 设备通讯。对于每一个连接到主机上的EZ_USB设备,驱动程序以ezusb-I 的形式创建一个符号连接,此处I 是一个从0开始的事例。如果有3个EZ_USB 设备连到主机上,那就存在3个符号连接:ezusb-0, ezusb-1, ezusb-2。符号连接的名字在调用CreateFile( )时使用来得到设备驱动的句柄。CreateFile( )真正做的是为设备驱动程序创建的设备对象得到一个句柄。下面的例子展示了得到 EZ_USB 设备ezusb-0 的句柄:

HANDLE DeviceHandle;
DeviceHandle = CreateFile("\\\\.\\ezusb-0",
GENERIC_WRITE,
FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);


5、 设备I/O控制
有两种方法:
5、1  
用户态应用使用win32 函数DeviceIoControl( )来向设备驱动程序发送请求。下面的代码示例显示了向EZ_USB GPD 提交请求来读取设备的USB设备描述符。它使用上一个例子中返回的DeviceHandle 句柄。
void
rw_dev( HANDLE hDEV )
/*++
Routine Description:

    Called to do formatted ascii dump to console of  USB
    configuration, interface, and endpoint descriptors
    (Cmdline "rwbulk -u" )

Arguments:

    handle to device

Return Value:

    none

--*/
{
        UINT success;
        int siz, nBytes;
        char buf[256];
    PUSB_CONFIGURATION_DESCRIPTOR cd;
    PUSB_INTERFACE_DESCRIPTOR id;
    PUSB_ENDPOINT_DESCRIPTOR ed;

        siz = sizeof(buf);

        if (hDEV == INVALID_HANDLE_VALUE) {
                NOISY(("DEV not open"));
                return;
        }
        
        success = DeviceIoControl(hDEV,
                        IOCTL_BULKUSB_GET_CONFIG_DESCRIPTOR,
                        buf,
                        siz,
                        buf,
                        siz,
                        &nBytes,
                        NULL);

        NOISY(("request complete, success = %d nBytes = %d\n", success, nBytes));
        
        if (success) {
        ULONG i;
                UINT  j, n;
        char *pch;

        pch = buf;
                n = 0;

        cd = (PUSB_CONFIGURATION_DESCRIPTOR) pch;

        print_USB_CONFIGURATION_DESCRIPTOR( cd );

        pch += cd->bLength;

        do {

            id = (PUSB_INTERFACE_DESCRIPTOR) pch;

            print_USB_INTERFACE_DESCRIPTOR(id, n++);

            pch += id->bLength;
            for (j=0; j<id->bNumEndpoints; j++) {

                ed = (PUSB_ENDPOINT_DESCRIPTOR) pch;

                print_USB_ENDPOINT_DESCRIPTOR(ed,j);

                pch += ed->bLength;
            }
            i = (ULONG)(pch - buf);
        } while (i<cd->wTotalLength);

        }
        
        return;

}

 

对应此功能,驱动程序端:(SYS)应该这样设计

#define BULKUSB_IOCTL_INDEX             0x0000


#define IOCTL_BULKUSB_GET_CONFIG_DESCRIPTOR CTL_CODE(FILE_DEVICE_UNKNOWN,     \
                                                     BULKUSB_IOCTL_INDEX,     \
                                                     METHOD_BUFFERED,         \
                                                     FILE_ANY_ACCESS)


在DriverEntry中有

DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = BulkUsb_DispatchDevCtrl;

 用户模式的 DeviceIoControl()将会调用到它。

它的实现是:

NTSTATUS
BulkUsb_DispatchDevCtrl(
    IN PDEVICE_OBJECT DeviceObject,
    IN PIRP Irp
    )
/*++
 
Routine Description:

    Dispatch routine for IRP_MJ_DEVICE_CONTROL

Arguments:

    DeviceObject - pointer to device object
    Irp - I/O request packet

Return Value:

    NT status value

--*/
{
    ULONG              code;
    PVOID              ioBuffer;
    ULONG              inputBufferLength;
    ULONG              outputBufferLength;
    ULONG              info;
    NTSTATUS           ntStatus;
    PDEVICE_EXTENSION  deviceExtension;
    PIO_STACK_LOCATION irpStack;

    //
    // initialize variables
    //
    info = 0;
    irpStack = IoGetCurrentIrpStackLocation(Irp);
    code = irpStack->Parameters.DeviceIoControl.IoControlCode;
    deviceExtension = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;

    ioBuffer           = Irp->AssociatedIrp.SystemBuffer;
    inputBufferLength  = irpStack->Parameters.DeviceIoControl.InputBufferLength;
    outputBufferLength = irpStack->Parameters.DeviceIoControl.OutputBufferLength;

    if(deviceExtension->DeviceState != Working) {

        BulkUsb_DbgPrint(1, ("Invalid device state\n"));

        Irp->IoStatus.Status = ntStatus = STATUS_INVALID_DEVICE_STATE;
        Irp->IoStatus.Information = info;

        IoCompleteRequest(Irp, IO_NO_INCREMENT);
        return ntStatus;
    }

    BulkUsb_DbgPrint(3, ("BulkUsb_DispatchDevCtrl::"));
    BulkUsb_IoIncrement(deviceExtension);

    //
    // It is true that the client driver cancelled the selective suspend
    // request in the dispatch routine for create.
    // But there is no guarantee that it has indeed been completed.
    // so wait on the NoIdleReqPendEvent and proceed only if this event
    // is signalled.
    //
    BulkUsb_DbgPrint(3, ("Waiting on the IdleReqPendEvent\n"));
    
    //
    // make sure that the selective suspend request has been completed.
    //

    if(deviceExtension->SSEnable) {

        KeWaitForSingleObject(&deviceExtension->NoIdleReqPendEvent, 
                              Executive, 
                              KernelMode, 
                              FALSE, 
                              NULL);
    }

    switch(code) {

    case IOCTL_BULKUSB_RESET_PIPE:
    {
        PFILE_OBJECT           fileObject;
        PUSBD_PIPE_INFORMATION pipe;

        pipe = NULL;
        fileObject = NULL;

        //
        // FileObject is the address of the kernel file object to
        // which the IRP is directed. Drivers use the FileObject
        // to correlate IRPs in a queue.
        //
        fileObject = irpStack->FileObject;

        if(fileObject == NULL) {

            ntStatus = STATUS_INVALID_PARAMETER;

            break;
        }

        pipe = (PUSBD_PIPE_INFORMATION) fileObject->FsContext;

        if(pipe == NULL) {

            ntStatus = STATUS_INVALID_PARAMETER;
        }
        else {
            
            ntStatus = BulkUsb_ResetPipe(DeviceObject, pipe);
        }

        break;
    }

    case IOCTL_BULKUSB_GET_CONFIG_DESCRIPTOR:
    {
        ULONG length;

        if(deviceExtension->UsbConfigurationDescriptor) {

            length = deviceExtension->UsbConfigurationDescriptor->wTotalLength;

            if(outputBufferLength >= length) {

                RtlCopyMemory(ioBuffer,
                              deviceExtension->UsbConfigurationDescriptor,
                              length);

                info = length;

                ntStatus = STATUS_SUCCESS;
            }
            else {
                
                ntStatus = STATUS_BUFFER_TOO_SMALL;
            }
        }
        else {
            
            ntStatus = STATUS_UNSUCCESSFUL;
        }

        break;
    }

    case IOCTL_BULKUSB_RESET_DEVICE:
        
        ntStatus = BulkUsb_ResetDevice(DeviceObject);

        break;

    default :

        ntStatus = STATUS_INVALID_DEVICE_REQUEST;

        break;
    }

    Irp->IoStatus.Status = ntStatus;
    Irp->IoStatus.Information = info;

    IoCompleteRequest(Irp, IO_NO_INCREMENT);

    BulkUsb_DbgPrint(3, ("BulkUsb_DispatchDevCtrl::"));
    BulkUsb_IoDecrement(deviceExtension);

    return ntStatus;
}

5、2  也可以直接通过WriteFile,ReadFile来读写USB设备。

 

int _cdecl main(int argc,char *argv[])
{
    char *pinBuf = NULL, *poutBuf = NULL;
    int nBytesRead, nBytesWrite, nBytes;
        ULONG i, j;
    int ok;
    UINT success;
    HANDLE hRead = INVALID_HANDLE_VALUE, hWrite = INVALID_HANDLE_VALUE;
        char buf[1024];
        clock_t start, finish;
        ULONG totalBytes = 0L;
        double seconds;
        ULONG fail = 0L;

    parse(argc, argv );

        // dump USB configuation and pipe info
        if( fDumpUsbConfig ) {
                dumpUsbConfig();
        }


        // doing a read, write, or both test
        if ((fRead) || (fWrite)) {

            if (fRead) {
            //
            // open the output file
            //
                        if ( fDumpReadData ) { // round size to sizeof ULONG for readable dumping
                                while( ReadLen % sizeof( ULONG ) )
                                                ReadLen++;
                        }

            hRead = open_file( inPipe);
        
                pinBuf = malloc(ReadLen);

            }

            if (fWrite) {

                        if ( fDumpReadData ) { // round size to sizeof ULONG for readable dumping
                                while( WriteLen % sizeof( ULONG ) )
                                                WriteLen++;
                        }

                hWrite = open_file( outPipe);
                poutBuf = malloc(WriteLen);
            }


        for (i=0; i<IterationCount; i++) {

            if (fWrite && poutBuf && hWrite != INVALID_HANDLE_VALUE) {

                                PULONG pOut = (PULONG) poutBuf;
                                ULONG  numLongs = WriteLen / sizeof( ULONG );
                //
                // put some data in the output buffer
                //

                for (j=0; j<numLongs; j++) {
                    *(pOut+j) = j;
                }

                //
                // send the write
                //

                    WriteFile(hWrite,
                              poutBuf,
                              WriteLen,
                              &nBytesWrite,
                              NULL);

                    printf("<%s> W (%04.4d) : request %06.6d bytes -- %06.6d bytes written\n",
                            outPipe, i, WriteLen, nBytesWrite);
                assert(nBytesWrite == WriteLen);
                }

                if (fRead && pinBuf) {

                    success = ReadFile(hRead,
                                  pinBuf,
                              ReadLen,
                                  &nBytesRead,
                                  NULL);

                    printf("<%s> R (%04.4d) : request %06.6d bytes -- %06.6d bytes read\n",
                        inPipe, i, ReadLen, nBytesRead);

                if (fWrite) {

                    //
                    // validate the input buffer against what
                    // we sent to the 82930 (loopback test)
                    //

                    ok = compare_buffs(pinBuf, poutBuf,  nBytesRead);

                                        if( fDumpReadData ) {
                                                printf("Dumping read buffer\n");
                                                dump( pinBuf, nBytesRead );     
                                                printf("Dumping write buffer\n");
                                                dump( poutBuf, nBytesRead );

                                        }

                    assert(ok);

                                        if(ok != 1)
                                                fail++;

                    assert(ReadLen == WriteLen);
                    assert(nBytesRead == ReadLen);
                    assert(nBytesWrite == WriteLen);
                }
                }
        
        }


        if (pinBuf) {
            free(pinBuf);
        }

        if (poutBuf) {
            free(poutBuf);
        }


                // close devices if needed
                if(hRead != INVALID_HANDLE_VALUE)
                        CloseHandle(hRead);
                if(hWrite != INVALID_HANDLE_VALUE)
                        CloseHandle(hWrite);

    }           

        return 0;
}



 

对应此功能,驱动程序端:(SYS)应该这样设计

在DriverEntry 中有

    DriverObject->MajorFunction[IRP_MJ_READ]           =
    DriverObject->MajorFunction[IRP_MJ_WRITE]          = BulkUsb_DispatchReadWrite;

用户模式的ReadFile() WriteFile()将会调用到它们。
 

NTSTATUS
BulkUsb_DispatchReadWrite(
    IN PDEVICE_OBJECT DeviceObject,
    IN PIRP           Irp
    )
/*++
 
Routine Description:

    Dispatch routine for read and write.
    This routine creates a BULKUSB_RW_CONTEXT for a read/write.
    This read/write is performed in stages of BULKUSB_MAX_TRANSFER_SIZE.
    once a stage of transfer is complete, then the irp is circulated again, 
    until the requested length of tranfer is performed.

Arguments:

    DeviceObject - pointer to device object
    Irp - I/O request packet

Return Value:

    NT status value

--*/
{
    PMDL                   mdl;
    PURB                   urb;
    ULONG                  totalLength;
    ULONG                  stageLength;
    ULONG                  urbFlags;
    BOOLEAN                read;
    NTSTATUS               ntStatus;
    ULONG_PTR              virtualAddress;
    PFILE_OBJECT           fileObject;
    PDEVICE_EXTENSION      deviceExtension;
    PIO_STACK_LOCATION     irpStack;
    PIO_STACK_LOCATION     nextStack;
    PBULKUSB_RW_CONTEXT    rwContext;
    PUSBD_PIPE_INFORMATION pipeInformation;

    //
    // 初始化变量
    urb = NULL;
    mdl = NULL;
    rwContext = NULL;
    totalLength = 0;
    irpStack = IoGetCurrentIrpStackLocation(Irp);
    fileObject = irpStack->FileObject;
    read = (irpStack->MajorFunction == IRP_MJ_READ) ? TRUE : FALSE;
    deviceExtension = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;

    BulkUsb_DbgPrint(3, ("BulkUsb_DispatchReadWrite - begins\n"));

    if(deviceExtension->DeviceState != Working) {

        BulkUsb_DbgPrint(1, ("Invalid device state\n"));

        ntStatus = STATUS_INVALID_DEVICE_STATE;
        goto BulkUsb_DispatchReadWrite_Exit;
    }

    //
    // It is true that the client driver cancelled the selective suspend
    // request in the dispatch routine for create Irps.
    // But there is no guarantee that it has indeed completed.
    // so wait on the NoIdleReqPendEvent and proceed only if this event
    // is signalled.
    //
    BulkUsb_DbgPrint(3, ("Waiting on the IdleReqPendEvent\n"));
    
    //
    // make sure that the selective suspend request has been completed.
    //

    if(deviceExtension->SSEnable)
	{

        KeWaitForSingleObject(&deviceExtension->NoIdleReqPendEvent, 
                              Executive, 
                              KernelMode, 
                              FALSE, 
                              NULL);
    }

    if(fileObject && fileObject->FsContext) 
	{

        pipeInformation = fileObject->FsContext;

        if(UsbdPipeTypeBulk != pipeInformation->PipeType) {
            
            BulkUsb_DbgPrint(1, ("Usbd pipe type is not bulk\n"));

            ntStatus = STATUS_INVALID_HANDLE;
            goto BulkUsb_DispatchReadWrite_Exit;
        }
    }
    else 
	{

        BulkUsb_DbgPrint(1, ("Invalid handle\n"));

        ntStatus = STATUS_INVALID_HANDLE;
        goto BulkUsb_DispatchReadWrite_Exit;
    }

	// 设置完成例程的参数
    rwContext = (PBULKUSB_RW_CONTEXT)
                ExAllocatePool(NonPagedPool,
                               sizeof(BULKUSB_RW_CONTEXT));

    if(rwContext == NULL)
	{
        
        BulkUsb_DbgPrint(1, ("Failed to alloc mem for rwContext\n"));

        ntStatus = STATUS_INSUFFICIENT_RESOURCES;
        goto BulkUsb_DispatchReadWrite_Exit;
    }

    if(Irp->MdlAddress)
	{

        totalLength = MmGetMdlByteCount(Irp->MdlAddress);
    }

    if(totalLength > BULKUSB_TEST_BOARD_TRANSFER_BUFFER_SIZE)
	{

        BulkUsb_DbgPrint(1, ("Transfer length > circular buffer\n"));

        ntStatus = STATUS_INVALID_PARAMETER;

        ExFreePool(rwContext);

        goto BulkUsb_DispatchReadWrite_Exit;
    }

    if(totalLength == 0)
	{

        BulkUsb_DbgPrint(1, ("Transfer data length = 0\n"));

        ntStatus = STATUS_SUCCESS;

        ExFreePool(rwContext);

        goto BulkUsb_DispatchReadWrite_Exit;
    }

	// 设置URB标志
    urbFlags = USBD_SHORT_TRANSFER_OK;
    virtualAddress = (ULONG_PTR) MmGetMdlVirtualAddress(Irp->MdlAddress);

	// 判断是读还是写
    if(read) 
	{

        urbFlags |= USBD_TRANSFER_DIRECTION_IN;
        BulkUsb_DbgPrint(3, ("Read operation\n"));
    }
    else
	{

        urbFlags |= USBD_TRANSFER_DIRECTION_OUT;
        BulkUsb_DbgPrint(3, ("Write operation\n"));
    }

    //
    // the transfer request is for totalLength.
    // we can perform a max of BULKUSB_MAX_TRANSFER_SIZE
    // in each stage.
    //
    if(totalLength > BULKUSB_MAX_TRANSFER_SIZE) 
	{

        stageLength = BULKUSB_MAX_TRANSFER_SIZE;
    }
    else 
	{

        stageLength = totalLength;
    }

	// 建立MDL
    mdl = IoAllocateMdl((PVOID) virtualAddress,
                        totalLength,
                        FALSE,
                        FALSE,
                        NULL);

    if(mdl == NULL)
	{
    
        BulkUsb_DbgPrint(1, ("Failed to alloc mem for mdl\n"));

        ntStatus = STATUS_INSUFFICIENT_RESOURCES;

        ExFreePool(rwContext);

        goto BulkUsb_DispatchReadWrite_Exit;
    }

    //
    // 将新MDL进行映射
	// map the portion of user-buffer described by an mdl to another mdl
    //
    IoBuildPartialMdl(Irp->MdlAddress,
                      mdl,
                      (PVOID) virtualAddress,
                      stageLength);

	// 申请URB数据结构
    urb = ExAllocatePool(NonPagedPool,
                         sizeof(struct _URB_BULK_OR_INTERRUPT_TRANSFER));

    if(urb == NULL) 
	{

        BulkUsb_DbgPrint(1, ("Failed to alloc mem for urb\n"));

        ntStatus = STATUS_INSUFFICIENT_RESOURCES;

        ExFreePool(rwContext);
        IoFreeMdl(mdl);

        goto BulkUsb_DispatchReadWrite_Exit;
    }

	// 建立Bulk管道的URB
    UsbBuildInterruptOrBulkTransferRequest(
                            urb,
                            sizeof(struct _URB_BULK_OR_INTERRUPT_TRANSFER),
                            pipeInformation->PipeHandle,
                            NULL,
                            mdl,
                            stageLength,
                            urbFlags,
                            NULL);

    //
    // 设置完成例程参数  BULKUSB_RW_CONTEXT  
    //
    
    rwContext->Urb             = urb;
    rwContext->Mdl             = mdl;
    rwContext->Length          = totalLength - stageLength;
    rwContext->Numxfer         = 0;
    rwContext->VirtualAddress  = virtualAddress + stageLength;
    rwContext->DeviceExtension = deviceExtension;

    //
    // use the original read/write irp as an internal device control irp
    // 设置设备堆栈

    nextStack = IoGetNextIrpStackLocation(Irp);
    nextStack->MajorFunction = IRP_MJ_INTERNAL_DEVICE_CONTROL;
    nextStack->Parameters.Others.Argument1 = (PVOID) urb;
    nextStack->Parameters.DeviceIoControl.IoControlCode = 
                                             IOCTL_INTERNAL_USB_SUBMIT_URB;

	// 设置完成例程式
    IoSetCompletionRoutine(Irp, 
                           (PIO_COMPLETION_ROUTINE)BulkUsb_ReadWriteCompletion,
                           rwContext,
                           TRUE,
                           TRUE,
                           TRUE);

    //
    // since we return STATUS_PENDING call IoMarkIrpPending.
    // This is the boiler plate code.
    // This may cause extra overhead of an APC for the Irp completion
    // but this is the correct thing to do.
    //

	// 将当前IRP阻塞
    IoMarkIrpPending(Irp);

    BulkUsb_DbgPrint(3, ("BulkUsb_DispatchReadWrite::"));
    BulkUsb_IoIncrement(deviceExtension);

	// 将IRP转发到底层USB总线驱动
    ntStatus = IoCallDriver(deviceExtension->TopOfStackDeviceObject,
                            Irp);

    if(!NT_SUCCESS(ntStatus)) {

        BulkUsb_DbgPrint(1, ("IoCallDriver fails with status %X\n", ntStatus));

        //
        // if the device was yanked out, then the pipeInformation 
        // field is invalid.
        // similarly if the request was cancelled, then we need not
        // invoked reset pipe/device.
        //
        if((ntStatus != STATUS_CANCELLED) && 
           (ntStatus != STATUS_DEVICE_NOT_CONNECTED)) {
            
            ntStatus = BulkUsb_ResetPipe(DeviceObject,
                                     pipeInformation);
    
            if(!NT_SUCCESS(ntStatus)) {

                BulkUsb_DbgPrint(1, ("BulkUsb_ResetPipe failed\n"));

                ntStatus = BulkUsb_ResetDevice(DeviceObject);
            }
        }
        else {

            BulkUsb_DbgPrint(3, ("ntStatus is STATUS_CANCELLED or "
                                 "STATUS_DEVICE_NOT_CONNECTED\n"));
        }
    }

    //
    // we return STATUS_PENDING and not the status returned by the lower layer.
    //
    return STATUS_PENDING;

BulkUsb_DispatchReadWrite_Exit:

    Irp->IoStatus.Status = ntStatus;
    Irp->IoStatus.Information = 0;

    IoCompleteRequest(Irp, IO_NO_INCREMENT);

    BulkUsb_DbgPrint(3, ("BulkUsb_DispatchReadWrite - ends\n"));

    return ntStatus;
}


 

 

在这个系列课程中,来自微软的权威技术专家将向您解释Windows操作系统的内部工作原理,从系统架构的大局观出发,逐步展示进程、线程、安全机制、内存管理和存储管理等子系统的工作方式。通过对底层原理的揭示,使您更进一步的理解Windows上各类程序的工作方式和如何进行错误诊断及性能优化。 本次课程的内容编排得到了国内知名技术作家,《Windows Internals》一书的中文译者,潘爱民先生的大力支持,同时TechNet也邀请到了众多微软一线技术专家进行讲解。这是一个为IT专业人员量身定做的Windows内部知识课程,在介绍原理的同时,也紧密地围绕实际案例和常见的故障进行分析点评。这是一个系统的学习Windows底层工作机制的好机会,课程内容深入浅出,精彩纷呈,绝对不容错过。 深入研究Windows内部原理系列之一:Windows的昨天、今天和明天 讲师信息:潘爱民 2007年01月25日 14:00-15:30 Level: 300 著名技术作家、微软亚洲研究院研究员潘爱民老师将在这次课程中跟听众分享Windows的发展历程和技术精萃,描绘操作系统的体系架构、Vista的内核变更以及今后版本Windows的发展趋势。 深入研究Windows内部原理系列之二:Windows体系结构-从操作系统的角度 讲师信息:张银奎 2007年01月26日 14:00-15:30 Level: 400 操作系统是计算机系统的灵魂和管理中心,也是软件系统中最复杂的部分。本讲座将以生动的讲解和丰富的演示带您领略Windows操作系统的核心架构和主要组件,包括HAL、内核、执行体、系统进程(IDLE、SMSS.EXE、WinLogon.EXE)和Windows子系统(CSRSS.EXE、WIN32K.SYS以及子系统DLL)等。并讨论中断管理、对象管理、和异常分发等系统机制和实现这些机制的基本数据结构。 深入研究Windows内部原理系列之三:Windows体系结构-从应用程序的角度 讲师信息:曾震宇 2007年01月29日 14:00-15:30 Level: 400 从服务器软件到Office办公应用,从联网游戏到即时消息,不管这些应用的复杂程度如何,他们都是一个个在操作系统控制和管理之下的可执行程序。本次课程邀请微软全球技术中心专家级工程师,为各位讲解一个程序是如何经历从启动、分配资源、运行、结束这一连串的过程,并且介绍其中的重要概念和排错诊断技巧。 深入研究Windows内部原理系列之四:Windows操作系统中的重要基本概念 讲师信息:高宇 2007年01月30日 14:00-15:30 Level: 400 进程、线程、资源分配、内存管理、Win32 API、服务、安全,这些是工作中常常提及但是又无法深入理解的神秘概念。在这次课程中,讲师将介绍Windows中最常见与最重要的一些基本概念. 使大家能够顺利地参与到本系列之后的讨论中去。 深入研究Windows内部原理系列之五:Windows Sysinternals工具集介绍 讲师信息:彭爱华 2007年01月31日 14:00-15:30 Level: 400 Sysinternals Suite(Windows Sysinternals工具集)包含一系列免费的系统工具,其中有大名鼎鼎的Process Explorer、FileMon、RegMon等(在Windows Vista下,FileMon和RegMon则被Process Monitor所代替),如果把系统管理员比喻成战士的话,那么Sysinternals Suite就是我们手中的良兵利器。熟悉和掌握这些工具,并且对Windows的体系有一定的了解,将大幅度的提高日常的诊断和排错能力。本课程将以任务驱动的模式,介绍几个经典的应用案例,来介绍Sysinternals Suite的强大功能。 深入研究Windows内部原理系列之六:Vista新特性底层揭秘 讲师信息:彭爱华 2007年02月01日 14:00-15:30 Level: 400 Windows Vista绝非仅仅是具有诸如3D切换、毛玻璃等炫目的界面效果,花钱购买了Windows Vista,而仅仅为了使用其界面效果,难免有点“买椟还珠”的感觉。实际上Windows Vista值得称道的是它具有很多全新的安全特性,例如用户帐户控制、IE保护模式、服务隔离和Windows资源保护等等。有了这些全新的安全特性,我们就可以在相当的程度上摆脱恶意软件的滋扰。Windows之父Jim Allchin曾经说过不要满足于只知道How-to、小技巧之类的知识,而是应该深入底层了解其内部原理。只有了解了这些安全特性的内在原理,才能真正了解Windows Vista是怎样精心替我们解决安全问题的,才能真正利用好这些安全特性。本课程将以UAC、IE保护模式为例,介绍这些安全特性的内在原理。 深入研究Windows内部原理系列之七:开机引导过程 讲师信息:张银奎 2007年02月02日 14:00-15:30 Level: 400 Windows的启动是一个复杂的过程,从加载器(NTLDR或WinLoad)开始工作到Windows子系统准备就绪,中间经历了若干个复杂的步骤,包括内核和执行体的初始化,创建系统进程和线程,对象管理器初始化基本对象,I/O管理器枚举设备并安装驱动程序,启动SMSS和WinLogon进程,运行Windows子系统进程。本讲座将解析以上各个步骤的来龙去脉,并探讨驱动的加载顺序、用户登录(Gina,SAM数据库,域身份验证)、系统服务程序、Shell等等启动过程密切相关的问题。 深入研究Windows内部原理系列之八:内存管理揭秘 讲师信息:徐晓卓 2007年02月05日 14:00-15:30 Level: 400 工欲善其事,必先利其器。如果能够深入了解Windows内存管理机制,那么无论在系统配置还是在故障排错方面,都能让我们直达根源,起到事半功倍的效果。本课程将全面介绍Windows内部内存管理机制,包括寻址原理、进程内存空间分布、核心态用户态内存管理原理以及虚拟内存管理原理等。同时将讨论应用程序中内存的使用问题,内存泄露的发生以及排除方法。 深入研究Windows内部原理系列之九:Windows的安全机制和实现 讲师信息:张瞰 2007年02月06日 14:00-15:30 Level: 400 Windows如何从操作系统层面保障所有程序的安全?访问控制列表,令牌、系统帐号、SAM数据库、GINA、交互式登陆、COM+,这些概念如何组成一个完整的Windows安全平台?这次课程将解答您这方面的疑问。 深入研究Windows内部原理系列之十:驱动和硬件的管理 讲师信息:张伟伟 2007年02月07日 14:00-15:30 Level: 400 驱动程序如何被Windows识别、加载和管理?随着Windows的发展,驱动程序的类型和作用经历了怎么样的变化?inf文件在驱动安装过程中起到了怎样的作用?Vista的驱动程序有哪些新变化?如果这方面的问题一直困扰着您,那这次课程是绝对不容错过的。 深入研究Windows内部原理系列之十一:存储和文件系统 讲师信息:高宇 2007年02月08日 14:00-15:30 Level: 400 课程将在宏观上简要介绍Windows的存储体系, 观察磁盘上的扇区怎样变成用户眼中的文件. 然后深入观察磁盘上的数据结构. 在分析枯燥的16进制数据的同时, 也会和大家讨论一些有趣和常见的错误现象。 深入研究Windows内部原理系列之十二:网络协议的构成和实现 讲师信息:高宇 2007年02月09日 14:00-15:30 Level: 400 课程内容包括Windows中的网络组件, 网络协议,重要网络服务的实现与特点。 Windows中的TCP/IP以及其上的服务将是本节的主要部分。 深入研究Windows内部原理系列之十三:如何诊断和调试蓝屏错误 讲师信息:张银奎 2007年02月12日 14:00-15:30 Level: 400 当Windows操作系统检测到来源于系统硬件或内核代码的严重错误时,为了避免继续运行可能导致的更严重后果,Windows会通过蓝屏报告错误并让整个系统以可控的方式停止运行(BSOD)。Windows提供了多种方法来诊断和调试蓝屏错误,包括故障转储文件(DUMP)、内核调试以及通过驱动程序注册并接收错误信息。本讲座将解释蓝屏产生的原因和过程,引发蓝屏错误典型的根源,并向您介绍使用WinDbg分析DUMP文件的高级技巧。 深入研究Windows内部原理系列之十四:用户模式的程序排错(上) 讲师信息:喻勇 2007年03月09日 14:00-15:30 Level: 400 “该程序执行了非法操作,即将被关闭”,这是我们耳熟能详的出错报告。程序为什么会崩溃?如何发现崩溃的原因并进行解决?在全面了解了Windows的体系结构和程序运行方式后,我们将进一步介绍访问越界、缓冲溢出、内存泄露等故障的原理,并理论联系实际,带领大家使用调试工具来解决一些常见的问题。 深入研究Windows内部原理系列之十五:用户模式的程序排错(下) 讲师信息:喻勇 2007年03月13日 14:00-15:30 Level: 400 “该程序执行了非法操作,即将被关闭”,这是我们耳熟能详的出错报告。程序为什么会崩溃?如何发现崩溃的原因并进行解决?在全面了解了Windows的体系结构和程序运行方式后,我们将进一步介绍访问越界、缓冲溢出、内存泄露等故障的原理,并理论联系实际,带领大家使用调试工具来解决一些常见的问题。 深入研究Windows内部原理系列之十六:使您成为Windows专家的一些学习习惯 讲师信息:喻勇 2007年03月15日 14:00-15:30 Level: 200 在系统的学习了前面的Windows内部原理之后,大家一定对这么多的技术细节和深入分析大呼过瘾,也一定想尽快地掌握这些知识。如何学好Windows?如何成为一个技术过硬的IT专业人士?作为这个技术大餐的最后一讲,讲师将跟大家分享一些学习的心得,如何找对突破方向和知识重点,循序渐进的进行系统的技术学习。同时也会指出常见的一些学习弊病和改进方法。最后,老师将推荐一些重要的书籍和学习资料供听众参考。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值