If you have the DirectX SDK installed, open the DirectX control panel applet and turn on the debug version. Run the application again in the Delphi debugger and open the event log (View/Debug Windows/Event Log). It should list in there the exact reason for the command failure.

By the way, cross-posting is considered rude in many forums.