Lines Matching refs:hr
126 HRESULT hr; in dotnet_init() local
138 hr = CoCreateInstance(&CLSID_CorRuntimeHost, NULL, CLSCTX_ALL, in dotnet_init()
141 if (FAILED(hr)) in dotnet_init()
146 hr = ICorRuntimeHost_Start(stuff->dotnet_host); in dotnet_init()
147 if (FAILED(hr)) in dotnet_init()
151 hr = ICorRuntimeHost_GetDefaultDomain(stuff->dotnet_host, &unk); in dotnet_init()
152 if (FAILED(hr)) in dotnet_init()
156 hr = IUnknown_QueryInterface(unk, &IID_mscorlib_System_AppDomain, (LPVOID*)&stuff->dotnet_domain); in dotnet_init()
157 if (FAILED(hr)) in dotnet_init()
179 return hr; in dotnet_init()
195 HRESULT hr; in PHP_FUNCTION() local
203 hr = dotnet_init(&where TSRMLS_CC); in PHP_FUNCTION()
204 if (FAILED(hr)) { in PHP_FUNCTION()
206 char *err = php_win32_error_to_msg(hr); in PHP_FUNCTION()
210 php_com_throw_exception(hr, buf TSRMLS_CC); in PHP_FUNCTION()
218 hr = ICorRuntimeHost_GetDefaultDomain(stuff->dotnet_host, &unk); in PHP_FUNCTION()
219 if (FAILED(hr)) { in PHP_FUNCTION()
221 char *err = php_win32_error_to_msg(hr); in PHP_FUNCTION()
225 php_com_throw_exception(hr, buf TSRMLS_CC); in PHP_FUNCTION()
231 hr = IUnknown_QueryInterface(unk, &IID_mscorlib_System_AppDomain, (LPVOID*)&stuff->dotnet_domain); in PHP_FUNCTION()
232 if (FAILED(hr)) { in PHP_FUNCTION()
234 char *err = php_win32_error_to_msg(hr); in PHP_FUNCTION()
238 php_com_throw_exception(hr, buf TSRMLS_CC); in PHP_FUNCTION()
260 …hr = stuff->dotnet_domain->lpVtbl->CreateInstance(stuff->dotnet_domain, oleassembly_sys, oletype_s… in PHP_FUNCTION()
266 if (SUCCEEDED(hr)) { in PHP_FUNCTION()
271 hr = IUnknown_QueryInterface(unk, &IID_IObjectHandle, &handle); in PHP_FUNCTION()
273 if (SUCCEEDED(hr)) { in PHP_FUNCTION()
275 hr = IObjectHandle_Unwrap(handle, &unwrapped); in PHP_FUNCTION()
276 if (SUCCEEDED(hr)) { in PHP_FUNCTION()
280 hr = IUnknown_QueryInterface(V_UNKNOWN(&unwrapped), &IID_IDispatch, &V_DISPATCH(&obj->v)); in PHP_FUNCTION()
282 if (SUCCEEDED(hr)) { in PHP_FUNCTION()
301 hr = E_INVALIDARG; in PHP_FUNCTION()
311 char *err = php_win32_error_to_msg(hr); in PHP_FUNCTION()
312 snprintf(buf, sizeof(buf), "Failed to instantiate .Net object [%s] [0x%08x] %s", where, hr, err); in PHP_FUNCTION()
316 php_com_throw_exception(hr, buf TSRMLS_CC); in PHP_FUNCTION()