2017-06-13 1 views
0

Ich habe eine Frage über die Einbettung v8 in dll, bitte helfen Sie mir, vielen Dank.Wie v8-Engine in dll (C++ Projekt) einbetten

Ich habe ein odbgscript.dll Plugin-Projekt von vs2013 für ollydbg2.01, diese DLL Aufruf v8 (Version v8-5.6.331), um Javascript-Anweisungen auszuführen. ollydbg.exe Aufruf odbgscript.dll. Mein Aufruf v8 Codes in odbgscript.dll, wie folgend:

#include "v8.h" 
using namespace v8 

    V8::InitializeICU();     
    V8::Initialize();  

    Isolate::CreateParams create_params;   
    Isolate* isolate = Isolate::New(create_params);  
    Isolate::Scope isolate_scope(isolate); 

    HandleScope handle_scope(isolate);  
    Local<Context> context = Context::New(isolate);  
    Context::Scope context_scope(context); 

    Local<String> source = String::NewFromUtf8(isolate, "'hello'+'world'"); 
    Local<Script> script = Script::Compile(source); 
    Local<Value> result = script->Run(); 

über Codes erfolgreich durch vs2013 kompiliert werden, aber ollydbg.exe, führen odbgscript.dll Plugin nach dem Ausführen wird ollydbg.exe abgebrochen und einige Fehler Tipps, wie folgende:

Betriebssystem: 6.1.7601, Plattform 2 (Service Pack 1) OllyDbg Version: 2.01.00 Ausnahmecode: C0000005 Parameter: 00000000 00000000 Ausnahmeadresse: 00000000

+0

Bitte geben Sie eine [MCVE] haben Sie die Plattform initialisieren? Hast du ein Isolat erstellt? Ich kann es nicht sagen, es sei denn, Sie geben ein vollständiges Beispiel, das das Problem reproduziert – xaxxon

Antwort