locked
Napstat window RRS feed

  • Question

  • Hi,

    Do you guyz have any sample code for getting the logo onto the NAP SHA napstat window? I know that INapComponentInfo interface has to be implemented. But wanted to check if you provide something already as in the case of Sample SHV UI.

     

    Thanks,

    Divya

    Monday, May 14, 2007 11:03 PM

Answers

  •  

     AFAIK it might not be in MSDN. But this is rather simple to do.

     

     While implenting INapComponentInfo (which is in NapCommon.idl) you will see:

     

     GetIcon(
       [out] CountedString** dllFilePath,
       [out] UINT32* iconResourceId
       ) const;

     This function should be implemented such that it returns a dll file name and a resource id. The "dllFilePath" is the dll which will have the icon resource embedded in it. And the "iconResourceId" is the resource ID of that embedded icon.

     

     The recommended practice is using the SHA dll as the dll to embed to icon. Also you should not change this icon in run-time. This icon is only for branding SHAs.

     

     I hope this helps,

     

    thanks,

     

    P.S: You can use GetModuleFileNameW function to get your SHA dll's location in run-time.

    Tuesday, May 15, 2007 7:45 PM

All replies

  • The logo is provided via Group Policy settings, and is a single logo across all machines to which that group policy applies.  It is not customizable per SHV/SHA, so there is no code sample to provide.

     

    INapComponentInfo is more for providing information and error messages from the SHA to the NAP Agent (for use in NAPStat and netsh status indicators).

     

    Hope this clarifies.

     

    -Chris

    Chris.Edson@online.microsoft.com *
    SDET, Network Access Protection
    * Remove the "online" make the address valid.
    ** This posting is provided "AS IS" with no warranties, and confers no rights.

     

     

     

     

     

    Tuesday, May 15, 2007 5:39 PM
  • Thank you for the clarification.

    Let me try to make the question more specific. In the napstat window, next to the SHA list there are small logos displayed. Is there a way to customise these logos? 

     

    Thanks,

     

    Tuesday, May 15, 2007 6:55 PM
  •  

     AFAIK it might not be in MSDN. But this is rather simple to do.

     

     While implenting INapComponentInfo (which is in NapCommon.idl) you will see:

     

     GetIcon(
       [out] CountedString** dllFilePath,
       [out] UINT32* iconResourceId
       ) const;

     This function should be implemented such that it returns a dll file name and a resource id. The "dllFilePath" is the dll which will have the icon resource embedded in it. And the "iconResourceId" is the resource ID of that embedded icon.

     

     The recommended practice is using the SHA dll as the dll to embed to icon. Also you should not change this icon in run-time. This icon is only for branding SHAs.

     

     I hope this helps,

     

    thanks,

     

    P.S: You can use GetModuleFileNameW function to get your SHA dll's location in run-time.

    Tuesday, May 15, 2007 7:45 PM
  • Thanks Atacan!
    Thursday, May 31, 2007 9:40 PM