AP courses provide a highschool credit if you pass the course, but your only granted a college credit if you pass the End of Course Standardized AP Exam with a 3 or higher.
Dual enrollment courses offer an enrollment into an actual college course. So passing the class and a final course exam (if required), will assuredly grant you both a highschool credit and a college credit.