Nóta
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað aðskrá þig inn eða breyta skráasöfnum.
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað að breyta skráasöfnum.
Sets the current script context on the thread.
Syntax
STDAPI_(JsErrorCode) JsSetCurrentContext(
_In_ JsContextRef context
);
Parameters
context
The script context to make current.
Return Value
The code JsNoError if the operation succeeded, a failure code otherwise.
Example
JsRuntimeHandle runtime;
JsContextRef context;
// Create a runtime.
JsCreateRuntime(JsRuntimeAttributeNone, nullptr, &runtime);
// Create an execution context.
JsCreateContext(runtime, &context);
// Now set the current execution context.
JsSetCurrentContext(context);
Requirements
Header: jsrt.h