hgeCreate函式

hgeCreate函式是創造HGE對象如果需要從HGE接口返回一個指針。函式原型HGE *hgeCreate(int ver)。

參數,返回值,注釋,

參數

ver
HGE API version number. Just pass the HGE_VERSION constant here.
HGE應用程式接口版本號。在這裡必須傳遞正確的常數HGE_VERSION

返回值

If the loaded HGE.DLL contains compatible API, hgeCreate returns a pointer to the HGE interface. Otherwise it returns 0.
如果讀取HGE.DLL包含可兼容的應用程式接口,hgeCreate便會從HGE接口返回一個指針。另外的它將返回0。

注釋

hgeCreate is a global C function. It is located outside of any classes and is imported from the HGE DLL.
HgeCreate是一個全局性的C函式。它定位在任何類的外面輸入來自HGE DLL的信息。
To access HGE functions you need the HGE interface pointer that is returned by hgeCreate function. hgeCreate creates a HGE object if needed and increases the internal reference counter. To free obtained interface you must call the Release function.
想要存取HGE函式你需要用hgeCreate函式從HGE接口返回一個指針。hgeCreate想要創建一個HGE項目必須知道內部的參數並且需要不斷擴充這些參數的數量。想要釋放獲得的接口信息你必須使用Release函式。
You may call hgeCreate every time you need access to HGE, then call Release.Or you may get the interface just once during startup and store it in a global variable, then release during cleanup.Although the latter is supposed to be 'bad style', this works fine with not very big projects.
你可以使用hgeCreate在任何你需要存取HGE的時候,然後再使用Release函式。或者你可以在啟動和存儲global變數的時候一次性的獲得接口信息,然後在清除的時候釋放信息。儘管後者是不被許可的“bad style”,但是卻不會大範圍的影響整個工程。

相關詞條

熱門詞條

聯絡我們