旧一篇: Mac OS X Programming读书笔记1 - 系统架构 Refer Mac OS architecture 新一篇: Mac OS X Programming读书笔记2 - HelloWorld How to write Hello world 新一篇: Mac OS X Programming读书笔记3 - 事件处理 Mac OS X - 維基百科,自由的百科全書 Wiki Learn C with...
由 Evan 發表於
02:13 PM
|
迴響 (0)
最近在做結婚光碟的時候,發現製作光碟的UVS(Ulead Video Studio) 一直無法正常的執行。由於我自己就是做這行的,於是直接下去看整個crash call stack。發現CRASH 在一開始~~~整個在initialized filter 的時候死在 (Quicktime.qts)。 經過許多文章裡面的尋找 YouTube - Re: Quicktime.qts error in Macromedia Projector QuickTime 7 這幾篇的文章都提到~ 要先將Quicktime.qts 移除,我就直接把 C:\Windows\System32\Quicktime.qts 移除 結果發現無法改善~~~~ 並且我無法順利的移除Quicktime(Uninstall Quicktime) 後來我發現~~ 因為我有裝一套Storm player 而這次有問題的Quicktime.qts 是在 那個目錄裡面的~~~~~...
由 Evan 發表於
10:48 PM
|
迴響 (0)
This is a simple console problem to display all file version and time for current folder. The full code as follow:...
由 Evan 發表於
02:08 PM
|
迴響 (0)
Perl2EXE is a very useful program when you try to translate your PERL code to a execute file without PERL environment. There should be noted if you happen the same problem. Active PERL need install: Although we try to...
由 Evan 發表於
02:32 PM
|
迴響 (0)
(Application Picker dialog from XP) Application Picker is a dialog which will show-up when you insert DVD title or new medium in your computer. It show all playable application and let you to choose one from the list. One day,...
由 Evan 發表於
08:45 PM
|
迴響 (0)
Use VC8 (Visual Studio 2005) to create project is more easy than VC6(VC98), but however we may not CoInitialize ATL service as well. It always happen failed since you use your API to CoInitialize this service. But it iswork...
由 Evan 發表於
01:51 PM
|
迴響 (0)
SYMPTOMSWhen you try to register or unregister a COM server, it will pop failed in 0x80029C4A (TYPE_E_CANTLOADLIBRARY).CAUSEThis is cuase by no TLB or missing TLB of this COM DLL. RESOLUTIONIf your COM DLL is builded using /notlb. remember use CComModule::RgisterServer(FALSE); CComModule::DllUnregisterServer(FALSE);otherwise,...
由 Evan 發表於
12:08 PM
|
迴響 (0)
|
引用
(圖片來源: 悅仕網路書店)書 名:DirectShow開發指南I S B N :7-302-07650-2出 版 社 :北京科海電子出版社裝 訂:16開 平裝 黑白隨書光碟:0CD書本頁數:368 頁 推薦原因: 對於整個DirectShow 有完整的說明,原作者陸齊明為微軟的MVP,對於整個DirectX有完整的了解,對於要處理影像問題的人這本是一本不可或缺的基本書籍。(圖片來源: 悅仕網路書店)書 名:DirectShow實務精選I S B N :7-03-013654-3出 版 社 :北京科海電子出版社裝 訂:16開 平裝 黑白隨書光碟:1書本頁數:471 頁 推薦原因: 同為微軟MVP陸齊明的作品,這本書偏向於實務,舉凡DVD播放、Filter的製作都有相當好的範例~裡面的範例光碟可以讓你有快速的應用與了解。(圖片來源: 悅仕網路書店)書 名:Windows Media編程導向I S B N :7-302-10944-3出 版 社 :北京科海電子出版社裝 訂:16開 平裝 黑白隨書光碟:1CD書本頁數:309 頁...
由 Evan 發表於
01:21 AM
|
迴響 (0)
|
引用
From XP-SP2. the firewall setting default will block all app connection except user approval. So, you can approve every app you want to execute and let it work correctly under XP-SP2 (also in Vista). But if your appllication is...
由 Evan 發表於
06:06 PM
|
迴響 (0)
|
引用
fstream.h 和iostream.h在VC8已經不存在 (參考VinceYuan Blog升级VC7项目到VC8的注意事项) #include <fstream>using namespace std;Depenency problem: 如果要引用某些其他project header file 在VC6中必須要設定dependency,在VC8中則沒有這樣的限制其他詳細的步驟可以參考VinceYuan Blog升级VC7项目到VC8的注意事项...
由 Evan 發表於
07:21 PM
|
迴響 (0)
|
引用
To search a attribute via XPATH. you can use Element[@Attr] to address it in XPATH.So~~ to search some specific search as follow:1. product@cost which is > 5000, you can write as follow.product[@cost > '5000']2. product@name contains "yellow" (case-insensitivity).contains(translate(product[@name], 'ABC...Z', 'abc....z'),...
由 Evan 發表於
05:13 PM
|
迴響 (0)
|
引用
I think XML is a very simple storage medium that you can save and query in it. But all data is storage as a tree node in the XML. In this case, it can very simple to save hierarchy...
由 Evan 發表於
12:05 PM
|
迴響 (0)
Except to set the dependency of services in SCM(Service Control Manager). You have another way to make sure some services can run before your application (serivce).Use StartService to start a Window ServicePlease note as follow:If the service already start, it...
由 Evan 發表於
11:08 AM
|
迴響 (0)
|
引用
(Picturefrom Amazon)Sometime you just write code without fully understanding the meaning. Like design pattern, maybe you already know part of them even use them very well. "Head First Design Patterns" is a good book, it use a story to let...
由 Evan 發表於
05:12 PM
|
迴響 (0)
|
引用
I have summerized some note about the string comparison via XSLT and XPATH.Find specific string with "=":Find specific Item with text "testITEM".<xsl:apply-templates select="//*[Item[text() = 'testITEM']]"></xsl:apply-templates>Find specific string with "contains":Find specific Item which contain "testITEM".<xsl:apply-templates select="//*[contains(Item,'testITEM']"></xsl:apply-templates>Find specific string case-insensitivity "=":Find specific Item with text...
由 Evan 發表於
07:15 PM
|
迴響 (0)
We usually doesn't care about the startup odering of Window Services. But there is a situation about this.You usually don't care what you don't understand.Total Service: ServiceA and ServiceB.In ServiceA we will retrieval some information via ServiceB. If ServiceB doesn't start before ServiceA this future...
由 Evan 發表於
05:38 PM
|
迴響 (0)
|
引用
FilExt of TLB.(TYPE Library) OLE Type Library .TLB:OLE庫文件,其中存放了OLE自動化對象的數據類型、模組和接口定義,自動化伺服器透過TLB文件就能了解自動化對象的使用方法。此檔案可供其他語言來了解COM的內部架構與Interface.可以用VC6 的OLE Viewer(OLEView.exe)去察看~~...
由 Evan 發表於
05:18 PM
|
迴響 (0)
|
引用
在軟體開發的過程中,對於一些需要的儲存資料,往往一般工程師都會使用INI檔來做為存取的要求。但是隨著資料量的增大、對於資料搜尋程度的渴望與日俱增。所以現在的許多APP開發上都會使用到XML來作為儲存資料與處理資料的中介。但是隨著XML發展來的XPATH、XSLT、XQUERY種種多的語法來說,也是會讓人一下子無法找到任何的頭緒。今天在看MSDN的雜誌的時候看到有關於Neetu Rajpal寫到關於An Introduction to the XML Tools in Visual Studio 2005,就直接拿手邊的VS2005來測試一下,果然相當的好用,對於XML的編輯上、使用XSLT來做搜尋的時候,更可以加上偵錯與逐步執行的功能,真是相當的人性化呢~~~~(VS2005 裡面編輯XML,XSLT的畫面)當然有許多家的業者也有許多相當好的XML編輯軟體可以使用,ALTOVA所研發的XMLSPY,如果只用到XMLSPY功能也就相當齊全,不過倒是用不太習慣就對了,不過慢慢適應總是會有所成長才對~~~( ALTOVA的XMLSPY)...
由 Evan 發表於
08:05 PM
|
迴響 (0)
|
引用
There are something we should keep in mind when we tried to write a Windows Service. The most important is the "Registry Key".In Windows programming, we usually use registry key to setting some value for difference user. Regstry key control...
由 Evan 發表於
03:03 PM
|
迴響 (2)
|
引用
A simple note from "Write Pure Windows Service" and "How to debug Windows Service".Write "Windows Service"Windows Service is kind of application but it will start when system startup. Windows service will triggerd by "SMC"(System Managed Controller). There is some...
由 Evan 發表於
06:14 PM
|
迴響 (0)
|
引用
Remove DirectX SDKBecause VS2005 doesn't need DirectX SDK, so ~~~ if you use some library from DirectX. Please use #if (defined(_MSC_VER) && (_MSC_VER > 1310)) //For VS2005 Compiler///.....#endifWhich the version of compiler VS2003 is 1310, and VS2005 is 1400. Resolve...
由 Evan 發表於
02:53 PM
|
迴響 (0)
|
引用
Dr.Watson是一個相當方便的偵錯工具,當你的系統出現向以下一樣的錯誤訊息。即使你沒有安裝VC,你也可以透過Dr.Watson幫你把錯誤的log去記錄下來。這一篇文章,主要就是簡單的介紹如何的使用Dr.Watson,並且也交你如何更改系統的設定去啟動你的Dr.Watson、或是當你不想使用它的時候,也可以透過修改Registry Table去將他由系統初始設定裏面移除掉。啟動Dr.Watson:Dr.Watson並不是什麼新的軟體,而是從古早時代就已經存在在各位的電腦之中,至於怎麼啟動就是在[執行]下面去按[drwstn32]即可。設定Dr.Watson:在這個設定畫面,你可以設定將error.log 放置的地點,也記得要把[傾印記號表]標記起來,才能正確的記錄下錯誤資訊。 設定Dr.Watson為預設的Just-In-Time debugger:要將Dr.Watson設定的話(注意~~ 再這裡最好先備份你的registry table),才能避免你原來所設定VC debugger 的設定會消失。找尋問題的版本增加Debug Information: 開始找尋問題之前,記得~~~將你的release版本的軟體加上debug information,這樣才能讓你的Dr.Watson將正確的資訊傾印下來。 將Dr.Watson由預設移除:主要是將RegistryTable修改為原來的資料,請將以下文字另存新檔為Dr.Reg,然後點兩下後安裝~~~ Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]"Debugger"="\"C:\\WINDOWS\\system32\\vsjitdebugger.exe\" -p %ld -e %ld"...
由 Evan 發表於
02:44 PM
|
迴響 (3)
BSTR bstrMyBeaster = SysAllocString (L"Tring, Tring!");WCHAR* pwszMyWCharString = L"Tring, Tring!";USES_CONVERSION;LPSTR pszCharStringFromBSTR = OLE2A (bstrMyBeaster);LPSTR pszCharStringFromLPWSTR = W2A (pwszMyWCharString);// ...SysFreeString (bstrMyBeaster);I think "USES_CONVERSION;" is very convenient and easy to convert between CComBSTR and Char. But this article also tell us it...
由 Evan 發表於
08:11 PM
|
迴響 (1)
|
引用
說起CodeProject,大概學習VC++與.NET的人都不會不知道的一個好網站。裡面有個蠻好用的專案CTreeProperty算是相當好使用的專案之ㄧ,可以簡單秀出如下圖一樣的Dialog.(PIC: CTreePropSheet - A Netscape/Visual Studio .NET like Preferences Dialog)讓我困擾許久的是~~如何搞出Minimize Button 呢?後來找到答案了BOOL CTreePropSheet::OnInitDialog(){......::SetWindowLong( m_hWnd, GWL_STYLE, GetStyle() | WS_MINIMIZEBOX );GetSystemMenu( FALSE )->InsertMenu( -1, MF_BYPOSITION | MF_STRING, SC_ICON, "Minimize" );DrawMenuBar();} 感謝need_help 提供...
由 Evan 發表於
01:45 AM
|
迴響 (0)
|
引用
Except Window XP PowerToy, engineer should have some toy like "VS Core Community Powertoys " to development your program. I don't have time to tried them all, but I would like to introduce this stuff to all of you. :)...
由 Evan 發表於
09:52 PM
|
迴響 (0)
|
引用
GDS(Google Destop Search)是GOOGLE所推出的桌面搜尋軟體,可以將自己電腦中所有的"資訊",都可以加以搜尋~~~相信這個軟體推出的時候,引起各家相關搜尋軟體的大拼鬥,當然~~~ 透過一段時間之後,GDS不僅僅獲得搜尋最快的排名,也有最多的應用程式(Add-in)可以輔助來使用~~~當我在查看相關的應用程式(Add-in) ,這時候我忽然發現其實GDS有開發相關的原始碼(source code)(Google SDK)可以參考使用(有SDK與範例程式),並且可以使用Visual Studio .NET , Java , Perl , Python 等等任何使用COM與XML的語言。那~~ 至於幫忙寫(Add-in) 有啥好處呢?Receive a free, limited-edition Google Desktop Developer T-shirt 不錯吧~~~~ 可以拿到一件 GDS T-Shirt ㄟ~~~~~ 真不賴~~~...
由 Evan 發表於
11:03 PM
|
迴響 (0)
|
引用
Richard SimonSams, Paperback, Published April 2002, 413 pages, ISBN 0672323230(Review on BookPool)這本書雖然是比較早出來的書籍,並且距離現在的時間也有點久遠,但是對於想要快速了解Visual Studio .NET Framework的人,可以由快速的操作介面、一連串的範例程式來下手,都可以快速的了解.NET Framework的基礎架構。但是由於本書就是希望能夠帶給你一個快速的Overview,並也可以透過此書快速的了解Visual Studio .NET 的整體操作介面與Visual Studio 6 的差別。不過話說回來,這種要介紹IDE的書籍,如果看到舊一點書還真是給它傷腦筋。比如說Managed Code好了,起初在Visual Studio .NET 裡面,有專門給予 managed code 的project wizard;不過就我手上所使用的Visual Studio 2003 企業版中所有的Project Wizard裡面並沒有這樣的選項,不過還是可以透過 Windows Application C++ (console )來撰寫與managed...
由 Evan 發表於
05:41 PM
|
迴響 (0)
Designing .NET Class Libraries is very good place that I am used to go here and study something anout .NET Framework. I also like Brad Abrams very much, because hi usually use very simple example to explain such hard thing like...
由 Evan 發表於
09:54 PM
|
迴響 (0)
|
引用
最近在做VC6轉換VC7的時候,倒是慢慢發現VC6的一些bug,舉例來說,看一下下面的範例程式: if (int i) { i = 1; }在VC6只會得到一個warnning:warning C4700: local variable 'i' used without having been initialized但是由於Constructor 通常不會有回傳值(return value),所以基本上在if() 不應該有變數的起始。所以這樣的code在GNU C++會發現是無法compiler過的~~~當然VC7 修掉了這個嚴重的bug,你可以看到出現:error C2059: syntax error : ')'蠻有趣的bug,不過~~~ 若有人這樣寫code 可就慘了,因為雖然constructor沒有回傳值(return value),但是在VC6中, if (int i)卻是判斷為true~~~ 這樣~~可能是與原來的想法會有點出入~~~所以有時候利用VC7來compiler一下現在的code,也是一個好主意。...
由 Evan 發表於
06:27 PM
|
迴響 (0)
|
引用
由於工作上的關係,最近有許多機會可以接觸到.NET Framework的相關開發工具與書籍,再此先介紹一本可以了解.NET Framework概觀的書籍(Applied Microsoft .NET Framework Programming)。搜尋網路上的一些相關資料,MSDN也提供了一些Visual Studio.NET Framework開發上的工具,當然如果對於反組譯有興趣可以查看反組譯的文章,也可以查看ILDASM is Your New Best Friend 或是Ildasm.exe 教學課程遠端偵錯方面,檔案在 C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\Debugger下可以找到,但是遠端連線軟體,mcvcmon 似乎一定要 mcvcmon.exe -anyuse -tcpip 才能正確執行,詳細可以查看使用遠端偵錯監視器進行遠端偵錯。...
由 Evan 發表於
05:25 PM
|
迴響 (0)
|
引用
"Managed code" is one of the most important progresses between .Net Framework and VC++. Althouth you can know about how efficiency and how productivity the "managed code" is. but how to proof the efficiency and productivity?How efficiency? In this link,...
由 Evan 發表於
02:00 AM
|
迴響 (0)
|
引用
學習新的語言,一直是身為軟體工程師不可躲避的宿命與責任。而微軟的C#,更是身為視窗系統研發的我們,必須學習的一個新技術。最近除了學習將VisualStudio的Porting之外,C#應該是讓我們進入.Net Framework 最快路徑。這裡提供幾個鏈結關於C#:C# Station: Introduction to the C# TutorialA Quick view from C/C++ to C#Patrick也在這篇文章中提到Applied Microsoft .Net framework programming這本書,也是一本利用C#來了解.Net Framework ,是本不可缺少的好書~~...
由 Evan 發表於
09:03 PM
|
迴響 (0)
|
引用
Patrick's Article is talking about bug reporting best proctice. Somehow in the such big project like Visual Studio .NET IDE. They usually MedDog to do testing case management. A good and sysmantic testing case can find bug more easier.There are...
由 Evan 發表於
11:16 AM
|
迴響 (0)
|
引用
Naming is alway difficult thing for me. But when look the speech which Brad Abrams talking about naming convension, I think he provide more detail situation what we have to do when we need naming our variables. Some interesting about...
由 Evan 發表於
03:37 PM
|
迴響 (0)
|
引用
[圖片來自]如果有人依據How to Implement Drag and Drop Between Your Program and Explorer的文章自己將他的Class加入自己程式之中,或許會發現無法順利將CMyDropTarget 順利的在自己程式中Register,尋找一些書籍之後,我在MFC (Programming Windows with MFC, 2/e)中Putting It All Together: The Widget Application尋找出解決的方式那是因為程式沒有對於OLE做起始化的設定,請在自己程式引用#include <afxole.h> 並且在::InitInstance()加入 if (!AfxOleInit ()) { AfxMessageBox (_T ("AfxOleInit failed, you may not use drag and drop")); return FALSE; }就可以了~~~~...
由 Evan 發表於
09:59 PM
|
迴響 (0)
|
引用
[圖片來自:]最近開始研習一些關於WIN GUI上面的一些操作與視覺部分的修改,順便也開始研究去修改一些WINDOW上面的基本操作,當然DND(DRAG AND DROP)是一定會去觸碰到的一部份。在WINDOW上面對於DRAG AND DROP的操作上,主要可以透過兩種方式去處理,分別是透過WM_DROPFILES跟使用OLE的DRAG AND DROP。這兩種主要差別在於,使用WM_DROPFILES的方式僅能處理外部拖曳見來的檔案,並且是在拖曳之後的動作。而使用OLE的DRAG AND DROP的方式,可以去客製化整個流程包括OnDragOver、OnDragLeave、OnDragEnter等等的Event。在此我就不詳細介紹這兩種的原理~因為我所提供的網頁裡面都有詳細的說明,不然、也可以參考MSDN裡面的"drag and drop, about OLE drag and drop"參考網址:http://www.thecodeproject.com/listctrl/filedroplistctrl.asp?df=100&forumid=306&exp=0&select=68072http://www.codeproject.com/shell/explorerdragdrop.asp?select=502828&df=100&forumid=1699&exp=0(簡單講解 WM_DROPFILES)http://www.codeguru.com/Cpp/Cpp/cpp_mfc/dragdrop/article.php/c4059/http://www.funducode.com/freevc/controls/controls8/controls8.htm...
由 Evan 發表於
01:27 PM
|
迴響 (0)
|
引用
DirectX 9.1 or newer (must include "dxerr9.lib")http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/intro/program/debugging/dxgeterrordescription9.aspDirectX 8.1 (must include "dxerr8.lib")http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx81_c/directx_cpp/Intro/ProgramCPP/Debugging/dxgeterrordescription8.aspyou also can use AMGetErrorText (Quartz.lib).http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/htm/amgeterrortext.asp...
由 Evan 發表於
04:06 PM
|
迴響 (0)
利用呼叫DLL的方式來建置程式, 是一個很方便的事情. 但是有許多東西需要注意才對!!對於DLL呼叫時, 由於會使用到許多COM本身的共同參數,對於共通參數的使用時, 容易產生無法抓取參數的情形(尤其是 Resource檔內的資料), 可以使用AFX_MANAGE_STATE(AfxGetStaticModuleState()); 在每段程式的前段, 可以讓VC自己產生一個靜態的ModuleSate而不會有抓取不到資源檔的問題.再呼叫DLL裡面的參數也要注意, 若是在所謂的Synchronization Call 中需要呼叫DLL, 會產生直接跳過, 而無任何動作的情況, 參考PRB: Synch OLE Call Fails in Inter-Process/Thread SendMessage 對於這種情況, 解決方式, 可使用自傳訊息的方式來解決.最近小小心得......
由 Evan 發表於
10:56 PM
|
迴響 (0)
|
引用
ListCtrl在MFC之中算是很好使用的工具,可以很輕鬆的利用一個List來做顯示、新增、刪除一些資訊。最近有一些使用上的心得,可以跟大家分享:延伸設定:List.SetExtendedStyle(List.GetExtendedStyle() | LVS_EX_HEADERDRAGDROP | LVS_EX_ONECLICKACTIVATE);可以設定一些延伸功能,其餘可看MSDN。自動對應到選擇的欄位:List.EnsureVisible(nItem,FALSE);若是你的List 時常需要Refresh 但是又怕被Scroll跑掉,可以使用這個,確保你select到的欄位可以被看到。...
由 Evan 發表於
06:18 AM
|
迴響 (0)
|
引用
逛CodeGURU的時候看到的,可以參考說明網頁Add GIF-Animation to your MFC and ATL Projects ,該測試碼提供兩種方式(資源檔讀入、檔名讀入),很好用的物件。此外CodeGURU裡面有許多好的程式,大家可以參考一下......
由 Evan 發表於
01:30 PM
|
迴響 (0)
前幾天去誠品,逛呀逛著,開始看一本關於遊戲設計概念的書『大師談遊戲架構與設計理論 (Game Architecture and Design)』。這本書其實真不賴,不僅有遊戲計概念的書,並且有教導專案管理、程式碼的撰寫風格等等。這些部分其實在市面上的書是很少看的到的。不過在裡面看到一個程式命名的技巧匈牙利命名法(Hungarian Notation)回頭看自己寫的程式,還真的沒有這樣的命名習慣,難怪自己有時候要找變數的型態,還是得花上一點時間。在這裡找出一些我找到的相關資料,大家可以看看。...
由 Evan 發表於
08:25 PM
|
迴響 (2)
|
引用
前言:這些資料的產生是由於我在做DEBUG的時候,往往無法在VC下無法在某些函示中設定BreakPoint,令我相當困擾。所以去詢問老闆的結果,才讓我知道關於Side-By-Side的概念,於是想說將現在所瞭解到的概念加以整理一下,希望以後用到會清楚一點,也希望能幫助到一些有需要的人。大綱:這份文件主要稍微介紹到在WIN XP下呼叫COM物件的基本流程與Side-By-Side的概念。...
由 Evan 發表於
12:02 PM
|
迴響 (0)
|
引用
前言:這篇文章主要是利用VC教導修改Registry中[HKEY_CLASSES_ROOT]中的新增一個檔案類型,也就是當你在檔案管理員中按下[工具]-->[資料夾選項]->[檔案類型]。在這裡會有相當多的檔案類型會出現,並且會有個別的ICON(圖示)也就是我們在檔案管理員下會看到的特別圖示(比如說:ZIP是一個壓縮檔的圖案)。而現在就是告訴各位,如何利用VC撰寫一個可以新增一個檔案類型,並且指定好開檔類型與檔名顯示的方法。...
由 Evan 發表於
10:42 PM
|
迴響 (1)
|
引用