}
disasm->FDecode(&instr, ops, 3);
- wchar_t instrMnemonic[64]; // I never know how much to allocate...
+ WCHAR instrMnemonic[64]; // I never know how much to allocate...
disasm->CchFormatInstr(instrMnemonic, 64);
buff_offset += sprintf_s(&buff[buff_offset], bufflen - buff_offset, "\r\n%p %S",
(void*)((size_t)orig_hotCodeBlock + offset), instrMnemonic);
void freeMemory(void* block);
// Return an integer config value for the given key, if any exists.
-int getIntConfigValue(const wchar_t* name, int defaultValue);
+int getIntConfigValue(const WCHAR* name, int defaultValue);
// Return a string config value for the given key, if any exists.
-const wchar_t* getStringConfigValue(const wchar_t* name);
+const WCHAR* getStringConfigValue(const WCHAR* name);
// Free a string ConfigValue returned by the runtime.
// JITs using the getStringConfigValue query are required
// to return the string values to the runtime for deletion.
// This avoids leaking the memory in the JIT.
-void freeStringConfigValue(const wchar_t* value);
+void freeStringConfigValue(const WCHAR* value);
#endif
return result;
}
-void MethodContext::recGetIntConfigValue(const wchar_t* name, int defaultValue, int result)
+void MethodContext::recGetIntConfigValue(const WCHAR* name, int defaultValue, int result)
{
if (GetIntConfigValue == nullptr)
GetIntConfigValue = new LightWeightMap<Agnostic_ConfigIntInfo, DWORD>();
ZeroMemory(&key, sizeof(Agnostic_ConfigIntInfo));
DWORD index =
- (DWORD)GetIntConfigValue->AddBuffer((unsigned char*)name, sizeof(wchar_t) * ((unsigned int)wcslen(name) + 1));
+ (DWORD)GetIntConfigValue->AddBuffer((unsigned char*)name, sizeof(WCHAR) * ((unsigned int)wcslen(name) + 1));
key.nameIndex = index;
key.defaultValue = defaultValue;
void MethodContext::dmpGetIntConfigValue(const Agnostic_ConfigIntInfo& key, int value)
{
- const wchar_t* name = (const wchar_t*)GetIntConfigValue->GetBuffer(key.nameIndex);
+ const WCHAR* name = (const WCHAR*)GetIntConfigValue->GetBuffer(key.nameIndex);
printf("GetIntConfigValue name %S, default value %d, value %d", name, key.defaultValue, value);
GetIntConfigValue->Unlock();
}
-int MethodContext::repGetIntConfigValue(const wchar_t* name, int defaultValue)
+int MethodContext::repGetIntConfigValue(const WCHAR* name, int defaultValue)
{
if (GetIntConfigValue == nullptr)
return defaultValue;
Agnostic_ConfigIntInfo key;
ZeroMemory(&key, sizeof(Agnostic_ConfigIntInfo));
- size_t nameLenInBytes = sizeof(wchar_t) * (wcslen(name) + 1);
+ size_t nameLenInBytes = sizeof(WCHAR) * (wcslen(name) + 1);
int nameIndex = GetIntConfigValue->Contains((unsigned char*)name, (unsigned int)nameLenInBytes);
if (nameIndex == -1) // config name not in map
return defaultValue;
return (int)result;
}
-void MethodContext::recGetStringConfigValue(const wchar_t* name, const wchar_t* result)
+void MethodContext::recGetStringConfigValue(const WCHAR* name, const WCHAR* result)
{
if (GetStringConfigValue == nullptr)
GetStringConfigValue = new LightWeightMap<DWORD, DWORD>();
AssertCodeMsg(name != nullptr, EXCEPTIONCODE_MC, "Name can not be nullptr");
DWORD nameIndex = (DWORD)GetStringConfigValue->AddBuffer((unsigned char*)name,
- sizeof(wchar_t) * ((unsigned int)wcslen(name) + 1));
+ sizeof(WCHAR) * ((unsigned int)wcslen(name) + 1));
DWORD resultIndex = (DWORD)-1;
if (result != nullptr)
resultIndex = (DWORD)GetStringConfigValue->AddBuffer((unsigned char*)result,
- sizeof(wchar_t) * ((unsigned int)wcslen(result) + 1));
+ sizeof(WCHAR) * ((unsigned int)wcslen(result) + 1));
GetStringConfigValue->Add(nameIndex, resultIndex);
DEBUG_REC(dmpGetStringConfigValue(nameIndex, resultIndex));
void MethodContext::dmpGetStringConfigValue(DWORD nameIndex, DWORD resultIndex)
{
- const wchar_t* name = (const wchar_t*)GetStringConfigValue->GetBuffer(nameIndex);
- const wchar_t* result = (const wchar_t*)GetStringConfigValue->GetBuffer(resultIndex);
+ const WCHAR* name = (const WCHAR*)GetStringConfigValue->GetBuffer(nameIndex);
+ const WCHAR* result = (const WCHAR*)GetStringConfigValue->GetBuffer(resultIndex);
printf("GetStringConfigValue name %S, result %S", name, result);
GetStringConfigValue->Unlock();
}
-const wchar_t* MethodContext::repGetStringConfigValue(const wchar_t* name)
+const WCHAR* MethodContext::repGetStringConfigValue(const WCHAR* name)
{
if (GetStringConfigValue == nullptr)
return nullptr;
AssertCodeMsg(name != nullptr, EXCEPTIONCODE_MC, "Name can not be nullptr");
- size_t nameLenInBytes = sizeof(wchar_t) * (wcslen(name) + 1);
+ size_t nameLenInBytes = sizeof(WCHAR) * (wcslen(name) + 1);
int nameIndex = GetStringConfigValue->Contains((unsigned char*)name, (unsigned int)nameLenInBytes);
if (nameIndex == -1) // config name not in map
return nullptr;
int resultIndex = GetStringConfigValue->Get(nameIndex);
- const wchar_t* value = (const wchar_t*)GetStringConfigValue->GetBuffer(resultIndex);
+ const WCHAR* value = (const WCHAR*)GetStringConfigValue->GetBuffer(resultIndex);
DEBUG_REP(dmpGetStringConfigValue(nameIndex, resultIndex));
void dmpIsFieldStatic(DWORDLONG key, DWORD value);
bool repIsFieldStatic(CORINFO_FIELD_HANDLE fhld);
- void recGetIntConfigValue(const wchar_t* name, int defaultValue, int result);
+ void recGetIntConfigValue(const WCHAR* name, int defaultValue, int result);
void dmpGetIntConfigValue(const Agnostic_ConfigIntInfo& key, int value);
- int repGetIntConfigValue(const wchar_t* name, int defaultValue);
+ int repGetIntConfigValue(const WCHAR* name, int defaultValue);
- void recGetStringConfigValue(const wchar_t* name, const wchar_t* result);
+ void recGetStringConfigValue(const WCHAR* name, const WCHAR* result);
void dmpGetStringConfigValue(DWORD nameIndex, DWORD result);
- const wchar_t* repGetStringConfigValue(const wchar_t* name);
+ const WCHAR* repGetStringConfigValue(const WCHAR* name);
struct Environment
{
return wrappedHost->freeMemory(block);
}
-int JitHost::getIntConfigValue(const wchar_t* key, int defaultValue)
+int JitHost::getIntConfigValue(const WCHAR* key, int defaultValue)
{
mc->cr->AddCall("getIntConfigValue");
int result = wrappedHost->getIntConfigValue(key, defaultValue);
return result;
}
-const wchar_t* JitHost::getStringConfigValue(const wchar_t* key)
+const WCHAR* JitHost::getStringConfigValue(const WCHAR* key)
{
mc->cr->AddCall("getStringConfigValue");
- const wchar_t* result = wrappedHost->getStringConfigValue(key);
+ const WCHAR* result = wrappedHost->getStringConfigValue(key);
// Don't store null returns, which is the default
if (result != nullptr)
return result;
}
-void JitHost::freeStringConfigValue(const wchar_t* value)
+void JitHost::freeStringConfigValue(const WCHAR* value)
{
mc->cr->AddCall("freeStringConfigValue");
wrappedHost->freeStringConfigValue(value);
return wrappedHost->freeMemory(block);
}
-int JitHost::getIntConfigValue(const wchar_t* key, int defaultValue)
+int JitHost::getIntConfigValue(const WCHAR* key, int defaultValue)
{
mcs->AddCall("getIntConfigValue");
return wrappedHost->getIntConfigValue(key, defaultValue);
}
-const wchar_t* JitHost::getStringConfigValue(const wchar_t* key)
+const WCHAR* JitHost::getStringConfigValue(const WCHAR* key)
{
mcs->AddCall("getStringConfigValue");
return wrappedHost->getStringConfigValue(key);
}
-void JitHost::freeStringConfigValue(const wchar_t* value)
+void JitHost::freeStringConfigValue(const WCHAR* value)
{
mcs->AddCall("freeStringConfigValue");
wrappedHost->freeStringConfigValue(value);
return wrappedHost->freeMemory(block);
}
-int JitHost::getIntConfigValue(const wchar_t* key, int defaultValue)
+int JitHost::getIntConfigValue(const WCHAR* key, int defaultValue)
{
return wrappedHost->getIntConfigValue(key, defaultValue);
}
-const wchar_t* JitHost::getStringConfigValue(const wchar_t* key)
+const WCHAR* JitHost::getStringConfigValue(const WCHAR* key)
{
return wrappedHost->getStringConfigValue(key);
}
-void JitHost::freeStringConfigValue(const wchar_t* value)
+void JitHost::freeStringConfigValue(const WCHAR* value)
{
wrappedHost->freeStringConfigValue(value);
}
printf(" ; if there are any failures, record their MC numbers in the file fail.mcl\n");
}
-static bool ParseJitOption(const char* optionString, wchar_t** key, wchar_t** value)
+static bool ParseJitOption(const char* optionString, WCHAR** key, WCHAR** value)
{
char tempKey[1024];
const char* tempVal = &optionString[i + 1];
const unsigned keyLen = i;
- wchar_t* keyBuf = new wchar_t[keyLen + 1];
+ WCHAR* keyBuf = new WCHAR[keyLen + 1];
MultiByteToWideChar(CP_UTF8, 0, tempKey, keyLen + 1, keyBuf, keyLen + 1);
const unsigned valLen = (unsigned)strlen(tempVal);
- wchar_t* valBuf = new wchar_t[valLen + 1];
+ WCHAR* valBuf = new WCHAR[valLen + 1];
MultiByteToWideChar(CP_UTF8, 0, tempVal, valLen + 1, valBuf, valLen + 1);
*key = keyBuf;
targetjitOptions = *pJitOptions;
}
- wchar_t* key;
- wchar_t* value;
+ WCHAR* key;
+ WCHAR* value;
if ((currArgument >= argc) || !ParseJitOption(argv[currArgument], &key, &value))
{
DumpHelp(argv[0]);
}
DWORD keyIndex =
- (DWORD)targetjitOptions->AddBuffer((unsigned char*)key, sizeof(wchar_t) * ((unsigned int)wcslen(key) + 1));
+ (DWORD)targetjitOptions->AddBuffer((unsigned char*)key, sizeof(WCHAR) * ((unsigned int)wcslen(key) + 1));
DWORD valueIndex =
- (DWORD)targetjitOptions->AddBuffer((unsigned char*)value, sizeof(wchar_t) * ((unsigned int)wcslen(value) + 1));
+ (DWORD)targetjitOptions->AddBuffer((unsigned char*)value, sizeof(WCHAR) * ((unsigned int)wcslen(value) + 1));
targetjitOptions->Add(keyIndex, valueIndex);
delete[] key;
// Look for 'key' as an environment variable named COMPlus_<key>. The returned value
// is nullptr if it is not found, or a string if found. If not nullptr, the returned
// value must be freed with jitInstance.freeLongLivedArray(value).
-wchar_t* GetCOMPlusVariable(const wchar_t* key, JitInstance& jitInstance)
+WCHAR* GetCOMPlusVariable(const WCHAR* key, JitInstance& jitInstance)
{
- static const wchar_t Prefix[] = W("COMPlus_");
+ static const WCHAR Prefix[] = W("COMPlus_");
static const size_t PrefixLen = (sizeof(Prefix) / sizeof(Prefix[0])) - 1;
// Prepend "COMPlus_" to the provided key
size_t keyLen = wcslen(key);
size_t keyBufferLen = keyLen + PrefixLen + 1;
- wchar_t* keyBuffer =
- reinterpret_cast<wchar_t*>(jitInstance.allocateArray(static_cast<ULONG>(sizeof(wchar_t) * keyBufferLen)));
+ WCHAR* keyBuffer =
+ reinterpret_cast<WCHAR*>(jitInstance.allocateArray(static_cast<ULONG>(sizeof(WCHAR) * keyBufferLen)));
wcscpy_s(keyBuffer, keyBufferLen, Prefix);
wcscpy_s(&keyBuffer[PrefixLen], keyLen + 1, key);
}
// Note this value must live as long as the jit instance does.
- wchar_t* value = reinterpret_cast<wchar_t*>(jitInstance.allocateLongLivedArray(sizeof(wchar_t) * valueLen));
+ WCHAR* value = reinterpret_cast<WCHAR*>(jitInstance.allocateLongLivedArray(sizeof(WCHAR) * valueLen));
DWORD newValueLen = GetEnvironmentVariableW(keyBuffer, value, valueLen);
jitInstance.freeArray(keyBuffer);
InitIEEMemoryManager(&jitInstance)->ClrVirtualFree(block, 0, 0);
}
-bool JitHost::convertStringValueToInt(const wchar_t* key, const wchar_t* stringValue, int& result)
+bool JitHost::convertStringValueToInt(const WCHAR* key, const WCHAR* stringValue, int& result)
{
if (stringValue == nullptr)
{
return false;
}
- wchar_t* endPtr;
+ WCHAR* endPtr;
unsigned long longResult = wcstoul(stringValue, &endPtr, 16);
bool succeeded = (errno != ERANGE) && (endPtr != stringValue) && (longResult <= INT_MAX);
if (!succeeded)
return true;
}
-int JitHost::getIntConfigValue(const wchar_t* key, int defaultValue)
+int JitHost::getIntConfigValue(const WCHAR* key, int defaultValue)
{
jitInstance.mc->cr->AddCall("getIntConfigValue");
if (!valueFound)
{
- wchar_t* complusVar = GetCOMPlusVariable(key, jitInstance);
+ WCHAR* complusVar = GetCOMPlusVariable(key, jitInstance);
valueFound = convertStringValueToInt(key, complusVar, result);
if (complusVar != nullptr)
{
return valueFound ? result : defaultValue;
}
-const wchar_t* JitHost::getStringConfigValue(const wchar_t* key)
+const WCHAR* JitHost::getStringConfigValue(const WCHAR* key)
{
jitInstance.mc->cr->AddCall("getStringConfigValue");
bool needToDup = true;
- const wchar_t* result = nullptr;
+ const WCHAR* result = nullptr;
// First check the force options, then mc value. If value is not presented there, probe the JIT options and then the
// environment.
{
// Now we need to dup it, so you can call freeStringConfigValue() on what we return.
size_t resultLenInChars = wcslen(result) + 1;
- wchar_t* dupResult = (wchar_t*)jitInstance.allocateLongLivedArray((ULONG)(sizeof(wchar_t) * resultLenInChars));
+ WCHAR* dupResult = (WCHAR*)jitInstance.allocateLongLivedArray((ULONG)(sizeof(WCHAR) * resultLenInChars));
wcscpy_s(dupResult, resultLenInChars, result);
result = dupResult;
}
return result;
}
-void JitHost::freeStringConfigValue(const wchar_t* value)
+void JitHost::freeStringConfigValue(const WCHAR* value)
{
jitInstance.mc->cr->AddCall("freeStringConfigValue");
jitInstance.freeLongLivedArray((void*)value);
#include "icorjithostimpl.h"
private:
- bool convertStringValueToInt(const wchar_t* key, const wchar_t* stringValue, int& result);
+ bool convertStringValueToInt(const WCHAR* key, const WCHAR* stringValue, int& result);
JitInstance& jitInstance;
};
/*-------------------------- Misc ---------------------------------------*/
-const wchar_t* JitInstance::getForceOption(const wchar_t* key)
+const WCHAR* JitInstance::getForceOption(const WCHAR* key)
{
return getOption(key, forceOptions);
}
-const wchar_t* JitInstance::getOption(const wchar_t* key)
+const WCHAR* JitInstance::getOption(const WCHAR* key)
{
return getOption(key, options);
}
-const wchar_t* JitInstance::getOption(const wchar_t* key, LightWeightMap<DWORD, DWORD>* options)
+const WCHAR* JitInstance::getOption(const WCHAR* key, LightWeightMap<DWORD, DWORD>* options)
{
if (options == nullptr)
{
return nullptr;
}
- size_t keyLenInBytes = sizeof(wchar_t) * (wcslen(key) + 1);
+ size_t keyLenInBytes = sizeof(WCHAR) * (wcslen(key) + 1);
int keyIndex = options->Contains((unsigned char*)key, (unsigned int)keyLenInBytes);
if (keyIndex == -1)
{
return nullptr;
}
- return (const wchar_t*)options->GetBuffer(options->Get(keyIndex));
+ return (const WCHAR*)options->GetBuffer(options->Get(keyIndex));
}
// Used to allocate memory that needs to handed to the EE.
Result CompileMethod(MethodContext* MethodToCompile, int mcIndex, bool collectThroughput);
- const wchar_t* getForceOption(const wchar_t* key);
- const wchar_t* getOption(const wchar_t* key);
- const wchar_t* getOption(const wchar_t* key, LightWeightMap<DWORD, DWORD>* options);
+ const WCHAR* getForceOption(const WCHAR* key);
+ const WCHAR* getOption(const WCHAR* key);
+ const WCHAR* getOption(const WCHAR* key, LightWeightMap<DWORD, DWORD>* options);
const MethodContext::Environment& getEnvironment();
if (UseCoreDisTools)
{
- const wchar_t* coreDisToolsLibrary = MAKEDLLNAME_W("coredistools");
+ const WCHAR* coreDisToolsLibrary = MAKEDLLNAME_W("coredistools");
#ifdef PLATFORM_UNIX
// Unix will require the full path to coredistools. Assume that the
// location is next to the full path to the superpmi.so.
- wchar_t coreCLRLoadedPath[MAX_LONGPATH];
+ WCHAR coreCLRLoadedPath[MAX_LONGPATH];
HMODULE result = 0;
int returnVal = ::GetModuleFileNameW(result, coreCLRLoadedPath, MAX_LONGPATH);
return false;
}
- wchar_t* ptr = ::wcsrchr(coreCLRLoadedPath, '/');
+ WCHAR* ptr = ::wcsrchr(coreCLRLoadedPath, '/');
// Move past the / character.
ptr = ptr + 1;
- const wchar_t* coreDisToolsLibraryName = MAKEDLLNAME_W("coredistools");
+ const WCHAR* coreDisToolsLibraryName = MAKEDLLNAME_W("coredistools");
::wcscpy_s(ptr, &coreCLRLoadedPath[MAX_LONGPATH] - ptr, coreDisToolsLibraryName);
coreDisToolsLibrary = coreCLRLoadedPath;
#endif // PLATFORM_UNIX
}
disasm->FDecode(&instr, ops, 3);
- wchar_t instrMnemonicWide[64]; // I never know how much to allocate...
+ WCHAR instrMnemonicWide[64]; // I never know how much to allocate...
disasm->CchFormatInstr(instrMnemonicWide, 64);
char instrMnemonic[128];
size_t count;
FDecodeError = true;
}
- wchar_t instrMnemonic_1[64]; // I never know how much to allocate...
+ WCHAR instrMnemonic_1[64]; // I never know how much to allocate...
disasm_1->CchFormatInstr(instrMnemonic_1, 64);
- wchar_t instrMnemonic_2[64]; // I never know how much to allocate...
+ WCHAR instrMnemonic_2[64]; // I never know how much to allocate...
disasm_2->CchFormatInstr(instrMnemonic_2, 64);
if (wcscmp(instrMnemonic_1, L"ret") == 0)
haveSeenRet = true;
{
for (unsigned i = 0; i < jitOptions->GetCount(); i++)
{
- wchar_t* key = (wchar_t*)jitOptions->GetBuffer(jitOptions->GetKey(i));
- wchar_t* value = (wchar_t*)jitOptions->GetBuffer(jitOptions->GetItem(i));
+ WCHAR* key = (WCHAR*)jitOptions->GetBuffer(jitOptions->GetKey(i));
+ WCHAR* value = (WCHAR*)jitOptions->GetBuffer(jitOptions->GetItem(i));
bytesWritten += sprintf_s(spmiArgs + bytesWritten, MAX_CMDLINE_SIZE - bytesWritten, " -%s %S=%S",
optionName, key, value);
}
{
union {
LPVOID pv;
- wchar_t* asStr; // For debugging.
+ WCHAR* asStr; // For debugging.
};
DWORD cb;
};
virtual HRESULT STDMETHODCALLTYPE GetAppDomainStoreData(struct DacpAppDomainStoreData *data);
virtual HRESULT STDMETHODCALLTYPE GetAppDomainList(unsigned int count, CLRDATA_ADDRESS values[], unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetAppDomainData(CLRDATA_ADDRESS addr, struct DacpAppDomainData *data);
- virtual HRESULT STDMETHODCALLTYPE GetAppDomainName(CLRDATA_ADDRESS addr, unsigned int count, __out_z __inout_ecount(count) wchar_t *name, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetAppDomainName(CLRDATA_ADDRESS addr, unsigned int count, __out_z __inout_ecount(count) WCHAR *name, unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetAssemblyList(CLRDATA_ADDRESS appDomain, int count, CLRDATA_ADDRESS values[], int *fetched);
virtual HRESULT STDMETHODCALLTYPE GetAssemblyData(CLRDATA_ADDRESS baseDomainPtr, CLRDATA_ADDRESS assembly, struct DacpAssemblyData *data);
- virtual HRESULT STDMETHODCALLTYPE GetAssemblyName(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) wchar_t *name, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetAssemblyName(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) WCHAR *name, unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetThreadData(CLRDATA_ADDRESS thread, struct DacpThreadData *data);
virtual HRESULT STDMETHODCALLTYPE GetThreadFromThinlockID(UINT thinLockId, CLRDATA_ADDRESS *pThread);
virtual HRESULT STDMETHODCALLTYPE GetStackLimits(CLRDATA_ADDRESS threadPtr, CLRDATA_ADDRESS *lower, CLRDATA_ADDRESS *upper, CLRDATA_ADDRESS *fp);
virtual HRESULT STDMETHODCALLTYPE GetMethodDescData(CLRDATA_ADDRESS methodDesc, CLRDATA_ADDRESS ip, struct DacpMethodDescData *data, ULONG cRevertedRejitVersions, DacpReJitData * rgRevertedRejitData, ULONG * pcNeededRevertedRejitData);
virtual HRESULT STDMETHODCALLTYPE GetMethodDescPtrFromIP(CLRDATA_ADDRESS ip, CLRDATA_ADDRESS * ppMD);
- virtual HRESULT STDMETHODCALLTYPE GetMethodDescName(CLRDATA_ADDRESS methodDesc, unsigned int count, __out_z __inout_ecount(count) wchar_t *name, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetMethodDescName(CLRDATA_ADDRESS methodDesc, unsigned int count, __out_z __inout_ecount(count) WCHAR *name, unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetMethodDescPtrFromFrame(CLRDATA_ADDRESS frameAddr, CLRDATA_ADDRESS * ppMD);
virtual HRESULT STDMETHODCALLTYPE GetCodeHeaderData(CLRDATA_ADDRESS ip, struct DacpCodeHeaderData *data);
virtual HRESULT STDMETHODCALLTYPE GetThreadpoolData(struct DacpThreadpoolData *data);
virtual HRESULT STDMETHODCALLTYPE GetWorkRequestData(CLRDATA_ADDRESS addrWorkRequest, struct DacpWorkRequestData *data);
virtual HRESULT STDMETHODCALLTYPE GetObjectData(CLRDATA_ADDRESS objAddr, struct DacpObjectData *data);
- virtual HRESULT STDMETHODCALLTYPE GetObjectStringData(CLRDATA_ADDRESS obj, unsigned int count, __out_z __inout_ecount(count) wchar_t *stringData, unsigned int *pNeeded);
- virtual HRESULT STDMETHODCALLTYPE GetObjectClassName(CLRDATA_ADDRESS obj, unsigned int count, __out_z __inout_ecount(count) wchar_t *className, unsigned int *pNeeded);
- virtual HRESULT STDMETHODCALLTYPE GetMethodTableName(CLRDATA_ADDRESS mt, unsigned int count, __out_z __inout_ecount(count) wchar_t *mtName, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetObjectStringData(CLRDATA_ADDRESS obj, unsigned int count, __out_z __inout_ecount(count) WCHAR *stringData, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetObjectClassName(CLRDATA_ADDRESS obj, unsigned int count, __out_z __inout_ecount(count) WCHAR *className, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetMethodTableName(CLRDATA_ADDRESS mt, unsigned int count, __out_z __inout_ecount(count) WCHAR *mtName, unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetMethodTableData(CLRDATA_ADDRESS mt, struct DacpMethodTableData *data);
virtual HRESULT STDMETHODCALLTYPE GetMethodTableFieldData(CLRDATA_ADDRESS mt, struct DacpMethodTableFieldData *data);
virtual HRESULT STDMETHODCALLTYPE GetMethodTableTransparencyData(CLRDATA_ADDRESS mt, struct DacpMethodTableTransparencyData *data);
virtual HRESULT STDMETHODCALLTYPE GetMethodTableForEEClass(CLRDATA_ADDRESS eeClass, CLRDATA_ADDRESS *value);
virtual HRESULT STDMETHODCALLTYPE GetFieldDescData(CLRDATA_ADDRESS fieldDesc, struct DacpFieldDescData *data);
- virtual HRESULT STDMETHODCALLTYPE GetFrameName(CLRDATA_ADDRESS vtable, unsigned int count, __out_z __inout_ecount(count) wchar_t *frameName, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetFrameName(CLRDATA_ADDRESS vtable, unsigned int count, __out_z __inout_ecount(count) WCHAR *frameName, unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetModule(CLRDATA_ADDRESS addr, IXCLRDataModule **mod);
virtual HRESULT STDMETHODCALLTYPE GetModuleData(CLRDATA_ADDRESS moduleAddr, struct DacpModuleData *data);
virtual HRESULT STDMETHODCALLTYPE TraverseModuleMap(ModuleMapType mmt, CLRDATA_ADDRESS moduleAddr, MODULEMAPTRAVERSE pCallback, LPVOID token);
virtual HRESULT STDMETHODCALLTYPE GetMethodDescFromToken(CLRDATA_ADDRESS moduleAddr, mdToken token, CLRDATA_ADDRESS *methodDesc);
virtual HRESULT STDMETHODCALLTYPE GetPEFileBase(CLRDATA_ADDRESS addr, CLRDATA_ADDRESS *base);
- virtual HRESULT STDMETHODCALLTYPE GetPEFileName(CLRDATA_ADDRESS addr, unsigned int count, __out_z __inout_ecount(count) wchar_t *fileName, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetPEFileName(CLRDATA_ADDRESS addr, unsigned int count, __out_z __inout_ecount(count) WCHAR *fileName, unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetAssemblyModuleList(CLRDATA_ADDRESS assembly, unsigned int count, CLRDATA_ADDRESS modules[], unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetGCHeapData(struct DacpGcHeapData *data);
virtual HRESULT STDMETHODCALLTYPE GetGCHeapList(unsigned int count, CLRDATA_ADDRESS heaps[], unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetDacModuleHandle(HMODULE *phModule);
virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyList(CLRDATA_ADDRESS appDomain, int count, CLRDATA_ADDRESS values[], unsigned int *pNeeded);
- virtual HRESULT STDMETHODCALLTYPE GetPrivateBinPaths(CLRDATA_ADDRESS appDomain, int count, __out_z __inout_ecount(count) wchar_t *paths, unsigned int *pNeeded);
- virtual HRESULT STDMETHODCALLTYPE GetAssemblyLocation(CLRDATA_ADDRESS assembly, int count, __out_z __inout_ecount(count) wchar_t *location, unsigned int *pNeeded);
- virtual HRESULT STDMETHODCALLTYPE GetAppDomainConfigFile(CLRDATA_ADDRESS appDomain, int count, __out_z __inout_ecount(count) wchar_t *configFile, unsigned int *pNeeded);
- virtual HRESULT STDMETHODCALLTYPE GetApplicationBase(CLRDATA_ADDRESS appDomain, int count, __out_z __inout_ecount(count) wchar_t *base, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetPrivateBinPaths(CLRDATA_ADDRESS appDomain, int count, __out_z __inout_ecount(count) WCHAR *paths, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetAssemblyLocation(CLRDATA_ADDRESS assembly, int count, __out_z __inout_ecount(count) WCHAR *location, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetAppDomainConfigFile(CLRDATA_ADDRESS appDomain, int count, __out_z __inout_ecount(count) WCHAR *configFile, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetApplicationBase(CLRDATA_ADDRESS appDomain, int count, __out_z __inout_ecount(count) WCHAR *base, unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyData(CLRDATA_ADDRESS assembly, unsigned int *pContext, HRESULT *pResult);
- virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyLocation(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) wchar_t *location, unsigned int *pNeeded);
- virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyDisplayName(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) wchar_t *name, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyLocation(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) WCHAR *location, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyDisplayName(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) WCHAR *name, unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetStackReferences(DWORD osThreadID, ISOSStackRefEnum **ppEnum);
- virtual HRESULT STDMETHODCALLTYPE GetRegisterName(int regNum, unsigned int count, __out_z __inout_ecount(count) wchar_t *buffer, unsigned int *pNeeded);
+ virtual HRESULT STDMETHODCALLTYPE GetRegisterName(int regNum, unsigned int count, __out_z __inout_ecount(count) WCHAR *buffer, unsigned int *pNeeded);
virtual HRESULT STDMETHODCALLTYPE GetHandleEnum(ISOSHandleEnum **ppHandleEnum);
virtual HRESULT STDMETHODCALLTYPE GetHandleEnumForTypes(unsigned int types[], unsigned int count, ISOSHandleEnum **ppHandleEnum);
}
HRESULT
-ClrDataAccess::GetRegisterName(int regNum, unsigned int count, __out_z __inout_ecount(count) wchar_t *buffer, unsigned int *pNeeded)
+ClrDataAccess::GetRegisterName(int regNum, unsigned int count, __out_z __inout_ecount(count) WCHAR *buffer, unsigned int *pNeeded)
{
if (!buffer && !pNeeded)
return E_POINTER;
#ifdef _TARGET_AMD64_
- static const wchar_t *regs[] =
+ static const WCHAR *regs[] =
{
W("rax"), W("rcx"), W("rdx"), W("rbx"), W("rsp"), W("rbp"), W("rsi"), W("rdi"),
W("r8"), W("r9"), W("r10"), W("r11"), W("r12"), W("r13"), W("r14"), W("r15"),
};
#elif defined(_TARGET_ARM_)
- static const wchar_t *regs[] =
+ static const WCHAR *regs[] =
{
W("r0"),
W("r1"),
W("r8"), W("r9"), W("r10"), W("r11"), W("r12"), W("sp"), W("lr")
};
#elif defined(_TARGET_ARM64_)
- static const wchar_t *regs[] =
+ static const WCHAR *regs[] =
{
W("X0"),
W("X1"),
W("X28"), W("Fp"), W("Lr"), W("Sp")
};
#elif defined(_TARGET_X86_)
- static const wchar_t *regs[] =
+ static const WCHAR *regs[] =
{
W("eax"), W("ecx"), W("edx"), W("ebx"), W("esp"), W("ebp"), W("esi"), W("edi"),
};
return E_UNEXPECTED;
- const wchar_t caller[] = W("caller.");
+ const WCHAR caller[] = W("caller.");
unsigned int needed = (callerFrame?(unsigned int)wcslen(caller):0) + (unsigned int)wcslen(regs[regNum]) + 1;
if (pNeeded)
*pNeeded = needed;
}
HRESULT
-ClrDataAccess::GetMethodDescName(CLRDATA_ADDRESS methodDesc, unsigned int count, __out_z __inout_ecount(count) wchar_t *name, unsigned int *pNeeded)
+ClrDataAccess::GetMethodDescName(CLRDATA_ADDRESS methodDesc, unsigned int count, __out_z __inout_ecount(count) WCHAR *name, unsigned int *pNeeded)
{
if (methodDesc == 0)
return E_INVALIDARG;
if (SUCCEEDED(hr))
{
- const wchar_t *val = str.GetUnicode();
+ const WCHAR *val = str.GetUnicode();
if (pNeeded)
*pNeeded = str.GetCount() + 1;
HRESULT
-ClrDataAccess::GetObjectStringData(CLRDATA_ADDRESS obj, unsigned int count, __out_z __inout_ecount(count) wchar_t *stringData, unsigned int *pNeeded)
+ClrDataAccess::GetObjectStringData(CLRDATA_ADDRESS obj, unsigned int count, __out_z __inout_ecount(count) WCHAR *stringData, unsigned int *pNeeded)
{
if (obj == 0)
return E_INVALIDARG;
count = needed;
TADDR pszStr = TO_TADDR(obj)+offsetof(StringObject, m_FirstChar);
- hr = m_pTarget->ReadVirtual(pszStr, (PBYTE)stringData, count * sizeof(wchar_t), &needed);
+ hr = m_pTarget->ReadVirtual(pszStr, (PBYTE)stringData, count * sizeof(WCHAR), &needed);
if (SUCCEEDED(hr))
stringData[count - 1] = W('\0');
}
HRESULT
-ClrDataAccess::GetObjectClassName(CLRDATA_ADDRESS obj, unsigned int count, __out_z __inout_ecount(count) wchar_t *className, unsigned int *pNeeded)
+ClrDataAccess::GetObjectClassName(CLRDATA_ADDRESS obj, unsigned int count, __out_z __inout_ecount(count) WCHAR *className, unsigned int *pNeeded)
{
if (obj == 0)
return E_INVALIDARG;
{
StackSString s;
TypeString::AppendType(s, TypeHandle(mt), TypeString::FormatNamespace|TypeString::FormatFullInst);
- const wchar_t *val = s.GetUnicode();
+ const WCHAR *val = s.GetUnicode();
if (pNeeded)
*pNeeded = s.GetCount() + 1;
}
HRESULT
-ClrDataAccess::GetMethodTableName(CLRDATA_ADDRESS mt, unsigned int count, __out_z __inout_ecount(count) wchar_t *mtName, unsigned int *pNeeded)
+ClrDataAccess::GetMethodTableName(CLRDATA_ADDRESS mt, unsigned int count, __out_z __inout_ecount(count) WCHAR *mtName, unsigned int *pNeeded)
{
if (mt == 0)
return E_INVALIDARG;
}
else
{
- const wchar_t *val = s.GetUnicode();
+ const WCHAR *val = s.GetUnicode();
if (pNeeded)
*pNeeded = s.GetCount() + 1;
}
HRESULT
-ClrDataAccess::GetFrameName(CLRDATA_ADDRESS vtable, unsigned int count, __out_z __inout_ecount(count) wchar_t *frameName, unsigned int *pNeeded)
+ClrDataAccess::GetFrameName(CLRDATA_ADDRESS vtable, unsigned int count, __out_z __inout_ecount(count) WCHAR *frameName, unsigned int *pNeeded)
{
if (vtable == 0)
return E_INVALIDARG;
}
HRESULT
-ClrDataAccess::GetPEFileName(CLRDATA_ADDRESS addr, unsigned int count, __out_z __inout_ecount(count) wchar_t *fileName, unsigned int *pNeeded)
+ClrDataAccess::GetPEFileName(CLRDATA_ADDRESS addr, unsigned int count, __out_z __inout_ecount(count) WCHAR *fileName, unsigned int *pNeeded)
{
if (addr == 0 || (fileName == NULL && pNeeded == NULL) || (fileName != NULL && count == 0))
return E_INVALIDARG;
HRESULT
ClrDataAccess::GetFailedAssemblyLocation(CLRDATA_ADDRESS assembly, unsigned int count,
- __out_z __inout_ecount(count) wchar_t *location, unsigned int *pNeeded)
+ __out_z __inout_ecount(count) WCHAR *location, unsigned int *pNeeded)
{
if (assembly == NULL || (location == NULL && pNeeded == NULL) || (location != NULL && count == 0))
return E_INVALIDARG;
}
HRESULT
-ClrDataAccess::GetFailedAssemblyDisplayName(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) wchar_t *name, unsigned int *pNeeded)
+ClrDataAccess::GetFailedAssemblyDisplayName(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) WCHAR *name, unsigned int *pNeeded)
{
if (assembly == NULL || (name == NULL && pNeeded == NULL) || (name != NULL && count == 0))
return E_INVALIDARG;
}
HRESULT
-ClrDataAccess::GetAppDomainName(CLRDATA_ADDRESS addr, unsigned int count, __out_z __inout_ecount(count) wchar_t *name, unsigned int *pNeeded)
+ClrDataAccess::GetAppDomainName(CLRDATA_ADDRESS addr, unsigned int count, __out_z __inout_ecount(count) WCHAR *name, unsigned int *pNeeded)
{
SOSDacEnter();
HRESULT
ClrDataAccess::GetApplicationBase(CLRDATA_ADDRESS appDomain, int count,
- __out_z __inout_ecount(count) wchar_t *base, unsigned int *pNeeded)
+ __out_z __inout_ecount(count) WCHAR *base, unsigned int *pNeeded)
{
// Method is not supported on CoreCLR
HRESULT
ClrDataAccess::GetPrivateBinPaths(CLRDATA_ADDRESS appDomain, int count,
- __out_z __inout_ecount(count) wchar_t *paths, unsigned int *pNeeded)
+ __out_z __inout_ecount(count) WCHAR *paths, unsigned int *pNeeded)
{
// Method is not supported on CoreCLR
HRESULT
ClrDataAccess::GetAppDomainConfigFile(CLRDATA_ADDRESS appDomain, int count,
- __out_z __inout_ecount(count) wchar_t *configFile, unsigned int *pNeeded)
+ __out_z __inout_ecount(count) WCHAR *configFile, unsigned int *pNeeded)
{
// Method is not supported on CoreCLR
}
HRESULT
-ClrDataAccess::GetAssemblyName(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) wchar_t *name, unsigned int *pNeeded)
+ClrDataAccess::GetAssemblyName(CLRDATA_ADDRESS assembly, unsigned int count, __out_z __inout_ecount(count) WCHAR *name, unsigned int *pNeeded)
{
SOSDacEnter();
Assembly* pAssembly = PTR_Assembly(TO_TADDR(assembly));
StackSString displayName;
pAssembly->GetManifestFile()->GetDisplayName(displayName, 0);
- const wchar_t *val = displayName.GetUnicode();
+ const WCHAR *val = displayName.GetUnicode();
if (pNeeded)
*pNeeded = displayName.GetCount() + 1;
}
HRESULT
-ClrDataAccess::GetAssemblyLocation(CLRDATA_ADDRESS assembly, int count, __out_z __inout_ecount(count) wchar_t *location, unsigned int *pNeeded)
+ClrDataAccess::GetAssemblyLocation(CLRDATA_ADDRESS assembly, int count, __out_z __inout_ecount(count) WCHAR *location, unsigned int *pNeeded)
{
if ((assembly == NULL) || (location == NULL && pNeeded == NULL) || (location != NULL && count == 0))
{
SOSDacLeave();
return hr;
-}
\ No newline at end of file
+}
#if defined(FEATURE_CORESYSTEM)
size_t pathLen = wcslen(mutableFilePath);
- const wchar_t *nidll = W(".ni.dll");
- const wchar_t *niexe = W(".ni.exe");
+ const WCHAR *nidll = W(".ni.dll");
+ const WCHAR *niexe = W(".ni.exe");
const size_t dllLen = wcslen(nidll); // used for ni.exe as well
- const wchar_t *niwinmd = W(".ni.winmd");
+ const WCHAR *niwinmd = W(".ni.winmd");
const size_t winmdLen = wcslen(niwinmd);
if (pathLen > dllLen && _wcsicmp(mutableFilePath+pathLen-dllLen, nidll) == 0)
// We need to change the .pdb extension to .ildb
// compatible with VS7
- wchar_t fullpath[_MAX_PATH];
- wchar_t drive[_MAX_DRIVE];
- wchar_t dir[_MAX_DIR];
- wchar_t fname[_MAX_FNAME];
+ WCHAR fullpath[_MAX_PATH];
+ WCHAR drive[_MAX_DRIVE];
+ WCHAR dir[_MAX_DIR];
+ WCHAR fname[_MAX_FNAME];
IMAGE_NT_HEADERS*pNT;
const WCHAR* szsearchPath)
{
HRESULT hr = S_OK;
- wchar_t fullpath[_MAX_PATH];
- wchar_t drive[_MAX_DRIVE];
- wchar_t dir[_MAX_DIR];
- wchar_t fname[_MAX_FNAME];
+ WCHAR fullpath[_MAX_PATH];
+ WCHAR drive[_MAX_DRIVE];
+ WCHAR dir[_MAX_DIR];
+ WCHAR fname[_MAX_FNAME];
HANDLE hFile = INVALID_HANDLE_VALUE;
HANDLE hMapFile = INVALID_HANDLE_VALUE;
HMODULE hMod = NULL;
if (szFilename != NULL)
{
- wchar_t fullpath[_MAX_PATH];
- wchar_t drive[_MAX_DRIVE];
- wchar_t dir[_MAX_DIR];
- wchar_t fname[_MAX_FNAME];
+ WCHAR fullpath[_MAX_PATH];
+ WCHAR drive[_MAX_DRIVE];
+ WCHAR dir[_MAX_DIR];
+ WCHAR fname[_MAX_FNAME];
_wsplitpath_s( szFilename, drive, COUNTOF(drive), dir, COUNTOF(dir), fname, COUNTOF(fname), NULL, 0 );
_wmakepath_s( fullpath, COUNTOF(fullpath), drive, dir, fname, W("ildb") );
if (wcsncpy_s( m_szPath, COUNTOF(m_szPath), fullpath, _TRUNCATE) == STRUNCATE)
// We need to change the .ildb extension to .pdb to be
// compatible with VS7
- wchar_t fullpath[_MAX_PATH];
- wchar_t drive[_MAX_DRIVE];
- wchar_t dir[_MAX_DIR];
- wchar_t fname[_MAX_FNAME];
+ WCHAR fullpath[_MAX_PATH];
+ WCHAR drive[_MAX_DRIVE];
+ WCHAR dir[_MAX_DIR];
+ WCHAR fname[_MAX_FNAME];
if (_wsplitpath_s( m_szPath, drive, COUNTOF(drive), dir, COUNTOF(dir), fname, COUNTOF(fname), NULL, 0 ))
return E_FAIL;
if (_wmakepath_s( fullpath, COUNTOF(fullpath), drive, dir, fname, W("pdb") ))
#include "../../vm/gdbjithelpers.h"
#endif // FEATURE_GDBJIT
-typedef int (STDMETHODCALLTYPE *HostMain)(
- const int argc,
- const wchar_t** argv
- );
-
#define ASSERTE_ALL_BUILDS(expr) _ASSERTE_ALL_BUILDS(__FILE__, (expr))
// Holder for const wide strings
memcpy(dbuff,begNum,L);
dbuff[L] = 0;
dbuff[L+1] = 0;
- *ppRes = new double(wcstod((const wchar_t*)dbuff, (wchar_t**)&pdummy));
+ *ppRes = new double(wcstod((const WCHAR*)dbuff, (WCHAR**)&pdummy));
return ((unsigned)(pdummy - dbuff));
}
/*--------------------------------------------------------------------------*/
// Validator module type.
DWORD g_ValModuleType = ValidatorModuleTypeInvalid;
IMetaDataDispenserEx *g_pDisp = NULL;
-void DisplayFile(__in __nullterminated wchar_t* szFile,
+void DisplayFile(__in __nullterminated WCHAR* szFile,
BOOL isFile,
ULONG DumpFilter,
- __in_opt __nullterminated wchar_t* szObjFile,
+ __in_opt __nullterminated WCHAR* szObjFile,
strPassBackFn pDisplayString);
extern mdMethodDef g_tkEntryPoint; // integration with MetaInfo
memset(pwzObjFileName,0,sizeof(WCHAR)*nLength);
WszMultiByteToWideChar(CP_UTF8,0,pszObjFileName,-1,pwzObjFileName,nLength);
}
- DisplayFile((wchar_t*)pwzFileName, true, g_ulMetaInfoFilter, pwzObjFileName, DumpMI);
+ DisplayFile((WCHAR*)pwzFileName, true, g_ulMetaInfoFilter, pwzObjFileName, DumpMI);
g_pDisp->Release();
g_pDisp = NULL;
if (pwzObjFileName) VDELETE(pwzObjFileName);
{ // determine whether _Ty is integral
};
- #ifdef _NATIVE_WCHAR_T_DEFINED
- template<>
- struct _Is_integral<wchar_t>
- : true_type
- { // determine whether _Ty is integral
- };
- #endif /* _NATIVE_WCHAR_T_DEFINED */
-
template<>
struct _Is_integral<unsigned short>
: true_type
#endif
- // Use to determine if a template type parameter is a string.
- template <typename T>
- struct is_cstr
- : public std::false_type
- {};
-
- template <typename T>
- struct is_cstr< T* >
- : public std::conditional<
- std::is_same<typename std::remove_cv<T>::type, char>::value ||
- std::is_same<typename std::remove_cv<T>::type, wchar_t>::value,
- std::true_type,
- std::false_type>::type
-
- { };
-
} // namespace std
#endif // !USE_STL
typedef char CHAR;
typedef signed char SCHAR;
typedef unsigned char UCHAR;
-typedef wchar_t WCHAR;
typedef CHAR ASCII;
typedef CHAR ANSI;
struct CORINFO_String : public CORINFO_Object
{
unsigned stringLen;
- wchar_t chars[1]; // actually of variable size
+ WCHAR chars[1]; // actually of variable size
};
struct CORINFO_Array : public CORINFO_Object
// Return an integer config value for the given key, if any exists.
virtual int getIntConfigValue(
- const wchar_t* name,
+ const WCHAR* name,
int defaultValue
) = 0;
// Return a string config value for the given key, if any exists.
- virtual const wchar_t* getStringConfigValue(
- const wchar_t* name
+ virtual const WCHAR* getStringConfigValue(
+ const WCHAR* name
) = 0;
// Free a string ConfigValue returned by the runtime.
// to return the string values to the runtime for deletion.
// This avoids leaking the memory in the JIT.
virtual void freeStringConfigValue(
- const wchar_t* value
+ const WCHAR* value
) = 0;
// Allocate memory slab of the given size in bytes. The host is expected to pool
]
interface ISymNGenWriter2 : ISymNGenWriter
{
- HRESULT OpenModW([in] const wchar_t* wszModule,
- [in] const wchar_t* wszObjFile,
+ HRESULT OpenModW([in] LPCWSTR wszModule,
+ [in] LPCWSTR wszObjFile,
[out] BYTE** ppmod);
HRESULT CloseMod([in] BYTE* pmod);
[in] DWORD dwRelocCrc);
HRESULT QueryPDBNameExW(
- [out, size_is(cchMax)] wchar_t wszPDB[],
+ [out, size_is(cchMax)] WCHAR wszPDB[],
[in] SIZE_T cchMax);
};
m_ModuleName = NULL;
size_t len = wcslen(modName);
- m_ModuleName = new wchar_t[len + 1];
- NewArrayHolder<wchar_t> moduleNameHolder(m_ModuleName);
- wcscpy_s((wchar_t *)m_ModuleName, len + 1, (wchar_t *)modName);
+ m_ModuleName = new WCHAR[len + 1];
+ NewArrayHolder<WCHAR> moduleNameHolder(m_ModuleName);
+ wcscpy_s((WCHAR *)m_ModuleName, len + 1, (WCHAR *)modName);
m_MetadataBase = baseAddress;
m_MetadataSize = mdSize;
return(*this);
}
- OutString& operator<<(const wchar_t* str) {
+ OutString& operator<<(const WCHAR* str) {
size_t len = wcslen(str);
if (cur+len > end)
Realloc(len);
//-----------------------------------------------------------------------------
// Widechar strings representing the above units. *** Keep in sync *** with the
// array defined in PerfLog.cpp
-extern const wchar_t * const wszUnitOfMeasureDescr[MAX_UNITS_OF_MEASURE];
+extern const WCHAR * const wszUnitOfMeasureDescr[MAX_UNITS_OF_MEASURE];
//-----------------------------------------------------------------------------
// Widechar strings representing the "direction" property of above units.
// a degrade.
// "Direction" property is true if an increase in the value of the counter indicates
// an improvement.
-extern const wchar_t * const wszIDirection[MAX_UNITS_OF_MEASURE];
+extern const WCHAR * const wszIDirection[MAX_UNITS_OF_MEASURE];
//-----------------------------------------------------------------------------
// Namespace for perf log. Don't create perf log objects (private ctor).
// Overloaded member functions to print different data types. Grow as needed.
// wszName is the name of thet perf counter, val is the perf counter value,
- static void Log(__in_z wchar_t const *wszName, UINT val, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr = 0);
- static void Log(__in_z wchar_t const *wszName, UINT64 val, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr = 0);
- static void Log(__in_z wchar_t const *wszName, double val, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr = 0);
+ static void Log(__in_z WCHAR const *wszName, UINT val, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr = 0);
+ static void Log(__in_z WCHAR const *wszName, UINT64 val, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr = 0);
+ static void Log(__in_z WCHAR const *wszName, double val, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr = 0);
private:
PerfLog();
~PerfLog();
// Helper routine to hide some details of the perf automation
- static void OutToPerfFile(__in_z const wchar_t *wszName, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr = 0);
+ static void OutToPerfFile(__in_z const WCHAR *wszName, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr = 0);
// Helper routine to hide some details of output to stdout
- static void OutToStdout(__in_z const wchar_t *wszName, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr = 0);
+ static void OutToStdout(__in_z const WCHAR *wszName, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr = 0);
// Perf log initialized ?
static bool m_perfLogInit;
static bool m_commaSeparatedFormat;
// Temp storage to convert wide char to multibyte for file IO.
- static wchar_t m_wszOutStr_1[PRINT_STR_LEN];
+ static WCHAR m_wszOutStr_1[PRINT_STR_LEN];
static DWORD m_dwWriteByte;
// State of the env var PERF_OUTPUT
protected:
union {
BYTE *m_buffer;
- wchar_t *m_asStr; // For debugging, view as a unicode string
+ WCHAR *m_asStr; // For debugging, view as a unicode string
};
#if _DEBUG
};
interface IXCLRDisassemblySupport;
-typedef SIZE_T (__stdcall *CDSTranslateAddrCB)(IXCLRDisassemblySupport *, CLRDATA_ADDRESS, wchar_t *, SIZE_T, DWORDLONG *);
-typedef SIZE_T (__stdcall *CDSTranslateFixupCB)(IXCLRDisassemblySupport *, CLRDATA_ADDRESS, SIZE_T, wchar_t *, SIZE_T, DWORDLONG *);
-typedef SIZE_T (__stdcall *CDSTranslateConstCB)(IXCLRDisassemblySupport *, DWORD, wchar_t *, SIZE_T);
-typedef SIZE_T (__stdcall *CDSTranslateRegrelCB)(IXCLRDisassemblySupport *, unsigned rega, CLRDATA_ADDRESS, wchar_t *, SIZE_T, DWORD *);
+typedef SIZE_T (__stdcall *CDSTranslateAddrCB)(IXCLRDisassemblySupport *, CLRDATA_ADDRESS, WCHAR *, SIZE_T, DWORDLONG *);
+typedef SIZE_T (__stdcall *CDSTranslateFixupCB)(IXCLRDisassemblySupport *, CLRDATA_ADDRESS, SIZE_T, WCHAR *, SIZE_T, DWORDLONG *);
+typedef SIZE_T (__stdcall *CDSTranslateConstCB)(IXCLRDisassemblySupport *, DWORD, WCHAR *, SIZE_T);
+typedef SIZE_T (__stdcall *CDSTranslateRegrelCB)(IXCLRDisassemblySupport *, unsigned rega, CLRDATA_ADDRESS, WCHAR *, SIZE_T, DWORD *);
[
object,
SIZE_T CbDisassemble(CLRDATA_ADDRESS, const void *, SIZE_T);
SIZE_T Cinstruction();
BOOL FSelectInstruction(SIZE_T);
- SIZE_T CchFormatInstr(wchar_t *, SIZE_T);
+ SIZE_T CchFormatInstr(WCHAR *, SIZE_T);
void *PvClient();
HRESULT SetTranslateFixupCallback([in]CDSTranslateFixupCB cb);
HRESULT SetTranslateConstCallback([in]CDSTranslateConstCB cb);
* the native newly jitted code.
*/
HRESULT OnCodeGenerated2([in] IXCLRDataMethodInstance* method, [in] CLRDATA_ADDRESS nativeCodeLocation);
-}
\ No newline at end of file
+}
// First, initialize the AltJitExcludeAssemblies list, but only do it once.
if (!s_pAltJitExcludeAssembliesListInitialized)
{
- const wchar_t* wszAltJitExcludeAssemblyList = JitConfig.AltJitExcludeAssemblies();
+ const WCHAR* wszAltJitExcludeAssemblyList = JitConfig.AltJitExcludeAssemblies();
if (wszAltJitExcludeAssemblyList != nullptr)
{
// NOTE: The Assembly name list is allocated in the process heap, not in the no-release heap, which is
// Setup assembly name list for disassembly, if not already set up.
if (!s_pJitDisasmIncludeAssembliesListInitialized)
{
- const wchar_t* assemblyNameList = JitConfig.JitDisasmAssemblies();
+ const WCHAR* assemblyNameList = JitConfig.JitDisasmAssemblies();
if (assemblyNameList != nullptr)
{
s_pJitDisasmIncludeAssembliesList = new (HostAllocator::getHostAllocator())
// Read function list, if not already read, and there exists such a list.
if (!s_pJitFunctionFileInitialized)
{
- const wchar_t* functionFileName = JitConfig.JitFunctionFile();
+ const WCHAR* functionFileName = JitConfig.JitFunctionFile();
if (functionFileName != nullptr)
{
s_pJitMethodSet =
#endif // PROFILING_SUPPORTED
#if FEATURE_TAILCALL_OPT
- const wchar_t* strTailCallOpt = JitConfig.TailCallOpt();
+ const WCHAR* strTailCallOpt = JitConfig.TailCallOpt();
if (strTailCallOpt != nullptr)
{
opts.compTailCallOpt = (UINT)_wtoi(strTailCallOpt) != 0;
return false;
}
- bool doStress = false;
- const wchar_t* strStressModeNames;
+ bool doStress = false;
+ const WCHAR* strStressModeNames;
// Does user explicitly prevent using this STRESS_MODE through the command line?
- const wchar_t* strStressModeNamesNot = JitConfig.JitStressModeNamesNot();
+ const WCHAR* strStressModeNamesNot = JitConfig.JitStressModeNamesNot();
if ((strStressModeNamesNot != nullptr) &&
(wcsstr(strStressModeNamesNot, s_compStressModeNames[stressArea]) != nullptr))
{
const char* className;
const char* fieldName;
const char* methodName;
- const wchar_t* str;
+ const WCHAR* str;
switch (tree->GetIconHandleFlag())
{
const char* eeGetFieldName(CORINFO_FIELD_HANDLE fieldHnd, const char** classNamePtr = nullptr);
#if defined(DEBUG)
- const wchar_t* eeGetCPString(size_t stringHandle);
+ const WCHAR* eeGetCPString(size_t stringHandle);
#endif
const char* eeGetClassName(CORINFO_CLASS_HANDLE clsHnd);
JitConfig.initialize(jitHost);
#ifdef DEBUG
- const wchar_t* jitStdOutFile = JitConfig.JitStdOutFile();
+ const WCHAR* jitStdOutFile = JitConfig.JitStdOutFile();
if (jitStdOutFile != nullptr)
{
jitstdout = _wfopen(jitStdOutFile, W("a"));
#ifdef DEBUG
-const wchar_t* Compiler::eeGetCPString(size_t strHandle)
+const WCHAR* Compiler::eeGetCPString(size_t strHandle)
{
#ifdef FEATURE_PAL
return nullptr;
// pretty print string if it looks like one
if ((id->idGCref() == GCT_GCREF) && (id->idIns() == INS_mov) && (id->idAddr()->iiaAddrMode.amBaseReg == REG_NA))
{
- const wchar_t* str = emitComp->eeGetCPString(disp);
+ const WCHAR* str = emitComp->eeGetCPString(disp);
if (str != nullptr)
{
printf(" '%S'", str);
case GT_CNS_INT:
if (tree->IsIconHandle(GTF_ICON_STR_HDL))
{
- const wchar_t* str = eeGetCPString(tree->gtIntCon.gtIconVal);
+ const WCHAR* str = eeGetCPString(tree->gtIntCon.gtIconVal);
if (str != nullptr)
{
printf(" 0x%X \"%S\"", dspPtr(tree->gtIntCon.gtIconVal), str);
#if defined(DEBUG) || defined(INLINE_DATA)
static ConfigMethodRange range;
- const wchar_t* noInlineRange = JitConfig.JitNoInlineRange();
+ const WCHAR* noInlineRange = JitConfig.JitNoInlineRange();
if (noInlineRange == nullptr)
{
// number of spaces in our config string to see if there are
// more. Number of ranges we need is 2x that value.
unsigned entryCount = 1;
- for (const wchar_t* p = noInlineRange; *p != 0; p++)
+ for (const WCHAR* p = noInlineRange; *p != 0; p++)
{
if (*p == L' ')
{
if (!s_WroteReplayBanner)
{
// Nope, open it up.
- const wchar_t* replayFileName = JitConfig.JitInlineReplayFile();
- s_ReplayFile = _wfopen(replayFileName, W("r"));
+ const WCHAR* replayFileName = JitConfig.JitInlineReplayFile();
+ s_ReplayFile = _wfopen(replayFileName, W("r"));
// Display banner to stderr, unless we're dumping inline Xml,
// in which case the policy name is captured in the Xml.
JitConfigValues JitConfig;
-void JitConfigValues::MethodSet::initialize(const wchar_t* list, ICorJitHost* host)
+void JitConfigValues::MethodSet::initialize(const WCHAR* list, ICorJitHost* host)
{
assert(m_list == nullptr);
assert(m_names == nullptr);
#define CONFIG_INTEGER(name, key, defaultValue) m_##name = host->getIntConfigValue(key, defaultValue);
#define CONFIG_STRING(name, key) m_##name = host->getStringConfigValue(key);
#define CONFIG_METHODSET(name, key) \
- const wchar_t* name##value = host->getStringConfigValue(key); \
+ const WCHAR* name##value = host->getStringConfigValue(key); \
m_##name.initialize(name##value, host); \
host->freeStringConfigValue(name##value);
return const_cast<const char*>(m_list);
}
- void initialize(const wchar_t* list, ICorJitHost* host);
+ void initialize(const WCHAR* list, ICorJitHost* host);
void destroy(ICorJitHost* host);
inline bool isEmpty() const
private:
#define CONFIG_INTEGER(name, key, defaultValue) int m_##name;
-#define CONFIG_STRING(name, key) const wchar_t* m_##name;
-#define CONFIG_METHODSET(name, key) MethodSet m_##name;
+#define CONFIG_STRING(name, key) const WCHAR* m_##name;
+#define CONFIG_METHODSET(name, key) MethodSet m_##name;
#include "jitconfigvalues.h"
public:
return m_##name; \
}
#define CONFIG_STRING(name, key) \
- inline const wchar_t* name() const \
+ inline const WCHAR* name() const \
{ \
return m_##name; \
}
// because of bad characters or too many entries, or had values
// that were too large to represent.
-void ConfigMethodRange::InitRanges(const wchar_t* rangeStr, unsigned capacity)
+void ConfigMethodRange::InitRanges(const WCHAR* rangeStr, unsigned capacity)
{
// Make sure that the memory was zero initialized
assert(m_inited == 0 || m_inited == 1);
m_ranges = (Range*)jitHost->allocateMemory(capacity * sizeof(Range));
m_entries = capacity;
- const wchar_t* p = rangeStr;
- unsigned lastRange = 0;
- bool setHighPart = false;
+ const WCHAR* p = rangeStr;
+ unsigned lastRange = 0;
+ bool setHighPart = false;
while ((*p != 0) && (lastRange < m_entries))
{
//
// You must use ';' as a separator; whitespace no longer works
-AssemblyNamesList2::AssemblyNamesList2(const wchar_t* list, HostAllocator alloc) : m_alloc(alloc)
+AssemblyNamesList2::AssemblyNamesList2(const WCHAR* list, HostAllocator alloc) : m_alloc(alloc)
{
WCHAR prevChar = '?'; // dummy
LPWSTR nameStart = nullptr; // start of the name currently being processed. nullptr if no current name
// MethodSet
//=============================================================================
-MethodSet::MethodSet(const wchar_t* filename, HostAllocator alloc) : m_pInfos(nullptr), m_alloc(alloc)
+MethodSet::MethodSet(const WCHAR* filename, HostAllocator alloc) : m_pInfos(nullptr), m_alloc(alloc)
{
FILE* methodSetFile = _wfopen(filename, W("r"));
if (methodSetFile == nullptr)
bool Contains(class ICorJitInfo* info, CORINFO_METHOD_HANDLE method);
// Ensure the range string has been parsed.
- void EnsureInit(const wchar_t* rangeStr, unsigned capacity = DEFAULT_CAPACITY)
+ void EnsureInit(const WCHAR* rangeStr, unsigned capacity = DEFAULT_CAPACITY)
{
// Make sure that the memory was zero initialized
assert(m_inited == 0 || m_inited == 1);
unsigned m_high;
};
- void InitRanges(const wchar_t* rangeStr, unsigned capacity);
+ void InitRanges(const WCHAR* rangeStr, unsigned capacity);
unsigned m_entries; // number of entries in the range array
unsigned m_lastRange; // count of low-high pairs
public:
// Take a Unicode string list of assembly names, parse it, and store it.
- AssemblyNamesList2(const wchar_t* list, HostAllocator alloc);
+ AssemblyNamesList2(const WCHAR* list, HostAllocator alloc);
~AssemblyNamesList2();
public:
// Take a Unicode string with the filename containing a list of function names, parse it, and store it.
- MethodSet(const wchar_t* filename, HostAllocator alloc);
+ MethodSet(const WCHAR* filename, HostAllocator alloc);
~MethodSet();
entry->m_next = NULL;
entry->m_hashId = hashId;
entry->m_offset = dataLen();
- size_t len = (wcslen(target)+1) * sizeof(wchar_t);
+ size_t len = (wcslen(target)+1) * sizeof(WCHAR);
if (len > ULONG_MAX) {
delete entry;
return NULL;
#define QUOTE_MACRO_u_HELPER(x) u###x
#define QUOTE_MACRO_u(x) QUOTE_MACRO_u_HELPER(x)
-#include <pal_char16.h>
#include <pal_error.h>
#include <pal_mstypes.h>
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*++
-
-
-
-Module Name:
-
- pal_char16.h
-
-Abstract:
-
-This file is used to define the wchar_t type as a 16-bit type on Unix.
-
-
-
---*/
-
-// The unix compilers use a 32-bit wchar_t, so we must make a 16 bit wchar_t.
-// The windows compilers, gcc and MSVC, both define a 16 bit wchar_t.
-
-// Note : wchar_t is a built-in type in C++, gcc/llvm ignores any attempts to
-// typedef it. Using the preprocessor here, we make sure gcc sees
-// __wchar_16_cpp__ instead of wchar_t. This is apparently not necessary under
-// vc++, for whom wchar_t is already a typedef instead of a built-in.
-
-#ifndef PAL_STDCPP_COMPAT
-#undef wchar_t
-#undef __WCHAR_TYPE__
-#define __WCHAR_TYPE__ __wchar_16_cpp__
-#define wchar_t __wchar_16_cpp__
-
-// Set up the wchar_t type (which got preprocessed to __wchar_16_cpp__).
-// In C++11, the standard gives us char16_t, which is what we want (and matches types with u"")
-// In C, this doesn't exist, so use unsigned short.
-// **** WARNING: Linking C and C++ objects will break with -fstrict-aliasing with GCC/Clang
-// due to conditional typedef
-#if !defined(_WCHAR_T_DEFINED) || !defined(_MSC_VER)
-#if defined(__cplusplus)
-#undef __WCHAR_TYPE__
-#define __WCHAR_TYPE__ char16_t
-typedef char16_t wchar_t;
-#else
-#undef __WCHAR_TYPE__
-#define __WCHAR_TYPE__ unsigned short
-typedef unsigned short wchar_t;
-#endif // __cplusplus
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#endif // !_WCHAR_T_DEFINED
-#endif // !_WCHAR_T_DEFINED || !_MSC_VER
-#endif // !PAL_STDCPP_COMPAT
#define _PTRDIFF_T
#endif
-#ifdef PAL_STDCPP_COMPAT
-
typedef char16_t WCHAR;
-#else // PAL_STDCPP_COMPAT
+#ifndef PAL_STDCPP_COMPAT
-typedef wchar_t WCHAR;
#if defined(__linux__)
#ifdef BIT64
typedef long int intptr_t;
#endif
#endif
-/* WCHAR */
-#if defined (SAFECRT_INCLUDE_REDEFINES)
-#if !defined(_WCHAR_T_DEFINED)
-typedef unsigned short WCHAR;
-#define _WCHAR_T_DEFINED
-#endif
-#endif
-
/* _W64 */
#if !defined(_W64)
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
#endif
#endif
-/* size_t */
-#if defined (SAFECRT_INCLUDE_REDEFINES)
-#if !defined(_SIZE_T_DEFINED)
-#if defined(BIT64)
-typedef unsigned __int64 size_t;
-#else
-typedef _W64 unsigned int size_t;
-#endif
-#define _SIZE_T_DEFINED
-#endif
-#endif
-
/* uintptr_t */
#if !defined(_UINTPTR_T_DEFINED)
#if defined(BIT64)
#if (_SAFECRT_USE_INLINES || _SAFECRT_IMPL) && !defined(_SAFECRT_DO_NOT_DEFINE_INVALID_PARAMETER)
#ifndef STATUS_INVALID_PARAMETER
-#if defined (SAFECRT_INCLUDE_REDEFINES)
-typedef LONG NTSTATUS;
-#endif
#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000DL)
#endif
#define _SIZE_T_DEFINED
#endif // !_SIZE_T_DEFINED
-#if !defined(_WCHAR_T_DEFINED) && !defined(_NATIVE_WCHAR_T_DEFINED)
-#error Unexpected define.
-typedef char16_t WCHAR;
-#define _WCHAR_T_DEFINED
-#endif
-
#ifndef SUCCEEDED
#define SUCCEEDED(hr) ((HRESULT)(hr) >= 0)
#endif
{
public:
virtual HRESULT STDMETHODCALLTYPE OpenModW(
- /* [in] */ const wchar_t *wszModule,
- /* [in] */ const wchar_t *wszObjFile,
+ /* [in] */ LPCWSTR wszModule,
+ /* [in] */ LPCWSTR wszObjFile,
/* [out] */ BYTE **ppmod) = 0;
virtual HRESULT STDMETHODCALLTYPE CloseMod(
/* [in] */ DWORD dwRelocCrc) = 0;
virtual HRESULT STDMETHODCALLTYPE QueryPDBNameExW(
- /* [size_is][out] */ wchar_t wszPDB[ ],
+ /* [size_is][out] */ WCHAR wszPDB[ ],
/* [in] */ SIZE_T cchMax) = 0;
};
HRESULT ( STDMETHODCALLTYPE *OpenModW )(
ISymNGenWriter2 * This,
- /* [in] */ const wchar_t *wszModule,
- /* [in] */ const wchar_t *wszObjFile,
+ /* [in] */ const WCHAR *wszModule,
+ /* [in] */ const WCHAR *wszObjFile,
/* [out] */ BYTE **ppmod);
HRESULT ( STDMETHODCALLTYPE *CloseMod )(
HRESULT ( STDMETHODCALLTYPE *QueryPDBNameExW )(
ISymNGenWriter2 * This,
- /* [size_is][out] */ wchar_t wszPDB[ ],
+ /* [size_is][out] */ WCHAR wszPDB[ ],
/* [in] */ SIZE_T cchMax);
END_INTERFACE
typedef SIZE_T ( __stdcall *CDSTranslateAddrCB )(
IXCLRDisassemblySupport *__MIDL____MIDL_itf_xclrdata_0000_00020000,
CLRDATA_ADDRESS __MIDL____MIDL_itf_xclrdata_0000_00020001,
- wchar_t *__MIDL____MIDL_itf_xclrdata_0000_00020002,
+ WCHAR *__MIDL____MIDL_itf_xclrdata_0000_00020002,
SIZE_T __MIDL____MIDL_itf_xclrdata_0000_00020003,
DWORDLONG *__MIDL____MIDL_itf_xclrdata_0000_00020004);
IXCLRDisassemblySupport *__MIDL____MIDL_itf_xclrdata_0000_00020006,
CLRDATA_ADDRESS __MIDL____MIDL_itf_xclrdata_0000_00020007,
SIZE_T __MIDL____MIDL_itf_xclrdata_0000_00020008,
- wchar_t *__MIDL____MIDL_itf_xclrdata_0000_00020009,
+ WCHAR *__MIDL____MIDL_itf_xclrdata_0000_00020009,
SIZE_T __MIDL____MIDL_itf_xclrdata_0000_00020010,
DWORDLONG *__MIDL____MIDL_itf_xclrdata_0000_00020011);
typedef SIZE_T ( __stdcall *CDSTranslateConstCB )(
IXCLRDisassemblySupport *__MIDL____MIDL_itf_xclrdata_0000_00020013,
DWORD __MIDL____MIDL_itf_xclrdata_0000_00020014,
- wchar_t *__MIDL____MIDL_itf_xclrdata_0000_00020015,
+ WCHAR *__MIDL____MIDL_itf_xclrdata_0000_00020015,
SIZE_T __MIDL____MIDL_itf_xclrdata_0000_00020016);
typedef SIZE_T ( __stdcall *CDSTranslateRegrelCB )(
IXCLRDisassemblySupport *__MIDL____MIDL_itf_xclrdata_0000_00020018,
unsigned int rega,
CLRDATA_ADDRESS __MIDL____MIDL_itf_xclrdata_0000_00020019,
- wchar_t *__MIDL____MIDL_itf_xclrdata_0000_00020020,
+ WCHAR *__MIDL____MIDL_itf_xclrdata_0000_00020020,
SIZE_T __MIDL____MIDL_itf_xclrdata_0000_00020021,
DWORD *__MIDL____MIDL_itf_xclrdata_0000_00020022);
SIZE_T __MIDL__IXCLRDisassemblySupport0003) = 0;
virtual SIZE_T STDMETHODCALLTYPE CchFormatInstr(
- wchar_t *__MIDL__IXCLRDisassemblySupport0004,
+ WCHAR *__MIDL__IXCLRDisassemblySupport0004,
SIZE_T __MIDL__IXCLRDisassemblySupport0005) = 0;
virtual void *STDMETHODCALLTYPE PvClient( void) = 0;
SIZE_T ( STDMETHODCALLTYPE *CchFormatInstr )(
IXCLRDisassemblySupport * This,
- wchar_t *__MIDL__IXCLRDisassemblySupport0004,
+ WCHAR *__MIDL__IXCLRDisassemblySupport0004,
SIZE_T __MIDL__IXCLRDisassemblySupport0005);
void *( STDMETHODCALLTYPE *PvClient )(
goto FAILED;
}
- if (snprintf (exe_buf, sizeof (CHAR) * (dwexe_buf + 1), EXE_TEXT "%ls", (wchar_t *)exe_module.lib_name) <= 0)
+ if (snprintf (exe_buf, sizeof (CHAR) * (dwexe_buf + 1), EXE_TEXT "%ls", (wchar_t*)exe_module.lib_name) <= 0)
{
goto FAILED;
}
#undef va_copy
#endif
-
-#ifdef _VAC_
-#define wchar_16 wchar_t
-#else
-#define wchar_t wchar_16
-#endif // _VAC_
-
#define ptrdiff_t PAL_ptrdiff_t
#define intptr_t PAL_intptr_t
#define uintptr_t PAL_uintptr_t
#undef open
#undef glob
-#undef wchar_t
#undef ptrdiff_t
#undef intptr_t
#undef uintptr_t
#undef siglongjmp
#undef _SIZE_T_DEFINED
-#undef _WCHAR_T_DEFINED
#define _DONT_USE_CTYPE_INLINE_
#if HAVE_RUNETYPE_H
Returns the LPWSTR string, or NULL on failure.
*/
-static LPWSTR FMTMSG_ProcessPrintf( wchar_t c ,
+static LPWSTR FMTMSG_ProcessPrintf( WCHAR c ,
LPWSTR lpPrintfString,
LPWSTR lpInsertString)
{
#ifndef _UNICODE
- wchar_t wctemp=L'\0';
+ char16_t wctemp=L'\0';
#endif /* _UNICODE */
_TUCHAR *scanptr; /* for building "table" data */
int ch = 0;
#if _INTEGRAL_MAX_BITS >= 64
int integer64; /* 1 for 64-bit integer, 0 otherwise */
#endif /* _INTEGRAL_MAX_BITS >= 64 */
- signed char widechar; /* -1 = char, 0 = ????, 1 = wchar_t */
+ signed char widechar; /* -1 = char, 0 = ????, 1 = char16_t */
char reject; /* %[^ABC] instead of %[ABC] */
char negative; /* flag for '-' detected */
char suppress; /* don't assign anything */
if(array_width < 1) {
if (widechar > 0)
- *(wchar_t UNALIGNED *)pointer = L'\0';
+ *(char16_t UNALIGNED *)pointer = L'\0';
else
*(char *)pointer = '\0';
}
#endif /* 0 */
_MBTOWC(&wctemp, temp, MB_CUR_MAX);
- *(wchar_t UNALIGNED *)pointer = wctemp;
+ *(char16_t UNALIGNED *)pointer = wctemp;
/* just copy W('?') if mbtowc fails, errno is set by mbtowc */
- pointer = (wchar_t *)pointer + 1;
+ pointer = (char16_t *)pointer + 1;
#ifdef _SECURE_SCANF
--array_width;
#endif /* _SECURE_SCANF */
} else
#else /* _UNICODE */
if (fl_wchar_arg) {
- *(wchar_t UNALIGNED *)pointer = ch;
- pointer = (wchar_t *)pointer + 1;
+ *(char16_t UNALIGNED *)pointer = ch;
+ pointer = (char16_t *)pointer + 1;
#ifdef _SECURE_SCANF
--array_width;
#endif /* _SECURE_SCANF */
/* In case of error, blank out the input buffer */
if (fl_wchar_arg)
{
- _RESET_STRING(((wchar_t UNALIGNED *)start), original_array_width);
+ _RESET_STRING(((char16_t UNALIGNED *)start), original_array_width);
}
else
{
{
if (fl_wchar_arg)
{
- *(wchar_t UNALIGNED *)pointer = L'\0';
+ *(char16_t UNALIGNED *)pointer = L'\0';
#ifdef _SECURE_SCANF
- _FILL_STRING(((wchar_t UNALIGNED *)start), original_array_width,
- ((wchar_t UNALIGNED *)pointer - (wchar_t UNALIGNED *)start + 1))
+ _FILL_STRING(((char16_t UNALIGNED *)start), original_array_width,
+ ((char16_t UNALIGNED *)pointer - (char16_t UNALIGNED *)start + 1))
#endif /* _SECURE_SCANF */
}
else
FILE * __cdecl _getstream(void);
FILE * __cdecl _openfile(__in_z const char * _Filename, __in_z const char * _Mode, __in int _ShFlag, __out FILE * _File);
-FILE * __cdecl _wopenfile(__in_z const wchar_t * _Filename, __in_z const wchar_t * _Mode, __in int _ShFlag, __out FILE * _File);
+FILE * __cdecl _wopenfile(__in_z const char16_t * _Filename, __in_z const char16_t * _Mode, __in int _ShFlag, __out FILE * _File);
void __cdecl _getbuf(__out FILE * _File);
int __cdecl _filwbuf (__inout FILE * _File);
int __cdecl _flswbuf(__in int _Ch, __inout FILE * _File);
#ifdef _SAFECRT_IMPL
int __cdecl _output(__inout FILE * _File, __in_z __format_string const char *_Format, va_list _ArgList);
-int __cdecl _woutput(__inout FILE * _File, __in_z __format_string const wchar_t *_Format, va_list _ArgList);
+int __cdecl _woutput(__inout FILE * _File, __in_z __format_string const char16_t *_Format, va_list _ArgList);
int __cdecl _output_s(__inout FILE * _File, __in_z __format_string const char *_Format, va_list _ArgList);
int __cdecl _output_p(__inout FILE * _File, __in_z __format_string const char *_Format, va_list _ArgList);
-int __cdecl _woutput_s(__inout FILE * _File, __in_z __format_string const wchar_t *_Format, va_list _ArgList);
-int __cdecl _woutput_p(__inout FILE * _File, __in_z __format_string const wchar_t *_Format, va_list _ArgList);
+int __cdecl _woutput_s(__inout FILE * _File, __in_z __format_string const char16_t *_Format, va_list _ArgList);
+int __cdecl _woutput_p(__inout FILE * _File, __in_z __format_string const char16_t *_Format, va_list _ArgList);
typedef int (*OUTPUTFN)(FILE *, const char *, va_list);
-typedef int (*WOUTPUTFN)(FILE *, const wchar_t *, va_list);
+typedef int (*WOUTPUTFN)(FILE *, const char16_t *, va_list);
#else /* _SAFECRT_IMPL */
int __cdecl _output_l(__inout FILE * _File, __in_z __format_string const char *_Format, __in_opt _locale_t _Locale, va_list _ArgList);
-int __cdecl _woutput_l(__inout FILE * _File, __in_z __format_string const wchar_t *_Format, __in_opt _locale_t _Locale, va_list _ArgList);
+int __cdecl _woutput_l(__inout FILE * _File, __in_z __format_string const char16_t *_Format, __in_opt _locale_t _Locale, va_list _ArgList);
int __cdecl _output_s_l(__inout FILE * _File, __in_z __format_string const char *_Format, __in_opt _locale_t _Locale, va_list _ArgList);
int __cdecl _output_p_l(__inout FILE * _File, __in_z __format_string const char *_Format, __in_opt _locale_t _Locale, va_list _ArgList);
-int __cdecl _woutput_s_l(__inout FILE * _File, __in_z __format_string const wchar_t *_Format, __in_opt _locale_t _Locale, va_list _ArgList);
-int __cdecl _woutput_p_l(__inout FILE * _File, __in_z __format_string const wchar_t *_Format, __in_opt _locale_t _Locale, va_list _ArgList);
+int __cdecl _woutput_s_l(__inout FILE * _File, __in_z __format_string const char16_t *_Format, __in_opt _locale_t _Locale, va_list _ArgList);
+int __cdecl _woutput_p_l(__inout FILE * _File, __in_z __format_string const char16_t *_Format, __in_opt _locale_t _Locale, va_list _ArgList);
typedef int (*OUTPUTFN)(__inout FILE * _File, const char *, _locale_t, va_list);
-typedef int (*WOUTPUTFN)(__inout FILE * _File, const wchar_t *, _locale_t, va_list);
+typedef int (*WOUTPUTFN)(__inout FILE * _File, const char16_t *, _locale_t, va_list);
#endif /* _SAFECRT_IMPL */
#ifdef _SAFECRT_IMPL
int __cdecl _input(__in FILE * _File, __in_z __format_string const unsigned char * _Format, va_list _ArgList);
-int __cdecl _winput(__in FILE * _File, __in_z __format_string const wchar_t * _Format, va_list _ArgList);
+int __cdecl _winput(__in FILE * _File, __in_z __format_string const char16_t * _Format, va_list _ArgList);
int __cdecl _input_s(__in FILE * _File, __in_z __format_string const unsigned char * _Format, va_list _ArgList);
-int __cdecl _winput_s(__in FILE * _File, __in_z __format_string const wchar_t * _Format, va_list _ArgList);
+int __cdecl _winput_s(__in FILE * _File, __in_z __format_string const char16_t * _Format, va_list _ArgList);
typedef int (*INPUTFN)(FILE *, const unsigned char *, va_list);
-typedef int (*WINPUTFN)(FILE *, const wchar_t *, va_list);
+typedef int (*WINPUTFN)(FILE *, const char16_t *, va_list);
#else /* _SAFECRT_IMPL */
int __cdecl _input_l(__inout FILE * _File, __in_z __format_string const unsigned char *, __in_opt _locale_t _Locale, va_list _ArgList);
-int __cdecl _winput_l(__inout FILE * _File, __in_z __format_string const wchar_t *, __in_opt _locale_t _Locale, va_list _ArgList);
+int __cdecl _winput_l(__inout FILE * _File, __in_z __format_string const char16_t *, __in_opt _locale_t _Locale, va_list _ArgList);
int __cdecl _input_s_l(__inout FILE * _File, __in_z __format_string const unsigned char *, __in_opt _locale_t _Locale, va_list _ArgList);
-int __cdecl _winput_s_l(__inout FILE * _File, __in_z __format_string const wchar_t *, __in_opt _locale_t _Locale, va_list _ArgList);
+int __cdecl _winput_s_l(__inout FILE * _File, __in_z __format_string const char16_t *, __in_opt _locale_t _Locale, va_list _ArgList);
typedef int (*INPUTFN)(FILE *, const unsigned char *, _locale_t, va_list);
-typedef int (*WINPUTFN)(FILE *, const wchar_t *, _locale_t, va_list);
+typedef int (*WINPUTFN)(FILE *, const char16_t *, _locale_t, va_list);
#ifdef _UNICODE
#define TINPUTFN WINPUTFN
errno_t __cdecl _sopen_helper(__in_z const char * _Filename,
__in int _OFlag, __in int _ShFlag, __in int _PMode,
__out int * _PFileHandle, int _BSecure);
-errno_t __cdecl _wsopen_helper(__in_z const wchar_t * _Filename,
+errno_t __cdecl _wsopen_helper(__in_z const char16_t * _Filename,
__in int _OFlag, __in int _ShFlag, __in int _PMode,
__out int * _PFileHandle, int _BSecure);
extern int _C_Termination_Done; /* termination done flag */
char * __cdecl _getpath(__in_z const char * _Src, __out_ecount_z(_SizeInChars) char * _Dst, __in size_t _SizeInChars);
-wchar_t * __cdecl _wgetpath(__in_z const wchar_t * _Src, __out_ecount_z(_SizeInWords) wchar_t * _Dst, __in size_t _SizeInWords);
+char16_t * __cdecl _wgetpath(__in_z const char16_t * _Src, __out_ecount_z(_SizeInWords) char16_t * _Dst, __in size_t _SizeInWords);
extern int _dowildcard; /* flag to enable argv[] wildcard expansion */
/* pointer to initial environment block that is passed to [w]main */
#ifndef _M_CEE_PURE
-extern _CRTIMP wchar_t **__winitenv;
+extern _CRTIMP char16_t **__winitenv;
extern _CRTIMP char **__initenv;
#endif /* _M_CEE_PURE */
/* startup set values */
extern char *_aenvptr; /* environment ptr */
-extern wchar_t *_wenvptr; /* wide environment ptr */
+extern char16_t *_wenvptr; /* wide environment ptr */
/* command line */
#if defined (_DLL)
_CRTIMP char ** __cdecl __p__acmdln(void);
-_CRTIMP wchar_t ** __cdecl __p__wcmdln(void);
+_CRTIMP char16_t ** __cdecl __p__wcmdln(void);
#endif /* defined (_DLL) */
#ifndef _M_CEE_PURE
_CRTIMP extern char *_acmdln;
-_CRTIMP extern wchar_t *_wcmdln;
+_CRTIMP extern char16_t *_wcmdln;
#else /* _M_CEE_PURE */
#define _acmdln (*__p__acmdln())
#define _wcmdln (*__p__wcmdln())
#ifndef _MANAGED_MAIN
int __CRTDECL main(__in int _Argc, __in_ecount_z(_Argc) char ** _Argv, __in_z char ** _Env);
-int __CRTDECL wmain(__in int _Argc, __in_ecount_z(_Argc) wchar_t ** _Argv, __in_z wchar_t ** _Env);
+int __CRTDECL wmain(__in int _Argc, __in_ecount_z(_Argc) char16_t ** _Argv, __in_z char16_t ** _Env);
#endif /* _MANAGED_MAIN */
/* helper functions for wide/multibyte environment conversion */
/* These two functions take a char ** for the environment option
At some point during their execution, they take ownership of the
memory block passed in using option. At this point, they
- NULL out the incoming char * / wchar_t * to ensure there is no
+ NULL out the incoming char * / char16_t * to ensure there is no
double-free
*/
int __cdecl __crtsetenv (__deref_inout_opt char ** _POption, __in const int _Primary);
-int __cdecl __crtwsetenv (__deref_inout_opt wchar_t ** _POption, __in const int _Primary);
+int __cdecl __crtwsetenv (__deref_inout_opt char16_t ** _POption, __in const int _Primary);
#ifndef _M_CEE_PURE
_CRTIMP extern void (__cdecl * _aexit_rtn)(int);
__deref_out_opt char *** _Env, __in int _DoWildCard,
__in _startupinfo * _StartInfo);
-_CRTIMP int __cdecl __wgetmainargs(__out int * _Argc, __deref_out_ecount(*_Argc)wchar_t *** _Argv,
- __deref_out_opt wchar_t *** _Env, __in int _DoWildCard,
+_CRTIMP int __cdecl __wgetmainargs(__out int * _Argc, __deref_out_ecount(*_Argc)char16_t *** _Argv,
+ __deref_out_opt char16_t *** _Env, __in int _DoWildCard,
__in _startupinfo * _StartInfo);
#endif /* defined (_DLL) || defined (CRTDLL) */
*/
extern intptr_t __cdecl _dospawn(__in int _Mode, __in_z_opt const char * _Name, __inout_z char * _Cmd, __in_z_opt char * _Env);
-extern intptr_t __cdecl _wdospawn(__in int _Mode, __in_z_opt const wchar_t * _Name, __inout_z wchar_t * _Cmd, __in_z_opt wchar_t * _Env);
+extern intptr_t __cdecl _wdospawn(__in int _Mode, __in_z_opt const char16_t * _Name, __inout_z char16_t * _Cmd, __in_z_opt char16_t * _Env);
extern int __cdecl _cenvarg(__in_z const char * const * _Argv, __in_z_opt const char * const * _Env,
__deref_out_opt char ** _ArgBlk, __deref_out_opt char ** _EnvBlk, __in_z const char *_Name);
-extern int __cdecl _wcenvarg(__in_z const wchar_t * const * _Argv, __in_z_opt const wchar_t * const * _Env,
- __deref_out_opt wchar_t ** _ArgBlk, __deref_out_opt wchar_t ** _EnvBlk, __in_z const wchar_t * _Name);
+extern int __cdecl _wcenvarg(__in_z const char16_t * const * _Argv, __in_z_opt const char16_t * const * _Env,
+ __deref_out_opt char16_t ** _ArgBlk, __deref_out_opt char16_t ** _EnvBlk, __in_z const char16_t * _Name);
#ifndef _M_IX86
extern char ** _capture_argv(__in va_list *, __in_z const char * _FirstArg, __out_ecount_z(_MaxCount) char ** _Static_argv, __in size_t _MaxCount);
-extern wchar_t ** _wcapture_argv(__in va_list *, __in_z const wchar_t * _FirstArg, __out_ecount_z(_MaxCount) wchar_t ** _Static_argv, __in size_t _MaxCount);
+extern char16_t ** _wcapture_argv(__in va_list *, __in_z const char16_t * _FirstArg, __out_ecount_z(_MaxCount) char16_t ** _Static_argv, __in size_t _MaxCount);
#endif /* _M_IX86 */
/*
#ifndef _SAFECRT_IMPL
/* _invalid_parameter is already defined in safecrt.h and safecrt.lib */
-#if !defined (_NATIVE_WCHAR_T_DEFINED) && defined (_M_CEE_PURE)
+#if !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE)
extern "C++"
-#endif /* !defined (_NATIVE_WCHAR_T_DEFINED) && defined (_M_CEE_PURE) */
+#endif /* !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE) */
_CRTIMP
#endif /* _SAFECRT_IMPL */
-void __cdecl _invalid_parameter(__in_z_opt const wchar_t *, __in_z_opt const wchar_t *, __in_z_opt const wchar_t *, unsigned int, uintptr_t);
+void __cdecl _invalid_parameter(__in_z_opt const char16_t *, __in_z_opt const char16_t *, __in_z_opt const char16_t *, unsigned int, uintptr_t);
-#if !defined (_NATIVE_WCHAR_T_DEFINED) && defined (_M_CEE_PURE)
+#if !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE)
extern "C++"
-#endif /* !defined (_NATIVE_WCHAR_T_DEFINED) && defined (_M_CEE_PURE) */
+#endif /* !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE) */
_CRTIMP
-void __cdecl _invoke_watson(__in_z_opt const wchar_t *, __in_z_opt const wchar_t *, __in_z_opt const wchar_t *, unsigned int, uintptr_t);
+void __cdecl _invoke_watson(__in_z_opt const char16_t *, __in_z_opt const char16_t *, __in_z_opt const char16_t *, unsigned int, uintptr_t);
#ifndef _DEBUG
-#if !defined (_NATIVE_WCHAR_T_DEFINED) && defined (_M_CEE_PURE)
+#if !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE)
extern "C++"
-#endif /* !defined (_NATIVE_WCHAR_T_DEFINED) && defined (_M_CEE_PURE) */
+#endif /* !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE) */
_CRTIMP
void __cdecl _invalid_parameter_noinfo(void);
#endif /* _DEBUG */
__forceinline
void _invoke_watson_if_error(
errno_t _ExpressionError,
- const wchar_t *_Expression,
- const wchar_t *_Function,
- const wchar_t *_File,
+ const char16_t *_Expression,
+ const char16_t *_Function,
+ const char16_t *_File,
unsigned int _Line,
uintptr_t _Reserved
)
errno_t _ExpressionError,
errno_t _ErrorValue1,
errno_t _ErrorValue2,
- const wchar_t *_Expression,
- const wchar_t *_Function,
- const wchar_t *_File,
+ const char16_t *_Expression,
+ const char16_t *_Function,
+ const char16_t *_File,
unsigned int _Line,
uintptr_t _Reserved
)
}
/* internal helper function to access environment variable in read-only mode */
-const wchar_t * __cdecl _wgetenv_helper_nolock(const wchar_t *);
+const char16_t * __cdecl _wgetenv_helper_nolock(const char16_t *);
const char * __cdecl _getenv_helper_nolock(const char *);
/* internal helper routines used to query a PE image header. */
* _putwc_nolock - putwc for the miniFILE stream.
****/
-int _putwc_nolock( wchar_t inChar, miniFILE* inStream )
+int _putwc_nolock( char16_t inChar, miniFILE* inStream )
{
int returnValue = WEOF;
- inStream->_cnt -= sizeof( wchar_t );
+ inStream->_cnt -= sizeof( char16_t );
if ( ( inStream->_cnt ) >= 0 )
{
- *( ( wchar_t* )( inStream->_ptr ) ) = inChar;
- inStream->_ptr += sizeof( wchar_t );
+ *( ( char16_t* )( inStream->_ptr ) ) = inChar;
+ inStream->_ptr += sizeof( char16_t );
returnValue = ( int )inChar;
}
{
int returnValue = EOF;
- if ( ( inStream->_cnt ) >= ( int )( sizeof( wchar_t ) ) )
+ if ( ( inStream->_cnt ) >= ( int )( sizeof( char16_t ) ) )
{
- inStream->_cnt -= sizeof( wchar_t );
- returnValue = ( int )( *( ( wchar_t* )( inStream->_ptr ) ) );
- inStream->_ptr += sizeof( wchar_t );
+ inStream->_cnt -= sizeof( char16_t );
+ returnValue = ( int )( *( ( char16_t* )( inStream->_ptr ) ) );
+ inStream->_ptr += sizeof( char16_t );
}
return returnValue;
* _ungetwc_nolock - ungetwc for the miniFILE stream.
****/
-int _ungetwc_nolock( wchar_t inChar, miniFILE* inStream )
+int _ungetwc_nolock( char16_t inChar, miniFILE* inStream )
{
int returnValue = WEOF;
- if ( ( size_t )( ( inStream->_ptr ) - ( inStream->_base ) ) >= ( sizeof( wchar_t ) ) )
+ if ( ( size_t )( ( inStream->_ptr ) - ( inStream->_base ) ) >= ( sizeof( char16_t ) ) )
{
- inStream->_cnt += sizeof( wchar_t );
- inStream->_ptr -= sizeof( wchar_t );
+ inStream->_cnt += sizeof( char16_t );
+ inStream->_ptr -= sizeof( char16_t );
returnValue = ( unsigned short )inChar;
}
/***
-* _safecrt_wfassign - convert a wchar_t string into a float or double.
+* _safecrt_wfassign - convert a char16_t string into a float or double.
****/
-void _safecrt_wfassign(int flag, void* argument, wchar_t* number )
+void _safecrt_wfassign(int flag, void* argument, char16_t* number )
{
// We cannot use system functions for this - they
- // assume that wchar_t is four bytes, while we assume
+ // assume that char16_t is four bytes, while we assume
// two. So, we need to convert to a regular char string
// without using any system functions. To do this,
// we'll assume that the numbers are in the 0-9 range and
* _minimal_chartowchar - do a simple char to wchar conversion.
****/
-int _minimal_chartowchar( wchar_t* outWChar, const char* inChar )
+int _minimal_chartowchar( char16_t* outWChar, const char* inChar )
{
- *outWChar = ( wchar_t )( ( unsigned short )( ( unsigned char )( *inChar ) ) );
+ *outWChar = ( char16_t )( ( unsigned short )( ( unsigned char )( *inChar ) ) );
return 1;
}
#ifndef MBUSAFECRT_INTERNAL_H
#define MBUSAFECRT_INTERNAL_H
-#include "pal_char16.h"
#include "pal_mstypes.h"
#ifndef DLLEXPORT
#define _IOMYBUF 8
int _putc_nolock( char inChar, miniFILE* inStream );
-int _putwc_nolock( wchar_t inChar, miniFILE* inStream );
+int _putwc_nolock( char16_t inChar, miniFILE* inStream );
int _getc_nolock( miniFILE* inStream );
int _getwc_nolock( miniFILE* inStream );
int _ungetc_nolock( char inChar, miniFILE* inStream );
-int _ungetwc_nolock( wchar_t inChar, miniFILE* inStream );
+int _ungetwc_nolock( char16_t inChar, miniFILE* inStream );
errno_t _safecrt_cfltcvt(double *arg, char *buffer, size_t sizeInBytes, int type, int precision, int flags);
void _safecrt_fassign(int flag, void* argument, char * number );
-void _safecrt_wfassign(int flag, void* argument, wchar_t * number );
+void _safecrt_wfassign(int flag, void* argument, char16_t * number );
-int _minimal_chartowchar( wchar_t* outWChar, const char* inChar );
+int _minimal_chartowchar( char16_t* outWChar, const char* inChar );
int _output_s( miniFILE* outfile, const char* _Format, va_list _ArgList);
-int _woutput_s( miniFILE* outfile, const wchar_t* _Format, va_list _ArgList);
+int _woutput_s( miniFILE* outfile, const char16_t* _Format, va_list _ArgList);
int _output( miniFILE *outfile, const char* _Format, va_list _ArgList);
int __tinput_s( miniFILE* inFile, const unsigned char * inFormat, va_list inArgList );
-int __twinput_s( miniFILE* inFile, const wchar_t * inFormat, va_list inArgList );
+int __twinput_s( miniFILE* inFile, const char16_t * inFormat, va_list inArgList );
#endif /* MBUSAFECRT_INTERNAL_H */
/* static data (read only, since we are re-entrant) */
//#if defined (_UNICODE) || defined (CPRFLAG) || defined (FORMAT_VALIDATIONS)
//extern const char __nullstring[]; /* string to print on null ptr */
-//extern const wchar_t __wnullstring[]; /* string to print on null ptr */
+//extern const char16_t __wnullstring[]; /* string to print on null ptr */
//#else /* defined (_UNICODE) || defined (CPRFLAG) || defined (FORMAT_VALIDATIONS) */
static const char __nullstring[] = "(null)"; /* string to print on null ptr */
-static const wchar_t __wnullstring[] = {'(', 'n', 'u', 'l', 'l', ')', '\0'};/* string to print on null ptr */
+static const char16_t __wnullstring[] = {'(', 'n', 'u', 'l', 'l', ')', '\0'};/* string to print on null ptr */
//#endif /* defined (_UNICODE) || defined (CPRFLAG) || defined (FORMAT_VALIDATIONS) */
/* The state table. This table is actually two tables combined into one. */
int no_output=0; /* non-zero = prodcue no output for this specifier */
union {
const char *sz; /* pointer text to be printed, not zero terminated */
- const wchar_t *wz;
+ const char16_t *wz;
} text;
int textlen; /* length of the text in bytes/wchars to be printed.
union {
char sz[BUFFERSIZE];
#ifdef _UNICODE
- wchar_t wz[BUFFERSIZE];
+ char16_t wz[BUFFERSIZE];
#endif /* _UNICODE */
} buffer;
- wchar_t wchar; /* temp wchar_t */
+ char16_t wchar; /* temp char16_t */
int buffersize; /* size of text.sz (used only for the call to _cfltcvt) */
int bufferiswide=0; /* non-zero = buffer contains wide chars already */
}
else
{
- flags |= FL_LONG; /* 'l' => long int or wchar_t */
+ flags |= FL_LONG; /* 'l' => long int or char16_t */
}
break;
case _T('L'):
/* print a single character specified by int argument */
#ifdef _UNICODE
bufferiswide = 1;
- wchar = (wchar_t) get_int_arg(&argptr);
+ wchar = (char16_t) get_int_arg(&argptr);
if (flags & FL_SHORT) {
/* format multibyte character */
/* this is an extension of ANSI */
textlen = 1; /* print just a single character */
#else /* _UNICODE */
if (flags & (FL_LONG|FL_WIDECHAR)) {
- wchar = (wchar_t) get_int_arg(&argptr);
+ wchar = (char16_t) get_int_arg(&argptr);
textlen = snprintf(buffer.sz, BUFFERSIZE, "%lc", wchar);
if (textlen == 0)
{
/* format multibyte character */
/* this is an extension of ANSI */
unsigned short temp;
- wchar = (wchar_t)get_int_arg(&argptr);
+ wchar = (char16_t)get_int_arg(&argptr);
temp = (unsigned short)wchar;
{
buffer.sz[0] = (char) temp;
textlen = (int)strlen(text.sz);
} else {
if (flags & FL_WIDECHAR) {
- text.wz = (wchar_t *)pstr->Buffer;
- textlen = pstr->Length / (int)sizeof(wchar_t);
+ text.wz = (char16_t *)pstr->Buffer;
+ textlen = pstr->Length / (int)sizeof(char16_t);
bufferiswide = 1;
} else {
bufferiswide = 0;
int i;
const char *p; /* temps */
- const wchar_t *pwch;
+ const char16_t *pwch;
/* At this point it is tempting to use strlen(), but */
/* if a precision is specified, we're not allowed to */
pwch = text.wz;
while (i-- && *pwch)
++pwch;
- textlen = (int)(pwch - text.wz); /* in wchar_ts */
+ textlen = (int)(pwch - text.wz); /* in char16_ts */
/* textlen now contains length in wide chars */
}
#else /* _UNICODE */
/***
*void write_char(char ch, int *pnumwritten)
*ifdef _UNICODE
-*void write_char(wchar_t ch, FILE *f, int *pnumwritten)
+*void write_char(char16_t ch, FILE *f, int *pnumwritten)
*endif
*void write_char(char ch, FILE *f, int *pnumwritten)
*
/***
*void write_multi_char(char ch, int num, int *pnumwritten)
*ifdef _UNICODE
-*void write_multi_char(wchar_t ch, int num, FILE *f, int *pnumwritten)
+*void write_multi_char(char16_t ch, int num, FILE *f, int *pnumwritten)
*endif
*void write_multi_char(char ch, int num, FILE *f, int *pnumwritten)
*
*void write_string(const char *string, int len, int *pnumwritten)
*void write_string(const char *string, int len, FILE *f, int *pnumwritten)
*ifdef _UNICODE
-*void write_string(const wchar_t *string, int len, FILE *f, int *pnumwritten)
+*void write_string(const char16_t *string, int len, FILE *f, int *pnumwritten)
*endif
*
*Purpose:
/* static data (read only, since we are re-entrant) */
#if defined (_UNICODE) || defined (CPRFLAG) || defined (FORMAT_VALIDATIONS)
extern const char __nullstring[]; /* string to print on null ptr */
-extern const wchar_t __wnullstring[]; /* string to print on null ptr */
+extern const char16_t __wnullstring[]; /* string to print on null ptr */
#else /* defined (_UNICODE) || defined (CPRFLAG) || defined (FORMAT_VALIDATIONS) */
static const char __nullstring[] = "(null)"; /* string to print on null ptr */
-static const wchar_t __wnullstring[] = { '(', 'n', 'u', 'l', 'l', ')', '\0' };/* string to print on null ptr */
+static const char16_t __wnullstring[] = { '(', 'n', 'u', 'l', 'l', ')', '\0' };/* string to print on null ptr */
#endif /* defined (_UNICODE) || defined (CPRFLAG) || defined (FORMAT_VALIDATIONS) */
/* The state table. This table is actually two tables combined into one. */
LOCAL(void) write_char(_TCHAR ch, int *pnumwritten);
LOCAL(void) write_multi_char(_TCHAR ch, int num, int *pnumwritten);
LOCAL(void) write_string(const _TCHAR *string, int len, int *numwritten);
-LOCAL(void) write_wstring(const wchar_t *string, int len, int *numwritten);
+LOCAL(void) write_wstring(const char16_t *string, int len, int *numwritten);
#else /* CPRFLAG */
LOCAL(void) write_char(_TCHAR ch, miniFILE *f, int *pnumwritten);
LOCAL(void) write_multi_char(_TCHAR ch, int num, miniFILE *f, int *pnumwritten);
LOCAL(void) write_string(const _TCHAR *string, int len, miniFILE *f, int *numwritten);
-//LOCAL(void) write_wstring(const wchar_t *string, int len, miniFILE *f, int *numwritten);
+//LOCAL(void) write_wstring(const char16_t *string, int len, miniFILE *f, int *numwritten);
#endif /* CPRFLAG */
int no_output=0; /* non-zero = prodcue no output for this specifier */
union {
const char *sz; /* pointer text to be printed, not zero terminated */
- const wchar_t *wz;
+ const char16_t *wz;
} text;
int textlen; /* length of the text in bytes/wchars to be printed.
union {
char sz[BUFFERSIZE];
#ifdef _UNICODE
- wchar_t wz[BUFFERSIZE];
+ char16_t wz[BUFFERSIZE];
#endif /* _UNICODE */
} buffer;
- wchar_t wchar; /* temp wchar_t */
+ char16_t wchar; /* temp char16_t */
int buffersize; /* size of text.sz (used only for the call to _cfltcvt) */
int bufferiswide=0; /* non-zero = buffer contains wide chars already */
}
else
{
- flags |= FL_LONG; /* 'l' => long int or wchar_t */
+ flags |= FL_LONG; /* 'l' => long int or char16_t */
}
break;
/* print a single character specified by int argument */
#ifdef _UNICODE
bufferiswide = 1;
- wchar = (wchar_t) get_int_arg(&argptr);
+ wchar = (char16_t) get_int_arg(&argptr);
if (flags & FL_SHORT) {
/* format multibyte character */
/* this is an extension of ANSI */
textlen = 1; /* print just a single character */
#else /* _UNICODE */
if (flags & (FL_LONG|FL_WIDECHAR)) {
- wchar = (wchar_t) get_short_arg(&argptr);
+ wchar = (char16_t) get_short_arg(&argptr);
no_output = 1;
} else {
/* format multibyte character */
/* this is an extension of ANSI */
unsigned short temp;
- wchar = (wchar_t)get_int_arg(&argptr);
+ wchar = (char16_t)get_int_arg(&argptr);
temp = (unsigned short)wchar;
{
buffer.sz[0] = (char) temp;
textlen = (int)strlen(text.sz);
} else {
if (flags & FL_WIDECHAR) {
- text.wz = (wchar_t *)pstr->Buffer;
- textlen = pstr->Length / (int)sizeof(wchar_t);
+ text.wz = (char16_t *)pstr->Buffer;
+ textlen = pstr->Length / (int)sizeof(char16_t);
bufferiswide = 1;
} else {
bufferiswide = 0;
int i;
const char *p; /* temps */
- const wchar_t *pwch;
+ const char16_t *pwch;
/* At this point it is tempting to use strlen(), but */
/* if a precision is specified, we're not allowed to */
pwch = text.wz;
while (i-- && *pwch)
++pwch;
- textlen = (int)(pwch - text.wz); /* in wchar_ts */
+ textlen = (int)(pwch - text.wz); /* in char16_ts */
/* textlen now contains length in wide chars */
}
#else /* _UNICODE */
/***
*void write_char(char ch, int *pnumwritten)
*ifdef _UNICODE
-*void write_char(wchar_t ch, FILE *f, int *pnumwritten)
+*void write_char(char16_t ch, FILE *f, int *pnumwritten)
*endif
*void write_char(char ch, FILE *f, int *pnumwritten)
*
/***
*void write_multi_char(char ch, int num, int *pnumwritten)
*ifdef _UNICODE
-*void write_multi_char(wchar_t ch, int num, FILE *f, int *pnumwritten)
+*void write_multi_char(char16_t ch, int num, FILE *f, int *pnumwritten)
*endif
*void write_multi_char(char ch, int num, FILE *f, int *pnumwritten)
*
*void write_string(const char *string, int len, int *pnumwritten)
*void write_string(const char *string, int len, FILE *f, int *pnumwritten)
*ifdef _UNICODE
-*void write_string(const wchar_t *string, int len, FILE *f, int *pnumwritten)
+*void write_string(const char16_t *string, int len, FILE *f, int *pnumwritten)
*endif
-*void write_wstring(const wchar_t *string, int len, int *pnumwritten)
-*void write_wstring(const wchar_t *string, int len, FILE *f, int *pnumwritten)
+*void write_wstring(const char16_t *string, int len, int *pnumwritten)
+*void write_wstring(const char16_t *string, int len, FILE *f, int *pnumwritten)
*
*Purpose:
* Writes a string of the given length to the given file. If no error occurs,
#define _TCHAR CRT_TCHAR
#define TCHAR CRTTCHAR
-typedef wchar_t _TCHAR;
-typedef wchar_t TCHAR;
-typedef wchar_t _TUCHAR;
+typedef char16_t _TCHAR;
+typedef char16_t TCHAR;
+typedef char16_t _TUCHAR;
#define _T(x) x
#define _TEOF WEOF
#define _TCHAR CRT_TCHAR
#define TCHAR CRTTCHAR
-typedef wchar_t _TCHAR;
-typedef wchar_t TCHAR;
+typedef char16_t _TCHAR;
+typedef char16_t TCHAR;
#define _T(x) L##x
#include "output.inl"
#include "mbusafecrt_internal.h"
typedef int (*INPUTFN)(miniFILE *, const unsigned char*, va_list);
-typedef int (*WINPUTFN)(miniFILE *, const wchar_t*, va_list);
+typedef int (*WINPUTFN)(miniFILE *, const char16_t*, va_list);
extern size_t PAL_wcsnlen(const WCHAR* inString, size_t inMaxSize);
/***
static int __cdecl vwscan_fn (
WINPUTFN inputfn,
- const wchar_t *string,
- const wchar_t *format,
+ const char16_t *string,
+ const char16_t *format,
va_list arglist
)
{
infile->_flag = _IOREAD|_IOSTRG|_IOMYBUF;
infile->_ptr = infile->_base = (char *) string;
- if(count>(INT_MAX/sizeof(wchar_t)))
+ if(count>(INT_MAX/sizeof(char16_t)))
{
/* old-style functions allow any large value to mean unbounded */
infile->_cnt = INT_MAX;
}
else
{
- infile->_cnt = (int)count*sizeof(wchar_t);
+ infile->_cnt = (int)count*sizeof(char16_t);
}
retval = (inputfn(infile, format, arglist));
static int __cdecl vnwscan_fn (
WINPUTFN inputfn,
- const wchar_t *string,
+ const char16_t *string,
size_t count,
- const wchar_t *format,
+ const char16_t *format,
va_list arglist
)
{
count = length;
}
- if(count>(INT_MAX/sizeof(wchar_t)))
+ if(count>(INT_MAX/sizeof(char16_t)))
{
/* old-style functions allow any large value to mean unbounded */
infile->_cnt = INT_MAX;
}
else
{
- infile->_cnt = (int)count*sizeof(wchar_t);
+ infile->_cnt = (int)count*sizeof(char16_t);
}
retval = (inputfn(infile, format, arglist));
}
int __cdecl swscanf_s (
- const wchar_t *string,
- const wchar_t *format,
+ const char16_t *string,
+ const char16_t *format,
...
)
{
* allocated 'fake' iob, we must lock/unlock to prevent collisions.
*
*Entry:
-* wchar_t *string - pointer to place to put output
+* char16_t *string - pointer to place to put output
*ifdef _COUNT_
* size_t count - max number of wide characters to put in buffer
*endif
-* wchar_t *format - format string to control data format/number
+* char16_t *format - format string to control data format/number
* of arguments followed by list of arguments, number and type
* controlled by format string
*
*******************************************************************************/
DLLEXPORT int __cdecl swprintf_s (
- wchar_t *string,
+ char16_t *string,
size_t sizeInWords,
- const wchar_t *format,
+ const char16_t *format,
...
)
{
}
DLLEXPORT int __cdecl _snwprintf_s (
- wchar_t *string,
+ char16_t *string,
size_t sizeInWords,
size_t count,
- const wchar_t *format,
+ const char16_t *format,
...
)
{
#include "mbusafecrt_internal.h"
-typedef int (*WOUTPUTFN)(miniFILE *, const wchar_t *, va_list);
+typedef int (*WOUTPUTFN)(miniFILE *, const char16_t *, va_list);
-static int _vswprintf_helper( WOUTPUTFN outfn, wchar_t *string, size_t count, const wchar_t *format, va_list ap );
+static int _vswprintf_helper( WOUTPUTFN outfn, char16_t *string, size_t count, const char16_t *format, va_list ap );
/***
*int vswprintf_s(string, sizeInWords, format, ap) - print formatted data to string from arg ptr
* lock/unlock to prevent collisions.
*
*Entry:
-* wchar_t *string - place to put destination string
-* size_t sizeInWords - size of the string buffer in wchar_t units
+* char16_t *string - place to put destination string
+* size_t sizeInWords - size of the string buffer in char16_t units
* size_t count - max number of bytes to put in buffer
-* wchar_t *format - format string, describes format of data
+* char16_t *format - format string, describes format of data
* va_list ap - varargs argument pointer
*
*Exit:
int __cdecl _vswprintf_helper (
WOUTPUTFN woutfn,
- wchar_t *string,
+ char16_t *string,
size_t count,
- const wchar_t *format,
+ const char16_t *format,
va_list ap
)
{
outfile->_flag = _IOWRT|_IOSTRG;
outfile->_ptr = outfile->_base = (char *) string;
- if(count>(INT_MAX/sizeof(wchar_t)))
+ if(count>(INT_MAX/sizeof(char16_t)))
{
/* old-style functions allow any large value to mean unbounded */
outfile->_cnt = INT_MAX;
}
else
{
- outfile->_cnt = (int)(count*sizeof(wchar_t));
+ outfile->_cnt = (int)(count*sizeof(char16_t));
}
retval = woutfn(outfile, format, ap );
}
DLLEXPORT int __cdecl vswprintf_s (
- wchar_t *string,
+ char16_t *string,
size_t sizeInWords,
- const wchar_t *format,
+ const char16_t *format,
va_list ap
)
{
}
DLLEXPORT int __cdecl _vsnwprintf_s (
- wchar_t *string,
+ char16_t *string,
size_t sizeInWords,
size_t count,
- const wchar_t *format,
+ const char16_t *format,
va_list ap
)
{
*
*Purpose:
-* wcscat_s() appends one wchar_t string onto another.
+* wcscat_s() appends one char16_t string onto another.
*
* wcscat() concatenates (appends) a copy of the source string to the
* end of the destination string.
#define _FUNC_PROLOGUE
#define _FUNC_NAME wcscat_s
-#define _CHAR wchar_t
+#define _CHAR char16_t
#define _DEST _Dst
#define _SIZE _SizeInBytes
#define _SRC _Src
#define _FUNC_PROLOGUE
#define _FUNC_NAME wcscpy_s
-#define _CHAR wchar_t
+#define _CHAR char16_t
#define _DEST _Dst
#define _SIZE _SizeInWords
#define _SRC _Src
*
*Purpose:
* wcslen returns the length of a null-terminated wide-character string,
-* not including the null wchar_t itself.
+* not including the null char16_t itself.
*
*******************************************************************************/
* returned.
*
*Entry:
-* const wchar_t * wcs - string whose length is to be computed
+* const char16_t * wcs - string whose length is to be computed
* size_t maxsize
*
*Exit:
*
*******************************************************************************/
-size_t __cdecl PAL_wcsnlen(const wchar_t *wcs, size_t maxsize)
+size_t __cdecl PAL_wcsnlen(const char16_t *wcs, size_t maxsize)
{
size_t n;
#define _FUNC_PROLOGUE
#define _FUNC_NAME wcsncat_s
-#define _CHAR wchar_t
+#define _CHAR char16_t
#define _DEST _Dst
#define _SIZE _SizeInWords
#define _SRC _Src
*
*Purpose:
-* defines wcsncpy_s() - copy at most n characters of wchar_t string
+* defines wcsncpy_s() - copy at most n characters of char16_t string
*
*******************************************************************************/
#define _FUNC_PROLOGUE
#define _FUNC_NAME wcsncpy_s
-#define _CHAR wchar_t
+#define _CHAR char16_t
#define _DEST _Dst
#define _SIZE _SizeInWords
#define _SRC _Src
#define _FUNC_PROLOGUE
#define _FUNC_NAME wcstok_s
-#define _CHAR wchar_t
+#define _CHAR char16_t
#include "tcstok_s.inl"
#define _FUNC_PROLOGUE
#define _FUNC_NAME _wmakepath_s
-#define _CHAR wchar_t
+#define _CHAR char16_t
#define _DEST _Dst
#define _SIZE _SizeInWords
#define _T(_Character) L##_Character
#define _FUNC_PROLOGUE
#define _FUNC_NAME _wsplitpath_s
-#define _CHAR wchar_t
+#define _CHAR char16_t
#define _TCSNCPY_S wcsncpy_s
#define _T(_Character) L##_Character
#define _MBS_SUPPORT 0
#define _SECURE_ITOA
#define _UNICODE
-#define TCHAR wchar_t
+#define TCHAR char16_t
#define _T(x) L##x
#include "xtox_s.inl"
struct testCase
{
- wchar_t *CorrectResult;
+ char16_t *CorrectResult;
int value;
int radix;
};
int __cdecl main(int argc, char **argv)
{
- wchar_t result[20];
- wchar_t *pResult = NULL;
+ char16_t result[20];
+ char16_t *pResult = NULL;
char *PrintResult = NULL; /* Use with convertC so we can */
char *PrintCorrectResult = NULL; /* print out the results */
int i = 0;
#define ___VSNWPRINTF_H__
/* These functions leaks memory a lot. C'est la vie. */
-int TestVsnwprintf_s(wchar_t* buf, size_t count, const wchar_t* format, ...)
+int TestVsnwprintf_s(char16_t* buf, size_t count, const char16_t* format, ...)
{
int retVal = 0;
va_list arglist;
int result;
int i;
- wchar_t passTestCases[] = {'1','2','3','4','5','6','7','8','9'};
- wchar_t failTestCases[] = {'a','b','p','$','?',234};
+ char16_t passTestCases[] = {'1','2','3','4','5','6','7','8','9'};
+ char16_t failTestCases[] = {'a','b','p','$','?',234};
if ((PAL_Initialize(argc, argv)) != 0)
{
}
/* Loop through each case. Testing if each is a digit. */
- for(i = 0; i < sizeof(passTestCases) / sizeof(wchar_t); i++)
+ for(i = 0; i < sizeof(passTestCases) / sizeof(char16_t); i++)
{
result = iswdigit(passTestCases[i]);
}
/* Loop through each case. Testing if each is a not a digit. */
- for(i = 0; i < sizeof(failTestCases) / sizeof(wchar_t); i++)
+ for(i = 0; i < sizeof(failTestCases) / sizeof(char16_t); i++)
{
result = iswdigit(failTestCases[i]);
#define __vswprintf_H__
/* These functions leaks memory a lot. C'est la vie. */
-int testvswp(wchar_t* buf, size_t buffSize, const wchar_t* format, ...)
+int testvswp(char16_t* buf, size_t buffSize, const char16_t* format, ...)
{
int retVal = 0;
va_list arglist;
}
- l = wcstoul((wchar_t*)teststr, &end, 10);
+ l = wcstoul((char16_t*)teststr, &end, 10);
if (l != result)
{
#include <palsuite.h>
/* C with a circumflex */
-wchar_t ustr[2] = { 0x108, 0 };
+char16_t ustr[2] = { 0x108, 0 };
/* expected conversion when best fit is allowed on Windows */
char* lpBestFitRes = "C";
{
LPWSTR wszTrustedPathCopy = new WCHAR[wcslen(pwzTrustedPlatformAssemblies) + 1];
wcscpy_s(wszTrustedPathCopy, wcslen(pwzTrustedPlatformAssemblies) + 1, pwzTrustedPlatformAssemblies);
- wchar_t *context;
+ WCHAR *context;
LPWSTR wszSingleTrustedPath = wcstok_s(wszTrustedPathCopy, PATH_SEPARATOR_STR_W, &context);
while (wszSingleTrustedPath != NULL)
return FAILURE_RESULT;
}
- wchar_t **wargv = new wchar_t*[argc];
+ WCHAR **wargv = new WCHAR*[argc];
for (int i = 0; i < argc; i++)
{
size_t len = strlen(argv[i]) + 1;
- wargv[i] = new wchar_t[len];
+ wargv[i] = new WCHAR[len];
WszMultiByteToWideChar(CP_ACP, 0, argv[i], -1, wargv[i], len);
}
// This function returns the address to the MapView of file and file size.
-void GetMapViewOfFile(__in wchar_t *szFile, PBYTE *ppbMap, DWORD *pdwFileSize)
+void GetMapViewOfFile(__in WCHAR *szFile, PBYTE *ppbMap, DWORD *pdwFileSize)
{
HANDLE hMapFile;
DWORD dwHighSize;
//
// Opens the .LIB file, and displays the metadata in the specified object files.
-void DisplayArchive(__in_z __in wchar_t* szFile, ULONG DumpFilter, __in_z __in_opt wchar_t* szObjName, strPassBackFn pDisplayString)
+void DisplayArchive(__in_z __in WCHAR* szFile, ULONG DumpFilter, __in_z __in_opt WCHAR* szObjName, strPassBackFn pDisplayString)
{
PBYTE pbMapAddress;
PBYTE pbStartAddress;
DWORD dwFileSize;
PVOID pvMetaData;
char *szName;
- wchar_t wzName[1024];
+ WCHAR wzName[1024];
char szBuf[17];
long cbMetaData;
int i;
// Opens the meta data content of a .EXE, .CLB, .CLASS, .TLB, .DLL or .LIB file, and
// calls RawDisplay()
-void DisplayFile(__in_z __in wchar_t* szFile, BOOL isFile, ULONG DumpFilter, __in_z __in_opt wchar_t* szObjName, strPassBackFn pDisplayString)
+void DisplayFile(__in_z __in WCHAR* szFile, BOOL isFile, ULONG DumpFilter, __in_z __in_opt WCHAR* szObjName, strPassBackFn pDisplayString)
{
// Open the emit scope
// print bar that separates different files
pDisplayString("////////////////////////////////////////////////////////////////\n");
- wchar_t rcFname[_MAX_FNAME], rcExt[_MAX_EXT];
+ WCHAR rcFname[_MAX_FNAME], rcExt[_MAX_EXT];
_wsplitpath_s(szFile, NULL, 0, NULL, 0, rcFname, _MAX_FNAME, rcExt, _MAX_EXT);
sprintf_s(szString,1024,"\nFile %S%S: \n",rcFname, rcExt);
IMetaDataImport2 *g_pImport = NULL;
IMetaDataDispenserEx *g_pDisp = NULL;
-void DisplayFile(__in_z __in wchar_t* szFile, BOOL isFile, ULONG DumpFilter, __in_z __in_opt wchar_t* szObjFile, strPassBackFn pDisplayString);
-void DisplayArchive(__in_z __in wchar_t* szFile, ULONG DumpFilter, __in_z __in_opt wchar_t* szObjName, strPassBackFn pDisplayString);
+void DisplayFile(__in_z __in WCHAR* szFile, BOOL isFile, ULONG DumpFilter, __in_z __in_opt WCHAR* szObjFile, strPassBackFn pDisplayString);
+void DisplayArchive(__in_z __in WCHAR* szFile, ULONG DumpFilter, __in_z __in_opt WCHAR* szObjName, strPassBackFn pDisplayString);
void PrintLogo()
{
extern "C" int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
{
- wchar_t *pArg = NULL;
- wchar_t *szObjName = NULL;
+ WCHAR *pArg = NULL;
+ WCHAR *szObjName = NULL;
ULONG DumpFilter = MDInfo::dumpDefault;
HRESULT hr = 0;
BOOL fWantHelp=FALSE;
// Validate incoming arguments
for (int i=1; i<argc; i++)
{
- const wchar_t *szArg = argv[i];
+ const WCHAR *szArg = argv[i];
if (*szArg == L'-' || *szArg == L'/')
{
if (_wcsicmp(szArg + 1, L"?") == 0)
// Loop through all files in the file pattern passed
WIN32_FIND_DATA fdFiles;
HANDLE hFind;
- wchar_t szSpec[_MAX_PATH];
- wchar_t szDrive[_MAX_DRIVE];
- wchar_t szDir[_MAX_DIR];
+ WCHAR szSpec[_MAX_PATH];
+ WCHAR szDrive[_MAX_DRIVE];
+ WCHAR szDir[_MAX_DIR];
hFind = WszFindFirstFile(pArg, &fdFiles);
break;
case InlineString: {
ULONG numChars;
- wchar_t str[84];
+ WCHAR str[84];
hr = meta->GetUserString(arg.i, str, 80, &numChars);
_ASSERTE(SUCCEEDED(hr));
str[numChars] = 0;
wcscpy_s(&str[79], 4, W("..."));
*out << '"';
- wchar_t* ptr = str;
+ WCHAR* ptr = str;
while(*ptr != 0) {
if (*ptr == '\n')
*out << "\\n";
#define MakeString(DST, OBJ, BEG, END) (DST = MyString(BEG, END))
#define StrEquals(STR1, STR2) (STR1 == STR2)
#define ClrGetEnvironmentVariable(var, res) GetEnvVar(L##var, res)
-bool FindLast(const MyString &str, MyStringIterator &iter, wchar_t c)
+bool FindLast(const MyString &str, MyStringIterator &iter, WCHAR c)
{
size_t pos = str.find_last_of(c);
iter = (pos == std::wstring::npos) ? str.end() : (str.begin() + pos);
return pos != std::wstring::npos;
}
void SkipChars(const MyString &str, MyStringIterator &i, WCHAR c1, WCHAR c2) { while (*i == c1 || *i == c2) i++; }
-bool GetEnvVar(_In_z_ wchar_t *var, MyString &res)
+bool GetEnvVar(_In_z_ WCHAR *var, MyString &res)
{
- wchar_t *buffer;
+ WCHAR *buffer;
size_t size;
_wdupenv_s(&buffer, &size, var);
if (!size || !buffer)
}
void ClrGetModuleFileName(HMODULE hModule, MyString& value)
{
- wchar_t driverpath_tmp[_MAX_PATH];
+ WCHAR driverpath_tmp[_MAX_PATH];
GetModuleFileNameW(hModule, driverpath_tmp, _MAX_PATH);
value = driverpath_tmp;
}
// Little helper function to get the codepage integer ID from the LocaleInfo
static UINT GetCodePage(LANGID LanguageID, DWORD locale)
{
- wchar_t CodePageInt[12];
+ WCHAR CodePageInt[12];
GetLocaleInfo(MAKELCID(LanguageID, SORT_DEFAULT), LOCALE_IDEFAULTCODEPAGE, CodePageInt, _countof(CodePageInt));
return _wtoi(CodePageInt);
}
{
LCID lcid = rglcid[i];
// Turn the LCID into a string
- wchar_t wzNumBuf[12];
+ WCHAR wzNumBuf[12];
_itow_s(lcid, wzNumBuf, _countof(wzNumBuf), 10);
MyString localePath = MakePath(path, wzNumBuf, dllName);
//-----------------------------------------------------------------------------
// Widechar strings representing the units in UnitOfMeasure. *** Keep in sync ***
// with the array defined in PerfLog.cpp
-const wchar_t * const wszUnitOfMeasureDescr[MAX_UNITS_OF_MEASURE] =
+const WCHAR * const wszUnitOfMeasureDescr[MAX_UNITS_OF_MEASURE] =
{
W(""),
W("sec"),
// a degrade.
// "Direction" property is true if an increase in the value of the counter indicates
// an improvement.
-const wchar_t * const wszIDirection[MAX_UNITS_OF_MEASURE] =
+const WCHAR * const wszIDirection[MAX_UNITS_OF_MEASURE] =
{
W("false"),
W("false"),
//-----------------------------------------------------------------------------
// Initialize static variables of the PerfLog class.
bool PerfLog::m_perfLogInit = false;
-wchar_t PerfLog::m_wszOutStr_1[];
+WCHAR PerfLog::m_wszOutStr_1[];
DWORD PerfLog::m_dwWriteByte = 0;
int PerfLog::m_fLogPerfData = 0;
HANDLE PerfLog::m_hPerfLogFileHandle = 0;
CloseHandle (m_hPerfLogFileHandle);
}
-void PerfLog::OutToStdout(__in_z const wchar_t *wszName, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr)
+void PerfLog::OutToStdout(__in_z const WCHAR *wszName, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr)
{
LIMITED_METHOD_CONTRACT;
- wchar_t wszOutStr_2[PRINT_STR_LEN];
+ WCHAR wszOutStr_2[PRINT_STR_LEN];
if (wszDescr)
_snwprintf_s(wszOutStr_2, PRINT_STR_LEN, PRINT_STR_LEN - 1, W(" (%s)\n"), wszDescr);
printf("%S", wszOutStr_2);
}
-void PerfLog::OutToPerfFile(__in_z const wchar_t *wszName, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr)
+void PerfLog::OutToPerfFile(__in_z const WCHAR *wszName, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr)
{
LIMITED_METHOD_CONTRACT;
}
else
{
- wchar_t wszOutStr_2[PRINT_STR_LEN];
+ WCHAR wszOutStr_2[PRINT_STR_LEN];
// workaround. The formats for ExecTime is slightly different from a custom value.
if (wcscmp(wszName, W("ExecTime")) == 0)
// Output stats in pretty print to stdout and perf automation format to file
// handle m_hPerfLogFileHandle
-void PerfLog::Log(__in_z const wchar_t *wszName, UINT64 val, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr)
+void PerfLog::Log(__in_z const WCHAR *wszName, UINT64 val, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr)
{
LIMITED_METHOD_CONTRACT;
// Output stats in pretty print to stdout and perf automation format to file
// handle m_hPerfLogFileHandle
-void PerfLog::Log(__in_z const wchar_t *wszName, double val, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr)
+void PerfLog::Log(__in_z const WCHAR *wszName, double val, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr)
{
LIMITED_METHOD_CONTRACT;
// Output stats in pretty print to stdout and perf automation format to file
// handle m_hPerfLogFileHandle
-void PerfLog::Log(__in_z const wchar_t *wszName, UINT32 val, UnitOfMeasure unit, __in_opt const wchar_t *wszDescr)
+void PerfLog::Log(__in_z const WCHAR *wszName, UINT32 val, UnitOfMeasure unit, __in_opt const WCHAR *wszDescr)
{
LIMITED_METHOD_CONTRACT;
// Set the help file and help context.
//<TODO>@todo: we don't have a help file yet.</TODO>
- if (FAILED(hr = pICreateErr->SetHelpFile(const_cast<wchar_t*>(W("complib.hlp")))) ||
+ if (FAILED(hr = pICreateErr->SetHelpFile(const_cast<WCHAR*>(W("complib.hlp")))) ||
FAILED(hr = pICreateErr->SetHelpContext(dwHelpContext)))
goto Exit1;
#if !defined(CROSSGEN_COMPILE)
if (g_CLRJITPath != nullptr)
{
- const wchar_t* p = wcsrchr(g_CLRJITPath, DIRECTORY_SEPARATOR_CHAR_W);
+ const WCHAR* p = wcsrchr(g_CLRJITPath, DIRECTORY_SEPARATOR_CHAR_W);
if (p != nullptr)
{
pwzJitName = p + 1; // Return just the filename, not the directory name
}
if (srcOffset < 0 || dstOffset < 0 || count < 0) {
- const wchar_t* str = W("srcOffset");
+ const WCHAR* str = W("srcOffset");
if (dstOffset < 0) str = W("dstOffset");
if (count < 0) str = W("count");
FCThrowArgumentOutOfRangeVoid(str, W("ArgumentOutOfRange_NeedNonNegNum"));
// This function will return NULL if the buffer is not large enough.
/*******************************************************************/
-wchar_t* formatMethodTable(MethodTable* pMT,
- __out_z __inout_ecount(bufSize) wchar_t* buff,
+WCHAR* formatMethodTable(MethodTable* pMT,
+ __out_z __inout_ecount(bufSize) WCHAR* buff,
DWORD bufSize)
{
CONTRACTL
// return the buffer position for next write.
/*******************************************************************/
-wchar_t* formatMethodDesc(MethodDesc* pMD,
- __out_z __inout_ecount(bufSize) wchar_t* buff,
+WCHAR* formatMethodDesc(MethodDesc* pMD,
+ __out_z __inout_ecount(bufSize) WCHAR* buff,
DWORD bufSize)
{
CONTRACTL
int nLen = MAX_CLASSNAME_LENGTH * 4 + 400; // this should be enough
- wchar_t *buff = (wchar_t *) qb.AllocThrows(nLen * sizeof(wchar_t));
- wchar_t *buffEnd = buff + nLen;
+ WCHAR *buff = (WCHAR *) qb.AllocThrows(nLen * sizeof(WCHAR));
+ WCHAR *buffEnd = buff + nLen;
while (ptr < end)
{
buff[nLen - 1] = W('\0');
- wchar_t* buffPtr = buff;
+ WCHAR* buffPtr = buff;
// stop if we hit unmapped pages
if (!isMemoryReadable((TADDR)ptr, sizeof(TADDR)))
buffPtr += wcslen(buffPtr);
- const wchar_t* kind = W("RETADDR ");
+ const WCHAR* kind = W("RETADDR ");
// Is this a stub (is the return address a MethodDesc?
MethodDesc* ftn = AsMethodDesc(*ptr);
MethodDesc* pMD = pCF->GetFunction();
const int nLen = 2048 - 1; // keep one character for "\n"
- wchar_t *buff = (wchar_t*)alloca((nLen + 1) * sizeof(wchar_t));
+ WCHAR *buff = (WCHAR*)alloca((nLen + 1) * sizeof(WCHAR));
buff[0] = 0;
buff[nLen-1] = W('\0'); // make sure the buffer is always NULL-terminated
bool TryParseString(uint8_t *&bufferCursor, uint32_t &bufferLen, const T *&result)
{
static_assert(
- std::is_same<T, char>::value || std::is_same<T, wchar_t>::value,
- "Can only be instantiated with char and wchar_t types.");
+ std::is_same<T, char>::value || std::is_same<T, WCHAR>::value,
+ "Can only be instantiated with char and WCHAR types.");
uint32_t stringLen = 0;
if (!TryParse(bufferCursor, bufferLen, stringLen))
}
// Typedef for string comparition functions.
-typedef int (__cdecl *UnicodeStringCompareFuncPtr)(const wchar_t *, const wchar_t *);
+typedef int (__cdecl *UnicodeStringCompareFuncPtr)(const WCHAR *, const WCHAR *);
//--------------------------------------------------------------------------------
// The DispatchMemberInfo class implementation.
ULONGLONG ObjectID;
ULONGLONG TypeID;
ULONG Flags;
- wchar_t Name[0];
+ WCHAR Name[0];
// Writes one EventStaticEntry to the buffer specified by ptr. Since we don't actually know how large the event will be,
// this write may fail if the remaining buffer is not large enough. This function returns the number of bytes written
// sizeRemaining must be larger than the structure + 1 wchar for the struct and
// null terminator of Name. We will do a better bounds check when we know the
// size of the field name.
- if (sizeRemaining < (int)(sizeof(EventStaticEntry) + sizeof(wchar_t)))
+ if (sizeRemaining < (int)(sizeof(EventStaticEntry) + sizeof(WCHAR)))
return -1;
// The location in the structure to write to. We won't actually write here unless we have sufficient buffer.
- wchar_t *name = (wchar_t *)(ptr + offsetof(EventStaticEntry, Name));
+ WCHAR *name = (WCHAR *)(ptr + offsetof(EventStaticEntry, Name));
int len = 0;
LPCUTF8 utf8Name = 0;
entry->TypeID = typeId;
entry->Flags = flags;
- return sizeof(EventStaticEntry) + len * sizeof(wchar_t);
+ return sizeof(EventStaticEntry) + len * sizeof(WCHAR);
}
};
return false;
}
- wchar_t *end;
+ WCHAR *end;
uint64_t result;
errno = 0;
result = _wcstoui64(out, &end, 16);
bool CreateSuspendableThread(
void (*threadStart)(void*),
void* argument,
- const wchar_t* name)
+ const WCHAR* name)
{
LIMITED_METHOD_CONTRACT;
bool CreateNonSuspendableThread(
void (*threadStart)(void*),
void* argument,
- const wchar_t* name)
+ const WCHAR* name)
{
LIMITED_METHOD_CONTRACT;
if (corType == ELEMENT_TYPE_CHAR)
{
m_type_name = new char[9];
- strcpy(m_type_name, "char16_t");
+ strcpy(m_type_name, "WCHAR");
}
else
{
struct SequencePointInfo
{
int lineNumber, ilOffset;
- char16_t* fileName;
+ WCHAR* fileName;
};
struct LocalVarInfo
{
int startOffset;
int endOffset;
- char16_t *name;
+ WCHAR *name;
};
struct MethodDebugInfo
HRESULT hr = CoReleaseMarshalData(pStream);
#ifdef _DEBUG
- wchar_t logStr[200];
+ WCHAR logStr[200];
swprintf_s(logStr, NumItems(logStr), W("Object gone: CoReleaseMarshalData returned %x, file %S, line %d\n"), hr, __FILE__, __LINE__);
LogInterop(logStr);
if (hr != S_OK)
ClrFreeInProcessHeap(0, block);
}
-int JitHost::getIntConfigValue(const wchar_t* name, int defaultValue)
+int JitHost::getIntConfigValue(const WCHAR* name, int defaultValue)
{
WRAPPER_NO_CONTRACT;
return CLRConfig::GetConfigValue(info);
}
-const wchar_t* JitHost::getStringConfigValue(const wchar_t* name)
+const WCHAR* JitHost::getStringConfigValue(const WCHAR* name)
{
WRAPPER_NO_CONTRACT;
return CLRConfig::GetConfigValue(info);
}
-void JitHost::freeStringConfigValue(const wchar_t* value)
+void JitHost::freeStringConfigValue(const WCHAR* value)
{
WRAPPER_NO_CONTRACT;
- CLRConfig::FreeConfigString(const_cast<wchar_t*>(value));
+ CLRConfig::FreeConfigString(const_cast<WCHAR*>(value));
}
//
public:
virtual void* allocateMemory(size_t size);
virtual void freeMemory(void* block);
- virtual int getIntConfigValue(const wchar_t* name, int defaultValue);
- virtual const wchar_t* getStringConfigValue(const wchar_t* name);
- virtual void freeStringConfigValue(const wchar_t* value);
+ virtual int getIntConfigValue(const WCHAR* name, int defaultValue);
+ virtual const WCHAR* getStringConfigValue(const WCHAR* name);
+ virtual void freeStringConfigValue(const WCHAR* value);
virtual void* allocateSlab(size_t size, size_t* pActualSize);
virtual void freeSlab(void* slab, size_t actualSize);
#include "multicorejit.h"
#include "multicorejitimpl.h"
-const wchar_t * AppxProfile = W("Application.Profile");
-
-
-void MulticoreJitFireEtw(const wchar_t * pAction, const wchar_t * pTarget, int p1, int p2, int p3)
+void MulticoreJitFireEtw(const WCHAR * pAction, const WCHAR * pTarget, int p1, int p2, int p3)
{
LIMITED_METHOD_CONTRACT
}
-void MulticoreJitFireEtwA(const wchar_t * pAction, const char * pTarget, int p1, int p2, int p3)
+void MulticoreJitFireEtwA(const WCHAR * pAction, const char * pTarget, int p1, int p2, int p3)
{
CONTRACTL {
NOTHROW;
// suffix (>= 0) is used for AutoStartProfile, to support multiple AppDomains. It's set to -1 for normal API call path
-HRESULT MulticoreJitRecorder::StartProfile(const wchar_t * pRoot, const wchar_t * pFile, int suffix, LONG nSession)
+HRESULT MulticoreJitRecorder::StartProfile(const WCHAR * pRoot, const WCHAR * pFile, int suffix, LONG nSession)
{
STANDARD_VM_CONTRACT;
// API Function: SettProfileRoot, store information with MulticoreJitManager class
// Threading: protected by InterlockedExchange(m_fMulticoreJITEnabled)
-void MulticoreJitManager::SetProfileRoot(AppDomain * pDomain, const wchar_t * pProfilePath)
+void MulticoreJitManager::SetProfileRoot(AppDomain * pDomain, const WCHAR * pProfilePath)
{
STANDARD_VM_CONTRACT;
// API Function: StartProfile
// Threading: protected by m_playerLock
-void MulticoreJitManager::StartProfile(AppDomain * pDomain, ICLRPrivBinder *pBinderContext, const wchar_t * pProfile, int suffix)
+void MulticoreJitManager::StartProfile(AppDomain * pDomain, ICLRPrivBinder *pBinderContext, const WCHAR * pProfile, int suffix)
{
CONTRACTL
{
void AutoStartProfile(AppDomain * pDomain);
// Multicore JIT API function: SetProfileRoot
- void SetProfileRoot(AppDomain * pDomain, const wchar_t * pProfilePath);
+ void SetProfileRoot(AppDomain * pDomain, const WCHAR * pProfilePath);
// Multicore JIT API function: StartProfile
- void StartProfile(AppDomain * pDomain, ICLRPrivBinder * pBinderContext, const wchar_t * pProfile, int suffix = -1);
+ void StartProfile(AppDomain * pDomain, ICLRPrivBinder * pBinderContext, const WCHAR * pProfile, int suffix = -1);
// Multicore JIT API function (internal): AbortProfile
void AbortProfile();
bool HandleModuleDependency(unsigned jitInfo);
- HRESULT ReadCheckFile(const wchar_t * pFileName);
+ HRESULT ReadCheckFile(const WCHAR * pFileName);
DomainAssembly * LoadAssembly(SString & assemblyName);
~MulticoreJitProfilePlayer();
- HRESULT ProcessProfile(const wchar_t * pFileName);
+ HRESULT ProcessProfile(const WCHAR * pFileName);
HRESULT OnModule(Module * pModule);
};
PCODE RequestMethodCode(MethodDesc * pMethod, MulticoreJitManager * pManager);
- HRESULT StartProfile(const wchar_t * pRoot, const wchar_t * pFileName, int suffix, LONG nSession);
+ HRESULT StartProfile(const WCHAR * pRoot, const WCHAR * pFileName, int suffix, LONG nSession);
HRESULT StopProfile(bool appDomainShutdown);
#endif // FEATURE_EVENT_TRACE
}
-void MulticoreJitFireEtw(const wchar_t * pAction, const wchar_t * pTarget, int p1, int p2, int p3);
+void MulticoreJitFireEtw(const WCHAR * pAction, const WCHAR * pTarget, int p1, int p2, int p3);
-void MulticoreJitFireEtwA(const wchar_t * pAction, const char * pTarget, int p1, int p2, int p3);
+void MulticoreJitFireEtwA(const WCHAR * pAction, const char * pTarget, int p1, int p2, int p3);
void MulticoreJitFireEtwMethodCodeReturned(MethodDesc * pMethod);
bool MatchWith(ModuleVersion & version, bool & gotVersion, Module * pModule, bool & shortAbort, bool fAppx);
#ifdef MULTICOREJIT_LOGGING
- void Dump(const wchar_t * prefix, int index);
+ void Dump(const WCHAR * prefix, int index);
#endif
};
#ifdef MULTICOREJIT_LOGGING
-void PlayerModuleInfo::Dump(const wchar_t * prefix, int index)
+void PlayerModuleInfo::Dump(const WCHAR * prefix, int index)
{
WRAPPER_NO_CONTRACT;
for (i = 0; i < m_pRecord->ModuleNameLen(); i ++)
{
- ssBuff.Append((wchar_t) m_pRecord->GetModuleName()[i]);
+ ssBuff.Append((WCHAR) m_pRecord->GetModuleName()[i]);
}
while (i < 32)
}
-HRESULT MulticoreJitProfilePlayer::ReadCheckFile(const wchar_t * pFileName)
+HRESULT MulticoreJitProfilePlayer::ReadCheckFile(const WCHAR * pFileName)
{
CONTRACTL
{
}
-HRESULT MulticoreJitProfilePlayer::ProcessProfile(const wchar_t * pFileName)
+HRESULT MulticoreJitProfilePlayer::ProcessProfile(const WCHAR * pFileName)
{
STANDARD_VM_CONTRACT;
#endif
-#ifndef _WCHAR_T_DEFINED
-typedef unsigned short wchar_t;
-#define _WCHAR_T_DEFINED
-#endif
-
#include "util.hpp"
#include <corpriv.h>
#include <cordbpriv.h>
void ComputeClassLayoutOrder();
void SortUnprofiledMethodsByClassLayoutOrder();
- HRESULT GetPdbFileNameFromModuleFilePath(__in_z const wchar_t *pwszModuleFilePath,
+ HRESULT GetPdbFileNameFromModuleFilePath(__in_z const WCHAR* pwszModuleFilePath,
__out_ecount(dwPdbFileNameBufferSize) char * pwszPdbFileName,
DWORD dwPdbFileNameBufferSize);