| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Missing file(s) |
HA> These are unfortunately not included. I can compile the program,
HA> but linking is somewhat more itchy. Can you provide me with these
HA> missing externals? Or a site where I can ftp them or file request
HA> them?
That was the original source I found, and I forgot that I had
simplified the source to eliminate those external functions. I am
not sure that I ever had the externals, and I don't remember where I
got the file. I had a simple shutdown similar to the one you posted,
but this one does a reboot after the shutdown. Here is the program
with the externals removed.
#define INCL_DOSPROCESS
#define INCL_DOSERRORS
#define INCL_NOPMAPI
#define INCL_DOSDEVICES
#define INCL_DOSFILEMGR /* File Manager values */
#include
#include
#include
#include
void main(void)
{
ULONG Reserved, dummy; /* Reserved, must be zero */
APIRET rc,rc2; /* Return code */
HFILE hf;
Reserved = 0; /* Reserved, must be set to zero */
fprintf(stderr, "Shutdown for OS/2 2.x\n\n");
rc2 = DosOpen("DOS$", &hf, &dummy, 0L, FILE_NORMAL, FILE_OPEN,
OPEN_ACCESS_WRITEONLY | OPEN_SHARE_DENYNONE |
OPEN_FLAGS_FAIL_ON_ERROR, NULL);
rc = DosShutdown(1L);
/* Display result of shutdown */
switch (rc)
{
case NO_ERROR:
fprintf(stderr, "\nThe system was shutdown succesfully");
break;
case ERROR_ALREADY_SHUTDOWN:
fprintf(stderr, "\nThe system was already shutdown");
break;
case ERROR_INVALID_PARAMETER:
fprintf(stderr, "\nInvalid paramater to DosShutdown");
exit(0);
break;
default:
fprintf(stderr, "\nUnknown return code [%lu]", rc);
exit(0);
break;
}
rc = DosShutdown(Reserved);
DosDevIOCtl( hf, 0xd5, 0xab, NULL, 0, NULL, NULL, 0, NULL );
DosClose(hf);
}
___
X don.hawkinson{at}twsubbs.twsu.edu
--- Maximus/2 2.02
* Origin: -=Fawnetta=-Wichita,KS Christian/OS2 (316) 721-1005 28.8 (1:291/7)SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1 @PATH: 291/7 11 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.