Convert int to enum
From: Bonj (Bonj_at_discussions.microsoft.com)
Date: 12/13/04
- Previous message: Dan Halbert: "DDE command-line wrapper?"
- Next in thread: Craig Kelly: "Re: Convert int to enum"
- Reply: Craig Kelly: "Re: Convert int to enum"
- Reply: Alexander Nickolov: "Re: Convert int to enum"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 13 Dec 2004 06:11:04 -0800
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
- Previous message: Dan Halbert: "DDE command-line wrapper?"
- Next in thread: Craig Kelly: "Re: Convert int to enum"
- Reply: Craig Kelly: "Re: Convert int to enum"
- Reply: Alexander Nickolov: "Re: Convert int to enum"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|