Here is a common mistake programmers can do when using that API:
I am trying to use acedConvertEntityToHatch to create a hatch directly from some lines. Is there additional documentation describing how to use this function?
This function is for converting old hatches (R13) that were anonymous block (*U and *X) references. The block reference must be database resident and have "ACAD" Xdata containing the old "HATCH" Xdata. A return value of eNotThatKindOfClass usually indicates a problem processing the Xdata.
Refer to the documentation in the ObjectARX Reference for acedConvertEntityToHatch:
pHatch must be a newly created, and open for write but not added to the database yet. pEnt must be an AcDbBlockReference or AcDbSolid, otherwise you should get the "eIIllegalEntityType" error status.