Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: ISAPI not supported on Unicode

122 views
Skip to first unread message

Jerry Pisk

unread,
Aug 4, 2004, 5:00:27 AM8/4/04
to
ISAPI modules are simple DLLs that export specific functions, what exactly
is giving you the message? Are you trying to use MFC's ISAPI classes?

Anyways, some Unicode support was added in IIS 6 (see
http://msdn.microsoft.com/library/en-us/iissdk/iis/enablingandsecuringisapiextensions.asp
for ISAPI extensions). Earlier versions don't support it at all.

Jerry

"Alpha Siera" <saxenamit2001[at]yahoo.com.[no spam please]> wrote in message
news:32C68E72-FF0A-446A...@microsoft.com...
> Hi,
>
> I am working on one Unicode app which is using ISAPI, but to my surprise
> when I build the application it says "ISAPI does not yet support Unicode".
> I am using Visual Studio Ver 6.0 with service pack 5. Any clue how can I
> enable my Unicode application to support ISAPI. Any help in this regards
> is appriciated.
>
> Regards
> Alpha


David Wang [Msft]

unread,
Aug 4, 2004, 4:49:32 AM8/4/04
to
Prior to IIS6, ISAPI does not natively support Unicode.

Unicode support in ISAPI on IIS6 consists of several functions that take in
Unicode URL/Physical path parameters (as appropriate) as well as Unicode
versions of all server variables -- which is enough to enable proper I18N
operation of ISAPI.

On prior versions of IIS, you will have to figure out the encoding of the
URL/header/(possible entity) based on the request and convert it to Unicode
yourself.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//

Alpha Siera

unread,
Aug 4, 2004, 6:01:02 AM8/4/04
to
Hi,

Thanx for your reply Jerry and David. My application is Unicode and I have defined _UNICODE and UNICODE for my application and have assigned startup symbol as wWinMainCRTStartup. After including afxisapi.h and building my application. I am getting following error

c:\program files\microsoft visual studio\vc98\mfc\include\afxisapi.h(15) : fatal error C1189: #error : ERROR: ISAPI does not yet support Unicode.

This is clearly defined in afxisapi.h as

#ifdef _UNICODE
#error ERROR: ISAPI does not yet support Unicode.
#endif

so it clearly means that I can't even include ISAPI in my Unicode app. I believe this is to be used with IIS 5 or previous versions which does'nt supports Unicode and Unicode support is only available in IIS 6 i.e with Visual Studio .Net. I am using Visual Studio 6.0 with service pack 6.

My Problem
=======
How can I include ISAPI support for my Unicode application I am ready to do all conversions whatever is required to call the native ISAPI ANSI API's. Currently I can't even include the ISAPI support in my application.

Regards
Alpha

David Wang [Msft]

unread,
Aug 4, 2004, 1:04:58 PM8/4/04
to
I have no ideas of the requirements placed by afxisapi.h, but I know that
httpext.h (ISAPI's actual include file) has no such restrictions against
Unicode.

I do not think anything is stopping you from compiling existing ISAPI code
with _UNICODE defined.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//

"Alpha Siera" <Alpha...@discussions.microsoft.com> wrote in message
news:48D90A26-826D-4CE8...@microsoft.com...

Jerry Pisk

unread,
Aug 4, 2004, 10:35:27 PM8/4/04
to
AfxIsapi.h is an MFC header, and it guards itself against being compiled
when UNICODE is defined, since it uses TCHAR parameters for all its string
parameters. Not using MFC will allow you to compile your code with UNICODE
defined, as David said. Of course you need to be careful and use ASCII
strings where required (such as with EXTENSION_CONTROL_BLOCK string members,
they are always single byte even if your DLL isn't).

Jerry

"David Wang [Msft]" <som...@online.microsoft.com> wrote in message
news:utt6VXk...@TK2MSFTNGP12.phx.gbl...

Vinodh Kumar P

unread,
Aug 26, 2004, 2:48:01 AM8/26/04
to
Hi Jerry,
I am facing the same problem reported by Alpha.Is there any way I can
use MFC to develop an ISAPI extenstion with _UNICODE defined?
I also do not find any documentation on this.Any help will be sincerly
appreciated.

Thanks and Regards,
Vinodh Kumar P

"Jerry Pisk" <jerr...@hotmail.com> wrote in message
news:utg3bTpe...@TK2MSFTNGP09.phx.gbl...

Jerry Pisk

unread,
Aug 26, 2004, 10:53:42 AM8/26/04
to
No there's not. You have to make a choice, either use MFC or have a Unicode
DLL. MFC can only have all strings Unicode or ASCII, your own code can use
both at the same time.

Jerry

"Vinodh Kumar P" <thecomd...@yahoo.com> wrote in message
news:cgk0tu$b9a$1...@news.mch.sbs.de...

David Wang [Msft]

unread,
Aug 27, 2004, 10:50:23 PM8/27/04
to
ISAPI itself does not care about the _UNICODE definition. It has individual
ServerSupportFunctions that expect Unicode strings as well as ANSI strings.
Since it does not care about the _UNICODE definition, you have to pass in
the right string type yourself (i.e. using TCHAR is incompatible with
ISAPI -- no function takes in a TCHAR).

Since MFC ISAPI does not accept _UNICODE, you cannot use MFC to develop an
ISAPI Extension with _UNICODE defined. You will have to compile the MFC
ISAPI separately, without _UNICODE defined. However, this does not prevent
you from using ISAPI's support for Unicode.

For example, my ISAPI Extension DLL is fully Unicode compliant and satisfies
I18N requirements. I do not use MFC, nor do I define _UNICODE, and I take
care to pass in the right ANSI/Unicode string according to the
ServerSupportFunction that I call. My code is fully Unicode compliant
regardless of _UNICODE being defined or not.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//

"Vinodh Kumar P" <thecomd...@yahoo.com> wrote in message
news:cgk0tu$b9a$1...@news.mch.sbs.de...

0 new messages