Accessing _servInst in zApp 3.x on NT

Article ID: 1073
Last updated: 05 Feb, 2008
Article ID: 1073
Last updated: 05 Feb, 2008
Revision: 1
Views: 3755
Posted: 22 Jan, 1998
by Dean J.
Updated: 05 Feb, 2008
by Dean J.
Problem


Unable to access the global variable _servInst in zApp 3.x under Windows NT.


Cause


If the 16 bit version of the application does DDE communication, part of the DDE communication uses a zApp global variable called _servInst. This variable is declared in lastdefs.hpp. However, because Z_NTUSEDLL is defined instead of Z_USEDLL in the NT environment, _servInst is not declared.

Here is how _servInst is accessed for 16 bit:

   unsigned long abc;
zAppGetAppVar(_servInst); // to access the value of _servInst
zAppGetAppVar(_servInst) = abc; // to set the value of _serveInst to the value of abc




Action


To access the global variable _servInst in zApp 3.x under Windows NT, modify two files as follows:

  1. In ddeclass.cpp change the line that states:

    unsigned long _servInst=0;
    to:

    Z_DLLVSPEC unsigned long Z_DLLVBSPEC _servInst=0;

  2. In defs.hpp add the following line:

    extern Z_DLLVSPEC unsigned long Z_DLLVBSPEC _servInst;
    after the line:

    extern unsigned long debugFlags;

Modifications to the source and header must be made in the parts directory. Modifications to the header must also be made to the workspace directories.
This article was:   Helpful | Not helpful
Report an issue
Article ID: 1073
Last updated: 05 Feb, 2008
Revision: 1
Views: 3755
Posted: 22 Jan, 1998 by Dean J.
Updated: 05 Feb, 2008 by Dean J.

Others in this category