View Full Version : Installing ISAPI filters to the IIS
nikfjell
02-03-2003, 08:23 AM
Hi
How do you install ISAPI filers to IIS with Install Shield?
Best regards
/Niklas
Cortneyw
02-20-2003, 11:37 AM
I accomplished this through script and a accompanying DLL (IsGetObj.dll).
Newbie to InstallShield (only a couple of weeks) and I recently had to overcome this task.... so I feel your pain.
Refer to "sreeramg"'s post in this previous ISC thread concerning create WebVDirs:
http://community.installshield.com/showthread.php?threadid=95053&perpage=5&highlight=IsGetObj.dll&pagenumber=1
Get (http://installsite.org/files/GetObject.zip) and setup up the DLL as suggested in sreeramg's post...
The function I wrote to create the ISAPI filter is below. Ignore REPORTERROR (my way of display/flat-file logging errors). and "pISAPI" is just a pointer to a typedef of strings for the ISAPI properties that were set before a call to this function.
**********************************************
function CreateISAPIFilter(pISAPI)
OBJECT myObj, objISAPI;
begin
if (UseDLL(SUPPORTDIR ^ "IsGetObj.dll") < 0 ) then
REPORTERROR( "Could not load DLL: " + SUPPORTDIR ^ "IsGetObj.dll", SEVERE);
endif;
if (MyGetObject("IIS://localhost/W3SVC/Filters", "", myObj) = FALSE) then
REPORTERROR ("Failure creating IIS object", SEVERE);
endif;
if (MyGetObject("IIS://localhost/W3SVC/Filters/" ^ pISAPI->sName, "", objISAPI) = FALSE) then
try
set objISAPI = myObj.Create("IIsFilter", pISAPI->sName);
catch
REPORTERROR ("Failure creating IIS ISAPI Filter: " + pISAPI->sName, SEVERE);
endcatch;
endif;
try
objISAPI.FilterPath = pISAPI->sPath;
if !(myObj.FilterLoadOrder % pISAPI->sName) then
myObj.FilterLoadOrder = myObj.FilterLoadOrder + "," + pISAPI->sName;
endif;
objISAPI.SetInfo();
myObj.SetInfo();
catch
REPORTERROR("Unable to set ISAPI Filter properties for: " + pISAPI->sName, SEVERE);
endcatch;
UnUseDLL(SUPPORTDIR ^ "IsGetObj.dll");
end;
**********************************************
Good luck!
Originally posted by nikfjell
Hi
How do you install ISAPI filers to IIS with Install Shield?
Best regards
/Niklas
nikfjell
02-25-2003, 05:27 AM
Thank you.
/Niklas
palani
06-16-2003, 08:41 AM
Hi all
I am new to the InstallShield. I am trying a create a ISAPI filter ( trying to add a dll file in to the IIS ) automatically through IsGetObj.dll function , which was already posted in the group. I have some with the function and please help me on this.
I have already crteated the Virtual directory in IIS through IsGetObj.dll object. I am trying add a dll file to the ISAPI filter though this dll. Can any one pls send me the piece of code that used to create the ISAPI filter through IsGetObj.dll object.
I have tried this function that used to create the ISAPI filter , which is posted by Cortneyw on 02-03-2003 08:23 AM. But I am getting a error. Like this.
typedef pointer type required.
In this function , CreateISAPIFilter(pISAPI) what is that pISAPI?
where should I call this function in my code? and What should I declare before calling this function
In the previous post it is written like this
++++++++++++++++++++++
The function I wrote to create the ISAPI filter is below. Ignore REPORTERROR (my way of display/flat-file logging errors). and "pISAPI" is just a pointer to a typedef of strings for the ISAPI properties that were set before a call to this function.
+++++++++++++++++++++++++++
Can any one pls explain what should I declare before calling the function CreateISAPIFilter(pISAPI).
Thanks for the help.
Palani
Function:
function CreateISAPIFilter(pISAPI)
OBJECT myObj, objISAPI;
begin
if (UseDLL(SUPPORTDIR ^ "IsGetObj.dll") < 0 ) then
REPORTERROR( "Could not load DLL: " + SUPPORTDIR ^ "IsGetObj.dll", SEVERE);
endif;
if (MyGetObject("IIS://localhost/W3SVC/Filters", "", myObj) = FALSE) then
REPORTERROR ("Failure creating IIS object", SEVERE);
endif;
if (MyGetObject("IIS://localhost/W3SVC/Filters/" ^ pISAPI->sName, "", objISAPI) = FALSE) then
try
set objISAPI = myObj.Create("IIsFilter", pISAPI->sName);
catch
REPORTERROR ("Failure creating IIS ISAPI Filter: " + pISAPI->sName, SEVERE);
endcatch;
endif;
try
objISAPI.FilterPath = pISAPI->sPath;
if !(myObj.FilterLoadOrder % pISAPI->sName) then
myObj.FilterLoadOrder = myObj.FilterLoadOrder + "," + pISAPI->sName;
endif;
objISAPI.SetInfo();
myObj.SetInfo();
catch
REPORTERROR("Unable to set ISAPI Filter properties for: " + pISAPI->sName, SEVERE);
endcatch;
UnUseDLL(SUPPORTDIR ^ "IsGetObj.dll");
end;
**********************************************
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.