NetServiceEnum or Net32ServiceEnum

The NetServiceEnum API retrieves information about all network services that are started.