• 1.摘要
  • 2.基本信息
  • 3.参数
  • 4.返回值
  • 5.注释

hgeCreate函数

hgeCreate函数是创造HGE对象如果需要从HGE接口返回一个指针。函数原型HGE *hgeCreate(int ver)。

基本信息

  • 中文名

    hgeCreate函数

  • 原型

    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 callRelease.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”,但是却不会大范围的影响整个工程。