The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
The Microsoft issue doesn't surprise me, but what does shock me is that my granddaughter went to DEFCON in Las Vegas with her Dad and had a blast soaking up everything on cryptography. She competed in a code reaking contest and came in 4th place.
I ghuess she's well on her way to being a real hacker threat!
She's planning on goping to Rice
University and studying Electrical and Computer Engineering with a Masters in cryptography.
She's not grandpa's little girl anymore!
CQ de W5ALT
Walt Fair, Jr.PhD P. E. Comport Computing Specializing in Technical Engineering Software
was thinking about this after switching off last night,
one possibility is usually when you pass struct/string/buffer parameters to interop you need to allocate and copy the source data into unmanaged memory. (I'm guessing at least one string/pathname in this case)
i.e. use Marshal.AllocHGlobal. otherwise the other processes (explorer) cant see the data (or only see corrupted remnants if they partially see into common space.)
In cases where they are returning a string yes I do. Here the marshalling is correct. I've got a talent for it, probably because I come from a C++ background.
This api call doesn't return a string, but another one i call returns one, and it's a path, so to be safe I preallocate 521 chars which is MAX_PATH*2 +1 for the null sentinel just to be absolutely sure.
So yeah. I've got the marshalling squared away. this is just a dark corner of the shell api that isn't very well documented - its' relatively recent. Since win7 i think when the shell underwent a bunch of internal changes.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
I remember someone at MS at one point had put together some small C# library that wrapped a bunch of new shell functions that were introduced, I think, with Windows 7, and jumplist support (which I believe is what you're after) was part of that. If SHAddToRecentDocs doesn't work, maybe you'll have better luck with this--maybe there's some sort of initialization you have to do that this library takes care of under the covers. Unfortunately MS never really supported it, and went so far as to remove from its own site and has pretty much been in denial about whether it ever existed or not.
[After some digging]
Found it in my own archive. They called it the Windows API Code Pack, and the last version was 1.1. There's a discussion here on SO about it. Seems like it's now on GitHub--unsupported, but available. I can't vouch for that version however.