PC Review


Reply
Thread Tools Rate Thread

Acessing C++ methods from VB .net

 
 
Philip
Guest
Posts: n/a
 
      15th Nov 2004
Hi, first of all I'm new to this whole .net thing so please forgive my
ignorance. Now I have a C++ object with me, and I want to be able to
call its methods from VB.net.

e.g.
[c++ code]
Foo::Foo
{
}
void Foo:isplay_Message()
{
printf("Hello World");
}

[vb code]
Dim myStringInstance As New Foo() ''Foo is the C++ object
myStringInstance.Display_Message() ''Display_Message prints out "hello
world"

Now what would be the easiest way I can make the above code work? Do
I have to make a COM object? Someone also told me to create a
netmodule, but I don't know how to create a C++ netmodule. And even
if I did know how to create a netmodule, I wouldn't know what to do
afterwards.

I'd really appreciate the help!


Sincerely,

Philip
 
Reply With Quote
 
 
 
 
Alexandre Moura
Guest
Posts: n/a
 
      19th Nov 2004
I'd say that the easiest way would be to either make your code into Managed C++ or create a C++ Wrapper - creating a COM wrapper might work, but I
wouldn't call it simple

Good luck

--------------------
>From: (E-Mail Removed) (Philip)
>Newsgroups: microsoft.public.dotnet.languages.vb
>Subject: Acessing C++ methods from VB .net
>Date: 15 Nov 2004 14:32:08 -0800
>Organization: http://groups.google.com
>Lines: 31
>Message-ID: <(E-Mail Removed)>
>NNTP-Posting-Host: 206.135.61.179
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1100557929 20872 127.0.0.1 (15 Nov 2004 22:32:09 GMT)
>X-Complaints-To: groups-(E-Mail Removed)
>NNTP-Posting-Date: Mon, 15 Nov 2004 22:32:09 +0000 (UTC)
>Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!postnews.google.com!not-for-

mail
>Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:242734
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb
>
>Hi, first of all I'm new to this whole .net thing so please forgive my
>ignorance. Now I have a C++ object with me, and I want to be able to
>call its methods from VB.net.
>
>e.g.
>[c++ code]
>Foo::Foo
>{
>}
>void Foo:isplay_Message()
>{
> printf("Hello World");
>}
>
>[vb code]
>Dim myStringInstance As New Foo() ''Foo is the C++ object
>myStringInstance.Display_Message() ''Display_Message prints out "hello
>world"
>
>Now what would be the easiest way I can make the above code work? Do
>I have to make a COM object? Someone also told me to create a
>netmodule, but I don't know how to create a C++ netmodule. And even
>if I did know how to create a netmodule, I wouldn't know what to do
>afterwards.
>
>I'd really appreciate the help!
>
>
>Sincerely,
>
>Philip
>


Sorry I don't take feature request for WinRes: it belongs to the .NET Framework SDK. I'm a consumer of WinRes, just like you...
--------------------
>From: Thomas Adams <(E-Mail Removed)>
>Newsgroups: microsoft.public.dotnet.internationalization
>Subject: RE: How to launch WinRes in full screen mode by another program?
>Date: 29 Sep 2004 19:31:46 GMT
>Organization: DFN.CIS Senior Customer
>Lines: 17
>Message-ID: <Xns9573DB02E2782thomasoadamsgmailcom@127.0.0.1>
>References: <(E-Mail Removed)> <r3R$(E-Mail Removed)>
>X-Trace: news.uni-berlin.de cGk7xWd2iWxkO9HVbF7isQODBzMeOPRUidb0ZHc/H3nGY=
>User-Agent: Xnews/06.08.25
>X-Converter: MorVer Version 1.0.305
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-

berlin.de!uni-berlin.de!not-for-mail
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.internationalization:947
>X-Tomcat-NG: microsoft.public.dotnet.internationalization
>
>Hi
>
>Your assumption is correct. I did not want to call out its long name
>since I didn't know if that could be regarded as breach of NDA.
>
>Thanks for the explanation. Do you take feature requests for WinRes?
>I'd like to see a "remember last size and location" some day...
>
>~T.
>
>(E-Mail Removed) (Xu Yang[MSFT]) wrote:
>
>
>--
>
> [Formerly appended fullquote was nuked by morver,
> the versatile morphing server.]
>


I'm afraid that LocStudio (when you say LS, I assume you are using LocStudio) does not have the option, and WinRes does not remember its size and
location when it was shut down.
If you are trying to call it in your own application, you can always use ProcessWindowStyle.Maximized when you start the process.

--------------------
>From: Thomas Adams <(E-Mail Removed)>
>Newsgroups: microsoft.public.dotnet.internationalization
>Subject: How to launch WinRes in full screen mode by another program?
>Date: 11 Sep 2004 21:26:17 GMT
>Organization: DFN.CIS Senior Customer
>Lines: 9
>Message-ID: <(E-Mail Removed)>
>X-Trace: news.uni-berlin.de 9sj2ViefNkwlw4tmA89WfA6mie8fmrCfbXqlIJqRehUb0=
>User-Agent: Xnews/06.08.25
>X-Face: #Rk@TOQ|^!ZG|&z6lA@-CY>/xB[Ei1mG*&S.+A5z;Ng?3OxX[#DVZw!"o!c`S|pzsX-EkdZZ(IVnFRTX%!:Sv^L&Gk~s]vJ@Z~%Rm@G]fr*r2P}u5

*&k/-_2+&Qowj6hiJ1b$^JQf:uy9456HIdKq*B`NC##kyO,>7"Ztnav+=71b*"E+DIme;{i&)ii{#6e?i8P,1Xpc[q0}i:Tm];B1
>X-Converter: MorVer Version 1.0.305
>Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-

berlin.de!uni-berlin.de!not-for-mail
>Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.internationalization:902
>X-Tomcat-NG: microsoft.public.dotnet.internationalization
>
>Hi
>
>Let's imagine you're using a translation environment (LS) that's
>launching WinRes every now and then. Is it possible to open WinRes in
>full screen mode in this case? It's quite annoying that it doesn't
>remember if I switch it to full screen mode the next time it is invoked.
>
>thanks,
>Thomas
>




 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create my own asynchronous BeginXXXX methods and EndXXXX methods Varangian Microsoft C# .NET 2 15th May 2008 09:46 PM
plse send troubleshooting methods about windows xp and windowsserver2003 about configuring user rights and security methods to implement touser lakshmikanthkkp456@gmail.com DIY PC 1 11th Apr 2008 09:58 AM
Is it possible to make generalized methods that accept parameterized references to call other methods? Microsoft C# .NET 3 22nd Jun 2007 11:19 PM
proper way to pass pointers by reference from managed c++ methods to native c++ methods Scott McFadden Microsoft VC .NET 1 22nd Apr 2006 06:10 AM
what's better Static Methods or Instace Methods David Microsoft Dot NET Framework 12 22nd Sep 2004 05:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:28 PM.