`
java-mans
  • 浏览: 11342255 次
文章分类
社区版块
存档分类
最新评论

在VC环境里怎么获取程序的执行时间

 
阅读更多
做算法设计时,比较算法的优劣的一种方法是看其执行所花的时间,在VC环境里怎么获取程序的执行时间呢?

  

方法一

   VC里有两个函数:
  
   QueryPerformanceFrequency ();
   QueryPerformanceCounter();
  
   可以用来计算.
  

  例如:

{
  
   LARGE_INTEGER litmp;
   _int64 QPart1,QPart2;
   double dfMinus, dfFreq, dfTim; 
   // 获得时钟频率
   QueryPerformanceFrequency(&litmp);
  
  
   dfFreq=(double) litmp.QuadPart;
   QueryPerformanceCounter(&litmp);
   QPart1=litmp.QuadPart;
  
  
  //(程序运行部分)
  //………………………………………
   //计算时间
   QueryPerformanceCounter(&litmp);
   QPart2=litmp.QuadPart;
   dfMinus=(double)(QPart2-QPart1);
   dfTim = dfMinus/dfFreq*1000; 
   //显示时间
   CString msg4="时间:",msg3,msg5="毫秒";
   msg3.Format("%10.9f",dfTim);
   AfxMessageBox(msg4+msg3+msg5);
  
  }

方法二

程序的执行性能总是体现出非常强的非直观性,很好地遵循了8-2法则(即80%的代码运行了20%的时间,20%的代码执行了80%的时间,甚至9-1法则)。所以性能问题总是要在项目后期考虑,并且要测量而不是猜测。除了用vTune这种重量级工具外,自己可以写一些轻量级的代码测量语句的执行时间。有时候只需要少量的一点代码就很容易找出程序的hotspot.
基础:
#include <ctime>
using namespace std;
time_t start, stop;
time(&start);
exe();
...
time(&stop);
CString strDump;
strDump.Format("SkinFilter time cost:%fs\r\n", difftime(stop, start));
AfxMessageBox(strDump);
这样可以输出start和stop之间语句执行时间。有一个缺点是不能测试1s以下的时间,折衷的办法是用循环把语句执行多次,但条件是不能有副作用。
进阶:
一般在release下测量性能(因为release下的性能才是真实的性能),但是在最终发行版中可能希望去掉测量性能的代码。我的做法是定义一个类似_DEBUG的_TIME宏,然后所有测量性能的代码在#ifdef _TIME #endif中撰写。更进一步,我们可以定义类似vc中的ASSERT宏,以避免写很多#ifdef的麻烦。
下面是一些time宏。
#ifdef _TIME
#define TIME(t) ((void)(time(t)))
#define DIFFTIME(d, t1, t2) ((void)(*d += difftime(t1, t2)))
#define DUMPTIME(dc, s, t) ((void)(dc << s << t << "\n"))
#else
#define TIME(t) ((void) 0)
#define DIFFTIME(d, t1, t2) ((void) 0)
#define DUMPTIME(dc, s, t) ((void) 0)
#endif


其他介绍

1 使用time_t time( time_t * timer ) 精确到秒

  计算时间差使用double difftime( time_t timer1, time_t timer0 )

2 使用clock_t clock() 得到的是CPU时间精确到1/CLOCKS_PER_SEC

3 使用DWORD GetTickCount() 得到的是系统运行的时间精确到毫秒

4 如果使用MFCCTime类,可以用CTime::GetCurrentTime() 精确到秒

5 要获取高精度时间,可以使用

BOOLQueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)获取系统的计数器的频率

BOOLQueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)获取计数器的值

然后用两次计数器的差除以Frequency就得到时间。

6 还有David的文章中提到的方法:

Multimedia Timer Functions

Thefollowing functions are used with multimedia timers.

timeBeginPeriod/timeEndPeriod/timeGetDevCaps/timeGetSystemTime

timeGetTime/timeKillEvent/TimeProc/timeSetEvent 精度很高



GetTickCount()GetCurrentTime()都只精确到55ms(1tick就是55ms)。如果要精确到毫秒,应该使用timeGetTime函数或QueryPerformanceCounter函数。

具体例子可以参考QA001022 "VC++中使用高精度定时器"QA001813 "如何在Windows实现准确的定时"QA004842 "timeGetTime函数延时不准"

Q:vc++怎样获取系统时间,返回值是什么类型的变量呢?

GetSystemTime返回的是格林威志标准时间

GetLocalTime,和上面用法一样,返回的是你所在地区的时间,中国返回的是北京时间

VOID GetSystemTime(

LPSYSTEMTIME lpSystemTime // address of system timestructure

);

函数就可以获得了,其中LPSYSTEMTIME 是个结构体

含:年,月,日,周几,小时,分,秒,毫秒。

以下是TimeMSDN文档:

Compatibility in the Introduction.

Libraries

LIBC.LIBSingle thread static library, retailversionLIBCMT.LIBMultithread static library, retail versionMSVCRT.LIBImportlibrary for MSVCRT.DLL, retail version

Return Value

time returns the time in elapsed seconds. There is noerror return.

Parameter

timer

Storage location for time

Remarks

The time function returns the number of secondselapsed since midnight (00:00:00), January 1, 1970, coordinated universal time,according to the system clock. The return value is stored in the location givenby timer. This parameter may be NULL, in which case the return value is notstored.

Example

/* TIMES.C illustrates various time and date functionsincluding:
 *        time              _ftime            ctime         asctime
 *        localtime         gmtime            mktime        _tzset
 *        _strtime          _strdate          strftime
 *
 * Also theglobal variable:
 *        _tzname
 */
#include <time.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include <string.h>
void main()
{
      chartmpbuf[128], ampm[] = "AM";
      time_tltime;
      struct_timeb tstruct;
      struct tm*today, *gmt, xmas = { 0, 0, 12, 25, 11, 93 };
      /* Settime zone from TZ environment variable. If TZ is not set,
       * theoperating system is queried to obtain the default value
       * for thevariable.
       */
      _tzset();
      /* Displayoperating system-style date and time. */
      _strtime(tmpbuf );
      printf("OS time:\t\t\t\t%s\n", tmpbuf );
      _strdate(tmpbuf );
      printf("OS date:\t\t\t\t%s\n", tmpbuf );
      /* GetUNIX-style time and display as number and string. */
      time(<ime );
      printf("Time in seconds since UTC 1/1/70:\t%ld\n",ltime );
      printf("UNIX time and date:\t\t\t%s", ctime( <ime ) );
      /* DisplayUTC. */
      gmt =gmtime( <ime );
      printf("Coordinated universal time:\t\t%s", asctime( gmt ) );
      /* Convertto time structure and adjust for PM if necessary. */
      today =localtime( <ime );
      if( today->tm_hour> 12 )
      {
     strcpy(ampm, "PM" );
    today->tm_hour -= 12;
      }
      if(today->tm_hour == 0 )    /* Adjust ifmidnight hour. */
    today->tm_hour = 12;
      /* Notehow pointer addition is used to skip the first 11
       *characters and printf is used to trim off terminating
       *characters.
       */
      printf("12-hour time:\t\t\t\t%.8s %s\n",
        asctime( today ) + 11, ampm );
      /* Printadditional time information. */
      _ftime(&tstruct );
      printf("Plus milliseconds:\t\t\t%u\n", tstruct.millitm );
      printf("Zone difference in seconds from UTC:\t%u\n",
              tstruct.timezone );
      printf("Time zone name:\t\t\t\t%s\n", _tzname[0] );
      printf("Daylight savings:\t\t\t%s\n",
              tstruct.dstflag ? "YES" : "NO" );
      /* Maketime for noon on Christmas, 1993. */
      if(mktime( &xmas ) != (time_t)-1 )
     printf("Christmas\t\t\t\t%s\n", asctime( &xmas ) );
      /* Usetime structure to build a customized time string. */
      today =localtime( <ime );
      /* Usestrftime to build a customized time string. */
      strftime(tmpbuf, 128,
          "Today is %A, day %d of %B in the year %Y.\n", today );
      printf(tmpbuf );
}
 


Output

OS time:21:51:03

OS date: 05/03/94

Time in seconds since UTC 1/1/70: 768027063

UNIX time and date: Tue May 03 21:51:03 1994

Coordinated universal time: Wed May 04 04:51:03 1994

12-hour time: 09:51:03 PM

Plus milliseconds: 279

Zone difference in seconds from UTC: 480

Time zone name:

Daylight savings: YES

Christmas Sat Dec 2512:00:00 1993

Today is Tuesday, day 03 of May in the year 1994.


1.使用CTime

CString str;//获取系统时间CTimetm;tm=CTime::GetCurrentTime();str=tm.Format("现在时间是%Y%m%d%X");MessageBox(str,NULL,MB_OK);

2: 得到系统时间日期(使用GetLocalTime)SYSTEMTIMEst;CStringstrDate,strTime;GetLocalTime(&st);strDate.Format("%4d-%2d-%2d",st.wYear,st.wMonth,st.wDay);strTime.Format("%2d:%2d:%2d",st.wHour,st.wMinute,st.wSecond);

3.使用GetTickCount//获取程序运行时间long t1=GetTickCount();//程序段开始前取得系统运行时间(ms)Sleep(500);longt2=GetTickCount();();//程序段结束后取得系统运行时间(ms)str.Format("time:%dms",t2-t1);//前后之差即程序运行时间AfxMessageBox(str);//获取系统运行时间longt=GetTickCount();CString str,str1;str1.Format("系统已运行 %d",t/3600000);str=str1;t%=3600000;str1.Format("%d",t/60000);str+=str1;t%=60000;str1.Format("%d",t/1000);str+=str1;AfxMessageBox(str);

如何在VC6.0中得到一个程序的运行时间,也就是这个程序耗费的时钟周期数// CC++的时间编程

#include<iostream>
#include<ctime>
 usingnamespace std; 
int main() 
{ 
    time_t begin,end; 
    begin=clock(); 
  //这里加上你的代码 
   end=clock(); 
  cout<<"runtime:"<<double(end-begin)/CLOCKS_PER_SEC<<endl; 
}    

unix时间相关,也是标准库的这些在<time.h>1.timegm函数只是将struct tm结构转成time_t结构,不使用时区信息;time_ttimegm(struct tm *tm);

2.mktime使用时区信息time_t mktime(struct tm*tm);

timelocal 函数是GNU扩展的与posix函数mktime相当time_t timelocal (struct tm *tm);

3.gmtime函数只是将time_t结构转成struct tm结构,不使用时区信息;structtm * gmtime(const time_t *clock);

4.localtime使用时区信息struct tm * localtime(consttime_t *clock);

1.time获取时间,stime设置时间time_t tt = time(&t);2.stime其参数应该是GMT时间,根据本地时区设置为本地时间;intstime(time_t *tp)

3.UTC=true 表示采用夏时制;4.文件的修改时间等信息全部采用GMT时间存放,不同的系统在得到修改时间后通过localtime转换成本地时间;5.设置时区推荐使用setup来设置;6.设置时区也可以先更变/etc/sysconfig/clock中的设置 再将ln -fs/usr/share/zoneinfo/xxxx/xxx /etc/localtime 才能重效

time_t只能表示68年的范围,即mktime只能返回1970-2038这一段范围的time_t看看你的系统是否有time_t64,它能表示更大的时间范围

Window里面的一些不一样的

CTime MFC类,好像就是把time.h封了个类,没扩展CTime t = GetCurrentTime();

SYSTEMTIME 结构包含毫秒信息typedef struct _SYSTEMTIME{ WORD wYear; WORD wMonth; WORD wDayOfWeek; WORD wDay; WORD wHour; WORDwMinute; WORD wSecond; WORD wMilliseconds;} SYSTEMTIME, *PSYSTEMTIME;

SYSTEMTIME t1;GetSystemTime(&t1) CTimecurTime(t1); WORD ms = t1.wMilliseconds;

SYSTEMTIME sysTm;::GetLocalTime(&sysTm);

time.h中的_strtime() //只能在windows中用char t[11];_strtime(t);puts(t);

------------------------------------------------------------------------------_timeb定义在SYS\TIMEB.H,有四个fieldsdstflagmillitmtimetimezone

void _ftime( struct _timeb *timeptr );

struct _timeb timebuffer; _ftime( &timebuffer );取当前时间:文档讲可以到ms,有人测试,好象只能到16ms!

-------------------------------------------------------------------------如何设定当前系统时间---

windowsSYSTEMTIME m_myLocalTime,*lpSystemTime;

m_myLocalTime.wYear=2003;

m_myLocalTime.wMonth=1;

m_myLocalTime.wDay=1;

m_myLocalTime.wHour=0;

m_myLocalTime.wMinute=0;

m_myLocalTime.wSecond=0;

m_myLocalTime.wMilliseconds=0;

lpSystemTime=&m_myLocalTime;

if( SetLocalTime(lpSystemTime) ) //此处换成 SetSystemTime( )也不行

MessageBox("OK !");

elseMessageBox("Error !");

SYSTEMTIMEm_myLocalTime,*lpSystemTime;

m_myLocalTime.wYear=2003;

m_myLocalTime.wMonth=1;

m_myLocalTime.wDay=1;

lpSystemTime=&m_myLocalTime;

if(SetDate(lpSystemTime) ) //此处换成 SetSystemTime( )也不行 MessageBox("OK!"); else MessageBox("Error!");

-----------------------------------------------------------------------------clock()函数,得到系统启动以后的毫秒级时间,然后除以CLOCKS_PER_SEC,就可以换成&ldquo;&rdquo;,标准c函数。clock_tclock ( void );

#include <time.h>

clock_t t = clock();

long sec =t / CLOCKS_PER_SEC;他是记录时钟周期的,实现看来不会很精确,需要试验验证;

---------------------------------------------------------------------------据说tc2.0time结构含有毫秒信息

#include <stdio.h>

#include <dos.h>

int main(void) {

struct time t;

gettime(&t);

printf("The current time is: %2d:%02d:%02d.%02d\n", t.ti_hour, t.ti_min, t.ti_sec,t.ti_hund); return 0;

} time 是一个结构体,, 其中成员函数 ti_hund 是豪秒。。。上程序可以在tc2.0运行

--------------------------------------------------------------------------------这个是windows里面常用来计算程序运行时间的函数;

DWORD dwStart = GetTickCount();

//这里运行你的程序代码

DWORD dwEnd = GetTickCount();

(dwEnd-dwStart)就是你的程序运行时间, 以毫秒为单位这个函数只精确到55ms1tick就是55ms--------------------------------------------------------------------------------timeGetTime()基本等于GetTickCount(),但是精度更高DWORD dwStart =timeGetTime();

//这里运行你的程序代码

DWORD dwEnd = timeGetTime();

(dwEnd-dwStart)就是你的程序运行时间, 以毫秒为单位虽然返回的值单位应该是ms,但传说精度只有10ms--------------------------------------------------------------------------------

Borland C++ Builder VCL的时间函数

  1. Date  返回TDateTime对象,包含当前的年月日信息,函数原型如下:  System::TDateTime __fastcall Date(void)

  2. Time  返回TDateTime对象,包含当前的时间信息,函数原型如下:  System::TDateTime __fastcall Time(void)

  3. Now  返回TDateTime对象,获取当前的日期和时间信息,函数原型如下:  System::TDateTime __fastcall Now(void)

  4. DatetimeToString  将TDateTime对象转换为指定格式的字符串对象,函数原型如下:  void __fastcallDateTimeToString(AnsiString &Result, constAnsiString Format,System::TDateTime DateTime)

  5. DateToStr  将TDateTime对象(包含当前年月日信息)转换为字符串对象,函数原型如下:  AnsiString __fastcall DateToStr(System::TDateTimeDate)

  6. TimeToStr  将当前日期转换为字符串对象,函数原型如下:  AnsiString __fastcall TimeToStr(System::TDateTimeTime)

  7. DateTimetoStr  将TDateTime对象转换为字符串对象,函数原型如下:  AnsiString __fastcallDateTimeToStr(System::TDateTime DateTime)

  8. StrToDate  将字符串对象转换为年月日对象,函数原型如下:  System::TDateTime __fastcall StrToDate(constAnsiString S)

  9. StrToTime  将字符串对象转换时间对象,函数原型如下:  System::TDateTime __fastcall StrToTime(constAnsiString S)

  10.StrToDateTime  将字符串对象转换为年月日时间对象,函数原型如下:  System::TDateTime__fastcall StrToDateTime(const AnsiString S)

  11.DateTimeToSystemTime  将TDateTime对象转换为操作系统时间,函数原型如下:  void __fastcallDateTimeToSystemTime(System::TDateTime DateTime,_SYSTEMTIME &SystemTime)

  12.SystemTimeToDateTime  将操作系统时间转换为TDateTime对象,函数原型如下:  System::TDateTime __fastcallSystemTimeToDateTime(const _SYSTEMTIME &SystemTime)

---------------------------------------------------------------------------------------下面是转的一个用汇编的精确计时方法---------------------------------------------------------------------------------------如何获得程序或者一段代码运行的时间?你可能说有专门的程序测试工具,确实,不过你也可以在程序中嵌入汇编代码来实现。

Pentium的指令系统中有一条指令可以获得CPU内部64位计数器的值,我们可以通过代码两次获取该计数器的值而获得程序或代码运行的时钟周期数,进而通过你的cpu的频率算出一个时钟周期的时间,从而算出程序运行的确切时间。

我们通过指令TDSIC来获得cpu内部计数器的值,指令TDSIC返回值放在EDX:EAX,其中EDX中存放64位寄存器中高32位的值,EAX存放第32位的值.

下面看看实现的代码:

//用汇编实现获取一段代码运行的时间

#include<iostream>

using namespace std;

void GetClockNumber (long high, long low);

voidGetRunTime();

int main()

{

long HighStart,LowStart,HighEnd,LowEnd;

longnumhigh,numlow; //获取代码运行开始时cpu内部计数器的值

__asm

{

RDTSC mov HighStart, edx movLowStart, eax

}

for(int i= 0; i<100000; i++ ) { for(int i= 0; i<100000; i++ ) {}

} //获取代码结束时cpu内部计数器的值,并减去初值

__asm { RDTSC movHighEnd, edx Mov LowEnd, eax ;获取两次计数器值得差 sub eax,LowStart cmp eax, 0 ; 如果低32的差为负则求返,因为第二次取得永远比第一次的大 jg L1 neg eax jmpL2 L1: mov numlow, eax L2: sbb edx, HighStart mov numhigh, edx} //把两个计数器值之差放在一个64位的整形变量中//先把高32位左移32位放在64的整形变量中,然后再加上低32 __int64 timer =(numhigh<<32) + numlow; //输出代码段运行的时钟周期数 //以频率1.1Gcpu为例,如果换计算机把其中的1.1改乘其它即可,因为相信大家的cpu都应该在1G以上 ^_^cout<< (double) (timer /1.1/1000000000) << endl; return 0; }

这样通过一条简单的汇编指令就可以获得程序或一段代码的大概时间,不过并不能得到运行的确切时间,因为即使去掉中间的循环,程序也会有个运行时间,

因为在第一次取得计数器的值后,有两条汇编指令mov HighStart, edx mov LowStart, eax这两条指令当然也有运行时间 ,当然你可以减去这两条指令的运行时间(1.1G的机子上是3e-8s),这样会更精确一点。

如果你要确切知道程序的运行时间,专业的测试软件肯定会更好一点,不过好像一般没有必要获取除非专门的要求的程序。

不过能DIY一个也是不错的,不管有没有,最起码你可以学到在VC++中如何嵌入汇编代码以及如何使用32位的寄存器,其实和16位的寄存器一样使用,将来64的也应该一样,只不过位数不同罢了



分享到:
评论

相关推荐

    VC驿站基础班无KEY高清C++教程下载地址

    ⑤、VC编译EXE在没装VC的电脑上运行出错问题解决! 2、ANSI与UNICODE ①、ANSI与UNICODE; ②、不同编码格式下的字符串处理及相互转化; ③、CString常用操作讲解。 3、模态对话框与非模态对话框 ①、模态与...

    VC++常用功能实例

    ◆怎样才能在VC里产生一个唯一的字符串◆ 31 ◆如何隐藏进程(在系统状态栏和进程列表里不可见)◆ 31 ◆如何得到一个确定大小的视?◆ 31 ◆如何实现点击窗口任意地方拖动窗口?◆ 32 ◆如何在启动时阻止MDI应用程序...

    网络驱动程序设计指南

    1.3.4 VC环境 23 1.3.5 网络OID 23 1.4 驱动程序例子 24 第二章 NIC微端口操作和函数概要 25 2.1 NIC微端口操作 25 2.1.1 初始化NDIS库和注册微端口驱动程序 25 2.1.2 注册网络接口卡 25 2.1.3 对查询和设置微端口...

    Visual C++案例开发集锦

    运行的通用环境:Win9x/NT/2000/XP +ACCESS数据库 第一章 窗口的动画效果 带有工具栏的对话框 单文档启动界面 实现全屏显示 实现透明窗体 为对话框程序制作真彩色启动界面 为对话框添加右键菜单 为应用程序添加多...

    Visual C++ 编程资源大全(源码 系统)

    dt221.zip 日期和时间的扩展类2.2版的更新程序(22KB)&lt;END&gt;&lt;br&gt;31,DllIco.zip 得到DLL/EXE文件中的资源定义 Cool(85KB)&lt;END&gt;&lt;br&gt;32,stealth.zip 这个由Visual C++ 5.0开发的SDI程序演示如何让程序运行时在...

    win2000驱动程序设计指南

    NDIS NIC微端口驱动程序 20 1.1 NIC微端口驱动程序类型 20 1.2 网络接口卡支持 20 1.3 微端口驱动程序代码的重要特征 22 1.3.1 ...1.3.4 VC环境 23 1.3.5 网络OID 23 1.4 驱动程序例子 24 第二章...

    mingw-get-inst-20111118

    在基本层,MinGW 是一组包含文件和端口库,其功能是允许控制台模式的程序使用微软的标准C运行时间库(MSVCRT.DLL),该库在所有的 NT OS 上有效,在所有的 Windows 95 发行版以上的 Windows OS 有效,使用基本运行...

    C#微软培训资料

    2.2 公用语言运行时环境与公用语言规范.13 2.3 开 发 工 具 .17 2.4 小 结 .19 第三章 编写第一个应用程序 .20 3.1 Welcome 程序 .20 3.2 代 码 分 析 .20 3.3 运 行 程 序 .23 .4 添 加 注 释 .25 ...

    VC++ Clock圆形时钟+万年历

    摘要:VC/C++源码,系统相关,电子钟,万年历 VC++编写实现的 Clock源码,圆形时钟+万年历,电子钟,运行后自动获取...程序可设置初始时间,代码在VC6+windows XP sp3环境下顺利编译。 运行环境:Windows/Visual C/C++

    易语言程序免安装版下载

     静态编译后的易语言可执行程序(exe)和动态链接库(dll),运行时不再依赖任何支持库文件,文件尺寸更小(相对以前的独立编译),PE结构更合理(取消了“易格式体”),加载速度更快,而且有效解决了“病毒误报”和...

    基于SIP开发软件电话的一些资源(转自YOUTOO)

    在VC里创建win32控制台程序工程,将libosip源码包的SRC目录下的Test目录内的C源程序随便拷一个到工程时,直接编译(工程设置里照前文方法在link选项里增加osip2.lib,osipparser2.lib引用我们之前成功编译得到的静态...

    VC++常用的共用函数100多页

    ◆怎样才能在VC里产生一个唯一的字符串◆ 31 ◆如何隐藏进程(在系统状态栏和进程列表里不可见)◆ 31 ◆如何得到一个确定大小的视?◆ 31 ◆如何实现点击窗口任意地方拖动窗口?◆ 32 ◆如何在启动时阻止MDI应用程序...

    16操作系统实验报告.doc

    【实验软硬件环境】 VC 【实验内容】 实验内容:父进程创建一个有名事件, 由子进程发送事件信号,父进程获取事 件信号后进行相应的处理 【实验原理】 父进程创建子进程,实现多个进程并发执行,提高计算机的运行...

    Visual C++开发经验技巧宝典(第9章)

    0581 获取当前系统的运行时间 383 0582 如何获取Windows 2000系统启动时间 384 0583 获取处理器信息 385 0584 通过内存映射实现传送数据 385 0585 检测是否安装声卡 387 0586 获取当前用户名 387 0587 ...

    Visual C++开发经验技巧宝典(第9章)—1

    0581 获取当前系统的运行时间 383 0582 如何获取Windows 2000系统启动时间 384 0583 获取处理器信息 385 0584 通过内存映射实现传送数据 385 0585 检测是否安装声卡 387 0586 获取当前用户名 387 0587 ...

    windows驱动开发技术详解-part2

    这两个驱动程序没有操作具体的硬件设备,只是在系统里创建了虚拟设备。在随后的章节中,它们会作 为基本驱动程序框架,被本书其他章节的驱动程序开发所复用。笔者将带领读者编写代码、编译、安装 和调试程序。  ...

    Windows驱动开发技术详解的光盘-part1

    这两个驱动程序没有操作具体的硬件设备,只是在系统里创建了虚拟设备。在随后的章节中,它们会作为基本驱动程序框架,被本书其他章节的驱动程序开发所复用。笔者将带领读者编写代码、编译、安装和调试程序。  1.1 ...

    vc++圆形时钟程序源代码(实现指针移动和修改时间)

    圆形钟表和指针实现源码,vc++时钟程序源代码,主要实现了指针的移动和修改当前时间等功能,圆形表盘的实现也是值得参考的,打开电子钟表程序后,自动获取系统当前时间,各个时针随即走动起来,齐飞的VC练习程序,...

    PT80-NEAT开发指南v1.1

    NEAT 程序一般执行过程 ..................................................................................................................... 20 第四章 窗口 ................................................

Global site tag (gtag.js) - Google Analytics