I’ve just started using ChaiScript and I’m having some issues with my code.
Currently I have a C++ application which as part of its usage, invokes GetThreadContext requests to keep tabs on a child thread. This works perfectly in when processing in C++ the returned CONTEXT C struct, I can retrieve it’s members like
threadContext.ESP without problems.
However when I pass the CONTEXT struct to ChaiScript, I get the following error
CONTEXT threadContext; GetThreadContext(myThread, &threadContext); chai.add(chaiscript::var(threadContext), "thread_context"); chai.eval("print(thread_context.ESP)");
Error: “‘ESP’ is not a function.” during evaluation at (EVAL 1, 8)
Am I passing it, or referencing it incorrectly? Or is it something else entirely