This page is a part of XSecurePro online Help Manual.
X-SecurePro is X-Server for windows by Labtam bringing your PC to Unix and X-Windows. Seamless Secure integration from PC to Unix and X-Window System. Bringing Maximum Security while still finding all of the standard access of X11, TCP/IP, FTP, TFTP, LPR, TELNET, NFS and SSH. Visit Home of X Server for windows for more information.



Porting X Window Applications to XSecurePro

When porting any application to XSecurePro, the first step is to ensure that the build environment is fully set up on XSecurePro.

Quite often, codes for X applications are generated using specific tools. If your code is created using a code generator and the code generator is not available on XSecurePro, you must take the code that was generated using the code generator to XSecurePro and port it.

The next step is to compile the source code and resolve issues as they appear. Typical issues are related to path differences, potentially non-existent device files, environment differences, etc. You might need to modify the paths for including the X11 and/or Motif include files and libraries.

There could be differences in the header files and in specific APIs, or there may be missing header files and APIs. The differences can be resolved by writing XSecurePro implementations for the APIs and header files.

If your applications include scripts, such as Perl scripts, these will have to be modified to account for the platform differences.

If you are porting a GUI application client receiving input via STDIN, use an alternate method of receiving input, such as a Windows dialog box.


Memory Management

Xlib contains its own memory management routines, including Xfree, Xmalloc, and Xcalloc. In order to maintain compatibility with future versions of the XSecurePro XDK, use these routines instead of Microsoft WIN32 memory management routines.

Memory allocated by these Xlib routines should be freed using Xlib routines. Similarly, memory that is freed using Xlib routines should be allocated by Xlib routines.


The gethostname Function

Xlib.dll exports the gethostname function. A function by this name is also exported by the Windows Sockets DLL.

We do not recommend that you use the Xlib.dll version of this function; it is provided by Xlib only for backwards compatibility. In order to ensure that you are using the Windows Sockets version of this function, and not the Xlib.dll version, your link statement must include WSOCK32.lib before Xlib.lib.


Setting the Locale for an X Client

The default value for the run-time control variable XLOCALEDIR is home\x11\locale. The locale.dir file is in the home\x11\locale directory.

Locale aliases are supported. You can specify your locale alias in the locale.alias file in the home\x11\locale directory.


Accepting Localized Input

X11R6 XIM support is included on the X server side. This support lets local X clients accept localized input when displaying to an X server that supports X11R6 XIM (such as XServer in XSecurePro).


Restrictions on Developing X Applications with XDK

There are some restrictions on developing an X application code with the XSecurePro XDK:

  • You cannot directly use WinSock API

  • As sockets interface, the BSD sockets interface is implemented in XDK

  • There are no equivalent substitutes for some UNIX system calls/requests (e.g., fork, signal, pipe, etc.)

  • The source errno.h file for an X application may require some changes in the application source code; in some cases, you can also use the xeerrno.h file in the home\XDK\Include\Sys directory of the XSecurePro package

  • Some other restrictions.





Home | Product | Download | Order Now | Upgrade | Support | Pricing | Company Information | Contact Us


Labtam Copyright 1999 - 2009 LabtamTM Inc.