Can i achieve my things like communicating with Firmware, via VC++.net.
Yes. There is *nothing* you can do in MFC that you can't do in C++/CLI ( or Win32, for that matter ). But, C++/CLI has a more modern framework, so it offers all sorts of stuff that vanilla C++ and MFC do not.
Is it functionality wise Same(.net & MFC)?
No. Like I said, the .NET framework offers a lot of stuff that MFC does not.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
Does anyone have any good articles on doing these 2 things with c/c++? I see many articles for c# and VB. I would like to do simple everyday tasks but faster without the need of accessing AD Users and computers everytime.
I have created a .Net User control which includes reference to a C++ /CLI component developed with /clr . Since there are some unmanaged resoucrces, i am calling the disposing the C++ /CLI in the dipose method of the user control. If we drag and drop this control in to a Windows form and then try to delete it,it is throwing an exception that the "C++ / CLI " dll could not be located.... however it is working fine while running the application
can anyone help me out.The sample code is
/// Clean up any resources being used.
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
if (disposing && (components != null))
if (unmanagedComponent != null)
unmanagedComponent = null;
C++/CLI does not allow you directly access or override the Dispose method. You use a destructor (dtor) and a finalize destructor in your C++/CLI code. You explicitly dispose of the object's resources by using "delete". Since the finalize destructor does not get called if you use "delete", you should call the finalize destructor explicitly from the destructor if you have clean up code in the finalize destructor.
ref class Test
// free all managed and unmanaged resources and memory
// free all unmanaged resources and memory only
I don't know how to window form in C++, because i never lernt @ college. I want to make an application where i create some textbox in windo form, it will display an result for e.g text1 = text2 * text3 . just the basic idea to make so that I can understand little bit of it
OK - the 'managed C++' syntax in 2003, Microsoft has abandoned. You certainly have MFC tho, which is a dying technology, but there's heaps of resources to support it. I'd still do C++ development in MFC, not in C++/CLI.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
I wrote a C++ program which will create a service in windows. By starting that service I want to run a particular .exe The issue here is that, after starting that service, that .exe is running in the task manager but the application window is not visible.
I am giving the .exe path as a command line argument while executing the C++ exe.
If the service is running under a system account (SYSTEM, LocalService, etc.) then its child processes do too and they aren't visible by default on the interactive desktop. I believe the recommended way to run an app interactive is CreateProcessAsUser(). You shouldn't run the EXE as interactive and running in the service's account because that a) won't work in Vista and b) opens you up to elevation of priv attacks in pre-Vista.
Thanks for the info. In the CreateProcessAsUser(
"cmd.exe" or cmdline args,
NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE,
This I got from one site, I want to know, apart from calling this function, anyotherfunction needs to be called?And for the "htoken" parameter any objects or assignments needs to be done? and FYI is now I am using CreateProcess method in the program