April 10, 2003
I also tried this method and had the same result
as Jan ie:
======================
Symbol Undefined _IID_IDirectDraw7
Lines Processed: 130061  Errors: 1  Warnings: 1
Build failed
=======================
Has anyone found a way around this problem?

Phill.

Has anyone solved this problem?
"Jan Knepper" <jan@smartsoft.cc> wrote in message
news:3D8B90C0.E6789619@smartsoft.cc...
> Christof Meerwald wrote:
>
> > On Fri, 20 Sep 2002 09:15:11 -0400, Jan Knepper wrote:
> > > Christof Meerwald wrote:
> > >>  - use "link /lib /convert" (using the Microsoft linker included in
the Platform
> > >> SDK) to convert the libraries to the old COFF format
> > > VC98's LIB (not LINK) actually does have the /convert switch and
indeed if you do:
> > > LIB /convert shell32.lib
> >
> > But AFAIK "lib /convert shell32.lib" is the same as "link /lib /convert shell32.lib" (I guess lib is just a small wrapper around "link /lib")
>
> Tried, that, not with VC98, and it didn't work.
> It does not really make sense though to convert a library with a 'link'
command... Could
> be just me...
>
>


April 10, 2003
I don't know what else you have tried, but a relatively simple, albeit hacky, way around this is to define the symbol internally.

const IID IID_IDirectDraw7 = { ... }

The value of IID_IDirectDraw7 will *never* change, so this should be fine.

However, you may want to insulate your code from a multiply defined symbol, if IID_IDirectDraw7 becomes linked in the future. A way to get around this is

// in global header
#define    IID_IDirectDraw7    IID_IDirectDraw7_internal


// in implementationfile.cpp
const IID IID_IDirectDraw7_internal = { ... };

That way even if/when you link to IID_IDirectDraw7 it'll all compile and link and work no problem.

Naturally it's a little unattractive, since it's a #define, but because of the immutability of IID values it is safe.


"Phill" <phillbert@pacific.net.au> wrote in message news:b73dpf$281n$1@digitaldaemon.com...
> I also tried this method and had the same result
> as Jan ie:
> ======================
> Symbol Undefined _IID_IDirectDraw7
> Lines Processed: 130061  Errors: 1  Warnings: 1
> Build failed
> =======================
> Has anyone found a way around this problem?
>
> Phill.
>
> Has anyone solved this problem?
> "Jan Knepper" <jan@smartsoft.cc> wrote in message
> news:3D8B90C0.E6789619@smartsoft.cc...
> > Christof Meerwald wrote:
> >
> > > On Fri, 20 Sep 2002 09:15:11 -0400, Jan Knepper wrote:
> > > > Christof Meerwald wrote:
> > > >>  - use "link /lib /convert" (using the Microsoft linker included in
> the Platform
> > > >> SDK) to convert the libraries to the old COFF format
> > > > VC98's LIB (not LINK) actually does have the /convert switch and
> indeed if you do:
> > > > LIB /convert shell32.lib
> > >
> > > But AFAIK "lib /convert shell32.lib" is the same as "link /lib
/convert
> > > shell32.lib" (I guess lib is just a small wrapper around "link /lib")
> >
> > Tried, that, not with VC98, and it didn't work.
> > It does not really make sense though to convert a library with a 'link'
> command... Could
> > be just me...
> >
> >
>
>


April 10, 2003
I've faced this problem couple months ago (mainly with DirectShow GUIDs), and found the cause and solution.

Cause: VC uses 'struct __declspec(uuid("..."))' constructions hidden via
MIDL_INTERFACE macro

Solution: I wrote special parser which went through all headers and extracted all GUIDs into separate sources, then compiled them and added to library.

I doubt if this lib becomes copyrighted, so I don't publish it here, but you are free to contact me directly and I will send it to you (in zip it is 48 Kb).

Nic Tiger.


"Phill" <phillbert@pacific.net.au> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:b73dpf$281n$1@digitaldaemon.com...
> I also tried this method and had the same result
> as Jan ie:
> ======================
> Symbol Undefined _IID_IDirectDraw7
> Lines Processed: 130061  Errors: 1  Warnings: 1
> Build failed
> =======================
> Has anyone found a way around this problem?
>
> Phill.
>
> Has anyone solved this problem?
> "Jan Knepper" <jan@smartsoft.cc> wrote in message
> news:3D8B90C0.E6789619@smartsoft.cc...
> > Christof Meerwald wrote:
> >
> > > On Fri, 20 Sep 2002 09:15:11 -0400, Jan Knepper wrote:
> > > > Christof Meerwald wrote:
> > > >>  - use "link /lib /convert" (using the Microsoft linker included in
> the Platform
> > > >> SDK) to convert the libraries to the old COFF format
> > > > VC98's LIB (not LINK) actually does have the /convert switch and
> indeed if you do:
> > > > LIB /convert shell32.lib
> > >
> > > But AFAIK "lib /convert shell32.lib" is the same as "link /lib
/convert
> > > shell32.lib" (I guess lib is just a small wrapper around "link /lib")
> >
> > Tried, that, not with VC98, and it didn't work.
> > It does not really make sense though to convert a library with a 'link'
> command... Could
> > be just me...
> >
> >
>
>


April 10, 2003
Yeah, create a file with the necessary IID's in there. Such as attached for
example...
Good luck!
Jan



Phill wrote:

> I also tried this method and had the same result
> as Jan ie:
> ======================
> Symbol Undefined _IID_IDirectDraw7
> Lines Processed: 130061  Errors: 1  Warnings: 1
> Build failed
> =======================
> Has anyone found a way around this problem?
>
> Phill.
>
> Has anyone solved this problem?
> "Jan Knepper" <jan@smartsoft.cc> wrote in message
> news:3D8B90C0.E6789619@smartsoft.cc...
> > Christof Meerwald wrote:
> >
> > > On Fri, 20 Sep 2002 09:15:11 -0400, Jan Knepper wrote:
> > > > Christof Meerwald wrote:
> > > >>  - use "link /lib /convert" (using the Microsoft linker included in
> the Platform
> > > >> SDK) to convert the libraries to the old COFF format
> > > > VC98's LIB (not LINK) actually does have the /convert switch and
> indeed if you do:
> > > > LIB /convert shell32.lib
> > >
> > > But AFAIK "lib /convert shell32.lib" is the same as "link /lib /convert shell32.lib" (I guess lib is just a small wrapper around "link /lib")
> >
> > Tried, that, not with VC98, and it didn't work.
> > It does not really make sense though to convert a library with a 'link'
> command... Could
> > be just me...
> >
> >


April 11, 2003
I found an even simpler way from the Microsoft
website, just add the following line before including
ddraw.h like this:

#define INITGUID
#include "ddraw.h"

This fixes  all of the IID's

Thanks to all  for your suggestions.

Phill.

"Jan Knepper" <jan@smartsoft.us> wrote in message news:3E95F5B7.14C29C84@smartsoft.us...
> Yeah, create a file with the necessary IID's in there. Such as attached
for
> example...
> Good luck!
> Jan
>
>
>
> Phill wrote:
>
> > I also tried this method and had the same result
> > as Jan ie:
> > ======================
> > Symbol Undefined _IID_IDirectDraw7
> > Lines Processed: 130061  Errors: 1  Warnings: 1
> > Build failed
> > =======================
> > Has anyone found a way around this problem?
> >
> > Phill.
> >
> > Has anyone solved this problem?
> > "Jan Knepper" <jan@smartsoft.cc> wrote in message
> > news:3D8B90C0.E6789619@smartsoft.cc...
> > > Christof Meerwald wrote:
> > >
> > > > On Fri, 20 Sep 2002 09:15:11 -0400, Jan Knepper wrote:
> > > > > Christof Meerwald wrote:
> > > > >>  - use "link /lib /convert" (using the Microsoft linker included
in
> > the Platform
> > > > >> SDK) to convert the libraries to the old COFF format
> > > > > VC98's LIB (not LINK) actually does have the /convert switch and
> > indeed if you do:
> > > > > LIB /convert shell32.lib
> > > >
> > > > But AFAIK "lib /convert shell32.lib" is the same as "link /lib
/convert
> > > > shell32.lib" (I guess lib is just a small wrapper around "link
/lib")
> > >
> > > Tried, that, not with VC98, and it didn't work.
> > > It does not really make sense though to convert a library with a
'link'
> > command... Could
> > > be just me...
> > >
> > >
>


----------------------------------------------------------------------------
----


> #include <stdjak.h>
>
> #include <stdio.h>
>
> #include <objbase.h>
>
>
>
> static IID              IIDFromString     ( LPOLESTR );
> static CLSID            CLSIDFromString   ( LPOLESTR );
>
>
>
> extern "C" {
>
> const IID               IID_IWebBrowser2           = IIDFromString   (
L"{D30C1661-CDAF-11D0-8A3E-00C04FC9E26E}" );
> const IID               IID_IHTMLAnchorElement     = IIDFromString   (
L"{3050f1da-98b5-11cf-bb82-00aa00bdce0b}" );
> const IID               IID_IHTMLDocument2         = IIDFromString   (
L"{332c4425-26cb-11d0-b483-00c04fd90119}" );
> const IID               IID_IHTMLElement           = IIDFromString   (
L"{3050f1ff-98b5-11cf-bb82-00aa00bdce0b}" );
> const IID               IID_IHTMLImgElement        = IIDFromString   (
L"{3050f240-98b5-11cf-bb82-00aa00bdce0b}" );
> const IID               IID_IHTMLFrameBase         = IIDFromString   (
L"{3050F311-98B5-11CF-BB82-00AA00BDCE0B}" );
> const IID               IID_IHTMLFramesCollection2 = IIDFromString   (
L"{332c4426-26cb-11d0-b483-00c04fd90119}" );
> const IID               IID_IHTMLWindow2           = IIDFromString   (
L"{332c4427-26cb-11d0-b483-00c04fd90119}" );
> const IID               IID_IDocHostUIHandler      = IIDFromString   (
L"{BD3F23C0-D43E-11CF-893B-00AA00BDCE1A}" );
> const IID               IID_IHTMLTextElement       = IIDFromString   (
L"{3050f218-98b5-11cf-bb82-00aa00bdce0b}" );
> const IID               IID_IHTMLFormElement       = IIDFromString   (
L"{3050f1f7-98b5-11cf-bb82-00aa00bdce0b}" );
> const IID               IID_IHTMLSelectElement     = IIDFromString   (
L"{3050f244-98b5-11cf-bb82-00aa00bdce0b}" );
> const IID               IID_IHTMLInputElement      = IIDFromString   (
L"{3050f5d2-98b5-11cf-bb82-00aa00bdce0b}" );
>
>
>
> const CLSID             CLSID_WebBrowser           = CLSIDFromString (
L"{8856F961-340A-11D0-A96B-00C04FD705A2}" );
>
> };
>
>
>
> static IID  IIDFromString ( LPOLESTR  str )
> {
>    CLSID             clsid;
>    IID               tmp;
>    HRESULT           result;
>    static TCHAR      message  [ 128 ];
>
>
>    if ( ( result = CLSIDFromString ( str, &clsid ) ) != S_OK )
>    {
>       sprintf ( message, "CLSIDFromString %ld", result );
>       MessageBox ( 0, message, __FUNC__, MB_ICONERROR | MB_OK );
> //    iMessage :: Report ( iMessage :: ButtonOk, __FUNC__, 0,
"CLSIDFromString %ld", result );
>    }
>
>    if ( ( result = IIDFromString  ( str, &tmp ) ) != S_OK )
>    {
>       sprintf ( message, "IIDFromString %ld", result );
>       MessageBox ( 0, message, __FUNC__, MB_ICONERROR | MB_OK );
> //    iMessage :: Report ( iMessage :: ButtonOk,  __FUNC__, 0, "%s",
__FILE__ );
>    }
>
>    return ( tmp );
> }
>
>
>
> static CLSID  CLSIDFromString ( LPOLESTR  str )
> {
>    CLSID             clsid;
>    HRESULT           result;
>    static TCHAR      message  [ 128 ];
>
>
>    if ( ( result = CLSIDFromString ( str, &clsid ) ) != S_OK )
>    {
>       sprintf ( message, "CLSIDFromString %ld", result );
>       MessageBox ( 0, message, __FUNC__, MB_ICONERROR | MB_OK );
> //    iMessage :: Report ( iMessage :: ButtonOk, __FUNC__, 0,
"CLSIDFromString %ld", result );
>    }
>
>    return ( clsid );
> }


April 11, 2003
Cool!
This might add quite a bit of 'size' to your code though...



Phill wrote:

> I found an even simpler way from the Microsoft
> website, just add the following line before including
> ddraw.h like this:
>
> #define INITGUID
> #include "ddraw.h"
>
> This fixes  all of the IID's
>
> Thanks to all  for your suggestions.
>
> Phill.

April 12, 2003
It does. That's the reason I often eschew it in favour of the "#define _" technique, especially when creating small COM DLLs

"Jan Knepper" <jan@smartsoft.us> wrote in message news:3E96CDB8.E3C47E7C@smartsoft.us...
> Cool!
> This might add quite a bit of 'size' to your code though...
>
>
>
> Phill wrote:
>
> > I found an even simpler way from the Microsoft
> > website, just add the following line before including
> > ddraw.h like this:
> >
> > #define INITGUID
> > #include "ddraw.h"
> >
> > This fixes  all of the IID's
> >
> > Thanks to all  for your suggestions.
> >
> > Phill.
>


April 12, 2003
Ok , I see what you mean . Nic sent me a file
that has fixed the problem any way. Im just glad to
get rid of the headache and learn something new from
this. Im just another new Imigrant from Java.

Thanks
BTW, Jan your website has your old Email
address on it , I see you have a new one.
.cc -> .us

Phill.

"Jan Knepper" <jan@smartsoft.us> wrote in message news:3E96CDB8.E3C47E7C@smartsoft.us...
> Cool!
> This might add quite a bit of 'size' to your code though...
>
>
>
> Phill wrote:
>
> > I found an even simpler way from the Microsoft
> > website, just add the following line before including
> > ddraw.h like this:
> >
> > #define INITGUID
> > #include "ddraw.h"
> >
> > This fixes  all of the IID's
> >
> > Thanks to all  for your suggestions.
> >
> > Phill.
>


1 2
Next ›   Last »