Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built pcm using visual studio #73

Closed
gggh000 opened this issue Jul 5, 2018 · 10 comments
Closed

Built pcm using visual studio #73

gggh000 opened this issue Jul 5, 2018 · 10 comments

Comments

@gggh000
Copy link

gggh000 commented Jul 5, 2018

I Built pcm using visual studio 15 running on ws2012. The build was successful and executable generated on x64/debug folder however when executing, dll error message:

Starting MSR service failed with error 2 The system cannot find the file specified.
Trying to load winring0.dll/winring0.sys driver...
Failed to load winring0.dll/winring0.sys driver.

Cannot access CPU counters
You must have signed msr.sys driver in your current directory and have administrator rights to run this program
Access to Processor Counter Monitor has denied (no MSR or PCI CFG space access).

@opcm
Copy link
Contributor

opcm commented Jul 7, 2018

these libraries are not provided with PCM. as described in PCM Windows HOWTO please download them separately.

@gggh000
Copy link
Author

gggh000 commented Jul 9, 2018

Looks like there WINDOWS_HOWTO.rtf in which says build msr.sys using winddk.
Is there any steps to it?

Building using nmake included in VS resulted in following:

c:\dw\pcm\WinMSRDriver\Win7>mymake.bat
c:\dw\pcm\WinMSRDriver\Win7>set BUILD_PATH=
c:\dw\pcm\WinMSRDriver\Win7>rmdir /S /Q objfre_win7_amd64
The system cannot find the file specified.
c:\dw\pcm\WinMSRDriver\Win7>nmake
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
makefile(1) : fatal error U1052: file '\makefile.def' not found
Stop.
c:\dw\pcm\WinMSRDriver\Win7>rem chdir objfre_win7_amd64\amd64
c:\dw\pcm\WinMSRDriver\Win7>rem copy msr.sys c:
c:\dw\pcm\WinMSRDriver\Win7>rem chdir ..
c:\dw\pcm\WinMSRDriver\Win7>rem chdir ..

Thanks.,

@opcm opcm added the bug label Jul 11, 2018
@opcm
Copy link
Contributor

opcm commented Jul 11, 2018

ok. this needs to be debugged. Does the winring driver option work for you?

@gggh000
Copy link
Author

gggh000 commented Jul 11, 2018

I am not sure what winring driver option is so I dont know what to do in that case. Please note that I completely clueless and unfamiliar with this this tool and only depending on HOW TO docs. Can you give precise directions?

@gggh000
Copy link
Author

gggh000 commented Jul 11, 2018

Ok I found winring mentioned on Windows how to, will try out. thx.

@gggh000
Copy link
Author

gggh000 commented Jul 11, 2018

Downloaded one of the mentioned tool and copied all 4 mentioned drivers to c:\windows\system32. Still did not work, so I rebooted and ran it with administrator access however it complained about not finding the winring driver.

However, I managed to build on linux first try so it appears to be working. Windows build is then less important but may still be nice to have it work in case.
Thanks.,

@opcm
Copy link
Contributor

opcm commented Jul 12, 2018

Copying to c:\windows\system32 is not enough. As described in the how to please
copy WinRing0.dll, WinRing0.sys, WinRing0x64.dll, WinRing0x64.sys files into the PCM.exe binary location.

@opcm opcm added enhancement and removed bug labels Jul 12, 2018
@opcm
Copy link
Contributor

opcm commented Jul 12, 2018

Building the driver should work using the project file: MSR.vcxproj

@opcm
Copy link
Contributor

opcm commented Nov 6, 2018

please let me know if the issue is still there (e.g. when you use MSR.vcproj)

@opcm
Copy link
Contributor

opcm commented Nov 23, 2018

please reopen if the issue still exists

@opcm opcm closed this as completed Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants