Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Can't get my call to WSAAccept to work.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't get my call to WSAAccept to work.

    https://docs.microsoft.com/en-us/win...ock2-wsaaccept

    Can't get this to not give me compile errors....


    Code:
     GLOBAL InternetAddr AS sockaddr_in   
    
     FUNCTION TCP_ACCEPT_(wParam AS DWORD)AS LONG
    
       LOCAL hAccept AS DWORD
       LOCAL my_addrlen AS LONG
       LOCAL my_lpfnCondition AS DWORD
       LOCAL my_dwCallbackData AS DWORD POINTER
    
       my_dwCallbackData = CODEPTR(my_function)
    
       hAccept = WSAAccept(wParam, BYVAL VARPTR(InternetAddr), my_addrlen, my_lpfnCondition, BYREF my_dwCallbackData);
    
    
     END FUNCTION 
    This works:
    Code:
     RESULT_LONG = bind(BYVAL Listen_, BYVAL VARPTR(InternetAddr),  SIZEOF(InternetAddr))


  • #2
    > BYREF my_dwCallbackData)

    Why are passing this parameter by reference instead of by value?
    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment


    • #3
      Thanks Jose. It works now! You see the obvious I was not seeing!!

      Comment

      Working...
      X