Avoiding redefinition of INT8
-
Hi, I am using WMI to get hardware details. WMI defines INT8. At the same time I am using one library that defines INT8, and because of this I am getting redefinition error for INT8. I can not change the code either in WMI or in other library. There could be one way by creating a Dll for all wmi code. But is there any other workaround for the same? That would be great, if one can help me in getting following details without using WMI: 1. All drives (Fixed as well as removable) and their partitions with size, utilization and driver (description, date, version) details. 2. CPU details : No of CPUs and for each CPU ---> CPU type, CPU alias, Original clock, Real Clock, Effective clock, CPUID manufacturer, CPUID revision. 3. Motherboard details: Motherboard ID, Motherboard Name, BUS type, BUS Width, BIOS type, System BIOS Date, No of memory modules and RAM within them. Regards! Paddy
-
Hi, I am using WMI to get hardware details. WMI defines INT8. At the same time I am using one library that defines INT8, and because of this I am getting redefinition error for INT8. I can not change the code either in WMI or in other library. There could be one way by creating a Dll for all wmi code. But is there any other workaround for the same? That would be great, if one can help me in getting following details without using WMI: 1. All drives (Fixed as well as removable) and their partitions with size, utilization and driver (description, date, version) details. 2. CPU details : No of CPUs and for each CPU ---> CPU type, CPU alias, Original clock, Real Clock, Effective clock, CPUID manufacturer, CPUID revision. 3. Motherboard details: Motherboard ID, Motherboard Name, BUS type, BUS Width, BIOS type, System BIOS Date, No of memory modules and RAM within them. Regards! Paddy
You dont need to repeate your question
WhiteSky
-
You dont need to repeate your question
WhiteSky
Sorry for the same. Regards! Paddy
-
Hi, I am using WMI to get hardware details. WMI defines INT8. At the same time I am using one library that defines INT8, and because of this I am getting redefinition error for INT8. I can not change the code either in WMI or in other library. There could be one way by creating a Dll for all wmi code. But is there any other workaround for the same? That would be great, if one can help me in getting following details without using WMI: 1. All drives (Fixed as well as removable) and their partitions with size, utilization and driver (description, date, version) details. 2. CPU details : No of CPUs and for each CPU ---> CPU type, CPU alias, Original clock, Real Clock, Effective clock, CPUID manufacturer, CPUID revision. 3. Motherboard details: Motherboard ID, Motherboard Name, BUS type, BUS Width, BIOS type, System BIOS Date, No of memory modules and RAM within them. Regards! Paddy
Padmanabh Sharma wrote:
WMI defines INT8. At the same time I am using one library that defines INT8, and because of this I am getting redefinition error for INT8. I can not change the code either in WMI or in other library. But is there any other workaround for the same?
Hmmm. You could write a (thin) wrapper-class for (parts of) WMI (or the other lib), hiding it from the outside. In that class's .cpp, before including the WMI-stuff, you undef INT8 (it is not
typedef
'd I hope) and let WMI define it.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation." -- Caius Petronius, Roman Consul, 66 A.D.