473,322 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Embedding VC++ Application/DLL into a vb.net application

Bob
I would appreciate any suggestions on handling the following...
I currently have a VC++ MDI Application. The core pieces/products are
all handled in separate dll's.
Our shop has slowly been rewriting other applications over to VB.net.
My application has now been targeted with coming over, but management
does not want to incur a rewrite timeline. Since we have a standard
vb.net framework in place, their thoughts are to try and take the
prewritten VC++ GUI pieces and have them instantiate within the VB.net
framework application.

I have been doing some research, and it seems like PInvoke is out,
since it appears to be good for the one-shot function calls.

The application is not a COM app, so Interop does not seem like such a
low-effort idea either, since it would appear to go that route, I
would have to rewrite my framework pieces in a COM wrapper in order to
then be able to use it from within the vb.net frame.

The only other option I see is wrapping my application pieces that can
come over with managed C++ and mixing that with vb.net.

Any thoughts would be greatly appreciated.
Regards
Nov 17 '05 #1
1 2571
"Bob" <rb****@travelers.com> wrote in message
news:4b**************************@posting.google.c om...
I would appreciate any suggestions on handling the following...
I currently have a VC++ MDI Application. The core pieces/products are
all handled in separate dll's.
Our shop has slowly been rewriting other applications over to VB.net.
My application has now been targeted with coming over, but management
does not want to incur a rewrite timeline. Since we have a standard
vb.net framework in place, their thoughts are to try and take the
prewritten VC++ GUI pieces and have them instantiate within the VB.net
framework application.


IMO it is impossible to have a single migration scheme which serves all
possible cases well. So take this with a grain of salt ...

Nevertheless, I'd take a step back. I'd try to think of how it would make
sense to invoke, from managed C++, the native functions that you have
exported from the "separate dll's" you mention. For example, if you have
"free functions" f1(), f2() and f3(), then perhaps you define an MC++ class
C with static functions C::f1(), C::f2(), C::f3(). On the other hand if you
expose a class interface in those DLLs then you'd want a similar managed
class with similar public functions with similar signatures.

No matter the interface, MC++ allows you to call native functions from
managed functions without thinking about it. (This is called "It just works"
or IJW). And since all managed languages share the same object model, once
you get that to work, your VB.Net application can use the managed C++ class
doing anything special.

Regards,
Will
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alicia Haumann | last post by:
I accidentally sent this to webmaster@python.org, so this could be a duplicate if "webmaster" forwards it to this list. :{ Hi, there. Thanks for any help that can be offered. I've been...
2
by: Roose | last post by:
With some googling I have found these resources: http://docs.python.org/ext/win-dlls.html http://www.python.org/doc/faq/windows.html I have a large Win32/MFC/C/C++ application that has an...
1
by: Craig Ringer | last post by:
Hi folks I'm a bit of a newbie here, though I've tried to appropriately research this issue before posting. I've found a lot of questions, a few answers that don't really answer quite what I'm...
1
by: Tommy Nordgren | last post by:
I want to write an application that embeds and extends (at least) the Python and Perl interpreters. Now i want to find as much as possible about the Python tools used for extending and embedding...
4
by: Mok-Kong Shen | last post by:
Apology, if this is OT. (Please kindly refer me eventually to another group.) With VC++ I can embed asm statements in a function e.g. as follows: __asm { ........ je lab
1
by: Kakacek | last post by:
Hello All, Let's say I have a following python code: class hw_class: def __init__(self): pass def hello_world(self): print 'Hello World!' create_instance('hw_class', 'hw')
1
by: gavinpaterson | last post by:
Dear Pythoners, I am writing as I am having trouble embedding a Python program into a Win XP C++ console application. I have written a script file for importing and I am trying to use the...
6
by: Qun Cao | last post by:
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python...
0
by: Severian | last post by:
I am working on embedding Python 2.5 in my C++ application, and I have a few questions: 1) My application is multi-threaded; what problems should I be aware of if I create a separate interpreter...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.