| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files (x86)/Windows Kits/10/Source/10.0.19041.0/ucrt/internal/ |
Upload File : |
//
// GetModuleFileNameA.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Definition of __acrt_GetModuleFileNameA.
//
#include <corecrt_internal_win32_buffer.h>
DWORD __cdecl __acrt_GetModuleFileNameA(
HMODULE const hModule,
char * const lpFilename,
DWORD const nSize
)
{
size_t const wide_buffer_size = MAX_PATH + 1;
wchar_t wide_buffer[wide_buffer_size];
DWORD const amount_copied = GetModuleFileNameW(
hModule,
wide_buffer,
wide_buffer_size
);
if (amount_copied == 0) {
__acrt_errno_map_os_error(GetLastError());
return 0;
}
__crt_no_alloc_win32_buffer<char> filename_buffer(lpFilename, static_cast<size_t>(nSize));
errno_t const cvt = __acrt_wcs_to_mbs_cp(
wide_buffer,
filename_buffer,
__acrt_get_utf8_acp_compatibility_codepage()
);
return static_cast<DWORD>(filename_buffer.size());
}