随笔分类 -  win32 & vs

剁了xp,醉了win7
摘要:装完win7,安装各种软件完毕,重启,然并卵。 cpu,内存飙升!!svchost.exe这个进程内存发疯了一样往上飙升 从 几十兆 到占用1个多G, 纳尼, 总共物理内存才2G。 ╮(╯▽╰)╭用ProcExp打开查看显示wuauserv服务一直在工作, 估计就是它。原来是Windows upda... 阅读全文

posted @ 2015-08-20 16:22 偏爱省略号 阅读(236) 评论(0) 推荐(0)

sourceInsight *** more bytes are required
摘要:现象:用sourceinsight修改的文件无法保存,提示 No enough space to save "XXX", xxx more bytes are required.服务器Centos5.5,已经开了samba服务; 但在windows资源管理器里可以直接访问 并读写。刚开始怀疑smb问... 阅读全文

posted @ 2015-03-12 20:03 偏爱省略号 阅读(1013) 评论(0) 推荐(0)

CFileDialog OFN_NOCHANGEDIR
摘要:问题:CFileDialog 调用后变成了当前工作路径,变成了CFileDialog所选择的路径。解决:在CFileDialog的dwFlags 设置标志OFN_NOCHANGEDIR就可以了,不会改变目录的。 阅读全文

posted @ 2014-07-07 19:09 偏爱省略号 阅读(898) 评论(0) 推荐(0)

chrome 切换到其他网络后重新加载网
摘要:chrome 突然提示 “您与 www.google.com 之间的安全连接目前正受到干扰。 请等待几分钟后再尝试重新加载网页,或在切换到其他网络后重新加载网”查看证书发现 已经过期解决:同步下系统时间,之前做测试,改了系统时间导致证书失效。 阅读全文

posted @ 2014-05-05 18:45 偏爱省略号 阅读(531) 评论(0) 推荐(0)

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

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

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 偏爱省略号 阅读(691) 评论(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 偏爱省略号 阅读(1079) 评论(0) 推荐(0)

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 偏爱省略号 阅读(826) 评论(0) 推荐(0)

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

posted @ 2014-02-20 19:17 偏爱省略号 阅读(451) 评论(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 偏爱省略号 阅读(1009) 评论(0) 推荐(0)

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 偏爱省略号 阅读(1056) 评论(0) 推荐(0)

va_list
摘要:void Log( const TCHAR *pszFormat, ... ){ TCHAR buf[1024] ; va_list arglist ; try { _tcscpy_s ( buf, 1023, _T("\... 阅读全文

posted @ 2014-02-11 16:43 偏爱省略号 阅读(407) 评论(0) 推荐(0)

Event log c++ sample.
摘要:1. Init regedit.bool InitLog( TCHAR *logName, TCHAR *sourceName, TCHAR *MessageDllName ) { // This number of categories for the event source. DWORD dwCategoryNum = 1; HKEY hk; DWORD dwData, dwDisp; TCHAR szBuf[MAX_PATH]; size_t cchSize = MAX_PATH; ... 阅读全文

posted @ 2014-02-11 15:55 偏爱省略号 阅读(730) 评论(0) 推荐(0)

Analyze Program Runtime Stack
摘要:Introduce:Process Explorer is an advanced process management utility that picks up where Task Manager leaves off. It will show you detailed information about a process including its icon, command-line, full image path, memory statistics, user account, security attributes, and more. When you zoom in 阅读全文

posted @ 2014-01-28 15:43 偏爱省略号 阅读(306) 评论(0) 推荐(0)

This application has request the Runtime to terminate it in an unusual way.
摘要:Q: CertsMV.exe gui popup two dialogs as follow.A:测试发现是分配内存导致,频繁分配内存(大约6M)可能是堆管理导致 分配大内存分配失败,程序未对 malloc 返回做检测导致后续的memset ,memcpy 脏数据,系统的异常处理抛出错误提示框(windows默认处理)错误提示堆栈 阅读全文

posted @ 2014-01-27 21:46 偏爱省略号 阅读(1198) 评论(0) 推荐(0)

How to check if Visual Studio 2005 SP1 is installed
摘要:How to check if Visual Studio 2005 SP1 is installedCheck the following registry key. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VS\Servicing\8.0 Check if the SP value is 1.Check your Visual Studio version from the Help > About menu is set to Version 8.0.50727.762 vs2005 sp1补丁微软网站. 下载地址1为:htt... 阅读全文

posted @ 2014-01-27 21:38 偏爱省略号 阅读(351) 评论(0) 推荐(0)

导航