ClusWorkerCreate function (resapi.h)

Creates a worker thread. The PCLUSAPI_CLUS_WORKER_CREATE type defines a pointer to this function.

Syntax

DWORD ClusWorkerCreate(
  [out] PCLUS_WORKER          lpWorker,
  [in]  PWORKER_START_ROUTINE lpStartAddress,
  [in]  PVOID                 lpParameter
);

Parameters

[out] lpWorker

Pointer to a zero-initialized CLUS_WORKER structure that on return is filled in with a handle to the created thread and a flag that indicates whether the handle should be terminated. The caller should never need to refer to or change the members of this structure.

[in] lpStartAddress

Pointer to the address of a function that should be called by the worker thread.

[in] lpParameter

A parameter to pass to the function whose address is pointed to by lpStartAddress.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header resapi.h
Library ResUtils.lib
DLL ResUtils.dll

See also

CLUS_WORKER

ClusWorkerCheckTerminate

ClusWorkerTerminate