CreateFiber (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function allocates a fiber object, assigns it a stack, and sets up execution to begin at the specified start address, typically the fiber function.

This function does not schedule the fiber.

  DWORD dwStackSize, 
  LPVOID lpParameter 


This argument is ignored in Microsoft® Windows® CE.

Fiber always uses the process stack size.

[in] Pointer to the application-defined function of type LPFIBER_START_ROUTINE to be executed by the fiber; represents the starting address of the fiber.

Execution of the new fiber does not begin until another fiber calls the SwitchToFiber function with this address.

For more information of the fiber callback function, see FiberProc.

[in] Specifies a single argument that is passed to the fiber.

This value can be retrieved by the fiber using the GetFiberData macro.

Return Values

If the function succeeds, the return value is the address of the fiber.

If the function fails, the return value is NULL.

To get extended error information, call GetLastError.


In Windows CE, dwStackSize must be set to zero.

Before a thread can schedule a fiber using the SwitchToFiber function, it must call the ConvertThreadToFiber function so a fiber is associated with the thread.

A thread cannot be converted to a fiber if the stack size of the thread is different from the process default stack size set by the /STACK linker setting.


OS Versions: Windows CE .NET 4.0 and later.
Header: Winbase.h.
Link Library: Coredll.lib.

See Also

FiberProc | SwitchToFiber | ConvertThreadToFiber | GetFiberData

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.