Results 1 to 3 of 3

Thread: Get variable VB UDT in VC DLL array or something like this!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    5

    Question Get variable VB UDT in VC DLL array or something like this!

    Hi,
    I'm trying to pass binary information to a VC DLL, like a structure (not predefined in the DLL) but I don't have any idea about how to do it.

    There's any way to convert VB UDT in a String of bytes, or something like this, which the VC DLL could understand and use?(OR ONLY RECEIVE WITHOUT BREAK!)

    Thanks a lot in advance.

    Edgar
    Edgar Berengena Moreno
    Software Engineer
    LaSalle University, U.R.L.
    Barcelona, Spain

    _________________________________
    Esos como todo...no somos nadie. Y tal.

  2. #2
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    gonna need a bit more info on this one Edgar - got any code you can post....
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    5
    Hi, Crispin,

    I have no special code already wrotten, because I don't know what to write...

    It should be something like this in C:

    void DllExportedFunction (void *information, long sizeOfInformation)
    //those params or what should be necessary (SAFEARRAY, ...whatever)
    {
    ...
    // here I would access the binary information (maybe write it directly to a file)
    ...
    }

    And in my VB source code I would like to know how to pass it to the DLL and in which kind of param; something like: (doesn't works)

    type MyUDT
    . . .L1 as long
    . . .L2 as long
    end type

    sub main()
    . .Dim sArray as String
    . .Dim stUDT as MyUDT

    . .sArray = stUDT
    . .DllEsportedFunction (sArray, Len (sArray))

    end sub


    ..OR SOMETHING LIKE THIS!! it only must let me access to the binary data to write it to a file.

    Thank you Crispin for your effort.
    Edgar
    Edgar Berengena Moreno
    Software Engineer
    LaSalle University, U.R.L.
    Barcelona, Spain

    _________________________________
    Esos como todo...no somos nadie. Y tal.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width