Fan-written Harry Potter fiction is very popular. There are apparently 10,000+ stories on the Internet. One of the players in my Sunday game pointed me to Harry Potter and the Original Rules yesterday. It's a "what if the magic in the Harry Potter universe was D&D magic" story. Ten chapters, about 40,000 words, are up so far. The writing definitely isn't professional, but "D&D magic" version of the Harry Potter universe is interesting and full of ideas for running pre-4e versions D&D in the Harry Potter universe.
For an example of how well D&D magic can be made to work as "Harry Potter magic", here is a flashback to the battle between Potter's parents and Voldemort leading up to Voldemort's first death from the Prologue:
Prologue 1: Ends and Beginnings.
A flash of brilliant light. A word, spoken in a voice that could only be described as lingering at absolute zero. A cloud of darkness.
A man's voice, courage and desperation mingling in the roar. "It's him! Take Harry! Take him, and go! I'll slow him down till they arrive!"
The frozen voice, now amused. "Wall of Stone." A woman's voice, distantly screaming.
A burst of dark fire, the blistering echoes of it almost obscuring the words, "Flame Strike".
The man's voice once more, an intriguing thread of pain now unravelling in it. "Hold Portal!"
The fierce cold of the laughter not quite heard becomes terrifyingly real with a whisper. "Freezing Sphere."
Splintering wood. Screams dwindling, running footsteps.
Laboured, gurgling breathing. A desperate skittering sound, something small and glassy rolling across an uneven floor.
"Finger of Death." The slightest flicker of green light. A thud, more screams, four slow footsteps.
"Give me the boy," the unbelievably chill voice now says. No emotion. No patience or particular impatience, but no room for excess syllables. They would have withered and died, attached to a voice like this. "Give me the boy, and save yourself."
A whimper, a scream, a whisper in the air marking the passage of a length of wood. The faint pop of something appearing. A swish of an arm, the clang of metal on metal, and then the echoing of flames once more.
In the distance, desperate fists beating on stone. Explosions. Cries.
Up close, two more words. "Energy Drain." A scream of agony, a pause. "The boy."
A long, long pause, and the woman's voice starts babbling, a prayer offered up to some unknown or unknowable god, words tripping over themselves to be heard and descending in spirals into some strange and unearthly tongue.
The cold voice has not run out of patience, it is simply aware that the previously allotted quantity of time has been expended. "Power Word... Kill."
Footsteps, and unconcerned green eyes open to stare into red ones. A hiss of surprise, unless it is recognition.
Tattered grey skin stretched over cold, bony digits, disrupts the moment of eyes. A brief moment to consider. Three words, spoken calmly.
"Finger of Death."
Green lightning, of an intensity never before seen. The thud and crackle of a body hitting the floor.
Brief silence, as even the distant cries and thumps falter.
An infant's voice, beginning to squall