[OFF TOPIC]
quote:
Originally posted by -dt-
var szSendToPath = Interop.Allocate((255 *2) +2);
The buffer must be at least MAX_PATH characters long. MAX_PATH is 260. But since paths can be longer than that, I suggest to use something like 4096 which would be more than enough. 255 is too little in any case.
[/OFF TOPIC]
But actually, one should not use this method to get the installation folder of Messenger. It should be read out of the registry.