Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void WINAPI MyInsert()
- {
- addIntFunction(NULL, "jsEval", jsEval, "( JavaScript String )", 2, 5);
- __asm add esp, 18h
- addIntFunction(NULL, "jsExec", jsExec, "( File Name )", 2, 5);
- __asm add esp, 18h
- addIntFunction(NULL, "jsNewScope", jsNewScope, "()", 1, 1);
- __asm add esp, 18h
- addIntFunction(NULL, "jsCloseScope", jsCloseScope, "( int ScopeID )", 2, 2);
- __asm add esp, 18h
- addIntFunction(NULL, "jsSetScope", jsSetScope, "( int ScopeID )", 2, 2);
- __asm add esp, 18h
- placeToInsert();
- }
- jsHandler jsHandle;
- int scopeNum = -1;
- void jsEval(void* obj, int argc, const char** argv)
- {
- jsHandle.evaluate((char*)argv[1], scopeNum);
- }
- int jsExec(void* obj, int argc, const char** argv)
- {
- jsHandle.execute((char*)argv[1], scopeNum);
- }
- int jsNewScope(void* obj, int argc, const char** argv)
- {
- return jsHandle.newScope();
- }
- void jsCloseScope(void* obj, int argc, const char** argv)
- {
- int scopeNum = atoi(argv[2]);
- jsHandle.closeScope(scopeNum);
- }
- int jsSetScope(void* obj, int argc, const char** argv)
- {
- scopeNum = atoi(argv[1]);
- return scopeNum;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement