R: Re: Building driver with VS Express 2013 + WDK 8.1 update

> Did you read the instructions? PCM needs both msr.sys and

winring0.sys. The source for msr.sys is included in the package, and it
does need to be called “msr.sys”. You have to get winring0 from another
location.

Sorry for the confusion.

The point is that, as far as I understood reading instructions, there are two option available: download and use winring0.sys/winring0.dll (I downloaded them and actually it does work !) OR just build msr.sys driver. Now my attempt was just to build and use the msr.sys driver (second option)…

by the way: pcm application code calls CreateService() and then OpenService() and StartService() in order to register and start msr.sys driver. I set VS Express 2013 to use Microsoft Symbol Server for debugging. Now launching pcm app under debugger control in VS Express 2013, it seems there is no way to step into CreateService(), OpenService() or StartService().

Is actually possible to step into those API calls -even if just at assembly code level- provided that PDB symbol files are available (via Microsfot Symbol Server) and loaded ?

Thank you

----Messaggio originale----
Da: xxxxx@probo.com
Data: 22-ott-2015 19.17
A: “Windows System Software Devs Interest List”
Ogg: Re: [ntdev] Building driver with VS Express 2013 + WDK 8.1 update

xxxxx@alice.it wrote:
> So I managed to solve it changing the value of TARGETNAME in sources.propos file itself.

Well, you’ll have to change it back.

> Anyway it seems a known problem…
> https://software.intel.com/en-us/forums/software-tuning-performance-optimization-platform-monitoring/topic/473927
>
> I tried to register & start the service using OSRLOADER: the driver actually is loaded but anyway the application (pcm.exe) does not work.

You know, this ALL would have gone a lot more smoothly if you had just
told us right from the beginning that you were trying to install and run
the Intel Performance Counter Monitor. I just assumed you were doing
some hacky thing for your own. I did not realize that you were trying
to build an off-the-shelf distribution from Intel.

Did you read the instructions? PCM needs both msr.sys and
winring0.sys. The source for msr.sys is included in the package, and it
does need to be called “msr.sys”. You have to get winring0 from another
location.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

xxxxx@alice.it wrote:

The point is that, as far as I understood reading instructions, there
are two option available: download and use winring0.sys/winring0.dll
(I downloaded them and actually it does work !) OR just build msr.sys
driver. Now my attempt was just to build and use the msr.sys driver
(second option)…

Nope. I believe both are required.

by the way: pcm application code calls CreateService() and then
OpenService() and StartService() in order to register and start
msr.sys driver. I set VS Express 2013 to use Microsoft Symbol Server
for debugging. Now launching pcm app under debugger control in VS
Express 2013, it seems there is no way to step into CreateService(),
OpenService() or StartService().

Is actually possible to step into those API calls -even if just at
assembly code level- provided that PDB symbol files are available (via
Microsfot Symbol Server) and loaded ?

That wouldn’t serve any purpose. Those calls date back to the original
work done for NT 3.1. They are well-tested and well-understood.
CreateService creates registry entries and makes a table entry in
memory. OpenService gets you a handle. StartService launches the
driver. You can simulate all of that yourself from the command line.
“sc create” does CreateService" and “sc start” or “net start” does
StartService. If those work, then the fundamentals are fine.

I’m betting that your problem is that you are on a 64-bit system and you
did not digitally sign the driver binary.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi,

finally I manged to build and use just the msr.sys driver only…

CreateService creates registry entries and makes a table entry in
memory

Table entry you are referring to is basically an (in memory) Service Control Manager (SCM) database’s entry ?

Thanks

----Messaggio originale----
Da: xxxxx@probo.com
Data: 22-ott-2015 23.46
A: “Windows System Software Devs Interest List”
Ogg: Re: R: Re: [ntdev] Building driver with VS Express 2013 + WDK 8.1 update

xxxxx@alice.it wrote:
>
> The point is that, as far as I understood reading instructions, there
> are two option available: download and use winring0.sys/winring0.dll
> (I downloaded them and actually it does work !) OR just build msr.sys
> driver. Now my attempt was just to build and use the msr.sys driver
> (second option)…

Nope. I believe both are required.

> by the way: pcm application code calls CreateService() and then
> OpenService() and StartService() in order to register and start
> msr.sys driver. I set VS Express 2013 to use Microsoft Symbol Server
> for debugging. Now launching pcm app under debugger control in VS
> Express 2013, it seems there is no way to step into CreateService(),
> OpenService() or StartService().
>
> Is actually possible to step into those API calls -even if just at
> assembly code level- provided that PDB symbol files are available (via
> Microsfot Symbol Server) and loaded ?

That wouldn’t serve any purpose. Those calls date back to the original
work done for NT 3.1. They are well-tested and well-understood.
CreateService creates registry entries and makes a table entry in
memory. OpenService gets you a handle. StartService launches the
driver. You can simulate all of that yourself from the command line.
“sc create” does CreateService" and “sc start” or “net start” does
StartService. If those work, then the fundamentals are fine.

I’m betting that your problem is that you are on a 64-bit system and you
did not digitally sign the driver binary.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

xxxxx@alice.it wrote:

finally I manged to build and use just the msr.sys driver only…

>CreateService creates registry entries and makes a table entry in
>memory

Table entry you are referring to is basically an (in memory) Service
Control Manager (SCM) database’s entry ?

Yes.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.