Your patbuf buffer is an array of wchar_t items, you cannot simply type-cast its address to a 'const char*'. glob() expects to be passed the address of a real 8-bit string (e.g. a UTF-8 one).
Also, you never zero-terminate your patbuf buffer, which in itself is another serious bug.
You should instead convert the path into a zero-terminated UTF-8 string, and pass its address to glob().
Hope this helps.