I create a OCX program with ATL project, and One parameter in the interface
function is ENUM type, and I has defined the ENUM type in the interface, but
compiled falid with MIDL2001, in the generated IDL file, I find the
generated result is not the same with my think, and What can I do?
The generated IDL is so:
in the interface define file(header file):
[...]
_interface IMyInterface:.. .
{
typedef enum _STATE
{
Init = 0,
Pause = 1,
Stop = 2
} STATE;
[propget, id(13), helpstring("ÊôÐ Ô CurrentState")] HRESULT
CurrentState([out, retval] STATE* pVal);
}
compiled fiaild£¬
in the IDL file(generated idl file):
[...]
enum _STATE
{
Init = 0,
Pause = 1,
Stop = 2
} ;
enum _STATE Init;
enum _STATE Pause;
enum _STATE Stop;
typedef enum STATE STATE;
[propget, id(13), helpstring("ÊôÐ Ô CurrentState")] HRESULT
CurrentState([out, retval] STATE* pVal);
.... 0 1448 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ajax Chelsea |
last post by:
can not the "static const int" be replaced by "static enum" anywhere?
is it necessary that define special initialization syntax for "static const int"?
|
by: Patrick Guio |
last post by:
Dear all,
I wonder whether anyone might have a better idea/solution to the
following. I need an associative container <int,string> for a limited
and defined number of values (enum-like) but ir must be able to be updated
with more pairs later. Here is the solution I have developed so long
All my enum-like int values are declared static const inside a namespace
as well as a struct with a static map<int,string> to keep the pairs.
The...
|
by: Fao |
last post by:
Hi, I am in my first year of C++ in college and my professor wants me
to Write a Program with multiple functions,to input two sets of
user-defined data types:
One type named 'Sign' declared by "typedef" to contain only
either +10 or -10 and
the other type named Color declared by "enum" to contain only
black, blue, purple, red, white, and yellow.
|
by: VK |
last post by:
Just to realease my frustration:
innocent "enum" is a reserved word in JScript!
!@#$%^&*
I occasionally discovered it just before I got ready to smash my
computer over my head (some people would enjoy I guess ;-)
Maybe someone has her/his collection of "undocumented reserved words"
|
by: mdh |
last post by:
In one of the answers to a K&R exercise, the first couple of lines are:
enum loop { NO, YES};
enum loop okloop=YES;
I get the first line, but not the second.
Sorry about the LOL question.
Thanks in advance
| |
by: Jacek Dziedzic |
last post by:
Hi!
I often find that my programs need to store information on
"current mode of something" with two or at most several
mutually exclusive "modes" to choose from, e.g.
- datafile: is it in a) read-only mode or b) write-only mode,
- a function picking points a) above, b) below or c) contained
on a plane in 3D,
etc.
|
by: Jamey Bon |
last post by:
As a newbie to C#, I am not sure what I can do about this. I would like to
do something like an Enumeration to use "constants" like Yes to indicate
true and No for false. But since there seems to be no underlying 0 or non-
zero for boolean values in C#, I am not sure how to handle this. Any
advice would be appreciated.
Thanks,
JB
|
by: JB |
last post by:
Hi All,
I'm pulling my hair over this and could really do with a bit of help.
I'm using various different enums as bit fields and I'd like to create
a set of generic Functions or Subs to manipulate the bitfields.
For instance:
<Flags()_
Enum ActionFlags As Byte
|
by: msukumarbabu |
last post by:
Hi all,
What will be difference between "typedef enum" and "enum".
or
difference between “typedef structure" and "structure"
I am going through some code.
in that some place they are using enum without typedef. In some places they are using typedef before enumeration definition.
Kindly provide some reference, for why they are using typedef.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |