I have searched around, and the answers I have found do not work for me.
Using ACAD 2004 VBA, I have attached XData to some entities, with the application name like this:
Dim DataType as Integer
Dim Data as Variant
DataType(0) = 1001
Data(0) = "MyApplication"
.
.
...