08 2011 档案
摘要:vs2010 rdlc .net4.0 卸载 Appdomain 时出错。 (异常来自 HRESULT:0x80131015) 解决办法 只要在窗口的关闭事件中,调用ReportViewer控件的LocalReport.Dispose()方法即可!
阅读全文
摘要:1) 不要在线程函数体内操作MFC控件,不要再线程里面调用UpdateData函数更新用户界面,而应该尽量采用发送消息的方式,在主线程的消息响应函数中操作控件;2)不建议采用SendMessage往主线程发送消息,因为它是同步的,阻塞的,可以考虑采用PostMessage代替;3)线程退出时,尽量不要使用TerminateThread函数,而尽可能的让线程自己退出;4) 当线程退出时,必须先等待工作者线程退出,主线程才退出,但是在主线程里面不要使用WaitForSingleObject或 WaitForMultiObjects等待线程结束,因为它可能造成死锁,当主线程使用这两个函数时,主线程就
阅读全文
摘要:#include<time.h>#defineBEGIN_COUNT(mark)__int64__begin_count##mark;\QueryPerformanceCounter((LARGE_INTEGER*)&__begin_count##mark);\#defineEND_COUNT(mark)__int64__end_count##mark;\QueryPerformanceCounter((LARGE_INTEGER*)&__end_count##mark);\__int64__Frequency##mark;\QueryPerformanceFreq
阅读全文
摘要:[DllImport("winmm.DLL", EntryPoint = "PlaySound", SetLastError = true, CharSet = CharSet.Unicode, ThrowOnUnmappableChar = true)] private static extern bool PlaySound(string szSound, System.IntPtr hMod, PlaySoundFlags flags); [System.Flags] public enum PlaySoundFlags : int { SND_S
阅读全文
摘要:#defineSINGLETON_CLASS_NO_DEF_CONSTRUCT_BODY(class_name)\private:\class_name();\class_name(constclass_name&);\class_name&operator=(constclass_name&);\public:\staticclass_name&Instance()\{\staticclass_nameone;\returnone;\}#defineSINGLETON_CLASS(class_name)\private:\class_name(){}\clas
阅读全文

浙公网安备 33010602011771号