RoleEnvironmentInitialize Function

 

Initializes the runtime library for the current process.

Syntax

STDAPI RoleEnvironmentInitialize();

Parameters

None.

Return Value

Use the SUCCEEDED macro to determine whether a call to the RoleEnvironmentInitialize has succeeded or failed. For more information, see Return Codes.

Remarks

You must call the RoleEnvironmentInitialize function for each process before calling any other API function in the Service Hosting native library.

A call to RoleEnvironementInitialize will fail if your code is not running in Azure environment or in theMicrosoft Azure compute emulator.

Function Information

Header File

ServiceRuntime.h

Import Library

<Azure SDK installation directory>\lib\x64\mswasr.lib

<Azure SDK installation directory>\lib\x86\mswasr.lib