December 2003 - Posts

ComInterop by Hand

Has anyone had the pleasure of having of doing COM Interop by hand? If so, what are your pros and cons of doing it this way?

We're currently working on a project that depends on a COM component. The client stated that we could not simply wrap this component using the .NET tool. They stated the reason why is because translation doesn’t occur properly, meaning – it don’t work J. So they wanted all Interop code to be hand coded, which I can't claim I've ever done before for a real project.

So I took it upon myself to do this part of the project. Not knowing much I found the process quite perplexing and not well documented, but after a while I finally wrapped my head around it and it’s really quite easy (but weird), thanks to the COM/OLE Viewer (yes a VS 6.0 tool). I’ll get into this tool is an absolute must in an article I’m going to write about custom COM Interop, but for now I’ll tell you that the tool provides you with the appropriate signatures you need to create for you interfaces and classes. If anyone knows a “.NET tool” for this please let me know. Anyway, after finally figuring out how to do this stuff the rest was easy, cumbersome – but easy. It takes a long time to do this crap.

So enough background, the real reason for this post is to give you some pro’s about doing COM Interop by hand despite my bitching.

1.)    You control how much actually is wrapped: By creating your own wrapper you don’t have to wrap the entire COM component. In this particular project the “Interop.SumCOMComponent.dll” created was over 1MB. That is huge for distribution; it was actually larger than the entire project. By creating Interop for just the functionality we needed we cut the size to under 100K.

2.)    You don’t have to create an additional layer of abstraction: When using the .NET tool you create a complete wrapper and traditionally I would create another class within the project for all my business rules that will then invoke methods of the Interop assembly. By creating your own Interop you don’t have to do that. You put it all into one.

I could really break both of these points into many, many other “best practices” points – but I’ll let you derive those. After the project is finished I’m going to write an article on doing this, using the same well known COM component this project used to illustrate both the pros and cons of using .NET’s built in Interop capabilities.   

 

JunkieHood Downtime

Hello All,

Some of you may have experienced a brief downtime this evening of junkiehood (dnj and sqlj) - we added a new server to our farm and needed to do a full reboot (I really need to get my MCSE to figure all this server setup crap). But we're up again, well almost. One of our servers hasn't started yet, but the great people at http://www.securewebs.com are working on it right now. They actually emailed me within 1 minute after I initiated a full restart of our farm to see if everything was ok, now that's service. They really are the best company i've ever hosted with! Scott, Emil and everyone else there are so great!

Happy Holidays all!

Real hits Microsoft with $1 billion antitrust suit

ok, what the hell - The company hits them with a billion dollar lawsuit, who is next? AOL, for not distributing their AIM, or TextPad for not distributing their notepad type software? Thoughts?

http://zdnet.com.com/2100-1104-5129316.html

DotNetJunkies Newsgroup Archiving Solution (Need Feedback)

I've been working on an archiving system for newsgroup posts (part of our newsgroup app) http://dotnetjunkies.com/newsgroups/

I just uploaded the first go and would like some feedback on features or ways to make it beter. I tried to follow some of the blog practices, but I know it can be improved as far as UI.

Basically the archiving app(a service) will run every so often, pull down newsgroup threads, and create static pages, directory, etc. I really want to attribute the pages well so google (and others) will be able to scrape them well enough to make a nice knowledge base. *if anyone knows any references for rock solid meta tags please forward them my way. I was debating on doing this myself, but the shear amount of data is mind boggling, you couldn't imagine how much data these things have.

Anyt thanks for any help you can give

go to : http://dotnetjunkies.com/newsgroups/ and click on archive. Note: I only brought down I think the last 25 root threads so there isn't a lot there yet, after I confirm the final bits for beta 1 i'm going back as far as i can.

New Article: SQL Server Disaster Recovery

SQL Server Disaster Recovery
By Microsoft Team
This bulletin gives an introduction on how to go about developing a disaster recovery strategy for SQL Server. Also included is a case study demonstrating typical considerations when designing a disaster recovery strategy. (Monday, December 08, 2003)

Read More     Discuss in the Forums     See More Articles

DotNetJunkies Gets Newsgroup Interface

Check it out: http://dotnetjunkies.com/newsgroups/ 

This is Beta 1 and more functionality will be coming including archiving and searching.

Special thanks to Wim Hollebrandse for helping us with the newsgroups inplementation

http://www.wimdows.net/newsgroups/newsgroups.aspx

Whole Mess of New SQL Server Article on SqlJunkies

Featured:

Running Stored Procedures

By Wayne Freeze
In this article, you’ll learn how to extract a list of stored procedures from a database, plus information about the parameters associated with the stored procedure. Finally, you’ll see how to take this information and use it to call a stored procedure on the fly. (Monday, December 01, 2003)

Read More     Discuss in the Forums     See More Articles

Troubleshooting and Debugging SQL Web Services Configurations (Monday, November 24, 2003)
In this article, over 20 frequently asked questions about SQL endpoint configuration, the Windows HTTP API driver, and Web Services authentication are answered.

Merge Modules and MSDE (Sunday, November 23, 2003)
Merge modules are a feature of Windows Installer that provide a standard method for delivering components, insuring that the correct version of a component is installed. A merge module contains a...

Moving Tables and Indexes between Filegroups (Sunday, November 23, 2003)
In this bulletin, two frequently asked questions centered around moving data between various database files are discussed.

SQL Mail (Sunday, November 23, 2003)
SQL Server provides the ability to send and receive e-mail by using SQL Mail. SQL Mail has stored procedures and extended stored procedures that can be used to manipulate data, process queries...