Can I save some data in 3dm. file ? (C++/MFC/Rhino 5)

I would like to save data, such as create date, user name and some description, in the 3dm file.
Is it possible ?

Rhino already saves create date and user name to 3DM files. If you want to save a description, you can add Notes.

http://docs.mcneel.com/rhino/5/help/en-us/commands/notes.htm

Does this help?

I found reading notes , but no writing example with C++.
So, do you know any example about how to write notes ?

Reading example : http://wiki.mcneel.com/developer/onreadnotes

See if these help.

static ON_wString GetNotes(CRhinoDoc& doc)
{
  return doc.Properties().Notes().m_notes;
}

static void SetNotes(CRhinoDoc& doc, const wchar_t* str)
{
  ON_3dmNotes notes = doc.Properties().Notes();
  if (str && str[0])
    notes.m_notes = str;
  else
    notes.m_notes.Empty();
  doc.Properties().SetNotes(notes);
}

I had done it, but it didn’t work.
my code is below.

BOOL CSampleDockbarPlugIn::WriteDocument(CRhinoDoc& doc, ON_BinaryArchive& archive, const CRhinoFileWriteOptions& options)
{
ON_String str(L"NoteTest");
ON_3dmNotes notes = doc.Properties().Notes();
if (str && str[0])
notes.m_notes = str;
else
notes.m_notes.Empty();
doc.Properties().SetNotes(notes);
return true;
}
BOOL CSampleDockbarPlugIn::ReadDocument(CRhinoDoc& doc, ON_BinaryArchive& archive, const CRhinoFileReadOptions& options)
{
ON_String notes = doc.Properties().Notes().m_notes;
return true;
}

Do not override CSampleDockbarPlugIn::WriteDocument and CSampleDockbarPlugIn::ReadDocument for the purpose of writing and reading Notes. The only thing you should be doing in these overrides is writing and reading your own document data. Here is an example if you need one.

https://github.com/mcneel/Rhino5Samples_CPP/tree/master/SampleDocumentUserData