C++ with Vb.NET

Status
Not open for further replies.

RCuber

The Mighty Unkel!!!
Staff member
What exactly is u r requirement? if u can tell me than maybe i can answer you

Charan
 

sakumar79

Technomancer
You want to call c++ code that has been compiled into .exe right? Also, I am assuming that you are doing this by using a system call to run the executable... If so, u can simply include the parameters to the command to be executed and use the argument string of the main function in C++ to retrieve the parameters.

Arun
 
OP
S

sourcecode

Broken In
sakumar79 said:
You want to call c++ code that has been compiled into .exe right? Also, I am assuming that you are doing this by using a system call to run the executable... If so, u can simply include the parameters to the command to be executed and use the argument string of the main function in C++ to retrieve the parameters.

Arun

what u assumed is true Bt I cudnt get it :cry:
cud u plz elaborate...

Actually my C++ code askes for the values after its exetution (at runtime) that values are to be taken from the vb form
 

sakumar79

Technomancer
Is the C++ program started after the values in the VB form are available or before? If after, you can pass the values in the form as command line parameters (<execute> <prg name> <parameter list>) where <execute> indicates VB command for running a command, <prg name> indicates the C++ program to be run and <parameter list> indicates list of parameters that the program has to process...

If the C++ program will already be running, you may need to do some system level raising of events at the VB side and monitoring of events on the C++ side. Try googling for info on these... The only way that I can think of to pass data in this case would be to use a data file initialized which would be where VB would write and C++ would read.

Arun
 
OP
S

sourcecode

Broken In
what is the execution command in vb?do i need to add the cpp file in the project or can execute it independantly?
 

sakumar79

Technomancer
sourcecode said:
what is the execution command in vb?do i need to add the cpp file in the project or can execute it independantly?

Refer *www.devx.com/dotnet/Article/7914 for information on running external programs. You dont need to add the cpp file into the project.

Arun
 

sakumar79

Technomancer
The Incredible said:
Dont mind but wat r these?

parameters

command line parameters

Vb.NET

system call

compiled into .exe

Parameters - data passed onto a function within a program that is taken as the input data. For example, in a function to calculate the square of a number n, n will be the parameter passed to the function...

Command line parameters - data passed onto a command such as those executed at the dos prompt. For example, in "copy a:\*.* c:\ ", the command is copy which takes two command line parameters a:\*.* (source) and c:\ (destination).

VB.NET - Visual Basic.NET is a programming language

compiled into .exe - Program is written in high-level language that is understood by humans. Then, it is compiled by an assembler into binary language understood by the computer. For MS-based systems, typically compiling will result in a .exe file creation.


Arun
 

The Incredible

Ambassador of Buzz
sakumar79 said:
compiled into .exe - Program is written in high-level language that is understood by humans. Then, it is compiled by an assembler into binary language understood by the computer. For MS-based systems, typically compiling will result in a .exe file creation.


Arun

Hey Arun thanks for the info. u know to get such info here is a bit tough as most of ppl dont reply and say to GOOGLE but usually v want in a language which sum ppl who hav a bit bad english. also when ppl answer themseles they giv sum exmaples just like u.

Its very nice to see a person like u over here.


BTW as u said for MS-based systems there r sum programs to convert our language to binary lang of computer. so do u know of a software which does da opposite means converts binary language to our language.

i've sum .chk files created by scandisk n cant read 'em as they are in binary language perhaps. help needed.
 

sakumar79

Technomancer
The Incredible said:
BTW as u said for MS-based systems there r sum programs to convert our language to binary lang of computer. so do u know of a software which does da opposite means converts binary language to our language.

i've sum .chk files created by scandisk n cant read 'em as they are in binary language perhaps. help needed.

Since any program is written in one of many possible languages, you will need to know the right decompiler for the program... Not sure if all languages have decompilers and if they do, how good they are since I have not used any...

For .chk files, you can try CHK-mate at *www.diydatarecovery.nl/chkmate.htm

Arun
 

puja399

In the zone
The Incredible said:
sakumar79 said:
compiled into .exe - Program is written in high-level language that is understood by humans. Then, it is compiled by an assembler into binary language understood by the computer. For MS-based systems, typically compiling will result in a .exe file creation.


Arun



BTW as u said for MS-based systems there r sum programs to convert our language to binary lang of computer. so do u know of a software which does da opposite means converts binary language to our language.

i've sum .chk files created by scandisk n cant read 'em as they are in binary language perhaps. help needed.

Then I guess u need to learn reversing.
 

puja399

In the zone
The Incredible said:
puja399 said:
Then I guess u need to learn reversing.

I'm only 15 and I think it is da age of learning only. So, I want to learn. Teach ME.

U can start by learning Windows API Programming in C/C++ (Use VC++) and then Win32 assembly language programming. U can find plenty of excellent free tutorials in the net, just use google.
 

The Incredible

Ambassador of Buzz
puja399 said:
U can start by learning Windows API Programming in C/C++ (Use VC++) and then Win32 assembly language programming.

can u giv sum details.

also wat did u mt by saying in C/C++ n then visual C++. i think C++ and visual C++ are different things
 

puja399

In the zone
U can program with WinAPI using any other 32 bit C++ compilers too (for Win platform of course), like Dev-C++ or GNU C++. But I recommend VC++ becuz of the intellisense support, good documentation and plenty of available books in the market, built-in MFC and ATL support, etc. Also the IDE for VC++ is the best u can get right now. Dev-C++ etc. are free though.

C++ is the language and VC++ is the mammoth tool itself that supports C++. It is THE TOOL people are using all over the world for any serious programming. (However, nowadays, VB is also being used for some serious programming, but the underlying mechanism is still from C++).

BTW, what C++ compiler ru using now? I hope its not TC++.
 

puja399

In the zone
Well...let me put it this way.....I have a computer in my home, its AMD athlon 64 3200+ with 1 GB RAM, and 200 GB SATA HDD. My video card is nVidia 6600GT, and I am running WinXP SP2. I use softwares like Photoshop CS2 and Visual Studio. But whenever I wish to view what files I have in a directory, I go to command prompt, cd\ to the desired directory and run a 'dir' command. And, thats not all, when I write any letter or something, I use the good old 'Edit' from the MS-DOS era.

Perhaps u r thinking, 'What a nutcase!!!', still using dir to view files and 'edit' for text editing? What wont use windows explorer, or use MS-Word!!! There must be something wrong with this person!!!!!


Yes, everything is wrong with using tc++. I don't know where u live, what school u read in, or what computer u use. But I am pretty certain that u dont use any computer older than Pentium-I, and any OS older than Windows 95/98. So, if u still use TC++, I would say there is something seriously wrong there. I would suggest that u drop the dead donkey and move along with the tide, unless of course, if u r not forced to learn it. WHY? There are reasons...

First of all, TC++ is not fully compliant with the modern C++ standard. Its an old compiler, at least 10 years old, and not supported anymore. (Its developer 'Borland' now makes 'Delphi', not Turbo C++). C++ has evolved a lot since then. For example, TC++ doesn't support templates which is the life-blood of modern C++. It doesn't support structured exception handling. It doesn't support many other things that r very important. If u learn C++ with TC++, be sure that u have to relearn everything.

Second, its a 16 bit compiler. Why on earth would u use a 16 bit complier when everything is 32 bit and going on to 64 bit!!!Would u crawl if u can run? TC++ was released for MS-DOS, not for Windows, and certainly not for WinXP.

Third, u can't use tc++ to program for windows. u can use it only to make some small programs that runs in a dosbox.
Other that writing some toy programs for showing off to ur friends or parents, its good for nothing, u cant use it to write any serious program. Learning computer programming, especially C++ is a serious task, too much time, labour, mindpower is required. Don't waste any of if on an obsolate system. TC++ has lived its life a long ago, served its purpose, and did it gracefully, it was a compiler of its class but it was back then. Now, its Visual C++ from microsoft. If u ever want to program for Windows with C++, its the only choice u have. In my opinion, if u decide to learn C++ for windows, learn VC++ or don't learn C++ for windows at all, no matter what others say or do.
 

The Incredible

Ambassador of Buzz
:shock:

I'm really very very shocked.

I never knew that. I thought dat VC++ is just a language as C++.

The actual problem is that in our school, the computers are really old. They seems to b P1 although i have a much better computer with AMD AthlonXP and WinXP.

Also, in our school, they use TC++ thats why I bought TC++.

Thanks for telling. I cant get what i shud do.

I'm really very much worried.
:(

BTW I'm in 9th CBSE.

BTW can u gimme a link to get VC++. Also, are the tutorials for C++ in TC++ and in VC++ different???

Plz tel me some basic things which I shud know to work in VC++ just as one shud know to work in TC++.
 
Status
Not open for further replies.
Top Bottom