From: HMS Surprise on 22 Jan 2007 18:30 Hi folks, I know this is more of a question for vc but thought driver folks might be familiar with it. The little piece of a program below gives me the following error. Thanks, jh c:\winddk\3790.1830\inc\wxp\guiddef.h(160) : error C2084: function 'int __cdecl IsEqualGUID(const struct _GUID &,const struct _GUID &)' already has a body ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include <stdafx.h #include <stdlib.h> #include <windows.h> #include <stdio.h> #include <string.h> #include <iostream.h> #include <devguid.h> #include <regstr.h> #include <guiddef.h> extern "C" { #include "setupapi.h" #include "hidsdi.h" } main(int arc, char* arv[]) { return 0; }
From: Gianluca Varenni on 22 Jan 2007 20:04 Why are you including the setupapi.h and hidsdi.h from within an extern C statement? I suspect that removing that extern C statement will solve the problem. Have a nice day GV "HMS Surprise" <john(a)datavoiceint.com> wrote in message news:1169508643.240949.98150(a)s48g2000cws.googlegroups.com... > Hi folks, > > I know this is more of a question for vc but thought driver folks might > be familiar with it. The little piece of a program below gives me the > following error. > > Thanks, > jh > > c:\winddk\3790.1830\inc\wxp\guiddef.h(160) : error C2084: function 'int > __cdecl IsEqualGUID(const struct _GUID &,const struct _GUID &)' already > has a body > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > #include <stdafx.h > #include <stdlib.h> > #include <windows.h> > #include <stdio.h> > #include <string.h> > #include <iostream.h> > #include <devguid.h> > #include <regstr.h> > #include <guiddef.h> > > extern "C" > { > #include "setupapi.h" > #include "hidsdi.h" > > } > > main(int arc, char* arv[]) > { > > return 0; > } >
From: Ray Trent on 22 Jan 2007 20:38 The superficial problem is that more than one of the header files you've included has an inline definition for IsEqualGUID. The more underlying problem is that you're including way too many header files, and probably are including incompatible ones. E.g. usually you don't have a stdafx.h header file unless you're compiling an MFC application, but in that case, you probably shouldn't be including windows.h or stdlib.h (just probably, though :-). Anyway, it's reasonably possible that if you move guiddef.h into your extern "C" block that the problem might go away because that file defines IsEqualGUID inside a c++ ifdef. That's a bit like treating skin cancer with a bandaid... but whatever turns you on. HMS Surprise wrote: > Hi folks, > > I know this is more of a question for vc but thought driver folks might > be familiar with it. The little piece of a program below gives me the > following error. > > Thanks, > jh > > c:\winddk\3790.1830\inc\wxp\guiddef.h(160) : error C2084: function 'int > __cdecl IsEqualGUID(const struct _GUID &,const struct _GUID &)' already > has a body > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > #include <stdafx.h > #include <stdlib.h> > #include <windows.h> > #include <stdio.h> > #include <string.h> > #include <iostream.h> > #include <devguid.h> > #include <regstr.h> > #include <guiddef.h> > > extern "C" > { > #include "setupapi.h" > #include "hidsdi.h" > > } > > main(int arc, char* arv[]) > { > > return 0; > } > -- Ray
|
Pages: 1 Prev: XP: PCI slot number identification Next: Device Simulator for USB |