home *** CD-ROM | disk | FTP | other *** search
- /*
- * ProIcon: Code resource to close a resource file.
- *
- * This code resource will appear under the resource type 'CODE', ID 1001,
- * name "CloseResFile". Invoke with:
- *
- * callout("CODE","CloseResFile", refFile)
- *
- * where resFile is an integer file identifier for an open resource file.
- *
- * resFile is a simple integer. The function returns error 105 if
- * there is an error closing the file.
- */
-
- #include "ProIcon.h"
-
- pascal dptr main(dargv, argc, ip, callback)
- dptr dargv;
- short int argc;
- short int *ip;
- pointer (*callback)();
- {
- if (argc != 1 || Type(Arg1) != T_Integer)
- RunErr(Err101, &Arg1); /* integer expected for first user arg */
-
- CloseResFile((int)IntVal(Arg1));
-
- if (ResError())
- RunErr(Err105, &Arg1);
-
- Return;
- }
-