I can't do it for any actor in the game without my injected (C++) code crashing. I've tried several functions, but I've mostly been interested in ACD_GetItemname (0xB3FDB0) for items and GetScreenNameByRActorId (0xA77A20) or GetName (0x9E7980) for monsters/npcs/gizmos. I believe I have the right signature for these functions but they only work intermittently, if at all, and my code is too fragile to use. I haven't posted any of it here because it's worthless.
I know these name functions take a pointer and modify it to point to a text container whose structure I know, but I haven't found any safe way to handle the pointers after the call. What exactly should I pass for the pointer parameter, and how should I handle it and clean up after the call? Or should I be calling different functions entirely?