473,669 Members | 2,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "blistering ly" 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 1214
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.spa m.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 "blistering ly" 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 "marshallin g" - 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.spa m.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 "blistering ly" 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.spa m.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 "marshallin g" - 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
3352
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 Order By Company ASC";
5
2750
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 $location_other I keep getting "Notice: Undefined index: location_other" referring to (!($_POST)) { $location_other = $location; } else
2
2724
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 page************************************************************ <form action="/process.php" method="get" name="formOne" id="formOne"> <select name="owner" size="6" multiple id="owner"> <option value="one">one</option> <option...
2
2541
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") || ($x=="two") || ... || ($x=="seven")) ... or 2) switch ($x){ case("one"):
0
3275
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 each!!!) Dan ==================== <style> body, table, tr, td { font-family: 'verdana'; font-size: 12px;
5
3222
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
10048
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 func1()
6
2661
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 s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse_id AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND sv.nnet_produkt_varegruppe_id IN ( SELECT nnet_produkt_varegruppe_id FROM nnet_produkt_varegruppe
1
2193
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
3163
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 /home/krecik/public_html/silnik.php on line 251 Line 208: print ( "error: " . mysql_error()); Line 251: session_register("uprawnienia", "zalogowany"); I can understand that sth, is wrong in line 251 after line 208 and it is logical to
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8803
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8587
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.