Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes an ATL thunk.
Syntax
void AtlThunk_InitData(
AtlThunkData_t *Thunk,
void *Proc,
size_t FirstParameter
);
Parameters
Thunk
A non-null return value from AtlThunk_AllocateData.
Proc
See the example in remarks for more info.
FirstParameter
See the example in remarks for more info.
Return value
None
Remarks
An ATL thunk has a signature of WNDPROC. See the following sample for more info on an implementation.
LRESULT CALLBACK AtlThunk(
_In_ HWND hwnd,
_In_ UINT uMsg,
_In_ WPARAM wParam,
_In_ LPARAM lParam
)
{
static void* FirstParameter;
static WNDPROC Proc;
return Proc((HWND)FirstParameter, uMsg, wParam, lParam);
}
An arbitrary number of AtlThunk functions can be created; FirstParameter and Proc are set (differently) for each one.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 [desktop apps only] |
Minimum supported server | Windows Server 2016 [desktop apps only] |
Target Platform | Windows |
Header | atlthunk.h |
DLL | Atlthunk.dll |