Turn into type TValue class type?
Using c + + Builder dcef3 development study, consult the online Delphi routine to write c + + Builder code
One step, the registered js callback class, allowing js to callback to the program
The function prototype dcef3 is
__classmethod void __fastcall Register (const System: : UnicodeString name, const System: : Rtti: : TValue & amp; Value);
The second parameter will not pass, TValue type,
Delphi function prototype is also TValue, I see his code is just a class name
With c + + written error
Void __fastcall TCustomRenderProcessHandler2: : OnWebKitInitialized (void)
{
TCefRTTIExtension: : Register (" JS_DELPHI, "TMyExtension);
}
[bcc32 Error] Unit2. CPP (224) : E2108 Improper use of typedef 'TMyExtension2'
[bcc32 Error] Unit2. CPP (224) : E2064 always initialize a 'const TValue & amp; 'with' undefined '
Full parser context
[bcc32 Error] Unit2. CPP (224) : E2342 Type mismatch in the parameter 'value' (wanted 'const TValue & amp; 'got' undefined)
With reference to the Delphi code
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
TMyExtension=class
Public
The class function _geta: string;
end;
Procedure TCustomRenderProcessHandler. OnWebKitInitialized;
The begin
TCefRTTIExtension. Register (' JS_DELPHI TMyExtension);
end;
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
With reference to the Delphi code is correct, compile run through