Archive for category C# coding
Really Detecting Design Mode
I recently had to deal with the problem of ADO.NET data access occurring on user controls, and forms in the Visual Studio design view. Now the data access depended upon a connection string in the App.config file and consequently, when run from Visual Studio it could not connect to the database since the connection string [...]
Microsoft’s Tlbimp creates leaky BSTR signatures
This one confounded me when I first discovered it, and I’ve recently been reminded about it. For the sake of remembering the details, and hopefully helping someone else out I’m going to document it here. The problem is this. When you have a COM library that you need to use from a C# app, you [...]