Help with Macintosh programming

macintosh programming, mac programming, mac os programming, mac os x programming, mac programming language, mac programing

InterSLIP Control always gives me -50

I’m trying to talk to InterSLIP using the device manager control calls as
listed in the InterSLIP Docs API page.

Unfortunately, any Control call I send results in error -50, "paramErr".
I’m not sure what the problem could be since A) the only parameter is the
csCode, and I’ve tried all those listed with the same results; B) my
device manager calls work perfectly with MacTCP; C) -50 isn’t even one of
the possible returns listed in IM for that call.

Has anyone used the InterSLIP API at all?

Thanks,

miguel

.
posted by admin in Uncategorized and have Comments (2)

2 Responses to “InterSLIP Control always gives me -50”

  1. admin says:

    In article <mncD0pv7w….@netcom.com>, m…@netcom.com (Miguel Cruz) wrote:
    > I’m trying to talk to InterSLIP using the device manager control calls as
    > listed in the InterSLIP Docs API page.

    > Unfortunately, any Control call I send results in error -50, "paramErr".
    > I’m not sure what the problem could be since A) the only parameter is the
    > csCode, and I’ve tried all those listed with the same results; B) my
    > device manager calls work perfectly with MacTCP; C) -50 isn’t even one of
    > the possible returns listed in IM for that call.

       Check out my source to InterSLIP/AE at
    ftp://ftp.netcom.com:/pub/le/leonardr/Misc

    Leonard
    ————————————————————————–
    Leonard Rosenthol                      Internet:       leona…@netcom.com
    Director of Engineering                AppleLink:      MACgician
    Aladdin Systems, Inc.                  GEnie:          MACgician

  2. admin says:

    In article <mncD0pv7w….@netcom.com> m…@netcom.com (Miguel Cruz) writes:
    >I’m trying to talk to InterSLIP using the device manager control calls as
    >listed in the InterSLIP Docs API page.

    >Unfortunately, any Control call I send results in error -50, "paramErr".
    >I’m not sure what the problem could be since A) the only parameter is the
    >csCode, and I’ve tried all those listed with the same results; B) my
    >device manager calls work perfectly with MacTCP; C) -50 isn’t even one of
    >the possible returns listed in IM for that call.

    I remember having similar problems trying to check to see if InterSLIP
    was installed.  Someone gave me a inline PBControlImmed function and
    I managed to get it to work – I have appended it to this message.  I can’t
    track down the message, but this seems to work (at least for escode=4, which
    was all I needed).  The code is in Pascal, but should be readily
    converted to more heathen languages.  I never bothered to pretty it
    up or document it, sorry.

           David Oberst/NWT Bureau of Statistics/Yellowknife, NWT, Canada
           obe…@gov.nt.ca
    ————
    unit InterSLIP;

    interface

     function IsInterSLIPActive: BOOLEAN;

    implementation

     uses
      UtilityBomb, TCL;

     function PBControlImmed (pbptr: Ptr): OSErr;
     inline
      $205F, $A204, $3E80;

     function IsInterSLIPActive: BOOLEAN;
      type
       csParamType = array[0..50] of LONGINT;
      var
       csptr: ^csParamType;
       count, refnum: INTEGER;
       pb: ParamBlockRec;
       theErr: OSErr;
     begin
      refnum := SIZEOF(pb);
      refnum := -96;
    (*    FailOSErr(OpenDriver(‘.InterSLIP’, refnum));*)
      with pb do begin
        ioCompletion := nil;
        ioNamePtr := nil;
        ioVRefNum := 0;
        ioCRefNum := refnum;
    (*    ioRefNum := 0;*)
        csCode := 4;
        for count := 0 to 10 do
         csParam[count] := 0;
       end;
    (*theErr := PBControl(@pb, FALSE);*)
      theErr := PBControlImmed(@pb);
      FailOSErr(theErr);
      csptr := @pb.csParam[0];

      IsInterSLIPActive := (csptr^[0] = 4);
     end;           (* IsInterSLIPActive *)

    end.