home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include "pxengine.h"
-
- #define NETDIR ""
- #define NETTYPE NOTONNET
- #define PASSWORD "password"
- #define TABLENAME "table"
-
- int main(void)
- {
- int pxErr;
- int Protected;
-
- PXNetInit(NETDIR,NETTYPE,DEFUSERNAME);
- PXTblProtected(TABLENAME, &Protected);
-
- if (Protected)
- pxErr = PXPswAdd(PASSWORD);
-
- /* Open encrypted table and when done with table, delete password
- from system, if necessary*/
- if (Protected)
- if ((pxErr = PXPswDel(PASSWORD)) != PXSUCCESS)
- printf("%s\n",PXErrMsg(pxErr));
-
- PXExit();
- return(pxErr);
- }