[MPlayer-dev-eng] [PATCH] VCD support for Windows (except Win9x)
Zuxy Meng
zuxy.meng at gmail.com
Mon Feb 26 15:29:54 CET 2007
Hi,
2007/2/26, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> Hello,
> On Mon, Feb 26, 2007 at 09:49:10PM +0800, Zuxy Meng wrote:
> > 2007/2/26, Compn <tempn at twmi.rr.com>:
> > >On Mon, 26 Feb 2007 21:37:40 +0800,
> > >Zuxy Meng scribed:
> > >
> > >> +#ifdef WIN32
> > >> + HANDLE hd;
> > >> + char device[] = "\\\\.\\D:";
> > >> +#endif
> > >
> > >does this hardcode the device name?
> > >D: is not the dvd/cdrom drive on all systems.
> >
> > D is only a stub here. The actual letter is filled by:
> > + device[4] = p->device[0];
>
> With any sane combination of compiler and operating system this should
> crash. String constants are supposed to be in readonly memory.
No it won't. Note that I used "char device[]" rather than "char*
device" so compilers are guaranteed to make a copy on stack.
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
More information about the MPlayer-dev-eng
mailing list