[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Calling VB.NET DLL from VC++

Bhanu Prakash

7/5/2007 10:11:00 AM

Hi,

I am trying to call VB.NET DLL from withing the VC++ project. It is failing.
Pls let me know how I can do it.

Thanks
Bhanu


9 Answers

(Mattias Sjögren)

7/5/2007 10:53:00 AM

0

>I am trying to call VB.NET DLL from withing the VC++ project. It is failing.

Failing in what way? What have you tried so far? Are you using managed
or native C++?


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.n... | http://www.dotneti...
Please reply only to the newsgroup.

kali charan polnati

7/5/2007 2:08:00 PM

0

We created a VB Dot net application of type class library. and trying to
call form vc++6.0. Its failing. Actually here we are trying to calling
managed coded form unmanaged environment (VC++6.0)

"Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
news:%23b007KvvHHA.412@TK2MSFTNGP04.phx.gbl...
> >I am trying to call VB.NET DLL from withing the VC++ project. It is
> >failing.
>
> Failing in what way? What have you tried so far? Are you using managed
> or native C++?
>
>
> Mattias
>
> --
> Mattias Sjögren [C# MVP] mattias @ mvps.org
> http://www.msjogren.n... | http://www.dotneti...
> Please reply only to the newsgroup.


Sheng Jiang

7/5/2007 4:56:00 PM

0

VC6 does not support managed code. Use VC.Net or higher and managed C++ to
call managed code.

--
Sheng Jiang
Microsoft MVP in VC++
"kali charan polnati" <kalicp@amvescap.com> wrote in message
news:OdYWp3wvHHA.312@TK2MSFTNGP04.phx.gbl...
> We created a VB Dot net application of type class library. and trying to
> call form vc++6.0. Its failing. Actually here we are trying to calling
> managed coded form unmanaged environment (VC++6.0)
>
> "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
> news:%23b007KvvHHA.412@TK2MSFTNGP04.phx.gbl...
> > >I am trying to call VB.NET DLL from withing the VC++ project. It is
> > >failing.
> >
> > Failing in what way? What have you tried so far? Are you using managed
> > or native C++?
> >
> >
> > Mattias
> >
> > --
> > Mattias Sjögren [C# MVP] mattias @ mvps.org
> > http://www.msjogren.n... | http://www.dotneti...
> > Please reply only to the newsgroup.
>
>


Egghead

7/5/2007 6:43:00 PM

0

Is your VB.Net is a COM object and register already?

--
cheers,
RL
"kali charan polnati" <kalicp@amvescap.com> wrote in message
news:OdYWp3wvHHA.312@TK2MSFTNGP04.phx.gbl...
> We created a VB Dot net application of type class library. and trying to
> call form vc++6.0. Its failing. Actually here we are trying to calling
> managed coded form unmanaged environment (VC++6.0)
>
> "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
> news:%23b007KvvHHA.412@TK2MSFTNGP04.phx.gbl...
>> >I am trying to call VB.NET DLL from withing the VC++ project. It is
>> >failing.
>>
>> Failing in what way? What have you tried so far? Are you using managed
>> or native C++?
>>
>>
>> Mattias
>>
>> --
>> Mattias Sjögren [C# MVP] mattias @ mvps.org
>> http://www.msjogren.n... | http://www.dotneti...
>> Please reply only to the newsgroup.
>
>


Sreedhar.chunduru

7/6/2007 5:03:00 AM

0

Thanks for the updation.

Can we call Managed code from VB 6.0?


"Sheng Jiang[MVP]" <sheng_jiang@hotmail.com.discuss> wrote in message
news:unI4wVyvHHA.4916@TK2MSFTNGP04.phx.gbl...
> VC6 does not support managed code. Use VC.Net or higher and managed C++ to
> call managed code.
>
> --
> Sheng Jiang
> Microsoft MVP in VC++
> "kali charan polnati" <kalicp@amvescap.com> wrote in message
> news:OdYWp3wvHHA.312@TK2MSFTNGP04.phx.gbl...
>> We created a VB Dot net application of type class library. and trying to
>> call form vc++6.0. Its failing. Actually here we are trying to calling
>> managed coded form unmanaged environment (VC++6.0)
>>
>> "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
>> news:%23b007KvvHHA.412@TK2MSFTNGP04.phx.gbl...
>> > >I am trying to call VB.NET DLL from withing the VC++ project. It is
>> > >failing.
>> >
>> > Failing in what way? What have you tried so far? Are you using managed
>> > or native C++?
>> >
>> >
>> > Mattias
>> >
>> > --
>> > Mattias Sjögren [C# MVP] mattias @ mvps.org
>> > http://www.msjogren.n... | http://www.dotneti...
>> > Please reply only to the newsgroup.
>>
>>
>
>


kali charan polnati

7/6/2007 5:13:00 AM

0

Yes, I made my VB.Net application as Make assembley Com visable . I
registered it using (regasm /tlb "Dll path"), it registered sucessfully.But
i am not able to call managed code (VB.NET) form unmanaged Environment
(VC++6.0).

"Egghead" <robertlo@NO_SHAW.CA> wrote in message
news:%234n25SzvHHA.4332@TK2MSFTNGP06.phx.gbl...
> Is your VB.Net is a COM object and register already?
>
> --
> cheers,
> RL
> "kali charan polnati" <kalicp@amvescap.com> wrote in message
> news:OdYWp3wvHHA.312@TK2MSFTNGP04.phx.gbl...
>> We created a VB Dot net application of type class library. and trying to
>> call form vc++6.0. Its failing. Actually here we are trying to calling
>> managed coded form unmanaged environment (VC++6.0)
>>
>> "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
>> news:%23b007KvvHHA.412@TK2MSFTNGP04.phx.gbl...
>>> >I am trying to call VB.NET DLL from withing the VC++ project. It is
>>> >failing.
>>>
>>> Failing in what way? What have you tried so far? Are you using managed
>>> or native C++?
>>>
>>>
>>> Mattias
>>>
>>> --
>>> Mattias Sjögren [C# MVP] mattias @ mvps.org
>>> http://www.msjogren.n... | http://www.dotneti...
>>> Please reply only to the newsgroup.
>>
>>
>
>


kali charan polnati

7/6/2007 5:28:00 AM

0

Actually we have one developed product which will idintify only VC++6.0 . So
we have to stick with VC++6.0. is there any way to call vb.net method form
VC++6.0. I made VB.Net application (dll) as Make com Visable and then
registered it by using command regasm /tlb 'dll path'.



"Sheng Jiang[MVP]" <sheng_jiang@hotmail.com.discuss> wrote in message
news:unI4wVyvHHA.4916@TK2MSFTNGP04.phx.gbl...
> VC6 does not support managed code. Use VC.Net or higher and managed C++ to
> call managed code.
>
> --
> Sheng Jiang
> Microsoft MVP in VC++
> "kali charan polnati" <kalicp@amvescap.com> wrote in message
> news:OdYWp3wvHHA.312@TK2MSFTNGP04.phx.gbl...
>> We created a VB Dot net application of type class library. and trying to
>> call form vc++6.0. Its failing. Actually here we are trying to calling
>> managed coded form unmanaged environment (VC++6.0)
>>
>> "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
>> news:%23b007KvvHHA.412@TK2MSFTNGP04.phx.gbl...
>> > >I am trying to call VB.NET DLL from withing the VC++ project. It is
>> > >failing.
>> >
>> > Failing in what way? What have you tried so far? Are you using managed
>> > or native C++?
>> >
>> >
>> > Mattias
>> >
>> > --
>> > Mattias Sjögren [C# MVP] mattias @ mvps.org
>> > http://www.msjogren.n... | http://www.dotneti...
>> > Please reply only to the newsgroup.
>>
>>
>
>


Egghead

7/6/2007 3:05:00 PM

0

Assume you used the COM template at the VS2003 and you have the strong name
with keys as well.
hmm, does your vc++ 6.0 (whatever account it "run as") has the execute right
at that dll's path?
Can you write a small VB6.0 and test the dll?
--
cheers,
RL
"kali charan polnati" <kalicp@amvescap.com> wrote in message
news:%23vVNGx4vHHA.4916@TK2MSFTNGP04.phx.gbl...
> Yes, I made my VB.Net application as Make assembley Com visable . I
> registered it using (regasm /tlb "Dll path"), it registered
> sucessfully.But i am not able to call managed code (VB.NET) form
> unmanaged Environment (VC++6.0).
>
> "Egghead" <robertlo@NO_SHAW.CA> wrote in message
> news:%234n25SzvHHA.4332@TK2MSFTNGP06.phx.gbl...
>> Is your VB.Net is a COM object and register already?
>>
>> --
>> cheers,
>> RL
>> "kali charan polnati" <kalicp@amvescap.com> wrote in message
>> news:OdYWp3wvHHA.312@TK2MSFTNGP04.phx.gbl...
>>> We created a VB Dot net application of type class library. and trying to
>>> call form vc++6.0. Its failing. Actually here we are trying to calling
>>> managed coded form unmanaged environment (VC++6.0)
>>>
>>> "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
>>> news:%23b007KvvHHA.412@TK2MSFTNGP04.phx.gbl...
>>>> >I am trying to call VB.NET DLL from withing the VC++ project. It is
>>>> >failing.
>>>>
>>>> Failing in what way? What have you tried so far? Are you using managed
>>>> or native C++?
>>>>
>>>>
>>>> Mattias
>>>>
>>>> --
>>>> Mattias Sjögren [C# MVP] mattias @ mvps.org
>>>> http://www.msjogren.n... | http://www.dotneti...
>>>> Please reply only to the newsgroup.
>>>
>>>
>>
>>
>
>


Sheng Jiang

7/6/2007 5:11:00 PM

0

Then expose some events to COM and handle the events in managed code

--
Sheng Jiang
Microsoft MVP in VC++
"kali charan polnati" <kalicp@amvescap.com> wrote in message
news:epq4g54vHHA.1756@TK2MSFTNGP05.phx.gbl...
> Actually we have one developed product which will idintify only VC++6.0 .
So
> we have to stick with VC++6.0. is there any way to call vb.net method form
> VC++6.0. I made VB.Net application (dll) as Make com Visable and then
> registered it by using command regasm /tlb 'dll path'.
>
>
>
> "Sheng Jiang[MVP]" <sheng_jiang@hotmail.com.discuss> wrote in message
> news:unI4wVyvHHA.4916@TK2MSFTNGP04.phx.gbl...
> > VC6 does not support managed code. Use VC.Net or higher and managed C++
to
> > call managed code.
> >
> > --
> > Sheng Jiang
> > Microsoft MVP in VC++
> > "kali charan polnati" <kalicp@amvescap.com> wrote in message
> > news:OdYWp3wvHHA.312@TK2MSFTNGP04.phx.gbl...
> >> We created a VB Dot net application of type class library. and trying
to
> >> call form vc++6.0. Its failing. Actually here we are trying to calling
> >> managed coded form unmanaged environment (VC++6.0)
> >>
> >> "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
> >> news:%23b007KvvHHA.412@TK2MSFTNGP04.phx.gbl...
> >> > >I am trying to call VB.NET DLL from withing the VC++ project. It is
> >> > >failing.
> >> >
> >> > Failing in what way? What have you tried so far? Are you using
managed
> >> > or native C++?
> >> >
> >> >
> >> > Mattias
> >> >
> >> > --
> >> > Mattias Sjögren [C# MVP] mattias @ mvps.org
> >> > http://www.msjogren.n... | http://www.dotneti...
> >> > Please reply only to the newsgroup.
> >>
> >>
> >
> >
>
>