There is the PathIsUNCEx() API for which we can pass a pointer to a string. When this function returns TRUE, the pointed string receives the server part of the given UNC path.
PathIsUNCEx()
TRUE