2.2.49.9 Module Specifications

The module statement is provided as a means to define non-enum symbolic constants.

 oa-module = [ "[" LWSP oa-module-attrs LWSP "]"  LWSP ]
             kw-module LWSP Identifier  LWSP 
             "{" oa-module-body "}"
  
 oa-module-attrs = oa-module-attr *( LWSP ","  LWSP oa-module-attr )
 oa-module-attr = uuid-attr /
             version-attr /
             help-attr /
             kw-dllname LWSP "(" LWSP string LWSP ")" /
             kw-hidden
  
 oa-module-body = *( oa-const-stmt / oa-mmethod-stmt )
 oa-const-stmt = [ "[" LWSP *(help-attr) LWSP "]" LWSP ]
                  ( kw-const / kw-static ) LWSP
                  oa-base-type-spec LWSP Identifier  LWSP 
                  "=" LWSP const-exp LWSP ";"
  
 oa-mmethod-stmt = [ "[" LWSP oa-mmethod-attrs LWSP "]" LWSP ] 
               oa-type-spec LWSP [ oa-mmethod-cc LWSP ]
               Identifier LWSP param-declarators LWSP ";"
 oa-mmethod-attrs = oa-mmethod-attr *( LWSP "," LWSP oa-mmethod-attr )
 oa-mmethod-attr = 
             kw-entry LWSP "(" LWSP oa-entry-id LWSP ")" /
             kw-propget /
             kw-propput /
             kw-propputref /
             kw-usesgetlasterror /
             kw-vararg  /
             help-attr
 oa-entry-id = string / integer-const-exp
 oa-mmethod-cc = kw-cdecl /
             kw-stdcall   /
             kw-pascal
  

kw-usesgetlasterror: Specifies that the module method supports an implementation-specific local error handling method<48>.

kw-vararg: Specifies that the final parameter of the method MUST be of type SAFEARRAY(VARIANT) or SAFEARRAY(VARIANT)*. This attribute MUST NOT be used on an ODL dispinterface property or on a property accessor method. For information on handling vararg arguments, see section 3.1.4.4.3.

oa-mmethod-cc:  Specifies an implementation-specific local calling convention for the method<49>.

The statements within the scope of the module statement define constant symbols with the specified type and values, and static entry points in the module are specified by the string argument of the dllname attribute.

All oa-mmethod-stmt productions MUST have an entry attribute specified. If oa-entry-id is a string, this is a named entry point. If oa-entry-id is an integer, the entry point is defined by an ordinal.