473,662 Members | 2,596 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Is VC++ any "better" than C#?

On Fri, 18 Jul 2008 10:41:23 -0700, jmDesktop <ne***********@ gmail.com>
wrote:
Thanks. One example I came across was video capture. There are folks
out there that have written .net wrappers, but they do not appear to
be "official" and state things like "Don't use this in production."
Well, that's an interesting example, if for no other reason than that the
DirectShow video capture stuff is a reasonably straight-forward and
natural thing to access from .NET using the p/invoke stuff. You may be
referring to the DirectShow.NET project, which I haven't used but
understand to be a pretty good wrapper for DirectShow.

As far as it not being "official" and not for "use in production", that
sort of thing is true for pretty much anything you find outside the normal
Microsoft API documentation. Even plain old C++ samples often come with a
similar caveat.

Personally, I don't think I'd ever write "don't use this in production" in
any sample code I make available, but I certainly feel that there's an
implied "use at your own risk" that goes along with _any_ sample code.
Well, if I do and it breaks, then when can I say? "Uh, I used this
guy's stuff off of CodeProject and yeah, he said not too." If I'm
going to use it I have to understand it to maintain it.
That's true...if you're going to incorporate some code into your own
projects, it may behoove you to understand what the code is doing. If
nothing else, doing otherwise risks getting someone's trojan hidden in
your own code. :)

But to some extent, it's hard to know where to draw the line. If a
component you use in your own code comes from a trusted source, do you
really need to know how it works? After all, I assume you haven't tried
to examine the implementation of .NET to determine for yourself how it
works, even though much of .NET is basically just a wrapper on the
unmanaged Windows API.

Likewise, if you find a library that you can use in your own .NET code and
which has a public API that is completely defined in terms of managed
code, as long as you trust the source, does it matter whether you know
exactly what's going on within the library?

Again, I realize in some such cases there may be warning against using the
library in production code, but to a large extent I believe that those
kinds of warnings are "CYA" measures. Any rational, thinking person
should be able to make a decision for themselves as to whether a publicly
available code sample or library is actually of high enough quality to use
in production code, regardless of whatever warnings come with it, with the
expectation that with adequate testing one can confirm or refute any
assumption of quality.
[...] I have had some C++, just
beginner stuff, so I can follow it and know what the constructs mean,
but that's about it. It's the low level stuff that I'd like to know
how to do because it seems to come in handy at times when looking at
MS's documentation.
Well, as I said...I do believe that there's value in learning the
unmanaged API as well as being familiar enough with C/C++ to navigate any
example code related to the unmanaged API. So if you're of the mind to
learn that, by all means do. But I wouldn't consider it a prerequisite to
writing .NET code, and it may be that you will find it just as effective
to learn as you go along, inasmuch as you need that knowledge at all.

Pete
Jul 18 '08 #1
2 1376
On Jul 18, 2:03*pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
wrote:
On Fri, 18 Jul 2008 10:41:23 -0700, jmDesktop <needin4mat...@ gmail.com*
wrote:
Thanks. *One example I came across was video capture. *There are folks
out there that have written .net wrappers, but they do not appear to
be "official" and state things like "Don't use this in production."

Well, that's an interesting example, if for no other reason than that the*
DirectShow video capture stuff is a reasonably straight-forward and *
natural thing to access from .NET using the p/invoke stuff. *You may be*
referring to the DirectShow.NET project, which I haven't used but *
understand to be a pretty good wrapper for DirectShow.

As far as it not being "official" and not for "use in production", that *
sort of thing is true for pretty much anything you find outside the normal *
Microsoft API documentation. *Even plain old C++ samples often come with a *
similar caveat.

Personally, I don't think I'd ever write "don't use this in production" in *
any sample code I make available, but I certainly feel that there's an *
implied "use at your own risk" that goes along with _any_ sample code.
Well, if I do and it breaks, then when can I say? *"Uh, I used this
guy's stuff off of CodeProject and yeah, he said not too." *If I'm
going to use it I have to understand it to maintain it.

That's true...if you're going to incorporate some code into your own *
projects, it may behoove you to understand what the code is doing. *If *
nothing else, doing otherwise risks getting someone's trojan hidden in *
your own code. *:)

But to some extent, it's hard to know where to draw the line. *If a *
component you use in your own code comes from a trusted source, do you *
really need to know how it works? *After all, I assume you haven't tried *
to examine the implementation of .NET to determine for yourself how it *
works, even though much of .NET is basically just a wrapper on the *
unmanaged Windows API.

Likewise, if you find a library that you can use in your own .NET code and *
which has a public API that is completely defined in terms of managed *
code, as long as you trust the source, does it matter whether you know *
exactly what's going on within the library?

