在delphi中定义了一个TOleEnum类型,但编译时提示"Undclared identifier: 'TOleEnum'",这是怎么回事?

解决方案 »

  1.   

    uses ActiveX
    或者
    uses Oledb;
    看帮助:
    Represents enumerated types that must be sent over a COM interface.UnitActivex or Oledb 这里告诉你在哪个单元Delphi syntax:type TOleEnum = type LongWord;DescriptionDispatch interfaces do not marshal enumerated types. TOleEnum is used in the Delphi language for interface parameters that are logically an enumerated type but must be passed as an integer value instead. Typically, each interface member that uses TOleEnum defines a set of integer constants to represent the enumerated values.