@@ -109,7 +109,7 @@ namespace winrt::impl
109109 return ;
110110 }
111111
112- result = static_cast <F>(WINRT_IMPL_GetProcAddress (WINRT_IMPL_LoadLibraryW (L" combase.dll" ), name));
112+ result = reinterpret_cast <F>(WINRT_IMPL_GetProcAddress (WINRT_IMPL_LoadLibraryW (L" combase.dll" ), name));
113113
114114 if (result)
115115 {
@@ -119,37 +119,37 @@ namespace winrt::impl
119119 result = fallback;
120120 }
121121
122- inline hresult get_agile_reference (winrt::guid const & iid, void * object, void ** result ) noexcept
122+ inline hresult get_agile_reference (winrt::guid const & iid, void * object, void ** reference ) noexcept
123123 {
124- static int32_t (__stdcall * handler)(uint32_t options, winrt::guid const & iid, void * object, void ** result ) noexcept ;
124+ static int32_t (__stdcall * handler)(uint32_t options, winrt::guid const & iid, void * object, void ** reference ) noexcept ;
125125
126126 load_runtime_function (" RoGetAgileReference" , handler,
127- [](uint32_t , winrt::guid const & iid, void * object, void ** result ) noexcept -> int32_t
127+ [](uint32_t , winrt::guid const & iid, void * object, void ** reference ) noexcept -> int32_t
128128 {
129- *result = nullptr ;
129+ *reference = nullptr ;
130130 static constexpr guid git_clsid{ 0x00000323 , 0x0000 , 0x0000 , { 0xC0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x46 } };
131131
132132 com_ptr<IGlobalInterfaceTable> git;
133133 hresult hr = WINRT_IMPL_CoCreateInstance (git_clsid, nullptr , 1 /* CLSCTX_INPROC_SERVER*/ , guid_of<IGlobalInterfaceTable>(), git.put_void ());
134134
135- if (result < 0 )
135+ if (hr < 0 )
136136 {
137137 return hr;
138138 }
139139
140140 uint32_t cookie{};
141141 hr = git->RegisterInterfaceInGlobal (object, iid, &cookie);
142142
143- if (result < 0 )
143+ if (hr < 0 )
144144 {
145145 return hr;
146146 }
147147
148- *result = new agile_ref_fallback (std::move (git), cookie);
148+ *reference = new agile_ref_fallback (std::move (git), cookie);
149149 return 0 ;
150150 });
151151
152- return handler (0 , iid, object, result );
152+ return handler (0 , iid, object, reference );
153153 }
154154}
155155
0 commit comments