|
How do you manipulate a service from console (running, starting, stopping)?
rechi
|
|
|
|
|
Do you mean in code from a console app, or just typing at the command prompt? If its in code, the same way as normal (StartService etc.). If you mean at the command prompt use SC.EXE
sc \\theServer command serviceName
Dylan Kenneally
London, UK
|
|
|
|
|
It was about the command prompt.
I've tried SC but it cannot be find by the system. It must be something like net start
rechi
|
|
|
|
|
Bogdan Rechi wrote:
It must be something like net start
It is 'net start service_name'. I think SC is available only on XP.
|
|
|
|
|
Net Start service name to start it
And
Net Stop service name to stop it
|
|
|
|
|
how i can get the ServerName from the IP address??
ie when i put 202.345.43.56 then i get 'mfghftp'
there is an API gethostbyaddr() but i dunno get anything frm that..
Any ideas??
Renjith-CPian.
|
|
|
|
|
Renjith - CPian wrote:
there is an API gethostbyaddr() but i dunno get anything frm that..
What return value do you get? Could it be something like WSANOTINITIALISED or WSAHOST_NOT_FOUND etc.?
If your writing for XP or .NET, check out getnameinfo
Dylan Kenneally
London, UK
|
|
|
|
|
In the previous version of ATL (Visual Studio 6), the guru's solved the 'marshal by value' issue with a IMarshal implementation (IMarshalByValueImpl). I moved my code to Visual Studio .Net with ATL 7.0. It compiles fine. However, my object, although it registers without a problem, cannot be created (class not registered error). Anybody goth the marshal by value to work in ATL 7.0?
|
|
|
|
|
Hi,
In dialog based application, i have a data array which is the sub-class created from the CArray. Now i want to check this data array from a dialog with edit control in it. The problem is that the size of the data array is not fixed, so it is not possible to edit this data array by using usually used MFC CEdit control. Therefore, my problem is how to create a dynamical edit control for the problem?
Thanks in advance!
chen
|
|
|
|
|
|
Yes Nish, you said is i want.
It may be an easy method for using a listbox to edit the data array, but how to save the data to a txt file from the listbox?
chen
|
|
|
|
|
Use a list control or a list box on the dialog to list the content. You can then allow elements to be edited. You also will not need a massive number of controls in the UI.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
I click Build/Start Debug/Attach to process... in order to start debuggin' on some program i wrote. I find the list as empty.
Do you know how could i bring the processes into the list?
rechi
|
|
|
|
|
It's a bug in Visual Studio.
Can be solved using a Service Pack.
rechi
|
|
|
|
|
hi all,
any one can know how to stop the System Time.
thanks in advance.
|
|
|
|
|
I don't know if you can stop it, but you could get the current time, and then continually reset it back to that time
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Yes, you can: shutdown your machine, unplug it, open it, remove battery from motherboard - and magic, time is stopped.
|
|
|
|
|
hi all,
any can know how to stop the System Time.
thanks in advance.
|
|
|
|
|
Hi!
I've programmed in c/c++ in text mode for several years
and quite familiar with this great language.
Now want to program in Windows environment,but just don't see where to start. There is SO MUCH in it(plus this new .NET technology). Please help me,give me some guide or little hint where to start,what to read(on the WEB if possible).Should I start directly with c# instead?
Thankyou,
Vitaliy
|
|
|
|
|
All in all, if you do not have any experience in
Windows programming, its best that you should
start with c#.
Probably many people would not agree with me
but i think programming .Net in c# is the
fastest way to program for windows and
certainely .Net.
There is going to be ample market for .Net programmers
in c# and certainely VC++ is not going to go away
but c# will be used for a lot of UI programming.
There are a lot of books out there and also a lot of
articles on the web.
Best of luck on your .Net journey!!;)
|
|
|
|
|
I disagree with the other guy. There is no reason to throw away your C++ skills to learn a lesser language, just because it is flavour of the month. MFC is pretty easy anyhow, just get a book and ask questions.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
I always argued that it's best to learn Win32 API first (at least basic concepts) and then move to MFC.
Regards,
Venet.
--------
Black holes are where God divided by zero.(Steven Wright)
|
|
|
|
|
|
Thanks for replies.
I understand that .NET is the way people will program Windows UI in the feature. I don't have any experience with c#,but heard it is very similar to Java.
I think Managed C++ is the most logical solution,to take advantages of both c++ and .NET
All these are good,but could you link me to some useful resource on all of these to start? The resources on this site are narrowed to very specific parts of MFC/ATL/.NET... etc
|
|
|
|
|
I personally found that messing around with a few example applications from here at the Code Project (from various authors) was the best way to pick things up, really. Like you, I was doing mostly console-type apps and tons kernel mode dev., leaving my MFC and UI coding skills a little thin (actually, they were non-existent!).
Also, if you use the built-in Wizard to create an MFC app, you can get it to create a simple app for you right off the get-go that even compiles - start mucking around with the created project - I recommend starting out with a bare-bones Dialog app persobally, CDialog is a lot quicker to pick up and learn how to plop down controls and muck around with them.
Have fun with the learning, I've been messing with MFC now since Aug 2001 and have personally found that the examples here are fantastic learning tools for people who learn by example.
: Dean 'Karnatos' Michaud
|
|
|
|