I have trouble with some syntax. I am not really familiar with the interface so please seduce my ignorance.
The VS2010 is giving me an error ... I can set this error to Edit: From where I am optimizing the code, I hope that it gives more context You never start Before using it here: The variable application is defined: An example of a class Applying which interface You need to determine which class you should use (some classes, Other class) assign a proper object, eg such as: application.Name = System.AppDomain.CurrentDomain.FriendlyName; Public static Zero AddApplication (String Application Name = Zero, String Process ImageFilename = Zero) {INetFw Authorized Application Application; INetFw Authorized Application Application; If (applicationName == tap) {application.Name = System.AppDomain.CurrentDomain.FriendlyName; / * Set the name of the application * /} and {application.Name = applicationName; / * Set the name of the application * /} if (processImageFileName == zero) {application.ProcessImageFileName = System.Reflection.Assembly.GetExecutingAssembly (). place; / * Set this property in place of the application's executable file * /} and {application.ProcessImageFileName = processImageFileName; / * Set this property to the executable file of the application * /} application. Competent = true; // Enable it * Now Add / Type this application to the authorized app collection * Netfgroup = Type. Gettypefrumprogid ("Hntcfg. FMGR", false); INETFwMgr MGR = (INetFwMgr) catalyst. Createinstance (networkfgroup type); Application = (INetFw Authorized Application) mgr.LocalPolicy.CurrentProfile.AuthorizedApplications; Applications.Add (application); }
application to
null , but it causes the run-time blank reference error .
application
application.Name = System.AppDomain.CurrentDomain.FriendlyName;
INetFw Authorized Application Application
INetFw authorized application applies.
INetFw authorized record RUSSY APPLICATION = New Class ();
Comments
Post a Comment