I have a questions about embedding v8 into dll,please help me,thanks a lot.
I have a odbgscript.dll plugin project of vs2013 for ollydbg2.01, this dll call v8(version v8-5.6.331) to execute javascript statements. ollydbg.exe call odbgscript.dll. My calling v8 codes in odbgscript.dll as following:
#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();
above codes can be compiled successfully by vs2013,but after running ollydbg.exe, execute odbgscript.dll plugin ,ollydbg.exe is aborted and some error tips as following:
Operating system: 6.1.7601, platform 2 (Service Pack 1)
OllyDbg version: 2.01.00
Exception code: C0000005
Parameters: 00000000 00000000
Exception address: 00000000
I had solved this problem . Different v8 version need different syntax statements. change number you can get corresponding example .
https://chromium.googlesource.com/v8/v8/+/branch-heads/5.6/samples/hello-world.cc
Related
I am trying to use multicore-0.2.15 toolbox with Octave v3.6.4 on Windows7 64bit
( http://octave.sourceforge.net/multicore/ )
but even the demo script doesn't seem to work, it's not possible to create a pipe and I received an error message. So if I try to evaluate the following command in Octave
[read_fd, write_fd, err, msg] = pipe ()
I receive the following output:
read_fd = -1
write_fd = -1
err = -1
msg = pipe: not supported on this system
The fork function doesn't work either.
Does anyone have an idea what the problem might be?
Zoltan
The error message pipe: not supported on this system says it all. There is no support for pipe() in your system (Windows 7). You can:
Not use the multicore which you will notice is unmaintained (see the unmaintained section at the bottom of the package list). You could instead use the parallel package.
Try another build of Octave. Maybe the MinGW builds will work with pipes.
Try another version of Octave. Version 3.8.1 has already been released and if it is a problem on the side of Octave instead of Windows, maybe it has been fixed.
Change operating system (pipe() works fine in Debian)
I am trying to merge some .net assemblies for Windows Phone 8 using ILMerge.exe (2.12.0803). On their own all assemblies work fine. I can successfully merge assembles which do not contain references to the Windows.Networking namespace as follows:
.\ILMerge.exe /lib:"%ProgramFiles(x86)%\Reference
Assemblies\Microsoft\Framework\WindowsPhone\v8.0"
/out:.\WP8\%1\MathToolbox.dll .\%1\MathBase.dll .\%1\PolyFunctions.dll
As soon as I try to include a DLL which uses the Windows.Networking namspace as follows:
.\ILMerge.exe /lib:"%ProgramFiles(x86)%\Reference
Assemblies\Microsoft\Framework\WindowsPhone\v8.0"
/out:.\WP8\%1\MathToolbox.dll .\%1\MathBase.dll .\%1\PolyFunctions.dll
.\%1\RemoteTools.dll
I am recieving the following exception:
An exception occurred during merging: Unresolved assembly reference
not allowed: Windows. at
System.Compiler.Ir2md.GetAssemblyRefIndex(AssemblyNode assembly) at
System.Compiler.Ir2md.GetTypeRefIndex(TypeNode type) at
System.Compiler.Ir2md.VisitReferencedType(TypeNode type) at
System.Compiler.Ir2md.VisitClass(Class Class) at
System.Compiler.Ir2md.VisitModule(Module module) at
System.Compiler.Ir2md.SetupMetadataWriter(String debugSymbolsLocation)
at System.Compiler.Ir2md.WritePE(Module module, String
debugSymbolsLocation, BinaryWriter writer) at
System.Compiler.Writer.WritePE(String location, Boolean
writeDebugSymbols, Module module, Boolean delayS ign, String
keyFileName, String keyName) at
System.Compiler.Writer.WritePE(CompilerParameters compilerParameters,
Module module) at ILMerging.ILMerge.Merge() at
ILMerging.ILMerge.Main(String[] args)
Having done some reading this exception suggets ILMerge is unable to locate the Windows.Networking assemblies. I have attempted adding various different flags to ILMERGE including:
.\ILMerge.exe /lib:"%ProgramFiles(x86)%\Reference
Assemblies\Microsoft\Framework\WindowsPhone\v8.0" /targetplatform:v4,"%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71"
/out:.\WP8\%1\MathToolbox.dll .\%1\MathBase.dll .\%1\PolyFunctions.dll
.\%1\RemoteTools.dll
But still get the same exception. If anyone has any suggestions that would be greatly appreciated.
I don't think ILMerge actually works with other than pure .NET assemblies, especially when Windows Phone 8 and WinRT projects uses referenced native libraries - that might be that not found "Windows" unresolved assembly.
The error indicates that ILMerge cannot find the platform's Windows.winmd. When compiling a Windows Phone or Windows Store project, you compile against two main things; The Platform SDK (WinRT) and a .NET SDK. Any tools that run over these assemblies will need both.
In addition to passing the .NET assembly folder, try passing "C:\Program Files (x86)\Windows Phone Kits\8.0\Windows Metadata directory" as a lib argument.
Make note, ILMerge is based on an older version of CCI (http://ccimetadata.codeplex.com/) so even after doing above, may still have trouble consuming the WinRT metadata format which is slightly different to .NET's.
I wanted to launch the process from firebreath,so I included "boost/process.hpp". Just including this header alone throws compile error.
could some one help?
FireBreath 1.6.1, FireBreath 1.7.0,windows 8
Error:
2>C:\Projects\plugin\FireBreath\src\3rdParty\boost\boost/process/detail/pipe.hpp(129): error C2665: 'boost::system::system_error::system_error' : none of the 7 overloads could convert all the argument types
2> C:\Projects\plugin\FireBreath\src\3rdParty\boost\boost/system/system_error.hpp(39): could be 'boost::system::system_error::system_error(int,const boost::system::error_category &,const std::string &)'
2> C:\Projects\plugin\FireBreath\src\3rdParty\boost\boost/system/system_error.hpp(43): or 'boost::system::system_error::system_error(int,const boost::system::error_category &,const char *)'
2> while trying to match the argument list '(DWORD, overloaded-function, const char [54])'
I faced same problem
boost: 1.47
OS: Windows XP (32 bit VM)
But not with FireBreath
I changed boost::system::system_category to boost::system::system_category() in pipe.hpp line 129
the boost::process library that was in FireBreath has compilation errors in them. I have fixed those errors and it now compiles for me, at least when including . I haven't actually tried to use it on windows yet, nor I suspect has anyone else.
Good luck, hope that helps.
I built a console app to find all the *.ts files in my project and then compile them using tsc.exe.
Everything was working fine, but as I converted my JavaScript files to TypeScript, I eventually ran into the following error:
ytsc.js(21053, 17) Microsoft JScipt runtime error: 'window' is undefined
Each time this happened when I was trying to extend window:
window['prop'] = "something";
I tested the code until I found the answer, which had little to do with my code...
The fault was my build tool.
I had declared the -e (execute) command line option when calling tsc.exe:
I did this because I thought I might add some automated testing code in the modules.
The cause for the error:
Most of my code is in functions.
However, there were a few places that I wanted to extend 'window' (for example if a built in function is missing from an old browser, I was shimming those calls). The code to shim the window object was running as the file loaded:
if (window.fun == null) {
window.fun = function(){...};
}
Anyway, because of the -e option, the tsc.exe was attempting to run the code (outside of a browser environment). This caused the above error.
I am trying to use the Ocaml csv library. I downloaded csv-1.2.3 and followed the installation instructions after installing findlib:
Uncompress the source archive and go to the root of the package,
Run 'ocaml setup.ml -configure',
Run 'ocaml setup.ml -build',
Run 'ocaml setup.ml -install'
Now I have META, csv.a, csv.cma, csv.cmi, csv.cmx, csv.cmxa, csv.mli files in ~/opt/lib/ocaml/site-lib/csv repertory. The shell command ocamlfind list -describe gives csv A pure OCaml library to read and write CSV files. (version: 1.2.3) which I believe means that csv is installed properly.
BUT when I add
let data = Csv.load "foo.csv" in
in my compute.ml module and try to compile it within the larger program package I have the compilation error :
File "_none_", line 1, characters 0-1:
Error: No implementations provided for the following modules:
Csv referenced from compute.cmx"
and if I simply type
let data = load "foo.csv" in
i get :
File "compute.ml", line 74, characters 13-17:
Error: Unbound value load
I have the same type of errors when I use Csv.load or load directly in the Ocaml terminal. Would somebody have an idea of what is wrong in my code or library installation?
My guess is that you're using ocamlfind for compilation (ocamlfind ocamlc -package csv ...), because you have a linking error, not a type-checking one (which would be the case if you had not specified at all where csv is). The solution may be, in this case, to add a -linkall option to the final compilation line producing an executable, to ask it to link csv.cmx with it. Otherwise, please try to use ocamlfind and yes, tell us what your compilation command is.
For the toplevel, it is very easy to use ocamlfind from it. Watch this toplevel interaction:
% ocaml
Objective Caml version 3.12.1
# #use "topfind";;
- : unit = ()
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
- : unit = ()
# #require "csv";;
/usr/lib/ocaml/csv: added to search path
/usr/lib/ocaml/csv/csv.cma: loaded
# Csv.load;;
- : ?separator:char -> ?excel_tricks:bool -> string -> Csv.t = <fun>
To be explicit. What I typed once in the toplevel was:
#use "topfind";;
#require "csv";;
Csv.load;; (* or anything else that uses Csv *)