2003-06-20

:(

Close but no go:

http://www.sellsbrothers.com/spout/#Naming_My_Feed

2003-06-17

RE: Last Post

Wow....I get to be one of the first west coast guys to read the east coast bloggers.....Cool!

Sleepless in Tulare (California)

Oh man...

I'm looking at the clock and it says it's 5:45AM. Something isn't right here. I tried to go to sleep last night around 12:30 but my mind didn't want to stop. Pieces of conversations along with project details, clips of songs, and the anxiety of not falling asleep were running through my head. I gave up at 5:00. Gezzz...if I knew that I wasn't going to sleep I would have just stayed up coding.

Wow...I looks like I'm going to be able to see the sun come up. I guess it's been a while since I've seen it...I should take advantage of this opportunity. I just hope I don't doze off for the 2:00PM meeting I have today.

2003-06-15

Passing string buffers to API calls

I recently had to make some API calls that passed a string buffer. Here's what I came up with:


[DllImport("msi", CharSet=CharSet.Auto)]
private static extern int MsiRecordGetString(IntPtr recordhandle,
int Field, string ValueBuffer, ref int len);

string buffer = new string(' ', 250);
int bufSize=buf.Length;
rv = MsiRecordGetString(hRec, x, buffer, ref bufSize);
Console.Write(buf.Substring(0, bufSize));


Does it sound about right?

Another question is when to use IntPtr instead of int?