====== format_GetFormatByExt ====== ===== Description ===== Retrieve a handle to a format, specified by its file extension, for a particular map type or map name. ===== Function prototype ===== ZFORMAT CExtAPI::format_GetFormatByExt(const char* lpMapName, long MapTypeID, const char* lpFileExt); ===== Arguments ===== ^ Name ^ Type ^ Comment ^ | lpMapName | const char* | A handle to a C-style string containing the name of the map for which a format will be retrieved (may be null). See [[zeolite:functions:project_GetMap]] for list of valid names. | | MapTypeID | long | The map type ID for which the format will be retrieved (may be zero). [[zeolite:mapID|See here]] for a list of valid values. | | lpFileExt | const char* | A handle to a C-style string containing the file extension of the format to be retrieved. | ===== Return value ===== A null pointer if an error occurred, and a valid non-null handle to a ZFORMAT variable otherwise. ===== Comments ===== ==== lpMapName and MapTypeID ==== It is not necessary to specify both //lpMapName// and //MapTypeID// arguments. Zeolite will search for the specified format first by the map name (if //lpMapName// is valid), and then by map type (if //MapTypeID// is valid). You should use //lpMapName// if you are loading or saving one of the maps in the project. If you are loading/saving a generic map (e.g. a heightfield overlay), then you should use //MapTypeID//.