M a r k y o l o g i s t

"After three days without programming, life becomes meaningless." - The Tao of Programming

About the author

Author Name is someone.
E-mail me Send mail

Recent posts

Recent comments

Tags

Don't show

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    What do you use to author autorun.exe for CD-ROMs?

    I have used Flash 5 in the past to author autorun executables for CD-ROMs. It is nice because it is easy and there is no runtime required. Macromedia has basically killed this usage with Flash MX though. You can't execute apps unless they are in a "fscommand" subdirectory and you can't pass commandline arguments to those apps either. Thanks a lot Macromedia!

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: Development
    Posted by markyologist on Tuesday, April 27, 2004 3:56 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    MiniStumbler

    There is a cool app called MiniStumbler that lets you search for and document wireless networks with your PPC. A new version has just been released and it now supports more wireless cards, including my Socket CF Wireless card. Now I just need to get a bluetooth GPS!

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: Networking | Pocket PC
    Posted by markyologist on Monday, April 26, 2004 1:30 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    Outlook and .Net

    If you are developing an addin for Outlook in C# or another .Net language or even just using COM from .Net, you should be cleaning up your COM objects (duh!). But, setting them to null is not enough. You must use the System.Runtime.InteropServices.Marshal.ReleaseComObject method to remove all references to that COM object. Here's a little class that you can use so you don't have to retype the code all over the place.

    using System;
    using System.Runtime.InteropServices;
    namespace Utils{
        public class ComUtils {
            public ComUtils() {
       
            }
            /// <summary>
            /// Force a release of the COM objects and do garbage collection.
            /// If you are using Outlook objects, this will allow Outlook to 
            /// exit cleanly after you are done with it.
            /// </summary>
            /// <param name="comObjects">Array of COM objects to release, 
            /// be sure to add the objects to the array in the order you want 
            /// them destroyed!</param>
            public static void Release(object[] comObjects) {
                try {
                    for(int i = 0; i<comObjects.Length;i++) {      
                        if(comObjects[i] != null) {
                            try{
                                // loop until the reference count is zero 
                                while(Marshal.ReleaseComObject(comObjects[i]) > 0);       
                            }
                            catch(System.InvalidCastException){
                                // the object was not a COM object
                                // no big deal, just go on to the next one
                            }
                            catch(System.NullReferenceException){
                                // object was null, still no big deal
                                // go on to next one
                            }
                            finally{
                                comObjects[i] = null;
                            }
                        }
                    } 
                }
                catch (Exception ex) {
                    // insert your exception handling here
                }
                finally {
                    // force a garbage collect to occur
                    GC.Collect();
                    // Wait for the thread processing the 
                    // queue of finalizers to finish
                    GC.WaitForPendingFinalizers();
                }
            }
        }
    }
    

    Just create an object array of your COM objects (in the order you want them released) and pass them to the Realease method of this class. For example:

    
    

    ComUtils.Release(new object[], {outlookMailItem, outlookNameSpace, outlookApplication);

     The GC.Collect() and GC.WaitForPendingFinalizers() are very important. I was recently working on an Outlook Addin and didn't have those two lines in there. Outlook would NOT shut down completely until I added them in!

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: Development
    Posted by markyologist on Wednesday, April 21, 2004 10:48 PM
    Permalink | Comments (1) | Post RSSRSS comment feed

    "War Blogging"

    Check out Jeffrey Palermo blogging from the middle of a war! He is in the Army Reserve and has been in the middle east for the past year. I was in the Marine Corps Reserve in the early 90s and served in Operation Desert Storm. I would have given anything to be able to bring a laptop along and get on the Internet to talk to family back home. It just wasn't available. I think it is pretty cool that he is able to talk to his wife on a daily basis. That has to make it a lot easier on her. I wasn't married at the time (I was only 21), but I know it was a rough time for my parents because most of the time they didn't know if i was OK or not. Oh and before anyone says anything like “how can this guy have time to be on the Net during a war?” believe me, even in the middle of a war, there is a LOT of downtime and that is probably some of the most difficult time to get through. Way too much time to think, much better to keep busy! Anyway, thanks for doing your duty Jeff, keep your head down and get home safe next week!

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: General
    Posted by markyologist on Friday, April 16, 2004 9:49 PM
    Permalink | Comments (1) | Post RSSRSS comment feed

    Windows Media Player "Album Info" Jacked Up

    OK Microsoft, what's the deal? I put OutKast's “Speakerboxxx/The Love Below” Disc 2 in my CDROM drive to rip the tracks and when Media Player downloads the track info about half the tracks are in the wrong order?!?! There is even one completely missing! So, I went to the All Music Guide website to see if they had them in the right order and they do, except for that missing track. I'm pretty sure that is where Media Player gets its info from, so what's going on?

    Next thing I did was click on “Find Album Info”, that found the tracks in the right order, except for that elusive missing track again. So I just shifted the last few track titles down one and typed in the missing title for track 17 and it is all fixed, but it is still annoying that I even had to do it!

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: General
    Posted by markyologist on Thursday, April 15, 2004 10:22 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    Visual Source Safe over the Internet

    Tim Heuer found a pretty cool project that allows you to use VSS over the Internet! I have used CVS and Subversion that way before, but I was amazed that someone has wrapped up VSS and turned it into a client/server system. Looks like it can even integrate into VS.Net.

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: Development
    Posted by markyologist on Thursday, April 15, 2004 3:48 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    iPAQ 2200 Series SDIO Driver Update

    HP has released an update for the iPAQ 2200 Series. It fixes some power consumption problems with SDIO devices and a “SD Card initialization issue”. Whatever that means. They don't seem to explain these updates very well.

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: Pocket PC
    Posted by markyologist on Tuesday, April 13, 2004 3:18 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    Linksys Router

    After upgrading the firmware on my linksys router I had some problems, but by turning off UPnP and disabling logging, the router hasn't required a reboot for a few days now. Hopefully Linksys will release a more stable firmware revision soon!

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: Networking
    Posted by markyologist on Monday, April 12, 2004 11:07 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    Printing the .Net TreeView Control

    I just published my first article on Codeproject. I looked for sample code for quite a while to print the TreeView control and just never found anything that quite did what I wanted. I found a lot of people asking how to do it though ;) So, I decided to write it myself and post it so others can use it too. I hope it is useful to someone!

    I'll also keep a copy here.

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: Development
    Posted by markyologist on Friday, April 09, 2004 11:05 AM
    Permalink | Comments (0) | Post RSSRSS comment feed

    HP iPAQ H6300 rumours

    Is anyone else as excited as I am about this rumoured Pocket PC Phone from HP? Not too sure if I'm ready to shell out the estimated $600 to buy it, but with some luck, maybe T-Mobile will have some kind of rebate on it :)

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Categories: Pocket PC
    Posted by markyologist on Wednesday, April 07, 2004 12:23 PM
    Permalink | Comments (3) | Post RSSRSS comment feed