Hi Kieth,

The parameters that I'm using are:

Word                                    NetLibOpenRef;
NetSocketAddrINType         ForeignAddrType;
NetSocketRef                        theSocket;
SWord                                  recv;
short                                      SocketReceiveErr;
CharPtr                                 msg;
Word                                    size,

 recv = NetLibReceive(NetLibOpenRef, theSocket,msg, size,0,
                 (NetSocketAddrType *)&ForeignAddrType,
                  (WordPtr)sizeof(ForeignAddrType),
                    -1,&SocketReceiveErr);

I have also tried the following:

 recv = NetLibReceive(NetLibOpenRef, theSocket,msg, size,0,
                 (NetSocketAddrType *)&ForeignAddrType,
                  (UInt16*)sizeof(ForeignAddrType),
                    -1,&SocketReceiveErr);

and:

VoidHand     hTest;
VoidPtr        pTest;

hTest = MemHandleNew(size);
pTest = MemHandleLock(hTest);

 recv = NetLibReceive(NetLibOpenRef, theSocket, pTest, size,0,
                 (NetSocketAddrType *)&ForeignAddrType,
                  (UInt16*)sizeof(ForeignAddrType),
                    -1,&SocketReceiveErr);
MemHandleUnlock(hTest);
MemHandleFree(hTest);

////////////////////////////////////////////////////////

Again, using the emulator the NetLibReceive call returns a netErrParam Err??
It works on the actual device.

Alex



----- Original Message -----
From: <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 7:17 PM
Subject: Re: NetLibReceive, I am getting the "netErrParam Err".


>
>
> Dude...you want us to figure out why you're getting a netErrParamErr, yet
you
> don't even show us your parameters???
>
> I know that one thing is wrong: you're lying to NetLibReceive with regards
to
> the fromLenP parameter.  It wants a _pointer_ to a UInt16.  You're passing
in
> just a UInt16!  Just because you cast it to a UInt* doesn't make it a
UInt16*.
>
> -- Keith Rollin
> -- Palm OS Emulator engineer
>
>
>
>
>
>
> "Alex R" <[EMAIL PROTECTED]> on 01/30/2001 06:03:58 AM
>
> Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
>
> Sent by:  "Alex R" <[EMAIL PROTECTED]>
>
>
> To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
> cc:    (Keith Rollin/US/PALM)
> Subject:  NetLibReceive, I am getting the "netErrParam     Err".
>
>
>
> Hello All,
>
> When I debug using the emulator, the NetLibReceive call returns a
> netErrParam error. The code below works fine on the actual device.
>
> /////////////////////////////////////////////////
>
> SWord  recv;
> short  SocketReceiveErr;
> CharPtr msg;
>
> MemSet(msg,size,'\0');
> recv = NetLibReceive(NetLibOpenRef,theSocket,msg, size,0,
>                 (NetSocketAddrType *)&ForeignAddrType,
>                  (unsigned short
> *)sizeof(ForeignAddrType),-1,&SocketReceiveErr);
>
> /////////////////////////////////////////////////
>
> Any help will be much appreciated.
>
>
> Alex
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please
> see http://www.palmos.com/dev/tech/support/forums/
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to