Share

AcDbDwgFiler::readString

C++

virtual Acad::ErrorStatus readString(
    ACHAR** pVal
) = 0;

Description

This interface, when implemented, checks filer status. If the status is OK, it allocates memory to hold the string, sets pVal to point to the newly allocated memory, reads the data into the newly allocated memory, and returns the filer status.

Note: callers of this method should not have pVal set to any allocated memory. The method's implementation will allocate the necessary memory.

The implementation of this function should follow that of the ObjectARX internal filers. It should:

  • check the current filer status. If it is Acad::eOk, then continue, or else return the current status.
  • allocate memory (using acdbAlloc) for the string to be copied into.
  • copy the string into the memory just allocated.
  • set the char pointer pointed to by pVal to point to the string copy.
  • return an Acad::ErrorStatus value indicating the success or failure of the operation (use Acad::eOk to indicate success).
  • If *pVal is not NULL, the memory will be freed by calling delString(*pVal).

Note When using the ObjectARX internal filers (that is, not a custom filer), this method does not do anything about platform-dependent byte order.

Parameters

Parameters Description
unnamed Address of a pointer that will be set to point to the string

Links

AcDbDwgFiler

Was this information helpful?