1. Miller Rhodes
  2. PowerServer Web
  3. Thursday, 07 February 2019

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

Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Friday, 8 February 2019
  2. PowerServer Web
  3. # 1
Marco Meoni Accepted Answer Pending Moderation
0
Votes
Undo

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
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. Miller Rhodes
  2. Sunday, 10 February 2019
There are no comments made yet.
  1. Friday, 8 February 2019
  2. PowerServer Web
  3. # 2
  • Page :
  • 1


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