上一页 1 ··· 5 6 7 8 9 10 11 下一页

2014年4月18日

ACE_DEBUG buffer

摘要: ACE中输出日志时,发现太长会被截断。1.测试char buf[5000] = {0};ACE_OS::memset(buf,'a', 4999);ACE_DEBUG((LM_INFO, ACE_TEXT("##@@##[ %s ]##@@##\n"), buf));结... 阅读全文

posted @ 2014-04-18 10:02 偏爱省略号 阅读(416) 评论(0) 推荐(0) 编辑

2014年4月16日

windows 定时任务 - 定时关机

摘要: 添加定时关机,刚好可以利用windows定时任务【开始】->【控制面板】->【任务计划】->【添加任务计划】1.找到shutdown.exe 设置每天执行2.设置晚上10点3.设置 -s -t 3参数, 3秒提示后关机 阅读全文

posted @ 2014-04-16 11:00 偏爱省略号 阅读(389) 评论(0) 推荐(0) 编辑

2014年4月14日

printf("%d \n", -1 < sizeof(int) ) Implicit conversion

摘要: int i = -1;printf("%d \n", -1 < sizeof(int) );结果输出: 0 在写程序时,经常对于比较很随意,特别是类型不同时,然而这带来的错误也是意想不到,却理所当然。剖析:sizeof(int) 结果返回unsigned int ,值为4i是int类型, int 与... 阅读全文

posted @ 2014-04-14 20:15 偏爱省略号 阅读(581) 评论(0) 推荐(0) 编辑

2014年3月6日

PAT、PMT、SDT详解

摘要: 下面针对解复用程序详细分析一下PAT,PMT和SDT三类表格的格式.如下图,四个频道复用PAT---Program Association Table,节目关联表。PAT表携带以下信息:(1)TS流ID--- transport_stream_id,该ID标志唯一的流ID(2)节目频道号-- program_number,该号码标志TS流中的一个频道,该频道可以包含很多的节目(即可以包含多个Video PID和Audio PID)(3)PMT的PID--- program_map_PID,表示本频道使用的哪个PID做为PMT的PID,因为可以有很多的频道,因此DVB规定PMT的PID可以由用户 阅读全文

posted @ 2014-03-06 19:23 偏爱省略号 阅读(3592) 评论(0) 推荐(0) 编辑

2014年2月26日

win32 signal

摘要: RemarksThesignalfunction enables a process to choose one of several ways to handle an interrupt signal from the operating system. Thesigargument is the interrupt to whichsignalresponds; it must be one of the following manifest constants, which are defined in SIGNAL.H.sigvalueDescriptionSIGABRTAbnorm 阅读全文

posted @ 2014-02-26 19:50 偏爱省略号 阅读(628) 评论(0) 推荐(0) 编辑

How to send CTRL+BREAK signal to detached command-line process

摘要: 1.GenerateConsoleCtrlEvent functionSends a specified signal to a console process group that shares the console associated with the calling process.for detail:http://msdn.microsoft.com/en-us/library/windows/desktop/ms683155(v=vs.85).aspx2.Send signalBrowsing though MSDN showed thatGenerateConsoleCtrl 阅读全文

posted @ 2014-02-26 19:36 偏爱省略号 阅读(1015) 评论(0) 推荐(0) 编辑

2014年2月21日

RegisterWindowMessage

摘要: RegisterWindowMessage functionDefines a new window message that is guaranteed to be unique throughout the system. The message value can be used when sending or posting messages.SyntaxC++UINT WINAPI RegisterWindowMessage( _In_LPCTSTR lpString);ParameterslpString[in]Type:LPCTSTRThe message to be regi. 阅读全文

posted @ 2014-02-21 18:55 偏爱省略号 阅读(783) 评论(0) 推荐(0) 编辑

2014年2月20日

windows下进程间通信(转)

摘要: 摘要随着人们对应用程序的要求越来越高,单进程应用在许多场合已不能满足人们的要求。编写多进程/多线程程序成为现代程序设计的一个重要特点,在多进程程序设计中,进程间的通信是不可避免的。Microsoft Win32 API提供了多种进程间通信的方法,全面地阐述了这些方法的特点,并加以比较和分析,希望能给读者选择通信方法提供参考。关键词进程进程通信IPC Win32 API1进程与进程通信 进程是装入内存并准备执行的程序,每个进程都有私有的虚拟地址空间,由代码、数据以及它可利用的系统资源(如文件、管道等)组成。多进程/多线程是Windows操作系统的一个基本特征。Microsoft Win32应用. 阅读全文

posted @ 2014-02-20 19:17 偏爱省略号 阅读(418) 评论(0) 推荐(0) 编辑

SetConsoleCtrlHandler

摘要: Excerpt:Registering a Control Handler FunctionThis is an example of theSetConsoleCtrlHandlerfunction that is used to install a control handler.When a CTRL+C signal is received, the control handler returnsTRUE, indicating that it has handled the signal. Doing this prevents other control handlers from 阅读全文

posted @ 2014-02-20 18:51 偏爱省略号 阅读(957) 评论(0) 推荐(0) 编辑

2014年2月19日

TerminateProcess

摘要: RemarksTheTerminateProcessfunction is used to unconditionally cause a process to exit. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised ifTerminateProcessis used rather thanExitProcess.This function stops execution of all threads within the process and requests 阅读全文

posted @ 2014-02-19 19:32 偏爱省略号 阅读(975) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 下一页

导航