Recent Comments

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

2008年3月10日 星期一

DWORD和dword到底有什麼不同?

DWORD:32bit的 unsigned long

這適合各種作業系統喔

我們開啟「登錄編輯器」或「登錄編輯程式」之後,若我們想增加一個DWORD值,我們可以在右側視窗按下滑鼠右鍵,選"新增"-->"DWORD值",再依自己需要新增DWORD值,這樣新增DWORD值的工作就算是結束了。

可是我們要自己寫一個DWORD值的登錄檔,我們卻必須這樣寫
"新增之DWORD值"=dword:00000001

"新增之DWORD值"=dword:1

但是,我們卻「不可以」這樣寫
"新增之DWORD值"=DWORD:00000001

"新增之DWORD值"=DWORD:1

這是因為Windows Registry只認識dword,卻不認識DWORD的緣故。
所以您若寫一個登錄檔如下
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoRun"=DWORD:00000000
然後儲存檔案時以reg為副檔名,執行並增加登錄的話。外表看起來,「好像」是已經增加登錄了,可是實際上因為Windows Registry不認識DWORD,所以您的「增加登錄」動作還是「失敗」囉。

請注意:
寫一個dword值的登錄檔時,必須全部用小寫的dword,若其中一個英文字母不是小寫的話,您是無法順利「增加登錄」的。

希望這篇文章能夠讓您進一步認識Windows登錄檔喔。

2008年3月5日 星期三

BCB include 後加不加.h

把.h從header files 拿掉的不是 ANSI C, 而是 ANSI C++。ANSI C++引進 name space 的機制,將所有的全域宣告都放在 std 這個 name space 下;為了要向下相容 C 及非標準 C++ 的程式碼,所以保留了帶有 .h 的 header files。

====@一@=======================
#include
using namespace std;

std::vector test;

====@二@=======================
#include

vector test;