ReactOS 0.4.16-dev-329-g9223134
InitOnce.c File Reference
#include "k32_vista.h"
Include dependency graph for InitOnce.c:

Go to the source code of this file.

Functions

BOOL WINAPI InitOnceExecuteOnce (_Inout_ PINIT_ONCE InitOnce, _In_ __callback PINIT_ONCE_FN InitFn, _Inout_opt_ PVOID Parameter, _Outptr_opt_result_maybenull_ LPVOID *Context)
 
BOOL WINAPI InitOnceBeginInitialize (_Inout_ LPINIT_ONCE lpInitOnce, _In_ DWORD dwFlags, _Out_ PBOOL fPending, _Outptr_opt_result_maybenull_ LPVOID *lpContext)
 
BOOL WINAPI InitOnceComplete (_Inout_ LPINIT_ONCE lpInitOnce, _In_ DWORD dwFlags, _In_opt_ LPVOID lpContext)
 

Function Documentation

◆ InitOnceBeginInitialize()

BOOL WINAPI InitOnceBeginInitialize ( _Inout_ LPINIT_ONCE  lpInitOnce,
_In_ DWORD  dwFlags,
_Out_ PBOOL  fPending,
_Outptr_opt_result_maybenull_ LPVOID lpContext 
)

Definition at line 26 of file InitOnce.c.

31{
33
34 Status = RtlRunOnceBeginInitialize(lpInitOnce, dwFlags, lpContext);
35 if (!NT_SUCCESS(Status))
36 {
38 return FALSE;
39 }
40
41 *fPending = (Status == STATUS_PENDING);
42 return TRUE;
43}
LONG NTSTATUS
Definition: precomp.h:26
#define STATUS_PENDING
Definition: d3dkmdt.h:43
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
Status
Definition: gdiplustypes.h:25
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:167
_Must_inspect_result_ NTSTATUS NTAPI RtlRunOnceBeginInitialize(_Inout_ PRTL_RUN_ONCE RunOnce, _In_ ULONG Flags, _Outptr_opt_result_maybenull_ PVOID *Context)
Definition: runonce.c:22
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ InitOnceComplete()

BOOL WINAPI InitOnceComplete ( _Inout_ LPINIT_ONCE  lpInitOnce,
_In_ DWORD  dwFlags,
_In_opt_ LPVOID  lpContext 
)

Definition at line 47 of file InitOnce.c.

51{
53
54 Status = RtlRunOnceComplete(lpInitOnce, dwFlags, lpContext);
55 if (!NT_SUCCESS(Status))
56 {
58 return FALSE;
59 }
60
61 return TRUE;
62}
NTSTATUS NTAPI RtlRunOnceComplete(_Inout_ PRTL_RUN_ONCE RunOnce, _In_ ULONG Flags, _In_opt_ PVOID Context)
Definition: runonce.c:73

◆ InitOnceExecuteOnce()

BOOL WINAPI InitOnceExecuteOnce ( _Inout_ PINIT_ONCE  InitOnce,
_In_ __callback PINIT_ONCE_FN  InitFn,
_Inout_opt_ PVOID  Parameter,
_Outptr_opt_result_maybenull_ LPVOID Context 
)

Definition at line 12 of file InitOnce.c.

17{
18 return NT_SUCCESS(RtlRunOnceExecuteOnce(InitOnce,
21 Context));
22}
_Maybe_raises_SEH_exception_ NTSTATUS NTAPI RtlRunOnceExecuteOnce(_Inout_ PRTL_RUN_ONCE RunOnce, _In_ __inner_callback PRTL_RUN_ONCE_INIT_FN InitFn, _Inout_opt_ PVOID Parameter, _Outptr_opt_result_maybenull_ PVOID *Context)
Definition: runonce.c:121
_In_ __inner_callback PRTL_RUN_ONCE_INIT_FN InitFn
Definition: rtlfuncs.h:2550
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:336
RTL_RUN_ONCE_INIT_FN * PRTL_RUN_ONCE_INIT_FN
Definition: rtltypes.h:338

Referenced by apartment_createwindowifneeded(), DllGetClassObject(), get_notif_hwnd(), init_winsock(), and winsock_init().