How to implement SetFileSaveFunction callback function?

I develop add-on for MicroStation using CONNECT Edition application with C++.

Using Microstation10.15 update SDK

I would like to get Save  event when save triggered.

extern "C" DLLEXPORT void MdlMain(int argc, WCharCP argv[])
{
         SystemCallback::SetFileSaveFunction(OnFileSave);
           return;
}

void OnFileSave(DgnPlatform::ProcessChangesWhen when, DgnPlatform::DgnFileChanges changesFlag, DgnPlatform::DgnSaveReason reason, double timestamp, DgnFileP pFile)
{
           WString Filename = pFile->GetFileName();
           if (reason == DgnPlatform::DgnSaveReason::UserInitiated)
           {

                /// do operations
            }

}

OnFileSave  function is never called.

How can I make this callback functionality working?

Parents Reply Children
No Data