Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Avoiding redefinition of INT8

Avoiding redefinition of INT8

Scheduled Pinned Locked Moved C / C++ / MFC
helphardwareperformancequestionannouncement
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Padmanabh Sharma
    wrote on last edited by
    #1

    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

    H J 2 Replies Last reply
    0
    • P Padmanabh Sharma

      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

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      You dont need to repeate your question


      WhiteSky


      P 1 Reply Last reply
      0
      • H Hamid Taebi

        You dont need to repeate your question


        WhiteSky


        P Offline
        P Offline
        Padmanabh Sharma
        wrote on last edited by
        #3

        Sorry for the same. Regards! Paddy

        1 Reply Last reply
        0
        • P Padmanabh Sharma

          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

          J Offline
          J Offline
          jhwurmbach
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups