473,386 Members | 1,679 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,386 software developers and data experts.

Can I do this?

Hi,

I want to use Net Forms (I think thats what theyre called) to build a
really sexy, cool front end - but then use Visual C++ (not VC++ .NET -
because I want native code, not IL) to create a "blisteringly" fast
application with a cool front end.

One reason why I don't want the CLR code is because it is relatively
easy to reverse engineer the code, plus I don't really like the idea of
interpreted code at all (call me old fashioned) - but the real reason is
security - I do not want my proprietary algorithms to be easily
available for all to see (not impressed by code obfuscators - they are
either too bugy, cause more problems than they solve, or are fairly easy
to de-obfuscate code they obfuscated - so No thanks its native code for me.

To recap, this is what I want to do:

1). Design GUIs using .Net Forms
2). Write client applicationb logic in C++
3). Compile code into a native binary (or at the very least, my C++ code
will not be "easily reversible" from the resulting executable

Can I do this?. If yes, please tell me how it can be done.
look forward to your response

B.

Nov 17 '05 #1
4 1207
Hi Beatrice!
One reason why I don't want the CLR code is because it is relatively
easy to reverse engineer the code, plus I don't really like the idea of
interpreted code at all
WHat code is interpreted? IL is jitted.. (and so compiled at runtime).
You also can use "ngen"; but the improvement is minimal (or even worser).
(call me old fashioned) - but the real reason is
security - I do not want my proprietary algorithms to be easily
available for all to see
My suggest is: DO your fancy-sexy UI with C# and do your algorithm in
unmanaged C++ (DLL) and use PInvoke.
1). Design GUIs using .Net Forms
Do it via C#.
2). Write client applicationb logic in C++
Do it in unmanaged C++ and use PInvoke to call it from C#.
3). Compile code into a native binary (or at the very least, my C++ code
will not be "easily reversible" from the resulting executable

Can I do this?. If yes, please tell me how it can be done.


Yes. See above...

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #2
"Beatrice Rutger" <br*****@no.spam.com> wrote in message
news:d8**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
I want to use Net Forms (I think thats what theyre called) to build a
really sexy, cool front end - but then use Visual C++ (not VC++ .NET -
because I want native code, not IL) to create a "blisteringly" fast
application with a cool front end.
OK.
Can I do this?. If yes, please tell me how it can be done.


Yes, sure. You'll need to decide if the native parts of the application run
in process with the managed parts or not.

If the native parts run in process then you can create one or more DLLs
whose exports you call from your forms by means of the Platform Infovke
(P/Invoke) capability:

http://msdn.microsoft.com/library/de...rp09192002.asp

http://msdn.microsoft.com/msdnmag/issues/03/07/NET/

http://msdn.microsoft.com/msdnmag/issues/04/10/NET/

The links I chose all show how C# card can invoke native code because often
that's what people want to do. You can use P/Invoke from any .Net language.

If the native parts run out of process then you can use some IPC technique
to hop the fence - e.g. sockets.

Regards,
Will
Nov 17 '05 #3
Hi William,

Many thanks for the prompt feedback and links. I will be reading them in
greater detail shortly. I have a couple more questions:

1). I quickly perused through the links you kindly provided - and I came
accross the dreaded word of "marshalling" - why are we marshalling data
if it we are running in the same process - (is data representation
between C++ and Managed C++ so different as to require in-process
marcshalling?). Is there any documentation you aware of that talks about
the performance hit due to marshalling?

2). My backend is pure java (J2EE app running on Linux). I have made the
decision to use.NET as the client app (front end) because SWING sucks
big time. I was wondering if you have any suggestions on how to
communicate between the backend and the frontend. I can't use XML
because it is too heavyweight and I will incur performance hits (parsing
related) on both sides. I was thinking of using a servlet layer on the
server side and then use HTTPS requests from the client to send base 64
encoded data from the server - This will allow me to receive files
stored at the backend server in Linux (MSB format). Do you have any
suggetsions/comments on how I can do this base 64 encoded HTTP comms
from the client side (or maybe another suggestion of how to communivcate
between the backend and frontend)

I look forward to your feedback.

Tkx
B.

