The NetUserEnum API can be used to enumarate the local user accounts. The example code supplied here can be compiled with Pelles C. You need to replace all the occurences of %s with %ls :
https://learn.microsoft.com/en-us/windows/win32/api/lmaccess/nf-lmaccess-netuserenum