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,NOTONNET,DEFUSERNAME);
- PXTblProtected(TABLENAME, &Protected);
-
- if (Protected)
- {
- /* Submit password to system if table protected */
- if ((pxErr = PXPswAdd(PASSWORD)) != PXSUCCESS)
- printf("%s\n", PXErrMsg(pxErr));
- }
-
- PXExit();
- return(pxErr);
- }