Ken Laws's Q&A profile
.NET Development Vexing debugging .net 2 service - EventType : clr20r3
I have a service, written in C#, targetting v.2 of the framework. The service occasionally crashes, with none of my exception handling code catching anything. The service architecture is as follows: OnStart, a System.Threading.Timer timer is instantiated OnTimer - inside a mutex to ensure thread safety, methods which utilise a COM object are called OnStop, get rid of timer, dispose of objects when mutex is available etc etc I think something dodgy with the COM interop is occuring, but not being able to catch any exceptions I can't confirm this. I have added a global unhandled exception handler to the AppDomain, but this too does not catch th ...Show All
Visual Studio Team System Ghost projects
2 weeks ago I had some problems creating projects from a remote location. The problem never really got solved but I can live with that for now. The problem is that the few times that I tried creating a project, the process halted with an error saying that it might not have been able to roll back all changes. Now my question is. The projects that I created doens't show up in the Team explorer but Source Control has entries for the projects and I'm not able to remove them. Likewise if I look in security settings new users was created for the projects. As with the Source control project I'm not able to delete them as well. Does anyone hav ...Show All
Visual C# CallBack from a WIN 32 C++ dll
Hello Everyone, My application is written under C#, but for some of the low level stuff I have to use C++ dll's and one of the dll require password before I can make some function call or if user entered wrong should ask again..... How can I implement something along those lines.... At first I can send the pasword, but if the password is wrong what is the way to get the password....If you want I can even post my procedure which asks for password..... Any help, suggestion highly appreciated... Thanks, Harsimrat I was thinking about this, can you outline exactly how you would like it to work ...Show All
Visual Studio Tools for Office .net COM Add-in for Excel - cannot find Extensibility Projects
Hi I have installed Visual Studio Tools for Microsoft Office after installing vb.net and Microsoft Office 2003 respectively. I cannot find the Extensibility Projects folderin the Other Projects folder. Please would someone help. Thanks Murray Hi Misha Thanks for the last response. The thing is that I want to sell my Add-In to users of Excel 2000 and onward. I would also like to try and target Excel 97 users if possible. So how do I create and Add-In to manipulate my VBA code that can be used in Excel 2000 and Excel 2003 (and at a stretch in Excel 97). It seems that I massive part of my market lies ...Show All
Visual Studio Express Editions Help :S
i'm new to visual c++ i used to use the free borland c++ 6 enterprise compiler, now i switched to visual since it was a free download the problem is when you have to name the include files... in borland i just typed #include <iostream> #include <iomanip> using namespace std; main() { cout << "I WIN!!" ; cin.get(); } that would run perfectly fine in Borland but in Visual C++ i get these errors: 1>Compiling... 1>Probeersel1.cpp 1>.\Probeersel1.cpp(4) : error C2871: 'std' : a namespace with this name does not exist 1>.\Probeersel1.cpp(7) : error C4430: missing type specifier - int assumed. Note: C++ doe ...Show All
Windows Forms Display a form's icon in a button control
I want to display a form's icon in a button control. I tried using the following code: Button1.Image = Me.Icon.ToBitmap It sort of works but the image size changes. The image in the button is now much bigger than it appears in the form. Am I doing something wrong Why does a form's icon appear so small in the form, but is severa ...Show All
Visual Studio Debugging processes
Hi, I am attempting to debug a C++ component by attaching to a process. I am doing the following:- 1) Start the executable in question. 2) Open Visual Studio .NET 3) Go Tools -> Debug Process 4) Select process needed, attach in Native Up to here all well and good. I can now break and terminate the process etc, view stuff through the Disassembler window. But I dont know how to associate this with the corresponding source code so that I can set breakpoints etc and step through the code. Can anybody help Cheers Unfortunately, without the pdb files that are built at compile time, you won't be able to g ...Show All
SQL Server SQL 2005 and SQL 2000, one Dev server, co-existence
We have many SQL 2000 servers and are beginning to plan our upgrade path. Has anyone had experience running SQL 2005 and SQL 2000 on the same machine This would be in a development environment to aid in our analysis. Is this possible Any issues or concerns Hi Marco, I'm not an expert on the CDW. You should post this to: http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=84&SiteID=1 for a quicker reposnse. Sorry I couldn't help. Dan ...Show All
.NET Development How to read Bitmap from a file.
Now,i have a binary file,that have write a string,a Int32 value,a bitmap ordinal. I use BinaryReader that could read String,Int32 value correctly. FileStream fileStream = new FileStream(fileName,FileMode.Open); // BinaryReader br = new BinaryReader(fileStream); String s= br.ReadString(); Int32 i=br.ReadInt32(); //How to read a bitmap to save to a bitmap ... ... ... br.Close(); // fileStream.Flush(); fileStream.Close(); Thanks. you don't need the FileStream -> BinaryReader -> MemStream steps, as FileStream is just as much Stream as MemStream is using (FileStream fs = new FileStream(filename, FileMode.Open)) using (Bitmap ...Show All
Visual Studio SQL Express failed to install due WMI configuration.
Hi All, My Visual Studio 2005 Professional Edition(RTM) Setup failed on install SQL Express Edition. So I tried to install this from WCU directory and I receveid a message: "The SQL Server System Configuration Checker cannot be executed due to WMI configuration on the machine mymachine Error:2147749917(0x8004101d)." Then I tried with the full SQL 2005 Developer Edition (RTM) with same result. Looking on SQLSetup0032_mymachine_SCC.log I have: " Processing article WMIServiceReadRegWorking Scc Error: 50024 (0xc368) Error code: 2147749917 (0x8004101d) Calling callback function for reason: 0x2 Callback function returned TRUE " I have ...Show All
Visual C++ Adding as a Reference changed some function definitions ??
Hello Everyone, I have an .exe which is a COM component, I used it in WIN 32 it worked fine as expected. I used the same exe as refrence in .NET and some function definitions got changes...For Example Originally in WIN 32 the function looked something like this virtual HRESULT __stdcall raw_OnChallenge ( long attemptsRemaining, unsigned char password[20]) IN .NET the object browser shows something like this.... System.Void OnChallenge( System.Int32 attemptsRemaining , System.Byte [] password ) To get the results correct, this function is suppose to return S_OK, which I can't do as (void).... Can someone please exp ...Show All
Windows Forms Where are windows forms controls icons stored?
Hi all... I have a custom control that I want to assign an icon that is similar to the icon of a control already present in VS 2005 toolbox but with a little change so I need to create a copy of it and made the modifications. I was searching for all Windows.Forms DLL's but I couldn't find them. Can you point me to the right file that stores these resources Thanks Jaime Get the reflector: http://www.aisto.com/roeder/dotnet/ Then use the reflector to open System.Windows.Forms.dll, you should see all the toolbox icons in BMP format under the Resources folder. The reflector can extract them for you, so you can edit it later ...Show All
Software Development for Windows Vista Unable to use the ifElse Activity in an embeded designer.
hey there, after implementing lab10, and reading some posts on this forum, i still didnt manage to get the ifElse Rules Condition Editor to work properly. The Rules Condition Editor opens, but it doesn't show all the activities in the intelissence, actualy, it gives only 4 of 5 options (Equals, ToString....). i've been strougeling with it for a few days, is it an issue of Beta2 thanks. hi vihang, should i still whait for the example thanks ...Show All
.NET Development C# equiv of isdate?
Hi, How do i check if a string contains a valid date Ex, i have a string ="jan 6 15:15", I want to set the year to 2006, but only if it's not already a valid date as is the case. so, the resulting string should be "jan 6 2006 15:15". but if the string already has a valid date, ex "jan 7 2005", I don't want to touch it. I try to use the datetime.parse inside a try/catch, but i couldn't get it to fail. It keeps setting the date to now(). Has anyone done this before If you know the format that it must be in, have a look at the DateTime.ParseExact method, otherwise us ...Show All
Visual C# !!! IF MICROSOFT HEAR US!!!
I just saw another thread with "Can i make a app that doesnt use the .NET. The framework is too big 23 MB".. SO... Can Microsoft create a .Net Framework just for c# not for asp or j# or visual basic providing only the neccesary dlls Please!!!! Eh, the framework is for .NET; there are in my opinion no specific dll's for j#, vb.net, etc... The CLR uses IL, and C#, VB.NET, J#, and all other .NET languages are compiled to Intermediate Language. ...Show All
