kernelwernel / VMAware

VM detection library and tool
GNU General Public License v3.0
291 stars 28 forks source link

VM::Default inaccessible #68

Closed alandtse closed 3 months ago

alandtse commented 3 months ago

Under VS2022 Version 17.8.3 this example results in an inaccessible member error for VM::DEFAULT

bool is_vm6 = VM::detect(VM::DEFAULT & ~(VM::RDTSC));

image

I'm on main (so not a release) so let me know if that's the issue. I tried moving

    // global values
    static flagset DEFAULT; // default bitset that will be run if no parameters are specified

From private: to public: but then Default isn't an enum so the & fails. I didn't have much time to play with it so may figure something out.

kernelwernel commented 3 months ago

Under VS2022 Version 17.8.3 this example results in an inaccessible member error for VM::DEFAULT

bool is_vm6 = VM::detect(VM::DEFAULT & ~(VM::RDTSC));

image

I'm on main (so not a release) so let me know if that's the issue. I tried moving

    // global values
    static flagset DEFAULT; // default bitset that will be run if no parameters are specified

From private: to public: but then Default isn't an enum so the & fails. I didn't have much time to play with it so may figure something out.

Fixed! Thanks for reporting the issue. The latest merge has made both VM::DEFAULT and VM::ALL as public.