Saving in OCAF

HELP!!
I still can not save an OCAF document.(See previous posting). All I get an empty file (0 Bytes).Under debug I get the following message:-First-chance exception in Leonardo.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
The dlls such as TKStdSchema.dll don't load.
If I put a breakpoint in ResourcesName() in OcafSample and run, the program stops at the breakpoint. Do the same in my code, my app does not. ResourcesName() in my app does not look like it is being called.
I have compared my code with that in OcafSample and can see no differance apart from class names.

Regards
Steve Howgill

Serge's picture

Hi Steve,

Try to set the breakpoint at CDM_Document
method FindStoragePlugin(). I believe that it returns
false. There is a call LoadResources() - try to debug
this method.

Regards,

SteveH's picture

Serge

Thanks for your help. I am trying your suggestion now.
It looks like the resources are not loading even if I call LoadResources() directly.
i.e. myOcafDoc -> LoadResources();
I still don't know what is going wrong, but at least I have somewhere to start looking.

Regards

Steve Howgill

Filippo Bottega's picture

I have the same problem!
Have you found a solution?

Regards,

Filippo Bottega.

Filippo Bottega's picture

Solved: wrong format name in aApp->New(aFormat, aDoc)

aFormat <> aDoc.Formats

Sorry, very trivial error.

SteveH's picture

Serge,
Save problem solved.
How stupid of me!
I forgot to place a putenv(somestring) call after one of my calls to SetEnvironmentVariable. It only took me 3 days to find it.......................

Many many thanks for your help.

Regards

Steve Howgill