Monday, January 31, 2005

Nth Cronulla NSW Surf Premiership Gallery Going Up Now

It was a day of big surf and many boat crashes on Saturday, so it's a big and entertaining gallery ....











Thursday, January 27, 2005

Stop giving me that stupid look. The Manly gallery is done...

http://www.picjar.com/pub/sheyenne/Manly_Carnival/



Tuesday, January 18, 2005

Wanda Gallery Done

... and uploading now to http://www.picjar.com/pub/sheyenne/Wanda_InterCities/. There will be 195 images in the gallery once the upload is done. I've also got the domain name cronullasunrise.com as a re-direct to the gallery. Telling folks that the shots will be linked from www.DotNetPerformance.com causes a few weird looks.






Monday, January 17, 2005

Wanda InterCities Pictures Going Up Now

I'm half way through organising the photos from Saturday's event at Wanda for upload - there are currently 101 up here. There were 2731 from the event, so its taking a while.


I got an email from Mike at the Toowoon Bay Surf Life Saving Club saying that they had a function on Friday night and had a good time looking at the photos from Avoca and Ocean Beach. Glad someone liked them.







Wednesday, January 12, 2005

Ocean Beach Peters Boats photo gallery up

I traditionally haven't put up shots from the surf carnivals I do because I have had plenty of hassle with a couple of clubs (not my local ones) worried about any shots from carnivals "used for the wrong reasons.". I had heaps of requests at the carnival on the weekend for people who want to get some photos for the event, so I've decided to do a large gallery that anyone who was there can use to grad some high-quality shots from. Overall, the folks up at the Central Coast where really friendly, and I had a great day shooting the event.


I did 1758 shoots in total, and narrowed it down to 162 for the gallery. I did the first shot at 7.54am and the last at 12.43, so that is a shot about every 10s. The crews did a pretty unique tribute to the tsunami victims (the third and fourth rows). Good luck to the crews for this weeks final Peters Boats.

Thursday, January 06, 2005

Dealing with the pain of C DLL interop

I had an email conversation with Dan last night and today about trying to get C# interop to a C DLL working. Dan's method call was succeeding, but the method wasn't doing what it was supposed to day. My final thoughts on the matter where:



The great problem with interop to C-style DLLs in that the fairly loose typing of C means that a parameter that is, say, char*, can mean a number of different things depending on what the method is documented as doing with the parameter. There is no way to automatically map parameter types. For char*, string, StringBuilder, and IntPtr could all be used.


My general strategy:



  • Find an API that has been mapped with a similar parameter and use that. The Windows API and Adam Nathan's conversions (Appendix E) of this is a good starting point.
  • Use the marshalling attributes where it makes sense, but don't kill yourself on them. Don't be ashamed to use Marshal.AllocHGlobal and do the marshalling by hand.
  • Watch out for byte-alignment padding.
  • Understand who is responsible for allocating memory and what heaps the memory is one.
  • Prefer manually allocated memory over pinned managed memory.
  • A Managed C++ wrapper is always much simpler than the C# or VB.NET equivalent.
  • A lot of Windows-centric interop can be replaced with WMI/ System.Management.
  • Get the OS and .NET Framework debug symbols.
  • Check the calling convention and character set.
  • Understand the basics of unmanaged debugging. It's not as hard as it might seem.

  • Hammering ahead with PIC#3

    I've had a good week working on PIC#3 (Programmers Introduction to C#, 3rd Edition). I've done the new material for

  • the System.Array and the Collection Classes chapter (I added some stuff on the new classes in System.Collections.Generics),
  • the Execution-Time Code Generation chapter (added cover of light-weight code generation),
  • the Interop chapter (added coverage on fixed-size buffers) and
  • the .NET Frameworks Overview chapter (added coverage of expended TryParse, serial port support, compression streams and updated the examples.



    All this stuff is due this week, so I guess it's code that it's done. Next week, the plan is to update:
  • the Windows Forms chapter (add ClickOnce coverage)
  • the DiskDiff: Making It Useful chapter (to try to cut down the interop usage with .NET 2.0 features)
  • the Threading and Asynchronous Operations chapter (to cover semaphores)



    The overall plan is to have the first draft of all the new material done by the end of the first week in Feb. So far, the plan is on track...



    This weekend, I'm heading up to the NSW Central coast to shoot a surf boat carnival. These are a few from November when I was up there last:








    Finally, one of my favorites from over Christmas - Sunset over Sth Cottesloe, Christmas Eve: