inline HMODULE LoadLibraryX(const Char* buffer) { Blob<wchar_t, false, BlobTraits<true, MAX_PATH> > t; t.Alloc(StringLength(buffer) + 1); t.GetWritableBuffer()[0] = 0; XLastDitchStringCopy(buffer, t.GetWritableBuffer()); return LoadLibraryW(t.GetBuffer()); }
inline int LoadStringX(HINSTANCE hInstance, UINT id, Char* buffer, int buffermax) { Blob<wchar_t, false, BlobTraits<true, 1024> > t; t.Alloc(buffermax + 1); t.GetWritableBuffer()[0] = 0; int r = LoadStringW(hInstance, id, t.GetWritableBuffer(), buffermax); XLastDitchStringCopy(t.GetBuffer(), buffer); return r; }