Hi James,
Thank you for the reply.
I'm now using BYTE (unsigned char) and I'm copying the data I receive
in recv() into windows' buffer using _mbsncpy().
I still can't get anything else than plain text files ...(for
instance, paint will say it can't get any preview, pdf readers will
just show a blank page, etc ...)
Is there something else I am missing (maybe wrong encoding on the
server side? I've tried with binary and ascii ...) .
I also tried giving the LPVOID Buffer parameter of ReadFile() directly
to recv() and it still doesn't work ... don't know what else to
try ...
On Sep 13, 12:38 pm, Fowl <
f...@fowlsmurf.net> wrote:
> You should be dealing with bytes, not chars,
>
> hth,
> James
>
> On 13 September 2010 20:12, Sylvain Friquet <
sylvain.friq...@gmail.com>wrote:
>
> > Hi,
>
> > I am writing a FS connected to a remote server, based on the C Mirror
> > example.
>
> > If I understood the ReadFile correctly, Windows is requesting to read
> > a file from a given Offset and is expecting me to fill its Buffer,
> > with a maximum length of 4096.
>
> > My remote server is then reading the file and sending the requested
> > part, using send() and recv() calls.
>
> > I am currently doing ok with text files (.txt, .html ...) but I can't
> > get it to work with other format (such as music or image files).
>
> > I guess that I am not correctly filling the Buffer windows gives me,
> > and/or not dealing properly with encoding/charset issue.
>
> > I'd like to know what type Windows is expecting me to fill its Buffer
> > with?
> > I am receiving chars and obviously I can't just strcpy them into the
> > Buffer which is unfortunate :)
>
> > Thanks in advance for helping out,
>
> > Sylvain.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Dokan" group.
> > To post to this group, send email to
do...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
dokan+un...@googlegroups.com <
dokan%2Bunsu...@googlegroups.com>.