home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a006 / 2.ddi / CEXAM.ZIP / PSWDEL.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-11  |  654 b   |  29 lines

  1. #include <stdio.h>
  2. #include "pxengine.h"
  3.  
  4. #define NETDIR          ""
  5. #define NETTYPE         NOTONNET
  6. #define PASSWORD        "password"
  7. #define TABLENAME       "table"
  8.  
  9. int main(void)
  10. {
  11.     int pxErr;
  12.     int Protected;
  13.  
  14.     PXNetInit(NETDIR,NETTYPE,DEFUSERNAME);
  15.     PXTblProtected(TABLENAME, &Protected);
  16.  
  17.     if (Protected) 
  18.        pxErr = PXPswAdd(PASSWORD);
  19.  
  20.     /* Open encrypted table and when done with table, delete password 
  21.        from system, if necessary*/
  22.     if (Protected)
  23.         if ((pxErr = PXPswDel(PASSWORD)) != PXSUCCESS)
  24.             printf("%s\n",PXErrMsg(pxErr));
  25.  
  26.     PXExit();
  27.     return(pxErr);
  28. }
  29.