'Creating A Shared Assembly in .NET
public class SharedObject
Public Function Greeting(ByVal name as String) As String
Return ("SharedObject says Hi : " & name )
End Function
End Class

6 Years
Discussion Span
Last Post by thines01

You need a Client to call that method that was written in VB?
If so, and you have the dll of that assembly:
Did you add it as a reference in your C++ project?


1) Create a C++/CLI project (preferably a CLR Console Application)
2) Add a new project to that workspace (file->Add->New Project)
- Make the new project a Visual Basic Class Library
- Paste the code you have above into that VB module
3) In the C++ project, add a reference to the VB project
- Project->References->Add New Reference / [Projects] (choose your VB project name)
4) Add a "using namespace (and the name of your vb project);" //to your C++ code
5) Add something to call the routine like this:

#include "stdafx.h"
using namespace System;
using namespace DW_405037_VB_DLL;
int main(array<System::String ^> ^args)
    SharedObject^ so = gcnew SharedObject();
    return 0;
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.