MCPcopy Create free account
hub / github.com/Nevcairiel/LAVFilters / WideStringFromResource

Function WideStringFromResource

common/baseclasses/videoctl.cpp:46–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44#ifndef UNICODE
45
46LPWSTR WINAPI WideStringFromResource(__out_ecount(STR_MAX_LENGTH) LPWSTR pBuffer, int iResourceID)
47{
48 *pBuffer = 0;
49
50 if (g_amPlatform == VER_PLATFORM_WIN32_NT)
51 {
52 LoadStringW(g_hInst, iResourceID, pBuffer, STR_MAX_LENGTH);
53 }
54 else
55 {
56
57 CHAR szBuffer[STR_MAX_LENGTH];
58 DWORD dwStringLength = LoadString(g_hInst, iResourceID, szBuffer, STR_MAX_LENGTH);
59 // if we loaded a string convert it to wide characters, ensuring
60 // that we also null terminate the result.
61 if (dwStringLength++)
62 {
63 MultiByteToWideChar(CP_ACP, 0, szBuffer, dwStringLength, pBuffer, STR_MAX_LENGTH);
64 }
65 }
66 return pBuffer;
67}
68
69#endif
70

Callers 3

OnActivateMethod · 0.85
OnActivateMethod · 0.85
GetPageInfoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected