Re: 'void' illegal with all types by Peter
Peter
Wed Dec 17 18:10:59 CST 2003
KC,
There is no other problem at the moment. Thanks!!!
peter
"KC" <kianchuantan@yahoo.com> wrote in message
news:%23qHdJVGxDHA.1908@TK2MSFTNGP10.phx.gbl...
> hi Peter,
>
> I got your code. I managed to get the code compiled by changing
>
> fReturn = (InitFileHandleCache() == NO_ERROR);
>
> to
>
> InitFileHandleCache();
>
> What is the problem apart from the compilation error ?
>
> KC
>
>
>
> "Peter Lin" <a_b_c_d_e_f_g@yahoo.com> wrote in message
> news:#4rd8H6wDHA.536@tk2msftngp13.phx.gbl...
> > Hi KC,
> >
> > I tried but didn't find the url to download the sample(there is a
lot
> > page not found error in microsoft web site) . The sample installed in my
> pc
> > is at: E:\Program Files\Microsoft
> > SDK\Samples\web\iis\extensions\io\ASyncWrite.
> >
> > here attached is one of the c source files. fwasync.c
> >
> > peter
> >
> > "KC" <kianchuantan@yahoo.com> wrote in message
> > news:%234r1Tu5wDHA.1740@TK2MSFTNGP12.phx.gbl...
> > > Hi Peter,
> > >
> > > Can provide more details ?
> > >
> > > KC
> > >
> > > "Peter Lin" <a_b_c_d_e_f_g@yahoo.com> wrote in message
> > > news:OkArvl4wDHA.2440@TK2MSFTNGP12.phx.gbl...
> > > > kc,
> > > >
> > > > I know the why the code cannot compile, the problem is :
> > > >
> > > > why the author wrote these kind of code and supplied as a SDK
sample,
> so
> > I
> > > > wonder whether it can be compiled under certain condition.
> > > >
> > > > peter
> > > >
> > > > "KC" <kianchuantan@yahoo.com> wrote in message
> > > > news:uQ28eY4wDHA.2304@TK2MSFTNGP12.phx.gbl...
> > > > > InitFileHandleCache function does not return anything.
> > > > >
> > > > > fReturn = (InitFileHandleCache() == NO_ERROR); caused the error
> when
> > > > > compiling the code.
> > > > >
> > > > > This is how you should call the function.
> > > > >
> > > > > InitFileHandleCache();
> > > > >
> > > > > KC
> > > > >
> > > > > "Peter Lin" <a_b_c_d_e_f_g@yahoo.com> wrote in message
> > > > > news:eWhmbK4wDHA.2360@TK2MSFTNGP10.phx.gbl...
> > > > > > Hi,
> > > > > > while I compile a iis sdk sample: ASyncWrite, I got the
error:
> > > > > > 'void' illegal with all types. because of the following
> > statement:
> > > > > >
> > > > > > -----
> > > > > > fReturn = (InitFileHandleCache() == NO_ERROR);
> > > > > > -----
> > > > > >
> > > > > > Here below is their definition:
> > > > > >
> > > > > > BOOL fReturn = TRUE;
> > > > > > VOID InitFileHandleCache(VOID)
> > > > > > {
> > > > > > InitializeCriticalSection(&g_csOpenFiles);
> > > > > > }
> > > > > >
> > > > > >
> > > > > > In what condition this code will compile ? How to get it
work
> ?
> > > > > >
> > > > > > Thanks!
> > > > > > peter lin
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>
>