1. Miller Rhodes
  2. PowerServer 2020 or older (Obsolete)
  3. Thursday, 7 February 2019 21:44 PM UTC

I've tried declaring and calling this function in all sorts of ways and it continues to return an error.

 

here is the code that is failing  :   If WSAStartup(257, istr_wsadata) = 0

 

It should return 0

 

I wonder if anyone else has had this problem

Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 8 February 2019 11:48 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi Miller,

what error you get?

The functions returns 5 different error codes that provide you reason of failure.

For the time being I can just tell you to check usual things: declare the external function with unicode-based in mind since the API is ANSI-based (add ";Ansi"), check if you are running from IE64 bit against a 32bit DLL (alternative check from FF or Chrome), have the structure in the 2nd parameter correctly defined, have rights to use WinSock in a Web session, etc ...

Best,

.m

 

 
Comment
  1. Miller Rhodes
  2. Sunday, 10 February 2019 22:50 PM UTC
thanks for all the help!! I basically got it working. The local external declaration looks like this



Function long WSAStartup32 ( &

integer wVersionRequested, &

Ref WSADATA lpWSAData &

) Library "ws2_32.dll" Alias For "WSAStartup:Ansi"
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 8 February 2019 17:13 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Hi Miller;

      FWIW: Just did a quick basic test with my framework's Socket example App in a PowerServer Web App (PS build 1880) and it worked for basic communication between a Web App and a native PB app for text transmissions. This PB code uses the WSAStartup API function call ...

 

Note that the DW transmission also works but the DWO internal representation in PS is different than native PB - so while the datum is transmitted, neither App can display the DWO. However, Native to Native and PS to PS App socket transmission works OK for DWO's.

HTH

Regards ... Chris

PS: First time that I have ever tested this App with PS!

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.