I'm trying to use the following function:

DWORD test = GetTargetProcessIdFromWindow("Untitled - Notepad");


DWORD GetTargetProcessIdFromWindow(char * WindowName)
{
HWND targetWnd;
targetWnd = FindWindow(NULL,(LPCWSTR)WindowName);
DWORD procID = GetWindowThreadProcessId(targetWnd, NULL);
return procID;
}

but targetWnd always returns 00000. Does anyone know how to properly convert from a string to LPCWSTR ?