William DePalo [MVP VC++] wrote:
"Beatrice Rutger" <br*****@no.spam.com> wrote in message
news:d8**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
I want to use Net Forms (I think thats what theyre called) to build a
really sexy, cool front end - but then use Visual C++ (not VC++ .NET -
because I want native code, not IL) to create a "blisteringly" fast
application with a cool front end.

OK.

Can I do this?. If yes, please tell me how it can be done.

Yes, sure. You'll need to decide if the native parts of the application run
in process with the managed parts or not.

If the native parts run in process then you can create one or more DLLs
whose exports you call from your forms by means of the Platform Infovke
(P/Invoke) capability:

http://msdn.microsoft.com/library/de...rp09192002.asp

http://msdn.microsoft.com/msdnmag/issues/03/07/NET/

http://msdn.microsoft.com/msdnmag/issues/04/10/NET/

The links I chose all show how C# card can invoke native code because often
that's what people want to do. You can use P/Invoke from any .Net language.

If the native parts run out of process then you can use some IPC technique
to hop the fence - e.g. sockets.

Regards,
Will


Nov 17 '05 #4
"Beatrice Rutger" <br*****@no.spam.com> wrote in message
news:d8**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
Many thanks for the prompt feedback and links.
You are welcome.
1). I quickly perused through the links you kindly provided - and I came
accross the dreaded word of "marshalling" - why are we marshalling data if
it we are running in the same process - (is data representation between
C++ and Managed C++ so different as to require in-process marcshalling?).
Is there any documentation you aware of that talks about the performance
hit due to marshalling?
Well, you are dealing translating objects in different type systems. And as
for the preformance hit, hopping the fence between the two environments is
not free. The rule of thumb is to minimize transitions betwwen environments
and do as much on each side of the boundary as is practical. I don't have
any numbers or links to them. Perhaps someone else does.
2). My backend is pure java (J2EE app running on Linux). I have made the
decision to use.NET as the client app (front end) because SWING sucks big
time. I was wondering if you have any suggestions on how to communicate
between the backend and the frontend.
It is not the kind of thing I do on a daily basis. I'd Google for

web services j2ee

or

.Net j2ee bridge

or something like that to start researching products or technologies.
Do you have any suggetsions/comments on how I can do this base 64 encoded
HTTP comms from the client side (or maybe another suggestion of how to
communivcate between the backend and frontend)


That's not something I have had to do either. Perhaps someone else has a
suggestion.

Regards,
Will
Nov 17 '05 #5

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

Similar topics

4
by: James | last post by:
I have a from with 2 fields: Company & Name Depening which is completed, one of the following queries will be run: if($Company){ $query = "Select C* From tblsample Where ID = $Company...
5
by: Scott D | last post by:
I am trying to check and see if a field is posted or not, if not posted then assign $location which is a session variable to $location_other. If it is posted then just assign it to...
2
by: Nick | last post by:
Can someone please tell me how to access elements from a multiple selection list? From what ive read on other posts, this is correct. I keep getting an "Undefined variable" error though... Form...
2
by: Alexander Ross | last post by:
I have a variable ($x) that can have 50 different (string) values. I want to check for 7 of those values and do something based on it ... as I see it I have 2 options: 1) if (($x=="one") ||...
0
by: Dan Foley | last post by:
This script runs fine, but I'd like to know why it's so slow.. Thanks for any help out there on how i can make it faster (it might take up to 5 min to write these 3 export files whith 15 records...
5
by: Lee Redeem | last post by:
Hi there I've created abd uploaded this basic PHP script: <html> <head> <title>PHP Test</title> </head> <body> <H1 align="center">
5
by: christopher vogt | last post by:
Hi, i'm wondering if there is something like $this-> to call a method inside another method of the same class without using the classname in front. I actually use class TEST { function...
6
by: Phil Powell | last post by:
Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv, nnet_produkt p WHERE...
1
by: Michel | last post by:
a site like this http://www.dvdzone2.com/dvd Can you make it in PHP and MySQL within 6 weeks? If so, send me your price 2 a r a (at) p a n d o r a . b e
11
by: Maciej Nadolski | last post by:
Hi! I can`t understand what php wants from me:( So: Cannot send session cache limiter - headers already sent (output started at /home/krecik/public_html/silnik.php:208) in...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.