Rename GetLogTextUTF8 to MsixGetLogTextUTF8 (#359)
This commit is contained in:
Родитель
3d74f1a68f
Коммит
8a3fe80913
|
@ -201,7 +201,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
std::cout << "Error: " << std::hex << hr << " while extracting the appx package" <<std::endl;
|
||||
Text<char> text;
|
||||
auto logResult = GetLogTextUTF8(MyAllocate, &text);
|
||||
auto logResult = MsixGetLogTextUTF8(MyAllocate, &text);
|
||||
if (0 == logResult)
|
||||
{ std::cout << "LOG:" << std::endl << text.content << std::endl;
|
||||
}
|
||||
|
|
|
@ -478,7 +478,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
std::cout << "Error: " << std::hex << result << " while extracting the appx package" <<std::endl;
|
||||
Text<char> text;
|
||||
auto logResult = GetLogTextUTF8(MyAllocate, &text);
|
||||
auto logResult = MsixGetLogTextUTF8(MyAllocate, &text);
|
||||
if (0 == logResult)
|
||||
{ std::cout << "LOG:" << std::endl << text.content << std::endl;
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
std::cout << "Error: " << std::hex << hr << " while reading the bundle" << std::endl;
|
||||
Text<char> text;
|
||||
auto logResult = GetLogTextUTF8(MyAllocate, &text);
|
||||
auto logResult = MsixGetLogTextUTF8(MyAllocate, &text);
|
||||
if (0 == logResult)
|
||||
{
|
||||
std::cout << "LOG:" << std::endl << text.content << std::endl;
|
||||
|
|
|
@ -446,7 +446,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
std::cout << "Error: " << std::hex << hr << " while extracting the appx package" <<std::endl;
|
||||
Text<char> text;
|
||||
auto logResult = GetLogTextUTF8(MyAllocate, &text);
|
||||
auto logResult = MsixGetLogTextUTF8(MyAllocate, &text);
|
||||
if (0 == logResult)
|
||||
{ std::cout << "LOG:" << std::endl << text.content << std::endl;
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ int main(int argc, char* argv[])
|
|||
remove(package.c_str());
|
||||
std::cout << "Error: " << std::hex << hr << " while extracting the appx package" <<std::endl;
|
||||
Text<char> text;
|
||||
auto logResult = GetLogTextUTF8(MyAllocate, &text);
|
||||
auto logResult = MsixGetLogTextUTF8(MyAllocate, &text);
|
||||
if (0 == logResult)
|
||||
{
|
||||
std::cout << "LOG:" << std::endl << text.content << std::endl;
|
||||
|
|
|
@ -1738,7 +1738,17 @@ MSIX_API HRESULT STDMETHODCALLTYPE PackPackage(
|
|||
typedef LPVOID STDMETHODCALLTYPE COTASKMEMALLOC(SIZE_T cb);
|
||||
typedef void STDMETHODCALLTYPE COTASKMEMFREE(LPVOID pv);
|
||||
|
||||
MSIX_API HRESULT STDMETHODCALLTYPE GetLogTextUTF8(COTASKMEMALLOC* memalloc, char** logText) noexcept;
|
||||
MSIX_API HRESULT STDMETHODCALLTYPE MsixGetLogTextUTF8(COTASKMEMALLOC* memalloc, char** logText) noexcept;
|
||||
|
||||
#ifndef MSIX_DEFINE_GetLogTextUTF8_BACKCOMPAT
|
||||
#define MSIX_DEFINE_GetLogTextUTF8_BACKCOMPAT 1
|
||||
#endif
|
||||
|
||||
#if MSIX_DEFINE_GetLogTextUTF8_BACKCOMPAT
|
||||
#ifndef GetLogTextUTF8
|
||||
#define GetLogTextUTF8(memalloc, logText) MsixGetLogTextUTF8(memalloc, logText)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Call specific for Windows. Default to call CoTaskMemAlloc and CoTaskMemFree
|
||||
MSIX_API HRESULT STDMETHODCALLTYPE CoCreateAppxFactory(
|
||||
|
|
|
@ -603,7 +603,7 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
|
||||
Text text;
|
||||
auto logResult = GetLogTextUTF8(MyAllocate, &text);
|
||||
auto logResult = MsixGetLogTextUTF8(MyAllocate, &text);
|
||||
if (0 == logResult)
|
||||
{
|
||||
std::cout << "LOG:" << std::endl << text.content << std::endl;
|
||||
|
|
|
@ -27,7 +27,7 @@ list(APPEND MSIX_EXPORTS
|
|||
"CoCreateAppxFactoryWithHeap"
|
||||
"CreateStreamOnFile"
|
||||
"CreateStreamOnFileUTF16"
|
||||
"GetLogTextUTF8"
|
||||
"MsixGetLogTextUTF8"
|
||||
"CoCreateAppxBundleFactory"
|
||||
"CoCreateAppxBundleFactoryWithHeap"
|
||||
${MSIX_UNPACK_EXPORTS}
|
||||
|
|
|
@ -41,7 +41,7 @@ static void finalizer(void) {
|
|||
LPVOID STDMETHODCALLTYPE InternalAllocate(SIZE_T cb) { return std::malloc(cb); }
|
||||
void STDMETHODCALLTYPE InternalFree(LPVOID pv) { std::free(pv); }
|
||||
|
||||
MSIX_API HRESULT STDMETHODCALLTYPE GetLogTextUTF8(COTASKMEMALLOC* memalloc, char** logText) noexcept try
|
||||
MSIX_API HRESULT STDMETHODCALLTYPE MsixGetLogTextUTF8(COTASKMEMALLOC* memalloc, char** logText) noexcept try
|
||||
{
|
||||
ThrowErrorIf(MSIX::Error::InvalidParameter, (logText == nullptr || *logText != nullptr), "bad pointer" );
|
||||
std::size_t countBytes = sizeof(char)*(MSIX::Global::Log::Text().size()+1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче