Re: MIDL compiler error...or me?
From: Robert (Robert_at_discussions.microsoft.com)
Date: 07/27/04
- Next message: Igor Tandetnik: "Re: Using ITypeComp: unable to look up methods or properties when return type is an IDispatch."
- Previous message: Sean Rohead: "IPicture & Office Command Bars"
- In reply to: Alexander Nickolov: "Re: MIDL compiler error...or me?"
- Next in thread: Alexander Nickolov: "Re: MIDL compiler error...or me?"
- Reply: Alexander Nickolov: "Re: MIDL compiler error...or me?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 27 Jul 2004 09:24:36 -0700
Thanks Alexander. I have tried it but ran into some trouble. Two questions:
1. If I want compatibility with older OSes, I need to ONLY use the /no_robust switch on my MIDL compiler line (and I don't need /D_WIN32_WINNT=0x500) ?
2. What I understood from your response is that I will only need no_robust (because I want compatibility for all)....I tried this:
midl /ms_ext /app_config /c_ext /no_robust bgcomint.idl
and at compile I get:
midl : command line warning MIDL1008 : unknown switch "no_robust"
Is my MIDL compiler not up to date? How can I fix this?
Thank you,
Robert
"Alexander Nickolov" wrote:
> Yes, you missing a macro. Add /D_WIN32_WINNT=0x500
> when building your proxy/stub DLL.
>
> Note this renders your proxy/stub DLL unusable on Win NT4
> and Win 9x/Me. If you want compatibility with older OSes,
> you need to instead add the /no_robust switch on your MIDL
> processing line.
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@mvps.org
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
> "Robert" <Robert@discussions.microsoft.com> wrote in message
> news:7C430C69-DA37-4C90-AEBD-A186A6ACF1A2@microsoft.com...
> > Hello everyone,
> >
> > I am trying to add a new method to a dual interface. The IDL goes like
> this:
> >
> > [id(3)] HRESULT GetLocations([out] SAFEARRAY(long) *locations);
> >
> > When I try to compile this, I get the error:
> >
> > fatal error C1189: #error : You need a Windows NT 4.0 or later to run
> this stub because it uses these features:
> > NMAKE : fatal error U1077: 'cl' : return code '0x2'
> > Stop.
> > Error executing nmake.
> >
> > Why is this happening? I am developing on Windows XP Pro. Is it the use of
> SAFEARRAY? Am I missing a directive or something? I use:
> >
> > import "oaidl.idl";
> > import "ocidl.idl";
> >
> > at the top. Am I missing something? Any help here would be greatly
> appreciated.
> >
> > Thank you
> >
> > Robert
> >
> >
>
>
>
- Next message: Igor Tandetnik: "Re: Using ITypeComp: unable to look up methods or properties when return type is an IDispatch."
- Previous message: Sean Rohead: "IPicture & Office Command Bars"
- In reply to: Alexander Nickolov: "Re: MIDL compiler error...or me?"
- Next in thread: Alexander Nickolov: "Re: MIDL compiler error...or me?"
- Reply: Alexander Nickolov: "Re: MIDL compiler error...or me?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|