Printf( "IOServiceGetMatchingServices returned %d\n", kernResult) kernResult = IOServiceGetMatchingServices( kIOMasterPortDefault, classesToMatch, matchingServices) Get an iterator across all matching devices. Look for devices that claim to be modems. Printf( "IOServiceMatching returned a NULL dictionary.\n") classesToMatch = IOServiceMatching( kIOSerialBSDServiceValue) Create a matching dictionary to find those instances. Serial devices are instances of class IOSerialBSDClient. static kern_return_t findModems( io_iterator_t * matchingServices) Caller is responsible for // releasing the iterator when iteration is complete. Returns an iterator across all known modems. Static kern_return_t getModemPath( io_iterator_t serialPortIterator, char * bsdPath, CFIndex maxPathSize) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Function prototypes static kern_return_t findModems( io_iterator_t * matchingServices)
0 Comments
If you are an educator, contact Bentley for an Academic SELECT Subscription so that you can take full advantage of the resources both in your classrooms and on the STUDENTserver.* If you don't have a code available, contact us and we will respond as soon as possible to get you connected. Choose from the wide range of applications included in the Academic SELECT Software Portfolio. * Log in to the Bentley STUDENTserver and download software within minutes. If you are a student, request your School Code from your professor or academic advisor. If you are an educator, contact Bentley for an Academic SELECT Subscription so that you can take full advantage of the resources both in your classrooms and on the STUDENTserver. Register today and gain access to free software licenses, online learning, community forums, and more. The STUDENTserver provides you with a variety of academic resources. We are committed to help prepare students for tomorrow's infrastructure workforce, so you can learn the same powerful applications that are in use by infrastructure professionals today. Through the Bentley Institute, you can take advantage of a variety of tools and resources in the Academic Program. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |