NetShareEnum or Net32ShareEnum

The NetShareEnum API retrieves share information about each shared resource on a server.