none
Manage firewall settings by own application RRS feed

  • Question

  • I am working on a project for my internship, and it requires my to create a firewall application that performs all typical actions as a firewall would, and also to make sure that when opening windows firewall, there is a banner that says "These setting are being managed by vendor application <name of app>"

    I am looking for the code to let me do that, and I think that this(cant post link - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ics/c-registering-with-windows-firewall-ownership ) is the kind of thing i am looking for. Problem is, i cant run it, i keep failing at the line:

    hr = products->Register(product, &registration);

    And i get the error code "SEC_E_CANNOT_INSTALL".

    Any idea how to fix this error,or if this is the wrong bit of code to achieve what i am looking for and i should be looking elsewhere?

    Also, sorry if this is the wrong topic to post in.

    Thanks!
    Monday, July 8, 2019 6:09 PM

Answers

All replies

  • Hello ibrahimmkhalid,

    This forum is for "Discuss the Windows Filtering Platform (WFP) Network Programming Interface to perform filtering decisions in the TCP/IP protocol stack." But your issue is firewall related.

    SEC_E_CANNOT_INSTALL error indicate that "The product binary has not been signed."

    "A user mode code module using this API should be linked with the /integritycheck linker flag. This flag sets IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY in the image PE header OptionalHeader.DllCharacteristics field, which enforces a signature check at load time. The code module should be digitally signed, consistent with the Authenticode signing procedure."

    Hope this helps.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, July 9, 2019 2:40 AM
  • I tried to do this, but could not get the project signed. My team lead says that signing the project is not in the scope of my internship, but he still wants my program to be able to say "These setting are being managed by vendor application <name of app>"

    Is there another way to go about achieving this?

    Thanks, and sorry for posting in the wrong forum topic.

    Tuesday, July 9, 2019 9:18 AM
  • Hello ibrahimmkhalid,

    Please refer to Authenticode Digital Signatures for signing your code.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, July 10, 2019 3:11 AM
  • I would ask in this c++ forum:

    https://social.msdn.microsoft.com/Forums/en-us/home?forum=vcgeneral


    Richard Mueller - MVP Enterprise Mobility (Identity and Access)

    Wednesday, July 10, 2019 11:38 AM
    Moderator