CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Return values from VB

    Hai,

    Could anyone help me out with the following questions?

    1) How do u make a function or procedure to return more than one value
    2) I want to add more than two nos using a function. How do u pass the parameters
    3) detailed difference between ActiveX EXE and ActiveX DLL. When both are COM based, why microsoft have introduced two concepts.
    4) What is the difference between Windows regular dll and ActiveX dll.

    5) Is it possible to develop a DLL which works as both ACTIVEX DLL and Windows regular DLL? (ANY Windows Based Language).

    6) What is OCX (Please compare with ActiveX DLL and ActiveX EXE) Which is Automation Server here( OCX or ActiveX executables)

    7) What is Plugin? (Such as JRE, Flash) How IE reacts when we try to open applet or Flash file?

    8) What is the difference between normal EXE and all above executables in terms of memory management?

    Thank you,

    Regards,
    K. Sripriya

  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477
    1) you can do 2 things, either return an array of values, or use byref parameters

    Code:
    Private Function abc(byref a as string, byref b as string,byref c as string) as string
        a = "a"
        b = "b"
        c = "c"
        abc = "abc"
    End Function
    ' when calling
    ret = abc(varA, varB, varC)
    ' ret will be "abc", varA will be "a", varB will be "b", varC will be "c"
    2) I'm not quite following you here. If you want to pass more then 1 parameter, you can simply add them to the definition of the funtion (like in the example above)

    3) The main difference between the two is that an activex exe can be run as a seperate executable, whereas a dll always has to be instanciated by another application. Take Word for instance, that's an exe, which can be called from code, but wich can also be called directly by executing the exe. ADO on the other hand can only be called from code, there's no such thing as ADO.exe

    4) ActiveX dll's have an object model. The objects must be created before they can be called. Functions in a regular dll can be called in the same way you can call API functions.

    5) I don't know, but I doubt it...

    6) An ocx is a control you can be used on a form. Typically, you can also call them from code without having to put them on a form, so you could compare them with an activex dll rather than to an exe (since you can't run the ocx on it's own)

    7) dunno

    8) dunno
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Nov 2002
    Posts
    82
    Hi BabuPriya,

    here other examples
    Attached Files Attached Files
    james

  4. #4
    Join Date
    Jan 2002
    Location
    somewhere between a variable and a string
    Posts
    214
    You can get a much better understanding of it all by visiting MSDN
    How can anyone sell information when all the information that they sell is free at the library ?

    How come Doctors keep getting smarter yet they cannot cure the common cold ?

    If Scientist are right and man evolved from monkey then where did the monkeys' come from ?

    Man I love this little dude that waves => <= He just doesn't stop

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

Featured