Re: MIDL compiler error...or me?

From: Robert (Robert_at_discussions.microsoft.com)
Date: 07/27/04


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
> >
> >
>
>
>



Relevant Pages

  • Re: Fibonacci and the roullette wheel
    ... Alexander wrote: ... covering every number other then the 0 or double 0, ... 5.26% on a double-0 wheel. ... Unless I'm missing something in your system, ...
    (sci.math)
  • Re: LVM question. Missing about 11GB of Space..
    ... den 29.10.2005 schrieb Alexander Dalloz um 18:14: ... > "Specify the percentage of the filesystem blocks reserved for the ... 30 gb missing;" about exactly the same topic. ...
    (Fedora)