Can a PC talk to a Mac in under two hours?


Happy Thanksgiving everybody!

Thanksgiving at my mom’s house in DC is a little bit non-traditional
as guests don’t arrive until around 8pm, we don’t eat until close to 11pm, and
we don’t stop partying until 2/3 AM.  There were about 30 people at my mom’s
house this year in D.C. which made it all the more fun.

My mother’s 60th birthday also happened to fall on turkey day this year, and
for a gift, I got her wireless speakers that plug into her PC so that she can
listen to internet radio in the kitchen and bedroom.  Worked like a charm 🙂

My oldest sister had been secretly recording testimonials from long-time friends and
family to create a birthday collage for my mom.  The only problem was that
there were still pictures that we needed to add to the collage, and my sister
uses an OS X mac laptop while I run Windows XP. Oh, and we had to do this all within
two hours (before guests arrived) and we had to do this without my mom finding out.  
Below are the options I went through to transfer still pictures from a PC to a Mac: 

  • Floppy Disk – My sister didn’t have hers so this was a no-go.
  • USB Keychain – The USB keychain that I own didn’t seem to work on a Mac.  This
    may be because the keychain has a password app on it that requires you to enter a
    password before you can view the files on the keychain.
  • Network – Network Stumbler found two wireless networks, but my sister couldn’t get
    on either of these, despite our efforts.  XP got on both of these networks without
    any problems. 
  • IR Port – Her laptop lacked an IR port.
  • CD-ROM Burning – This was the last option that I could think of, as my laptop is a
    DVD-CD/RW combo I could burn a disk for her pretty easily.  Unfortunately we
    didn’t have blank CD-Rs at my house, so I ran to the local grocery store (the only
    thing open on turkey day) and found blank CD-Rs <aside>Back when I first started
    burning disks in ’98, the only place you could ever find blank CDs was in computer
    stores, now you can find them in grocery stores</aside>. After sneaking these
    into our house, I ran upstairs only to discover that I didn’t have CD burning software,
    and after trashing a disk trying to get Windows Media Player to act
    as a burner, I started searching the web for burning software.  That’s when I
    remembered that Duncan had
    posted Anson’s CD
    burning code
    . I downloaded the MSI and installed it.  It’s a very easy to
    use, well-factored API, and below is the actual code I used to burn files to the CD
    burner (with inserted comments to explain what’s going on)

 //Create a new instance
of the XPBurn component
XPBurn.XPBurnCD cd =
new XPBurn.XPBurnCD();

//Add files (file path, name of file to use for
CD
cd.AddFile(@”c:\pic1.jpg”,”pic1.jpg”);

//… add all files…

/*

  Record Disc begins the process,
  Set 1st param to false if you want to actually burn the disk and not just simulate
a burn
  Set 2nd param to true if you want the disc to eject after burn

*/

cd.RecordDisc(false, true);

 With the code written, I placed it in a
button click event of a Windows form and presto, it worked!  My sister took the
freshly burned CD and was able to read the pictures off the disk with no problem. 
My mom loved the video montage and there was much rejoicing. 

Lessons learned:

  • Communicating between Macs and PCs is still way too difficult
  • C# saved my mom’s birthday 🙂

Comments (11)

  1. steven says:

    >…found two wireless networks, but my sister couldn’t get on either of these, despite our efforts…

    When I was testing Win-Mac interop a few weeks ago* I had almost exactly the opposite experience… I’ve had trouble with Windows and wireless off and on, but the Mac found my wireless nets without me even thinking about it. Random chance, dead chickens, voodo, blind luck… chalk it up to whatever.

    * http://steven.vorefamily.net/2003/11/05.html and following days.

  2. Must be the aligning of the moons – I wish it had been that easy 🙂

    Did you try to do a P2P transfer, for example sharing out a directory on a PC and have the mac connect to the directory directly or did you just use share files in a common location on the web (or send via email)?

  3. steven says:

    direct connection; using the Mac to connect to a shared directory on the PC (this was Panther, btw, accessing a PC’s share was reportedly more difficult on earlier versions) – description and picture at http://steven.vorefamily.net/2003/11/06.html

    I could have config’d a ftp server on the Mac side and used that from the PC, but I didn’t bother. Just being lazy, I guess.

  4. james says:

    How do you import the dll in .net ?

  5. To import the dll in a VS.NET project, right click on "References" in the Solution Explorer and select "Add Reference…". When the menu pops up, click Browse… and, assuming you took the default installation directory for XPBurn, navigate to "My DocumentsMSDNXPBurnXPBurnComponent.dll" click open and click OK to add it. Let me know if you still need help 🙂

  6. James says:

    The XPBurnComponent is under References, but l still get:
    error C2065: ‘XPBurn’ : undeclared identifier at:
    XPBurn.XPBurnCD cd = new XPBurn.XPBurnCD();

    What else do I need to do, before creating a new instance of the XPBurn component?

  7. Not sure why you’re getting an error, are you running Windows XP and VS.NET 2003? If so, can you email me your project and I’ll see if I can get it working on my side? danielfe @ microsoft.com (w/o spaces).

  8. manno says:

    jjj6uj5

  9. manno says:

    jjj6uj5

  10. manno says:

    jjj6uj5

  11. jbb92 says:

    I have a problem with the AddFile method :

    The second parameter doesn’t work, for example when I write :

    cd.AddFile("c:pic1.jpg","pic2.jpg")

    The name on the CD is always "pic1.jpg"

    Any ideas ?

    Thanks