I'm using '6 btw if you're suspecting maybe a unicode thing in '7 there Tony...?
Yes, I have a wrapper for the same API (except it only
works on '07), that's similar to Alex's except that it uses
unicode.
Alex's code should work on 07 if you make the following
changes:
1. On the DllImport() attribute, you to set the
CharSet=CharSet.Unicode
2. On the struct, you need to add the following
attribute:
[StructLayout( LayoutKind.Sequential, CharSet = CharSet.Unicode )]
3. When you set the struct's fields, you need to
set the 'flags' field to 0x4 and if you supply a
string in the second field (view or layout name),
you also need to include 0x8.