GXCreateObjectFromFile
CObject* GXCreateObjectFromFile(CFile& file, CRuntimeClass* pRuntimeClass);
CObject* GXCreateObjectFromFile(LPCTSTR lpszFileName, CRuntimeClass* pRuntimeClass);
file
Reference to a CFile-object which contains the data to be deserialized for the object. file can also be a CMemFile.
pRuntimeClass
Pointer to the runtime class information for the object to be instantiated.
lpszFileName
Points to a zero-terminated string with the file name.
Return Value
A pointer to the allocated object; NULL if an object of the given runtime class could not be found in the file.
Remarks
Instantiates an object of the given runtime class and loads its data from the given file object.
If the runtime class of object stored in the given file does not match pRuntimeClass, the method will not read the object and return NULL.
Example:
CGXGridParam* pParam = (CGXGridParam*) GXCreateObjectFromFile(
lpszFileName, RUNTIME_CLASS(CGXGridParam));