
compile error ( 'struct' redefinition )
Igor,
Have you read the relevant MSDN pages
on the functions / definitions you are trying to use?
At the bottom of every page is a requirements
section which states two things:
1. which header file the definitions are located in.
2. which header file you must include
Generally a definition will be located in one header file,
(i.e, _TAPE_ERASE is located in ntddtape.h),
BUT, the docs will state which header file to include -
in almost every case you must include windows.h,
and not explictly include the header file the defs are actually
located in.
I guess you just need to check MSDN carefully
whenever something like this happens..
James.
--
www.catch22.uk.net
Free win32 software, sourcecode, and tutorials
------
Please remove "YOURPANTS" when replying.
Quote:
> > I get this error when compiling my code:
> > c:\ntddk\src\storage\inc\ntddtape.h(97) : error C2011: '_TAPE_ERASE' :
> > 'struct' type redefinition
> > included files are:
> > #include <windows.h>
> > #include <ntddtape.h>
> > #include <devioctl.h>
> > #include <stdio.h>
> > #include <stdlib.h>
> > I saw that windef.h also has _TAPE_ERASE defined, but If I only include
> > windows.h,
> > then IOCTL_TAPE_SET_POSITION is not defined. how to bypass this problem
?
> > I'm using MS VS 6 SP 5
> ok, so now I figured out that the problem is in ntddtape.h. it seams that
> there is
> a bug (?) in header file...
> to bypass this "bug", I've copied ioctl definitons into my code, removed
the
> "#include <ntddtape.h>" and now it compiles and runs :) fine...
> someone should fix ( or at least tell me where I'm wrong ) this.
> regards,
> Igor