On 2013/02/14 21:27, Luiz Capitulino wrote: > On Thu, 14 Feb 2013 15:10:36 +0900 > Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com> wrote: > >> Rename 'class' member in class_info of PciDeviceInfo to 'dev_class', and >> add some casts to avoid errors from c++ compiler. > > [...] > >> # >> # @class_info.desc: #optional a string description of the device's class >> # >> -# @class_info.class: the class code of the device >> +# @class_info.dev_class: the class code of the device >> # >> # @id.device: the PCI device id >> # >> @@ -1171,7 +1171,7 @@ >> ## >> { 'type': 'PciDeviceInfo', >> 'data': {'bus': 'int', 'slot': 'int', 'function': 'int', >> - 'class_info': {'*desc': 'str', 'class': 'int'}, >> + 'class_info': {'*desc': 'str', 'dev_class': 'int'}, >> 'id': {'device': 'int', 'vendor': 'int'}, >> '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo', >> 'regions': ['PciMemoryRegion']} } > > The right way of doing this is to add 'class' to the set of reserved > words in scripts/qapi.py:c_var(). Then you'll have to adapt the code to > use the 'q_' prefix.
Thank you for the information, I will try that. > Now, is using C++ required? Why can't you use plain C? It is because Windows COM+ framework (which VSS uses) is designed based on C++ objective programming interface. Implementing this with plain C is theoretically possible, but that will require parsing C++ objects' vtables manually so the code would be much complex. (However, It might be possible to push Windows-specific C++ stuff into a DLL to and avoid involving qemu related headers.) Thanks, -- Tomoki Sekiyama