VS2019 VSInstr tool how to exclude function by function name

Wei 0 Reputation points
2023-11-03T08:01:35.86+00:00

I want to exclude function by function name, when I need to instrument modules. I know how to exclude namespace, but now I need to exclude all functions such as start with 'smtp_', no matter these functions in which namespace, in which class.
Could someone help me?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,785 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 27,221 Reputation points Microsoft Vendor
    2023-11-06T10:01:57.7833333+00:00

    Hi @Wei, 

    Welcome to Microsoft Q&A! 

    Please try the following:

    vsinstr /coverage xxx.dll /exclude:std::smtp_

    or vsinstr /coverage xxx.dll /exclude:smtp_

    It is noted that the :: is used for native namespace and the . is for managed namespace. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

     

    0 comments No comments