>
> Hi All,
>
> Could anybody help with the following problem ?
>
> I had a little utility to reload a tape and place it on-line from within
> a program. It works fine on MPE 4.0 but fails on MPE 5.0.
>
> The source of the utility is:
>
> #pragma intrinsic HPDEVCONTROL
> #define TAPEDEV 7
> #define INFO(s) (s >> 16)
> #define SUBS(s) (s & 0x0000FFFF )
> int status;
> char ldev[200];
> sprintf(ldev, "&%08d&", TAPEDEV);
> HPDEVCONTROL(&status, ldev, 100, 0);
> if ( status )
> {
> printf("HPDEVCONTROL(%d,100) INFO=%d SUBS=%d\n",
> TAPEDEV, INFO(status), SUBS(status));
> return(status);
> }
> HPDEVCONTROL(&status, ldev, 101, 0);
> if ( status )
> {
> printf("HPDEVCONTROL(%d,101) INFO=%d SUBS=%d\n",
> TAPEDEV, INFO(status), SUBS(status));
> return(status);
> }
>
> On MPE 5.0 the HPDEVCONTROL calls both fail with status -18, subsys 143
> ( "Intrinsic layer; a bounds violation occurred." ).
>
> Any suggestions would be greatly appreciated.
>
> :)
> Chris Breemer
> [log in to unmask]
>
Hello,
The HPDEVCONTROL has 4 parms that need to be passed, the 4th is to be passed
as a REFERENCE variable and not by value.
HPDEVCONTROL(&status, ldev, 100, 0) --> HPDEVCONTROL(&status, ldev, 100, &ref)
Regards.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| :-) The thoughts expressed herein are mine, and should not be used to |
| incriminate my employer, or anybody else: living, dead or undead. :-) |
+-=-=-=-=-=-=-=-__=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| / /\ |
| __ / / \ Enrique Gonzalez |
| /_/\ __ /_/ /\ \ Hewlett Packard Mexico |
| \ \ \/ /\\ \ \_\ \ Responce Center |
| \ \ \/ \\ \ \/ / Tel : (52)(5)326-46-07 |
| \ \ /\ \\ \ / Fax : (52)(5)326-46-81 |
| \ \ \ \ \\ \ \ e-mail : [log in to unmask] |
| \ \ \ \ \\ \ \ Postal : Prolongacion Reforma 700 |
| \ \ \_\/ \ \ \ Lomas de Santa Fe |
| \ \ \ \_\/ Mexico 01210, D.F. Mexico. |
+-=-=-=-=-=\_\/-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
|