Thursday, November 22, 2012

C++ Builder: [ILINK32 Error] Error: Unresolved external 'WinMain' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\7.0\LIB\C0W32.OBJ

Build 時出現以下錯誤訊息:
[ILINK32 Error] Error: Unresolved external 'WinMain' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\RAD STUDIO\7.0\LIB\C0W32.OBJ

解決方法:
 
如下圖,是 Console Application 的話,就別手殘把那個 Checkbox Uncheck!



Friday, November 16, 2012

VMWare 安裝 Mac OS X 10.7 開機當機?

安裝後或升級後重開機, 畫面停在起始灰色蘋果!!

再等等吧! VM 開機比較慢,也會做一些必要的調整,開機需要約10-30分鐘。

網路磁碟機無法連線

看這裏
http://social.technet.microsoft.com/Forums/en/w7itpronetworking/thread/1f22d98f-e150-4a54-9967-1641fa86dbc5

Wednesday, November 14, 2012

InstallAWare web updates 的一些設定

1. 軟體更新伺服器上的 .ini 和 .msi 檔名大小寫有分!(在 Google 協作平台)
2. ini 檔中的 [Update Packs for Versions] , Version 編號指的是舊版本在安裝時(.msi) 儲存的編號。
    版本編號必須一致,才能找到程式新版本。
3. ini 檔中的 URL 是下載新版程式的路徑。
所以,產生新版 .msi 時:
1. 修改 Product Version:Application Information > Project Properties > Product Version。
2. 修改 Update Packs for Versions:Web Updates > Versions

Saturday, November 10, 2012

Working with version information at C++ Builder

From: http://bcbjournal.org/articles/vol3/9901/Working_with_version_information.htm?PHPSESSID=eb3eea609943c3d1bb8294288b945696


January 1999

Working with version information

by John M. MianoIn order to understand the mechanics of our technique in the article, "A component for reading version information from a program file," you must be familiar with the way C++Builder works with component information. Let's quickly review version resources.

Creating version resources

In C++Builder, you set the version information for a program on the Version Info tab in the Project Options dialog box, as shown in Figure A. You must check the Include Version Information In Project check box in order to write the version resources to the executable file.Figure A: Enter version information page in the Project Options dialog box.

At the bottom of the Version Info tab, you'll find a list of version keywords to which you can assign values. C++Builder automatically creates a set of predefined keywords--you should use these keywords if possible, but you can add your own keywords to this list, if you have the need.

Reading version information

The GetFileVersionInfoSize Windows API function returns the number of bytes of version information stored in the image:
DWORD unusedparam ;
DWORD versionsize = GetFileVersionInfoSize (
Application->ExeName.c_str (),
&unusedparam) ;

You also use this function to determine whether your application actually contains version information. The only important parameter to this function is the name of the file. The GetFileVersionInfo API function copies the version resource information to a buffer so your program can access it:
if (versionsize != 0)
{
char *buffer = new char [versionsize] ;
bool status = GetFileVersionInfo (
Application>ExeName.c_str (),
unusedparam,
versionsize,
(void *) buffer) ;
}

Getting the language information

To extract individual items from the version information, you use the VerQueryValue API function. A unique string key identifies each version-information item. The format of this key string is
\StringFileInfo\LLLLCCCC\KeyName

where KeyName is the keyword defined in the Project Options dialog box and LLLL and CCCC are hexadecimal representations of the language and character-set identifiers used. The language and character-set identifiers may seem like extra information, because C++Builder allows you to enter version information for only one language. However, a program can contain version information in multiple languages and character sets. If you have access to a full-featured Windows resource editor, you can create multi-language resource information.The key value \VarFileInfo\Translation references a list of language translations contained in the version information. This fragment returns a pointer to an array containing information about each language contained in the version information:
UINT datasize ;
struct
{
unsigned short language ;
unsigned short character_set ;
} *translation ;
status = VerQueryValue(
buffer,
"\\VarFileInfo\\Translation",
(void **) &translation,
&datasize) ;
int translationcount
= datasize
/ sizeof (*translation)

The full key for the FileVersion keyword would be
String key
= "\\StringFileInfo\\"
+ String::IntToHex (translation
[0].language, 4)
+ String::IntToHex (translation
[0].character_set, 4)
+ "FileVersion" ;

The file version is returned like this:
char *version ;
UNIT versionsize
status = VerQueryValue(
buffer,
key.c_str (),
(void **) &translation,
&versionsize) ;


Wednesday, November 7, 2012

!! Two visitors !!

第一次看到這個筆記小格同時有二個訪客在線上(一個是我自己啦!),紀念一下。




Sunday, November 4, 2012

關於 OpenGL 的 Display List

1. 是 OpenGL 繪圖指令的集合。
2. 使用主記憶體,因為可記錄的指令數量與可用的記憶體數量有關。

比較:

glVertexPointerglInterleavedArrays

[Qt] 執行檔需要哪些 Dll?

 1. 使用 Qt  的 windeployqt.exe 工具 (在 C:\Qt\Qt5.14.1\5.14.1\msvc2017\bin\)。   a. 把執行檔 myProgram.exe 放在某個資料夾。   b. 在檔案總管這個資料夾按 Shift 和滑鼠右鍵,開啟 Po...