Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,929 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,773 people online right now. Registration is fast and FREE... Join Now!




Conversion from C++ to VB6.0

 
Reply to this topicStart new topic

Conversion from C++ to VB6.0

Soljah
4 Dec, 2007 - 08:23 PM
Post #1

New D.I.C Head
*

Joined: 4 Dec, 2007
Posts: 4


My Contributions
Hi Dreamincode.net,

I am part of 2D game making community, Eclipse, and I am trying to convert the following C++ Image magnifying feature into VB6.0.

Source Link

I Just would like to know if I'm pursuing a lost cause, or if it is possible to actually do this. I am not familiar with C++ Coding, but I am, however, an intermediate coder in VB6.0.

If anyone could add me on MSN, it would be great if you could:

1. Talk me through it.
2. Link me to a Valid Converter.
3. If this isn't too hard, Actually convert it to VB6.0 manually.

Thanks,

~Soljah
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Conversion From C++ To VB6.0
4 Dec, 2007 - 08:37 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,869



Thanked: 53 times
Dream Kudos: 550
My Contributions
Is it possible. Sure. but it is not the best way to do things here. You have two libraries here. One is just an image library and most of its functions can found elsewhere or written in pure VB (even translating them is not all that hard, but the truth is the the techniques used are actually a pain in the butt in VB and it is better to just rewrite the routines in VB with out really trying to copy what the C++ class did).

The second library is more interesting. It contains a set of inline assembly functions. This would be really pretty hard to do in VB (it can be done).

I think your best option would be to use C++ to make turn the code into a library that you can use from within VB. This saves you the trouble of translation.... just my 2 cents
User is offlineProfile CardPM
+Quote Post

Soljah
RE: Conversion From C++ To VB6.0
4 Dec, 2007 - 08:45 PM
Post #3

New D.I.C Head
*

Joined: 4 Dec, 2007
Posts: 4


My Contributions
Wow you sound like you know what you are doing, Problem is, I'm unfamiliar with C++ and making the code into a library.

So any help with that also?
User is offlineProfile CardPM
+Quote Post

Soljah
RE: Conversion From C++ To VB6.0
4 Dec, 2007 - 09:44 PM
Post #4

New D.I.C Head
*

Joined: 4 Dec, 2007
Posts: 4


My Contributions

Bump, Help would be greatly appreciated.
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Conversion From C++ To VB6.0
5 Dec, 2007 - 06:43 AM
Post #5

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,869



Thanked: 53 times
Dream Kudos: 550
My Contributions
I am sorry I don't really have time today to get into it. Basically what you want to do is start a new DLL (Win32 Dynamic-Link Library)project in C++ (I am assuming VC++ here). Once you get project started you want to copy over the functions... well there is more to it than that.

Tell you what, start with this tutorial, it will help you understand the process.

Once you are done there, we can begin to work that code over to a dll.

What you will probably have to do is make a "wrapper" set of function for the dll, to know exactly how to export the functions I need to study the source a little better.

Once you are done with the tutorial and think you have a basic handle on how to make a dll bump this and when I get off work I will see if I can take a look.

Maybe someone who has a little more experience with this (I have not done it in about 2 years... and even then only once or twice) can chime in.
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/8/09 03:19PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month