Nick Parker
My ramblings on .NET...

Heath is blogging

Thursday, 30 September 2004 12:54 by nickp
Heath Stewart, a good friend and former coworker is now blogging. Check out his blog on MSDN.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Software
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

.NET Security

Thursday, 30 September 2004 10:18 by nickp
Kieth Brown has recently released the book “The .NET Developer's Guide to Windows Security”. Keith initially had this book available online as he wrote it, I'm looking forward to having a copy in hand soon.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Comments are back up

Tuesday, 28 September 2004 00:17 by nickp

Javier Lozano came through on this one, there is a problem with the WebUIValidation.js file within a .NET Framework 1.1 install. Read up on the details here:

http://www.lozanotek.com/archive/2004/09/27/147.aspx

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Nice use of generics

Saturday, 25 September 2004 17:43 by nickp

Eric Gunnerson recently talked about a nice use of generics that I thought I would share. To create a COM object in .NET you can do the following:

Type t = Type.GetTypeFromCLSID(guid);
IGraphBuilder graphBuilder = (IGraphBuilder) Activator.CreateInstance(t);

so a nice helper function using generics looks like this:

private T CreateComObject(Guid guid) where T: class|
{
Type comType = Type.GetTypeFromCLSID(guid);
object o = Activator.CreateInstance(comType);
if(o == null)
return null;
else
return (T) o;
}

and now you can do something like this:

IGraphBuilder graphBuilder = CreateComObject<IGraphBuilder>(CLSID_FilterGraph);

Just wanted to document this for future use.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed