Thursday, October 14, 2004

Another Beta from Google - Google Desktop

yup...yet another beta from google ;-) But it looks pretty cool..I wanted to install it but the darn thing was going to close down my netscape (with umpteen tabs loaded) and IE :-( So I gave up on it..maybe some other time..anyway, you can get it from here:

Google Desktop Search

Check it out!

Thursday, October 07, 2004

Longhorn Desktop Visual Styles

Check out my new desktop look :)

You can get these visual styles from:

www.windowsx.org
and the MSN Messenger skins from:
http://www.rolandunderg.net/

enjoy!

GMail Drive !

Check this out..the GMail Drive shell extension..
http://www.viksoe.dk/code/gmail.htm
You can use your never ending 1 Gig to store files online. Its a little buggy but still..its really cool..

Wednesday, October 06, 2004

.NET Books Sample Chapters

Srinivasa Sivakumar has compiled this huge list of links to .NET Book Sample Chapters. And by huge I mean 500+ sample chapters !! Check them out here..
http://www3.brinkster.com/webguru/Sample.Asp

Monday, October 04, 2004

P/Invoke (Platform Invoke) links and resources

Let's admit it - P/Invoke is inevitable. Even with the extensive BCL (Base Class Library), there's more than once that we've had to resort to Win32 API calls. Then there are 3rd party dlls and legacy code. However, the .NET framework does make it quite a bit easier to interop with unmanaged code - P/Invoke being one of the techniques (apparently, interop seems to have been improved a lot more in .NET Framework v2.0 - so look out for that). P/Invoke is used to execute unmanaged DLL functions (exported functions). There are several good resources on P/Invoke but of course you wouldn't expect them to be all at one place, would you? To make it easy on my weak little brain and for others who might stumble across this post looking for P/Invoke stuff, I thought I'd consolidate whatever I've gathered into one blog post. So here you go...

First place to start would be MSDN:
MSDN Interop Link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconInteroperatingWithUnmanagedCode.asp
This has extensive information on general interop techniques including samples, walkthroughs, etc

MSDN Consuming Unmanaged DLL Functions with P/Invoke:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconconsumingunmanageddllfunctions.asp
This one is specific to P/Invoke - has samples, etc. Gives you a fair idea of how to go about calling an exported function with all the semantics that are involved. Good place to start off..

One of the most important aspect of P/Invoke is Marshalling Data Types across the Managed-Unmanaged boundary. Its very important to match up the data types between the managed and unmanaged worlds or else you could end up in a lot of misery !
MSDN Marshalling Data with Platform Invoke (this link is on the page pointed to by the previous link):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconmarshalingdatawithplatforminvoke.asp
Definitely read up on this one or else you're going to have a hard time figuring out what data type to use when trying to write your API prototype. There are lot of links from this page - the ones under 'In This Section' are particularly important. This reading will save you a lot of time especially if you're going to be using P/Invoke a whole lot.

Platform Invoke Cheat Sheet
This is an excellent resource for P/Invoke. It has a lot of articles, tutorials, other links, etc. It also has information on P/Invoke for the Compact Framework(which I'm totally oblivious to). Should be very helpful..

Here's a blog you would want to read up on - Adam Nathan's Interop-Centric CLR Blog:
http://blogs.msdn.com/adam_nathan
He's a test lead on the CLR team and knows almost anything you could think about interop between managed and unmanaged code. In fact, he even wrote the book:
.NET and COM: The Complete Interoperability Guide
If you're into a quite a bit of interop, then this book is for you..
Here's one of his articles on interop as well:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/manunmancode.asp

Here's another site I think is very interesting -
N/Direct - The .NET Interoperability Resource Center
It is what it says..resource for .net interop...excellent site with good information P/Invoke and Interop in general. It's got good samples and examples especially ones that are otherwise hard to find on other interop resources (eg. marshalling variable length structures, marshalling a structure containing an array of structures, etc etc) Pretty good stuff..maintained by a guy named Mattias Sjögren who's a real master on interop..definitely check it out..

Having a hard time figuring out how to declare prototypes for Win32 APIs? Need the signature in VB.NET and/or C#? Then this one's for you...www.pinvoke.net. Its got signatures for tons of Win32 APIs grouped by which library they belong to (kernel32, user32, etc) and since its a wiki site, people keep updating it as time goes by with VB.NET/C# signatures for more and more Win32 API functions. Some of them also have sample code which should give you a head start. Now, they also have a Visual Studio Add-In so you can directly get the signature for a particular API from within the VS.NET IDE - pretty cool, isn't it? You can submit signatures/samples either from the website or from within the IDE with the Add-In.

That's about all I've got right now on P/Invoke...I'm sure I've missed some..I'll keep adding more as and when I remember more resources on this. If you've got some that I've missed, feel free to add them to the comments and I can add it to this post - of course, including courtesy :)