I had d and c and hysterscopy for abnormal uterine bleeding. Does hysteroacopy detect cancer during procedure or only when removed tissue is analyzed?

No, it may suggest. No, tissue is needed for diagnosis. Irregularity, nodules or masses on hysteroscopy may suggest likely cancer but rissue analysis by a pathologist is required both to tell what type and grade and prognosis of cancer and to screen out benign causses of irregularity or nodular mass.