1. A method for constructing dispatch tables to match application program interface service routines, the method comprising: reading a header file of an application program interface; generating a corresponding dispatch table for at least one device indicated in the header file, wherein the corresponding dispatch tables are generated based on information read from the header file; and verifying that information contained in the dispatch tables is consistent with current requirements of the application program interface.