Results 1 to 2 of 2

Thread: C/C++ DLL output in VB

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 1999
    Location
    dubai
    Posts
    39

    C/C++ DLL output in VB

    I want to use a function in a dll that returns unsigned short*.

    How do I declare this function in VB?
    ganraj.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    There are no unsigned types in VB, but you can use the equivalent signed types.

    Private Declare Function YourFunc Lib "your.dll" (Params As Types) As Long

    There isn't a pointer type in VB either and a function cannot return ByRef. You can either use Long to represent the pointer (and have difficulties to get the actual value) or not return a pointer. Which is probably the better idea anyway.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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