Can this be done inside an ISR?

PaulS:
Microsoft is a master at that. What the fk is an LPTSTR? That type is used all over the fking place, when a nice simple char * would usually suffice.

They do that for exactly the same reason Arduino has int*_t, uint*_t, and all the other non-platform-dependant types. LPSTR is NOT necessarily the same as char *. It is, by definition, a Pointer to a String, and it is platform independant. Whereas char * can be very much platform-dependant, and, in the x86 world, even memory-model dependant.

But, feel free to rant on....

Regards,
Ray L.