Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InitializeInstance()

unsafe int Microsoft.Xna.Framework.WindowsManagedCallbackHandler.InitializeInstance ( void * parentExitEvent)
inlineprivate

Definition at line 269 of file WindowsManagedCallbackHandler.cs.

270 {
271 _parentExitEvent = parentExitEvent;
272 if ((_callManagedPlease = global::_003CModule_003E.CreateEventW(null, 0, 0, null)) == null)
273 {
274 uint lastError = global::_003CModule_003E.GetLastError();
275 return ((int)lastError > 0) ? ((int)(lastError & 0xFFFF) | -2147024896) : ((int)lastError);
276 }
277 if ((_managedFunctionDataCanBeWritten = global::_003CModule_003E.CreateEventW(null, 0, 1, null)) == null)
278 {
279 uint lastError2 = global::_003CModule_003E.GetLastError();
280 return ((int)lastError2 > 0) ? ((int)(lastError2 & 0xFFFF) | -2147024896) : ((int)lastError2);
281 }
282 if ((_proxyProcessNeedsToChange = global::_003CModule_003E.CreateEventW(null, 1, 0, null)) == null)
283 {
284 uint lastError3 = global::_003CModule_003E.GetLastError();
285 return ((int)lastError3 > 0) ? ((int)(lastError3 & 0xFFFF) | -2147024896) : ((int)lastError3);
286 }
287 if ((_newCallbackRegistered = global::_003CModule_003E.CreateEventW(null, 0, 0, null)) == null)
288 {
289 uint lastError4 = global::_003CModule_003E.GetLastError();
290 return ((int)lastError4 > 0) ? ((int)(lastError4 & 0xFFFF) | -2147024896) : ((int)lastError4);
291 }
292 return 0;
293 }

References Microsoft.Xna.Framework.WindowsManagedCallbackHandler._callManagedPlease, Microsoft.Xna.Framework.WindowsManagedCallbackHandler._managedFunctionDataCanBeWritten, Microsoft.Xna.Framework.WindowsManagedCallbackHandler._newCallbackRegistered, Microsoft.Xna.Framework.WindowsManagedCallbackHandler._parentExitEvent, and Microsoft.Xna.Framework.WindowsManagedCallbackHandler._proxyProcessNeedsToChange.