[C#][MAX] Class_ID to use with AppDataChunk

Hello,
What is the Class_ID I need to use when I call SetAppDataChunk and GetAppDataChunk methods on Object ?

I tried this but it fails:

Ip.RootNode.ObjectRef.AddAppDataChunk(Global.Class_ID.Create(0x6c0c074a,0x3cd1585f), SClass_ID.Utility, 0, new byte[] { 0, 0 });

I used the gencid.exe program to generate random Class_ID, which is usually used inside the Class Descriptor to identify your plugin, but mine is derived from CuiDockableContentAdapter.

Thank you.

The only thing that comes to mind is I recall some class ID’s being stored in the Autodesk.Max.BuiltInClassIDA and Autodesk.Max.BuiltInClassIDB enums.

I’m pretty sure it holds the class ID’s for basic object types. I’m not sure what ID you require for this method though. There’s probably a good chance it’s not in those enums.

Finally, I think my mistake in my code is not the Class_ID, but the data sent (new byte[] {0, 0}). In the Max documentation, I read I need to allocate memory for the data before using AppDataChunk. The problem is I need to use the Max_malloc method to do this, but I can’t find any way to access it in C# SDK…

Even in Visual Studio, Max_Malloc is not present in the documentation…

http://i.imgur.com/7S3t2Wd.png

EDIT :

My workaround about AppDataChunk is to use UserProp instead on the RootNode of the scene.
This works really well when you are able to serialize/deserialize your data and then use SetUserPropString method on the node.
I am currently using NewtonSoft.Json to serialize my objects, that works fine even with complex data.