Borland®
Community
[an error occurred while processing this directive]  ENTERA DEVELOPER SUPPORT

Frequently Asked Questions

Known issues using Entera with Gradient DCE

Question:

What are some of the known pitfalls using Gradient DCE on NT
with Entera?

Answer:

These should all be applicable to both Entera 3.2/DCE and Entera 4.0.

Building Entera Applications with Gradient DCE:
===============================================

1.  Define the compiler option:

 __GRADIENT32__

2.  Link with DCE32.LIB instead of LIBDCE.LIB or PTHREADS.LIB

Workaround for Gradient PC-DCE 2.0:
===================================

1.  The header file, cdsmsgproto.h is located in the Gradient PC-DCE 2.0
    installation directory $DCEINC\dce.  However, it is referenced by
    other Gradient header files as if it existed in $DCEINC.

    As a workaround, copy the file $DCEINC\dce\cdsmsgproto.h to $DCEINC.

Known Problems with Gradient support in Entera:
===================================================

1.  Conflicts between Entera and Gradient header files.

    When the Entera header file $ODEDIR/include/ode.h
    is included in addition to the Gradient header file,
    $DCEINC\dce\nbase.h, the structure uuid_t is redefined.

    When the Entera header file $ODEDIR/include/ode.h
    is included in addition to the Gradient header file,
    $DCEINC\dce\rpcbase.h, the structrure rpc_binding_vector_t is
    redefined.

    When the Entera header file $ODEDIR/include/ode.h
    is included in addition to the Gradient header file,
    $DCEINC\dce\uuid.h, the structure uuid_vector_t is redefined.

Workaround/Resolution:
     
Include search path should be $(ODEDIR)\include and $(PCDCE32)\include.
Do not use $(ODEDIR)\dceinc.

Make sure the Entera includes are before the Gradient includes.

2.  Access violation running servers with DAP attribute setting
    Protseq set to "udp" in the server DAP file.  Other settings
    work as expected.

Workaround/Resolution:

Use Protseq=tcp.

3.  When compiling as C++, the DCE macros for exception handling
(TRY, CATCH, etc.) are undefined.  They do compile as regular C.

Workaround/Resolution:

 These macros are not defined in the Gradient headers if __cplusplus
is defined in order to not conflict with C++'s exception handler.  You can do several
things to resolve this:

1.  Use DCE_TRY, DCE_CATCH, etc. instead of TRY, CATCH, etc.

2.  Use the preprocessor definition "STANDARD_DCE_EXCEPTIONS" which
instructs the Gradient headers to use the standard DCE exception macros.

3.  Separate the DCE headers and related code from your C++ code, and wrap
the C code to be used by C++.