|
I have a Windows service that has an installer class. I set the StartType to ServiceStartMode.Automatic , but after installation, it doesn't automatically start. What didn't I do?
BTW, the service starts fine if I do it in the SCM.
EDIT: I added the following code, and it works great:
class CLFCSServiceInstaller : ServiceInstaller
{
public override void Commit(System.Collections.IDictionary savedState)
{
base.Commit(savedState);
ServiceController controller = new ServiceController(this.ServiceName);
controller.Start();
controller.Close();
}
}
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Tuesday, December 18, 2007 12:36:59 PM
|
|
|
|
|
I'm creating a spy and packaging it in a COM library.
It is to be used by vbscripts for testing purposes.
I am able to search through the child windows of a window to find controls that already have a caption (i.e. buttons, checkboxes, radiobuttons.) using FindWindowEx(...) .
How would I be able to retrieve the handleID (HWND) of a control based on it's Name?
(i.e. textbox1 , ListView1 , TreeView1 , etc.)
I appreciate the assistance,
Cheers,
|
|
|
|
|
I think you can use "control.Handle" Or Textbox.Handle property to get the HWD.
|
|
|
|
|
hi
As part of my application i have to backup every day some important files into CD ROM, not manually it have to be automatic one (by programming), i implemented sehedular it will try to write into CD.,
i need to write some data into CD ROM, by C++ / vc .Net programming
is there any windows API ? or any thing to do ??
and i also validate the size of the DISK befor i write..
how can i do that??
thanks
iam a software engineer working for varisis technologies bangalore
|
|
|
|
|
|
Hi
I am trying to compile a website optimized for x64 processor architecture, however it does not work. I have selected x64 as primary platform on project options but whenever I try to debug my code, it gives that silly " Attempted to load a 64-bit assembly on a 32-bit platform. Use ReflectionOnlyLoad() instead if trying to load for reflection purposes. " error. What should I do?
Your help would be greatly appreciated
mca
|
|
|
|
|
mcamcamca wrote: Attempted to load a 64-bit assembly on a 32-bit platform
I think the error speaks for itself. You're trying to run 64-bit code on a 32-bit machine. That isn't going to work. In order to debug the code, you need to either set the project back to targeting a 32-bit machine, or move your development (Windows, Visual Studio, ...) to a 64-bit machine.
|
|
|
|
|
I have vista enterprise 64 bit installed on my pc. Morevoer .net framework 3.5 (x64) is also available. I am using .net 2008 rtm on this machine and still getting this error. What do I miss ?
mca
|
|
|
|
|
I don't have any 64-bit machines, so there's really nothing I can test.
But, from the sounds of the error message, Visual Studio is running in 32-bit mode. And after about 5 seconds of Googling, I found this[^].
|
|
|
|
|
It seems that vs tries to use 32 bit framework by default. I have to change this setting by using Microsoft.NET\Framework64\v2.0.50727\installutil.exe command. Your reference link really helps out.
I really thank you for your attention,
Sincerely
Can Akpinar
mca
|
|
|
|
|
Hello,
My .NET application locks up when the screensaver starts. I have no idea why or how to "debug" this.
Found no answer on google/msdn forums.
Hope someone can help me out ( any reason or way to debug this)
Regards,
Andy
|
|
|
|
|
It's probably more likely that your app hasn't actually "locked up" but that the screen saver has consumed 99%+ of the CPU, causing all other processes to run so slowly that they appear to lock up. The solution to that is simple - either don't run the screen saver or run a simple one, such as the Default or Logon Screensaver. Running any of the standard "3D" screen savers will eat nearly 100% of the CPU.
|
|
|
|
|
That would do it all right.
|
|
|
|
|
Thanks for the help but It's not right in my case, all other applications stay *alive* when the screensaver goes off, except my .NET application.
I've tried google, it seems like many more people have this problem and not 1 solution was ever posted!
The program does not go into unresponsive mode, it behaves more like when you try clicking a form when theres a Dialog window active.
|
|
|
|
|
There's nothing known in the .NET CLR that does this. I'd try the ANTS profiler on the code and see where it's hanging up.
|
|
|
|
|
hi
i am having instoled v2.0 framwork and i want to run my v1.1 project from this environment without uninstalling v2.0 framwrok how can i do it by aspnet_regiis tool
|
|
|
|
|
Hi,
You can't develop/debug a 1.1 app with Visual Studio 2005.
you can have several .NET Framework versions installed side-by-side; they don't interfere
with each other.
and you can have several Visual Studio versions installed side-by-side; they don't interfere
with each other.
But a .NET 1.1 app needs the 1.1 framework (and Visual 2003 to develop/debug).
And a .NET 2.0 app needs the 2.0 framework (and Visual 2005 to develop/debug).
There is a tiny little glitch: whatever Visual version you install last is the one that
will open automatically when you double-click one of the associated file types (either
source files, project files, solution files).
|
|
|
|
|
Hi Luc,
Luc Pattyn wrote: And a .NET 2.0 app needs the 2.0 framework (and Visual 2005 to develop/debug).
I would go one further...
And a .NET 2.0 app needs the 2.0 framework (and Visual 2005 or 2008 to develop/debug).
Luc Pattyn wrote: whatever Visual version you install last is the one that
will open automatically when you double-click one of the associated file types (either
source files, project files, solution files).
Yeah, that's a pain. I'm curious....after working with 2008, the solution icons
(when seen in Windows Explorer) have the VS version on them (like - "7.1" for 2003,
"8" for 2005, and "9" for 2008. Were those there in 2005 too?
Happy Holidays!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark,
I have no experience with VS2008 yet, I'm in no real hurry, so I am not promoting it either.
On an XP system with 1.1 and 2.0, VS2003 and VS2005 installed, Explorer shows no difference
between 2003 files and 2005 files.
If the extensions are the same, I am a bit puzzled how Explorer would know how to show
different icons. Anyway showing different icons but launching the wrong VS version seems
rather pointless to me.
I'd rather have the opposite: I would hope the most recent version would contain a
launch utility (devenv.exe?) that is smart enough to investigate the file you double-click,
and when it is clear which VS version is appropriate, would launch that version; if uncertain
(e.g. when a 2.0 file can be handled by both 2005 and 2008) it would just pop up a dialog...
But no, that is not what 2003+2005 are offering.
Again, I don't know at all how it is with 2008. I'll figure that out next year.
Regards, and Happy Holidays to you too.
modified on Wednesday, December 19, 2007 11:26:40 PM
|
|
|
|
|
Luc Pattyn wrote:
I have no experience with VS2008 yet, I'm in no real hurry, so I am not promoting it either.
Same here. Just tip-toeing with it right now.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
You can't.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hello All
I am trying to catch a right button down event for a control before the form sends it to this control; I tried to do that through overriding the WndProc
But it fails!
Is there any way to do that?
|
|
|
|
|
What are you trying to do? Why do you need to do this?
|
|
|
|
|
Hi,
How do i attach/install .net framework with my set up project.
I am creating set up project of windows application project.
Thank you
|
|
|
|
|
Check out this[^]. In the "prerequisites" list there is an entry for ".NET Framework 2.0" (or later if you are working in VS2008).
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|