Re: Convert int to enum

From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 12/14/04

  • Next message: Bonj: "Re: Convert int to enum"
    Date: Tue, 14 Dec 2004 10:16:43 -0800
    
    

    Why don't you use the ADO header from the Platform SDK?
    No need to process the IDL via MIDL.

    -- 
    =====================================
    Alexander Nickolov
    Microsoft MVP [VC], MCSD
    email: agnickolov@mvps.org
    MVP VC FAQ: http://www.mvps.org/vcfaq
    =====================================
    "Bonj" <Bonj@discussions.microsoft.com> wrote in message 
    news:E82DA6D7-03D5-4F34-9C89-A6109E45B6B0@microsoft.com...
    > I've posted this before but obviously to the wrong groups, as no-one's got
    > back... I can't believe I'm venturing into uncharted territory by trying 
    > to
    > use ADO in a Win32 SDK application...
    >
    > I am having a problem with MIDL producing output that is acceptable to C,
    > but not to C++ (the generated msado15_h.h file). I want to use the COM
    > object (ADO) in C++, so I don't really
    > want to have to go through the ballache of having a separate compilation 
    > unit
    > to export functions from.
    >
    > Basically, it produces a default argument, by saying
    > /* [defaultvalue][in] */ SeekEnum SeekOption = 1) = 0;
    >
    > when '0' isn't an enum - it's an int. It needs 'adSeekFirstEQ' but midl
    > obviously doesn't think to put that.
    >
    > Is there any way i can get midl.exe to produce an .h file that is 
    > acceptable
    > to the C++ compiler or am I just going to have to stick to C?
    >
    > The problem is not with compiling the msado15_i.c file - that compiles 
    > fine.
    > The issue is with compiling anything that includes the msado15_h.h file if 
    > it
    > is .cpp rather than .c 
    

  • Next message: Bonj: "Re: Convert int to enum"

    Relevant Pages

    • Re: Convert int to enum
      ... Why don't you use the ADO header from the Platform SDK? ... No need to process the IDL via MIDL. ... Microsoft MVP, MCSD ... > The problem is not with compiling the msado15_i.c file - that compiles ...
      (microsoft.public.vc.language)
    • Re: Convert int to enum
      ... Why don't you use the ADO header from the Platform SDK? ... No need to process the IDL via MIDL. ... Microsoft MVP, MCSD ... > The problem is not with compiling the msado15_i.c file - that compiles ...
      (microsoft.public.win32.programmer.ole)
    • Re: Convert int to enum
      ... Why don't you use the ADO header from the Platform SDK? ... No need to process the IDL via MIDL. ... Microsoft MVP, MCSD ... > The problem is not with compiling the msado15_i.c file - that compiles ...
      (microsoft.public.dotnet.languages.vc)
    • Re: Development tool that compiles to .NET using object pascal language, and Delphi interface?
      ... The VCL has always been bug-ridden. ... ADO has been supplanted by ADO.NET. ... > Tried compiling ADO stuff? ... > Tried memory intensive or highly multithreaded apps? ...
      (borland.public.delphi.non-technical)
    • Re: Passing structures in IDL
      ... Microsoft MVP, MCSD ... > I am trying to pass a structure as a parameter to a method in IDL. ... > However I am getting a warning on compiling the IDL. ...
      (microsoft.public.win32.programmer.ole)

    Loading