D&C is a minor procedure that is done to get a sample of endometrium for histological testing. This may also remove the endometrial polyp. D&C can be combined with a hysteroscopy which is the direct visualization of the endometrium. If it turns out to be cancer, then a hysterectomy will be necessary. This will be done later and not at the time of D&C.
Hope this helps.