Calling VB.NET DLL from C++

Can anyone tell me how to call a VB.NET DLL from C++.
The VB.NET DLL is registered for COM Interop.
This is simply test code...  Simplify if necessary...

=========> The VB.NET DLL code is :

Imports System
Imports System.Runtime.InteropServices

Namespace CCCVblib

  <Guid("89439AD1-756F-4f9c-BFB4-18236F63251E"), _
  InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
 Public Interface _CCCVblib
    <DispId(1)> Function GetMonth() As Integer
  End Interface

  <Guid("1376DE24-CC2D-46cb-8BF0-887A9CAF3014"), _
   ClassInterface(ClassInterfaceType.None), _
   ProgId("CCCVblib.VBClass")> Public Class VBClass
    Implements _CCCVblib

    Public CCCVblib()

    Public Function GetMonth() As Integer Implements _CCCVblib.GetMonth
      GetMonth = DateTime.Now.Month
    End Function

  End Class

End Namespace

=========>The C++ Calling code is :

#import "CCCVblib.tlb"
using namespace CCCVblib;

int cpptest(void)
int res;
HRESULT hresult;
CLSID clsid;

CoInitialize(NULL);      //initialize COM library
hresult=CLSIDFromProgID(OLESTR("CCCVblib.VBClass"), &clsid);    //retrieve CLSID of component
VBClass* t=NULL;
hresult=CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,__uuidof(VBClass),(LPVOID *) &t);
   return true;
res = t->GetMonth ();  //call method  <-------------- Error 'Use of undefined type CCCVblib::VBClass
t->Release();   //call method    <--------------  Error 'Use of undefined type CCCVblib::VBClass
CoUninitialize();  //Unintialize the COM library
return false;

The C++ does not find a function in Class VBClass.  What am doing wrong.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

#import "CCCVblib.tlb" raw_interfaces_only named_guids no_namespace
PSernzAuthor Commented:
No go...
It's got to be something basic.
PSernzAuthor Commented:
Found the problem myself..

The C++ function was referencing the VB DLL by the Class rather than by the assembly.
Rather than VBClass simply use the reference _CCCVblib.
This seems to me like a PAQ/refund.
PAQed with points refunded (500)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.