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

    writting a dll and want to return a result back to the calling code.

    Hi,

    I am writting a dll and want to return a result back to the calling code.
    I have tried putting:-
    public string oSQL2XStreamBridge( string Name)
    public class string oMyDll
    both of which it does not like...

    the code below errors because there is a return statment and it says you can't have a return statement when it is set to void. but it will not let me set it to string (as above)


    public class oMyDll
    {
    public oSQL2XStreamBridge( string Name)
    {
    string ResultMess = "";

    // work code goes here

    return "Test";
    }
    }

    How do I get the result back to the calling code?

    Thanks

  2. #2
    Join Date
    Dec 2010
    Posts
    12

    Re: writting a dll and want to return a result back to the calling code.

    You need to use reflection to load the dll at run time and invoke its method.

Tags for this Thread

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