3 — Migration Notes


[Previous] [Next] [Contents] [Index]


This chapter contains information on how to migrate applications developed for environments other than 32 bit Windows, or with other DCE vendors. It contains the following sections:

3.1 Migrating UNIX DCE Applications to PC-DCE
3.2 Migrating Applications Developed With Compaq DCE for Windows NT
3.3 Migrating 16 bit Windows Applications To 32 bit Windows
3.4 Migrating Applications Developed Using Earlier Releases of PC-DCE

3.1 Migrating UNIX DCE Applications to PC-DCE

Keep the following in mind when porting your existing DCE applications from a UNIX system to PC-DCE:

3.1.1 Retrieving Errors on DCE API Calls

In PC-DCE applications, failed pthread API calls (and other failed DCE API calls) return an error to the application via the Win32 API call GetLastError() rather than by setting the errno variable as expected in UNIX DCE implementations.

This mechanism for PC-DCE error retrieval is necessary because there is no way to set the errno variable from the PC-DCE runtime that works reliably for all C compilers or for all versions of a particular compiler's C runtime library. To retrieve the errno value of the most recent failed DCE API call, you must use GetLastError().

3.2 Migrating Applications Developed With Compaq DCE for Windows NT

Applications developed using Compaq DCE for Windows NT will have to be recompiled and relinked with PC-DCE ADK to be compatible with PC-DCE.

Developers who previously used Compaq's IDL compiler to generate stubs or header files may notice that PC-DCE's IDL compiler assigns a different calling convention to the function prototypes. PC-DCE's IDL compiler defaults the convention as being __cdecl whereas Compaq's IDL compiler defaults it to __stdcall. This may lead to some unresolved function prototype issues when applications are migrated to a PC-DCE development environment.

PC-DCE uses the -mgr_call_seq and -ptr_call_seq command line options to enable a developer to choose calling conventions. To force the call convention to be a __stdcall only, call the PC-DCE IDL compiler with the following parameters:

idl.exe -ptr_call_seq __stdcall -mgr_call_seq __stdcall

3.3 Migrating 16 bit Windows Applications To 32 bit Windows

Please keep the following in mind when porting your existing PC-DCE for Windows 3.1 (16-bit) applications to PC-DCE (32-bit):

3.4 Migrating Applications Developed Using Earlier Releases of PC-DCE

3.4.1 Mutexes

PC-DCE fully supports recursive (MUTEX_RECURSIVE_NP), nonrecursive (MUTEX_NONRECURSIVE_NP) and fast (MUTEX_FAST_NP) mutexes, with fast mutexes set as the default. As a result, any code from a previous PC-DCE release that tries to lock a mutex more than once in the same thread should be rewritten to unlock the mutex before it tries to relock it, unless the recursive mutex is explicitly selected.

The pthread_mutexattr_getkind_np() and pthread_mutexattr_setkind_np() routines are also supported, allowing you to set and retrieve the mutex kind attribute for recursive, nonrecursive, and fast mutexes.


[Previous] [Next] [Contents] [Index]


To make comments or ask for help, contact support@entegrity.com.

Copyright © 1997-2003 Entegrity Solutions Corporation & its subsidiaries