Again, I realize in some such cases there may be warning against using the *
library in production code, but to a large extent I believe that those *
kinds of warnings are "CYA" measures. *Any rational, thinking person *
should be able to make a decision for themselves as to whether a publicly*
available code sample or library is actually of high enough quality to use *
in production code, regardless of whatever warnings come with it, with the *
expectation that with adequate testing one can confirm or refute any *
assumption of quality.
[...] I have had some C++, just
beginner stuff, so I can follow it and know what the constructs mean,
but that's about it. *It's the low level stuff that I'd like to know
how to do because it seems to come in handy at times when looking at
MS's documentation.

Well, as I said...I do believe that there's value in learning the *
unmanaged API as well as being familiar enough with C/C++ to navigate any*
example code related to the unmanaged API. *So if you're of the mind to*
learn that, by all means do. *But I wouldn't consider it a prerequisiteto *
writing .NET code, and it may be that you will find it just as effective *
to learn as you go along, inasmuch as you need that knowledge at all.

Pete
I think I have/had a fundemental misunderstandin g here. Does VC++ use
the .NET runtime? I was thinking it did and was just another language
choice like C# or VB.NET. I thought this because all the express
editions were on the same download page. Is VC++ totally separate?

Thanks again.
Jul 18 '08 #2
On Fri, 18 Jul 2008 12:17:09 -0700, jmDesktop <ne***********@ gmail.com>
wrote:
I think I have/had a fundemental misunderstandin g here. Does VC++ use
the .NET runtime? I was thinking it did and was just another language
choice like C# or VB.NET. I thought this because all the express
editions were on the same download page. Is VC++ totally separate?
Visual C++ 2008 Express _can_ use the .NET runtime. But you don't _have_
to use the .NET runtime. I don't recall whether the 2008 versions still
include MFC, but I'd guess they do, and of course you can target the
non-.NET Windows API directly. I do recall that the Express version
doesn't provide a complete resource editor for unmanaged code; they really
want you to use .NET. If you're not familiar with the .rc resource file
language, it could be a big headache to construct complicated GUI
applications using VC++ Express. But using .NET isn't mandatory.

If you intend to use the .NET runtime, IMHO a language like VB.NET or C#
is probably more appropriate. I prefer C# because of its similarity to
C++ and what I perceive to be a better, more consistent and more reliable
design with respect to the language. But you can write .NET programs in
any of those languages, and frankly it's mostly a matter of personal
taste. It's not like C++ prevents you from using .NET in ways that would
be otherwise allowed in other languages.

Pete
Jul 18 '08 #3

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

Similar topics

0
1363
by: Trebor A. Rude | last post by:
I'm new to Perl (although I have about 7 years of C++ experience), and I was just wondering which of these two equivalent statements the group thinks is "better", and why: push @command, map {exists $options{$_} ? ($options{$_}, $comments{$_}) : ()} keys %comments; push @command, map {($options{$_}, $comments{$_})} grep exists $options{$_}, keys %comments;
6
1612
by: Tom Rahav | last post by:
Hi! I need to store some information about my application, such as trail version limits, allowed modules, etc. My question is whether it's better to store it in the windows registry, or in a binary file in the application's directory. My question is more aimed to the security issues, because I don't face performence as problem, since I need it just what the apllication starts. Thanks!
3
12361
by: Ajax Chelsea | last post by:
can not the "static const int" be replaced by "static enum" anywhere? is it necessary that define special initialization syntax for "static const int"?
1
1606
by: Alessandro Bottoni | last post by:
Is there any module or interface that allow the programmer to access a imap4/pop3 server in a more pythonic (or Object Oriented) way than the usual imaplib and popolib? I mean: is there any module that would allow me to query the server for specific messages (and fetch them) in a way similar to a OODB? TIA -----------------------------------
12
3222
by: junky_fellow | last post by:
Which is better using a switch statement or the if-then equivalent of switch ?
1
2629
by: Yang Zhang | last post by:
Anybody know how I can bootstrap-build lzz? The website is down, and the SF project only contains the lzz source (lzz is self-hosting). Also, are there any newer/better tools along the same lines? I dig the whole "better C++" theme (note that I mean tools that let me use existing C++ code and let others use my code; for instance, D stopped C ++ support, so it wouldn't fit in such a list). I found this one, but I'm not sure how it...
1
6933
by: CF FAN | last post by:
which one is better "eq" or "is" in coldfusion <cfif test eq "1"> or <cfif test is "1"> which one is more effective??
0
1028
by: service0059 | last post by:
This category is designed to enable you to have all the important information right at your fingertips and create better "sight value". You will learn how karat gold affects appeal and value and understand various cuts and stone settings. You get to discover for yourself the sales process and learn how to relate quality, rarity, and color to the gem values.http://www.dojewelry.net These are the latest items we have brought back from the...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8764
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
8546
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
7367
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...
0
4180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1752
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.