Although I prefer to use C# for most of the code I write, there are times when VB.NET seems better. For example VB.NET has a lot of templates for that save time, versus C#, which is more of a tooling issue than anything (i.e. in VB.NET 2005 you have options
for automagically generating code to handle single-instance applications and so on). Late-binding is very helpful when doing a lot of COM Interop, so you can skip adding all the optional Reflection.Missing parameters that are required by C#, but not VB.NET.
I think that I can write in VB.NET and C# equally well, however, and really having any bias against one or the other is more of a reflection of the ignorance of the person who think VB.NET is somehow "weaker" or "a toy" compared to C#, because it's completely
irrelevant in the big scheme of things aside from the forementioned benefits of late-binding and VS templates, and the forthcoming XML literals and dynamic features of VB.NET.
Making a UI in VB.NET in the future with XML literals and dynamicism is going to make it a lot easier to write than it currently is without those features.
Discussions
-
-
If the many-worlds, or infinite-worlds which seems more appropriate, theory of quantum physics is correct, then in some reality the machine imagined never gets turned off, and so never dies, thus being immortal. Also, in some reality, you lived a perfect life and so has society and together have managed to perfect the health and healing of the body thus gaining immortality. And in some reality, eventually, some society will find a way to merge all those realities into one in which the "perfect" reality is chosen by all the "imperfect" realities as being the one in which they would prefer to dwell, and in that "perfect" reality the society may choose to not only merge with all other realities, but to resurrect the dead in those alternate realities by means such as reviving them from genes left over, and from the electromagnetic signatures left over from their thought patterns, resurrect their memories and thoughts throughout all time.
LOL - so you know, anything's possible. Only one of the many realities has to be able and choose to do this to save all.
-
lagu26537 wrote:Also the network technician told me the exe is probably svchost.exe. Now I need to unload a dll which I think I know the name of from svchost.exe. How do you do that?
If it's always the same dll, then you can find out which host it's in by using Component Services/Computer/My Computer/DCOM and finding your GUID, take a look at the properties, etc....
If svchost is your host, is it a Windows Service? Then you just kill the service, using System.ServiceProcess.ServiceController.
-
lagu26537 wrote:No I'm using VS 2005. The only thing in server explorer is an item at the top that says "Data Connections". If I right click it and choose "Add connection" a window with the title "Choose Data Source" pops up. In that window there are 6 SQL servers and an <other> item.
Hmm ... which version of VS 2005 are you using? It should be there AFAIK, maybe it's an optional component to install?
You can do it without the tool - but you have to write a little bit more code. Take a look at this documentation:
http://msdn2.microsoft.com/en-us/library/ms186120(VS.80).aspx">http://msdn2.microsoft.com/en-us/library/ms186120(VS.80).aspx, in there you'll find a lot of information about it and especially at http://msdn2.microsoft.com/en-us/library/ms186146(VS.80).aspx">http://msdn2.microsoft.com/en-us/library/ms186146(VS.80).aspx where there's a sample of a query ... you want to "SELECT * FROM Win32_COMSetting WHERE ComponentId=yourGUID"
Win32_ComSetting is documented here: http://msdn2.microsoft.com/en-us/library/aa394107.aspx
-
mscrivo wrote:AndyC,
I don't use a transparent html background for my program. I use a fully qualified window, with html hosted within it. All dressings are removed from the window (titlebar, borders, etc) and the opacitiy is set and volia, it actually works very very well on Windows XP, even with multiple monitors.
Isn't that what Gadgets are all about? -
I have no idea how the DreamScene stuff is supposed to work, but could you tap into those APIs to get an active background?
Update: Forget it, I did a bit of checking and aside from the facts that it's only for Vista Ultimate, there is no documentation on the APIs, and wouldn't be what you want anyways, as far as I can tell. -
It should be there in Visual Studio 2005, so I assume you are using VS.NET 2003, in which case you need to download and install the Management (WMI) Extensions for Visual Studio .NET 2003 Server Explorer, available at:
http://www.microsoft.com/downloads/details.aspx?familyid=62d91a63-1253-4ea6-8599-68fb3ef77de1&displaylang=en -
You might start with WMI to find the name of the .dll or .exe you want from the component Id, using System.Management, I made a managed class wrapper around Win32_ClassicCOMClassSetting and did this:
ROOT.CIMV2.
ClassicCOMClassSetting.ClassicCOMClassSettingCollection comClasses = ROOT.CIMV2.ClassicCOMClassSetting.GetInstances("ComponentId = \"{0D81DFEC-5610-4A2B-9B57-FC33D21366F0}\"");foreach (ROOT.CIMV2.ClassicCOMClassSetting comClass in comClasses)
{
Console.WriteLine("AppId= " + comClass.AppID + "\nComponentId= " + comClass.ComponentId + "\nInProcServer= " + comClass.InprocServer + "\nInProcServer32=" + comClass.InprocServer32 + "\nLocalServer=" + comClass.LocalServer + "\nLocalServer32=" + comClass.LocalServer32);
Console.ReadKey();
}
Which gives me:
AppId= {0D81DFEC-5610-4A2B-9B57-FC33D21366F0}
ComponentId= {0D81DFEC-5610-4A2B-9B57-FC33D21366F0}
InProcServer=
InProcServer32=
LocalServer=
LocalServer32=J:\PROGRA~1\MSNMES~1\msnmsgr.exe
Which then can be used to find the process id and kill it.
To create the managed class wrapper, if you haven't before, you just navigate in the Server Explorer in Visual Studio, to Servers/Management Classes, right-click, Properties, Add Classes, look under Root/CIMV2 and find and add ClassicCOMClassSetting, then when it's added, right-click on Classic COM Class Settings and select Generate Managed Class, which creates the wrapper for you.
Warning: Expanding the Classic COM Class Settings node will take all day to enumerate all the components; it's best to avoid it, and go through DCOM Application Settings or something else that has Classic COM Class Settings as a child for whatever DCOM apps derive from it.
One more thing ... note that you may have to drill down through multiple components to find the server hosting your component.
HTH
-
There's debugging attributes - DebuggerDisplay (but maybe that's only available in .NET 2.0, I can't recall, sorry) you can use to display things in the watch window when debugging.
One other thing that might be causing your problem is that you are actually debugging a different version of the assembly - check your Modules window and make sure it's getting the right assemblies; if you have installed an assembly in the GAC and have a local version that's out of sync for instance, the symbols won't match up with the executing code, and you'll get unexpected results, but usually that's apparent my the code breaking or stepping through "invisible" lines of code ... so I am not sure if that's your problem. -
Dr Herbie wrote:
Can anyone suggest examples of functionality that would be better written in F# than in C#?
When would I want to use it?
Herbie
In addition to some of the other things people mentioned already, F# is a functional language without side effects, which means the variables are immutable, which means programs written with it can be parallelized without worrying about the kind of issues that overwriting a variable from a parallel thread would cause.