Internet Connection Sharing and Internet Connection Firewall question

G

Gary

Does anyone have the ICF API experiences?

We would like to use the ICF API in our program to automatically open
or close ports as needed.

But when i use the INetSharingPortMapping::Enable() or
INetSharingPortMapping::Delete() function under my Windows XP OS, it
causes a notification to appear on my local computer, every time I
have to choose "YES" or "NO" in order to continue this program. It is
very inconvenient for us to use this ICF API under our program. We
would like this program to continue running without user interruption.

Further look into the MSDN document related the ICF under following
website:
http://msdn.microsoft.com/library/d...ovide_notifications_to_the_user_interface.asp

Only four ICS/ICF methods will cause the notification to the user
interface:
INetSharingConfiguration::DisableInternetFirewall
INetSharingConfiguration::DisableSharing
INetSharingConfiguration::EnableInternetFirewall
INetSharingConfiguration::EnableSharing

I wonder why INetSharingPortMapping::Enable() and
INetSharingPortMapping::Delete() cause the notification to the user
interface.

Is there any way we could use INetSharingPortMapping::Enable() and
INetSharingPortMapping::Delete() without notification showing up?

Thank you !

Gary
 
S

Slobodan Brcin

Gary,
Try setting:
HKLM\SYSTEM\ControlSet001\Control\Windows\NoInteractiveServices

You can use regedit.
Or in TD find component "Windows subsystem" and change value.

If this helps, then you can try to figure what service is causing this and
disable that service from interacting with user. If it is not service that
shows prompt than I don't know the way to disable it.

Regards,
Slobodan
 
G

Gary

Slobodan:

Thank you for taking your time to answer my question.

I tried to set HKLM\SYSTEM\ControlSet001\Control\Windows\NoInteractiveServices
to become non-zero value.

Re-boot my windows xp machine. It does not work. The notification
message still showed up when I ran my executable program using ICF
API.

Here is the notification message:

Internet Sharing Configuration
C:\test.exe is attempting to change or view this computer's internet
Connection Protection settings. To give C:\test.exe permission to
edit these setting for as long as the program is open, click YES.

Yes No More Info

Thanks,
Gary
 
S

Slobodan Brcin

Then it is not coming from service, but from API function inside of your
process.

This is documented feature (it is intended to serve as protection
mechanism), and I don't know the way to disable it.

You will have to find some work around this like stopping service, manually
populating registry, and then starting service.
Or something like this.


Regards,
Slobodan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top