I'm trying to use the MoveFile(LPCWSTR existing, LPCWSTR new) function. I'd like to be able the one of the directories (represented by LPCWSTR) by concatenating different data (for example: root directories and potential file names). Despite hours of research, I can't figure out how to do this. Appreciate any help.
It sounds like you're trying to combine two LPCWSTR
which represent paths elements into a combined paths. If that's the case then you want to use the PathCombine method
LPCWSTR root = ...;
LPCWSTR name = ...;
WCHAR combined[MAX_PATH];
if (PathCombineW(combined, root, name) != NULL) {
// Succeeded
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With