This technote described how to get access to CIM from VI SDK. It comes with a real sample code showing how it's done exactly.