Smart Pointers – What, Why, Which?

Smart Pointers - What, Why, Which?What are they?Smart pointers are objects that look and feel like pointers, but are smarter. What does this mean?To look and feel like pointers, smart pointers need to have the same interface that pointers do: they

__HW_VTBL 結構體神奇!

typedef struct __HW_VTBL {  PVOID (*HWInit)(ULONG Identifier, PVOID pMDDContext, PHWOBJ pHWObj);  BOOL (*HWPostInit)(PVOID pHead);  ULONG (*HWDeinit)(PVOID pHead);  BOOL (*HWOpen)(PVOID pHead);  ULONG (*HWClose)(PVOID pHead);  INTERRUPT_TYPE

Comparison of Performance of Different poll implementations

epoll Scalability Web PageIntroduction Interface Description Man Pages Testing dphttpd dphttpd SMP results dphttpd UP results pipetest pipetest results Recent comparison results Analysis and Conclusions Acknowledgements IntroductionDavide Libenzi

(DirectX系列04)DirectShow 音頻錄製

    在DirectX的Bin目錄下有一個很好的工具-GraphEdit,通過這個工具能夠很好的反映音頻錄製的過程。可以總結一點,DirectShow音訊錄製過程就是,枚舉、綁定、串連這三個步驟。接下來看看這三個步驟是如何?的呢?    在此之前,先來介紹下幾個涉及到的COM對象。    ICaptureGraphBuilder2     IBaseFilter    The IBaseFilter interface is the primary interface for

Hot to use typelist of Loki??

最近調試的一段代碼,請一起look look!#include<iostream>#include<stdio.h>#include<string.h>using namespace std;namespace MCD{ template<class T,class U>struct Typelist{ typedef T Head;typedef U Tail;}; class NullType;#define

FileDisk 線程方式進行IRP序列化

      剛看完FileDisk代碼,感受頗多,其中採用線程的方式進行IRP序列化更是讓人覺得新鮮.在DDK中一般採用StartIo來進行IRP的序列話,其中在入口函數中加入pDriverObject->DriverStartUp = XXXStartIO即可, 當然也沒這麼簡單,其中還要做寫處理.      FileDisk採用了另外一種方法,先來看看代碼; //為IRP訊息而設的雙向迴圈鏈表結構 InitializeListHead(&device_extension-

placement new 在一塊已指派記憶體上建立對象

  placement new 是重載operator new的一個標準、全域的版本,它不能被自訂的版本代替(不像普通的operator new和operator delete能夠被替換成使用者自訂的版本)。它的原型如下: void *operator new( size_t, void *p ) throw()  { return p; }首先我們區分下幾個容易混淆的關鍵詞:new、operator new、placement

IO_STACK_LOCATION 結構和處理過程

    IO_STACK_LOCATION 結構The IO_STACK_LOCATION structure defines an I/O stack location, which is an entry in the I/O stack that isassociated with each IRP. Each I/O stack location in an IRP has somecommon members and some request-type-specific

鍵盤過濾驅動快捷實現

     最近在網上無意中看到一段代碼,主要講述的是Windows 下鍵盤過濾驅動的實現方式,這段代碼很有意識,是一種比較好的一種方法,主要將擷取的鍵盤驅動對象的所有分發函數替換,然後另行處理,具體的代碼如下;        //擷取鍵盤驅動對象    status = ObReferenceObjectByName(&uniNtNameString,            OBJ_CASE_INSENSITIVE,            NULL,            0,     

SGI STL空間適配器freelist設計

今天重新看了《STL原始碼剖析》,不禁要讚歎STL設計的經典。STL 的空間適配代碼設計的尤為精闢,不僅考慮到記憶體片段的隱患,而且考慮到指標空間的節儉和複用,降低維護鏈表(lists)帶來額外的負擔。我們來看看如下代碼;先看看STL的結構體,union obj{ union obj *free_list_link; char clent_data[1]; /* the client sees this */};obj

在完成連接埠中使用GetAcceptExSockaddrs

MSDN:When using AcceptEx, the GetAcceptExSockaddrs function must be called to parse the buffer into its three distinct parts (data, local socket address, and remote socket address). On Windows XP and later, once the AcceptEx function completes and

CPictureEx類實現GIF圖片的縮放

關於CPictureEx類,網上很多文章了。但基於CPictureEx展示的GIF圖片,卻無法縮放,有些不方便。因項目中用到了這個類,而且要實現縮放的功能。於是研究了一下,現將相關代碼寫下來,僅供參考。分兩步:1、主要是修改OnPaint函數,這個方法裡使用了BitBlt函數,這是一個不能縮放圖片的函數,我們使用StretchBlt來實現縮放。2、使用SetPaintRect函數,此函數在CPictureEx類中。看核心代碼:CPictureEx *m_Picture; void

IT企業之招聘之經曆

     經過金融風暴後,很多企業都在大張旗鼓的招聘,有些企業啟動的很早,2010校園招聘,廣州周立功公司9月6號就開始啟動,華為、綠盟科技等都相繼啟動。大家圖的就是希望能招聘到優秀的人才,畢竟誰都有先入為主的觀念。     IT行業一直都是競爭異常激烈的行業,好的工作應聘難度直逼考研和公務員的應聘難度,像周立功、華為、中興等這樣的企業招聘人才時可謂百裡挑一,但就是這樣,很多企業還是招不到滿意的人才。通過近些年的招聘發現,有兩點,第一、很多大學應屆畢業生還沒有做好工作的準備,把希望寄託在考研上,

嵌入式通用行業應用平台的靈魂和搭建

微软中国 微软中国 2 104 2010-11-12T11:01:00Z 2010-11-12T11:01:00Z 1 358 2041 微软用户 17 4 2395 11.9999 Clean Clean 7.8 磅 0 2 false false false

CreateThread、_beginthreadex、AfxBeginThread

1、CreateThread、_beginthreadex、AfxBeginThread的區別和正確使用:CreateThread是一個Windows的API函數,_beginthreadex是一個微軟VC中C執行階段程式庫中的線程建立函數,AfxBeginThread則是MFC中的線程建立函數。其依賴關係為:<--表示被依賴CreateThread <--_beginthreadexCreateThread <--

Wiondows 查詢卷裝置資訊代碼實現

NTSTATUS DPQueryVolumeInformation(PDEVICE_OBJECTDevObj,LARGE_INTEGER *TotalSize,DWORD *ClusterSize,DWORD *SectorSize){#define _FileSystemNameLength64//定義FAT16檔案系統簽名的位移量#define FAT16_SIG_OFFSET54//定義FAT32檔案系統簽名的位移量#define

VcdRom 虛擬光碟機驅動程式碼分析

       VcdRom 是網上一個愛好者類比微軟虛擬驅動編寫一個虛擬光碟機程式,近日在研究虛擬磁碟驅動時,無意中看到了VcdRom的虛擬光碟機的代碼,不禁就開始研究了起來,希望以後能有用武之地。           VcdRom驅動的進入點函數   在Windows 驅動中,不管是wdm還是WDF驅動開發模型,驅動的進入點函數一定是DriverEntry該函數的原型如下;NTSTATUSDriverEntry ( IN PDRIVER_OBJECT DriverObject,

Why Cloud?

        In data centers today, many computers suffer the same underutilization in computingpower and networking bandwidth. For example, projects may need a large amount of computing capacity to complete a computation, but no longer need the

FileDisk 原始碼

轉自:http://www.ccgcn.com/bbs/redirect.php?tid=974&goto=lastpostFileDisk.hFileDisk 是把一個鏡像檔案Mount成一個卷fileDisk.h中包含以下內容1.OPEN_FILE_INFORMATION結構複製內容到剪貼簿代碼:typedef struct _OPEN_FILE_INFORMATION {    LARGE_INTEGER   FileSize;    //鏡像檔案的大小,並不一定是到檔案尾。   

Policy-based design

       One problem which often arises during programming is how to build a base set of functionality which can be extended by the user, while still being modular enough to make it easy to replace only certain parts of an implementation without

總頁數: 61357 1 .... 20620 20621 20622 20623 20624 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.