Just a precision, in my DLL I assumed that each entity had a name. My mistake Since Pegamode has pointed that it was not true using ent_create, we have corrected the DLL code.
But for general purpose, it might be interesting to set the entity name by script...