Announcement

Collapse
No announcement yet.

C buffer to Powerbasic buffer

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

  • C buffer to Powerbasic buffer

    Hello
    i have the problem that i will a windows Function recfrom make a buffer
    of 4096 bytes .can every one tell me how i can make the buffer in powerbasic so is compatible to a C buffer what the Function need.

    DECLARE FUNCTION recvfrom LIB "ws2_32.dll" ALIAS "recvfrom" (BYVAL s AS DWORD, buf AS ANY, BYVAL buflen AS LONG, BYVAL flags AS LONG, saFrom AS SOCKADDR, fromlen AS LONG) AS LONG

    I have the Problem with "buf AS ANY" i dont know how to dim or creat it in the right large.
    I thanks for help.

    with high regards
    Andreas
    Last edited by Andreas Gaida; 12 Jul 2009, 05:32 AM.

  • #2
    Try posting a code sample so that people can better see what you are trying to do and can offer advice.
    Rgds, Dave

    Comment


    • #3
      I have extendet my first message to better show my problem

      Comment


      • #4
        There's some sample code posted by Peter Lameijn here which might help you...
        PowerBASIC and related source code. Please do not post questions or discussions, just source code.


        The function 'recvfrom' is used in Peter's example with 'buf' dimmed as a fixed length string so possibly what you need is "Dim buf As String * 4096" ?
        Rgds, Dave

        Comment


        • #5
          Thanks for the Help this was i need.
          Last edited by Andreas Gaida; 12 Jul 2009, 08:47 AM.

          Comment

          Working...
          X