This section describes what to do if the class that you need already exists in XWorkplace. Of course, this requires less setup work, because much of the work has already been done.
  1. If you need a new WPS method which isn't overridden yet, modify the IDL file in IDL\ to suit your needs.

    If the method you need is already overridden by XWorkplace, go to 3.

  2. If you then re-make XWorkplace, the SOM compiler will automatically get invoked and modify the sources in SRC\CLASSES and the headers in INCLUDE\CLASSES accordingly.

  3. Again, as said on the previous page, add your own directory to INCLUDE and SRC. Modify the SOM code of the class you need in SRC\CLASSES to call your implementation in your SRC\YOURDIR directory.

  4. You will need to add your header from INCLUDE\YOURDIR to the SOM class code file that you modified. Please think of some useful function prefix for your exported functions so that other programmers (including me) can find your code more easily.

    Don't forget to update src\classes\makefile so that the class code file will be made dependent on your new header (which you have added to the SRC\CLASSES code).

  5. In SRC\YOURDIR\, write your own makefile which compiles your sources. You can take the makefile in SRC\FILESYS\ as a template. This makefile is pretty smart because it automatically recognizes whether it is called from the main makefile, and if not, it invokes the main makefile, which in turn will call the sub-makefiles later. Also, that makefile uses the general makefile include setup.in in the main directory for compiler setup etc.

    Make sure that your makefile writes all .OBJ files into the BIN directory, which your makefile must create if it doesn't exist yet. Again, see how the makefile in SRC\FILESYS does this.

    Other than that, in SRC\YOURDIR, do whatever you want.

  6. Finally, take a look at \makefile. This is the "master makefile" which links all .OBJ modules into the main XWorkplace DLL (XFLDR.DLL). In that makefile, there is an OBJS macro which lists all the .OBJ files which are to be linked together.

    Add your .OBJ file(s) to the end of that variable (and please, add a comment that you did so).