Information about dmExtension

Hello, I am trying to create my own native extension. Where can I find API reference for dmExtension?
The problem is, I want to return something different than dmExtension::RESULT_OK from AppInitialize method if anything goes wrong when initializing objects from c++ library.

I found this in API reference

but dmExtension::EXTENSION_RESULT_OK or EXTENSION_RESULT_OK doesn’t work.

What is your actual error output?

/KanjiRecognizer/src/KanjiRecognizer.cpp
Line 56: cannot initialize return object of type ‘dmExtension::Result’ with an rvalue of type ‘ExtensionResult’
56 | return EXTENSION_RESULT_OK;
| ^~~~~~~~~~~~~~~~~~~

And what does your function look like? I.e. what do you return?

I just tried to replace

return dmExtension::RESULT_OK;

with what I found in API Reference

dmExtension::Result AppInitializeKanjiRecognizer(dmExtension::AppParams* params) 
{
    return  EXTENSION_RESULT_OK;
}

Notice that there is a separate C and C++ api:

The callback api expected ExtensionResult, as your error suggests.
So, you should use:

return EXTENSION_RESULT_OK;

The other example dmExtension::Result AppInitializeKanjiRecognizer(dmExtension::AppParams* params) may be the wrong type for the function you pass it to. E.g. see