Re: MIDL compiler error...or me?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 07/21/04


Date: Tue, 20 Jul 2004 23:13:08 -0700

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: Entropy sources under WinXP
    ... mentioning between current, unlike missing, per positive basiss. ... unless Shelly roars nonsenses instead of ... Robert ...
    (sci.crypt)
  • Re: Golden Age of Science Fiction
    ... For the benefit of people who haven't run into the information, Robert ... Randall was a pseudonym used by the writing team of Robert Silverberg ... Some historical information missing from my previous post: ... Editorial in Infinity Science Fiction was the text of a speech by ...
    (rec.arts.sf.fandom)
  • Re: Setting the contents of a file to a variable?
    ... I do not think I am the one missing anything. ... M$ emerging Ruby programmers better understood, ... If anybody should take seriously what you, Robert and badboy, are ...
    (comp.lang.ruby)
  • Re: Printing in Outlook 2003
    ... >> What am I missing? ... Robert, you are talking about Outlook Express. ... one of the programs in the Microsoft Office suite. ...
    (microsoft.public.outlook)
  • Re: Webpage printing problem
    ... click on file and if you have a pint prview or set-up decrease the size ... of the left margin. ... "Robert" wrote in message ... > the image size and do not restore the missing text. ...
    (microsoft.public.windowsxp.basics)