Esempio n. 1
0
extern "C" DWORD WINAPI dllGetFullPathNameA(LPCTSTR lpFileName, DWORD nBufferLength, LPTSTR lpBuffer, LPTSTR* lpFilePart)
{
#ifdef TARGET_WINDOWS
  if (!lpFileName) return 0;
  if(strstr(lpFileName, "://"))
  {
    unsigned int length = strlen(lpFileName);
    if (nBufferLength < (length + 1))
      return length + 1;
    else
    {
      strcpy(lpBuffer, lpFileName);
      if(lpFilePart)
      {
        char* s1 = strrchr(lpBuffer, '\\');
        char* s2 = strrchr(lpBuffer, '/');
        if(s2 && s1 > s2)
          *lpFilePart = s1 + 1;
        else if(s1 && s2 > s1)
          *lpFilePart = s2 + 1;
        else
          *lpFilePart = lpBuffer;
      }
      return length;
    }
  }
  return GetFullPathNameA(lpFileName, nBufferLength, lpBuffer, lpFilePart);
#else
  not_implement("kernel32.dll fake function GetFullPathNameW called\n"); //warning
  return 0;
#endif
}
Esempio n. 2
0
extern "C" int WINAPI dllGetLocaleInfoA(LCID Locale, LCTYPE LCType, LPTSTR lpLCData, int cchData)
{
  if (Locale == LOCALE_SYSTEM_DEFAULT || Locale == LOCALE_USER_DEFAULT)
  {
    if (LCType == LOCALE_SISO639LANGNAME)
    {
      if (cchData > 3)
      {
        strcpy(lpLCData, "eng");
        return 4;
      }
    }
    else if (LCType == LOCALE_SISO3166CTRYNAME)
    {
      if (cchData > 2)
      {
        strcpy(lpLCData, "US");
        return 3;
      }
    }
    else if (LCType == LOCALE_IDEFAULTLANGUAGE)
    {
      if (cchData > 5)
      {
        strcpy(lpLCData, "en-US");
        return 6;
      }
    }
  }

  not_implement("kernel32.dll incomplete function GetLocaleInfoA called\n");  //warning
  SetLastError(ERROR_INVALID_FUNCTION);
  return 0;
}
Esempio n. 3
0
extern "C" DWORD WINAPI dllGetFullPathNameW(LPCWSTR lpFileName, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR* lpFilePart)
{
#ifdef TARGET_WINDOWS
  if (!lpFileName) return 0;
  if(wcsstr(lpFileName, L"://"))
  {
    size_t length = wcslen(lpFileName);
    if (nBufferLength < (length + 1))
      return length + 1;
    else
    {
      wcscpy(lpBuffer, lpFileName);
      if(lpFilePart)
      {
        wchar_t* s1 = wcsrchr(lpBuffer, '\\');
        wchar_t* s2 = wcsrchr(lpBuffer, '/');
        if(s2 && s1 > s2)
          *lpFilePart = s1 + 1;
        else if(s1 && s2 > s1)
          *lpFilePart = s2 + 1;
        else
          *lpFilePart = lpBuffer;
      }
      return length;
    }
  }
  return GetFullPathNameW(lpFileName, nBufferLength, lpBuffer, lpFilePart);
#else
  not_implement("kernel32.dll fake function GetFullPathNameW called\n"); //warning
  return 0;
#endif
}
Esempio n. 4
0
LONG WINAPI dllRegEnumKeyExA (HKEY hKey, DWORD dwIndex, LPTSTR lpName,
                              LPDWORD lpcName, LPDWORD lpReserved, LPTSTR lpClass,
                              LPDWORD lpcClass, PFILETIME lpftLastWriteTime)
{
  not_implement("advapi32.dll fake function RegEnumKeyExA called\n"); //warning
  return 1;
}
Esempio n. 5
0
LONG WINAPI dllRegQueryInfoKeyA( HKEY hkey, LPSTR class_, LPDWORD class_len, LPDWORD reserved,
                                LPDWORD subkeys, LPDWORD max_subkey, LPDWORD max_class,
                                LPDWORD values, LPDWORD max_value, LPDWORD max_data,
                                LPDWORD security, FILETIME *modif )
{
  not_implement("advapi32.dll fake function RegQueryInfoKeyA called\n"); //warning
  return 1;
}
Esempio n. 6
0
extern "C" UINT WINAPI dllGetPrivateProfileIntA(
    LPCSTR lpAppName,
    LPCSTR lpKeyName,
    INT nDefault,
    LPCSTR lpFileName)
{
  not_implement("kernel32.dll fake function GetPrivateProfileIntA called\n"); //warning
  return nDefault;
}
Esempio n. 7
0
extern "C" BOOL WINAPI dllDisableThreadLibraryCalls(HMODULE h)
{
#ifdef TARGET_WINDOWS
  return DisableThreadLibraryCalls(h);
#else
  not_implement("kernel32.dll fake function DisableThreadLibraryCalls called\n"); //warning
  return TRUE;
#endif
}
Esempio n. 8
0
extern "C" DWORD WINAPI dllSizeofResource(HMODULE hModule, HRSRC hResInfo)
{
#ifdef TARGET_WINDOWS
  return SizeofResource(hModule, hResInfo);
#else
  not_implement("kernel32.dll fake function SizeofResource called\n"); //warning
  return 0;
#endif
}
Esempio n. 9
0
extern "C" SIZE_T WINAPI dllGlobalSize(HGLOBAL hMem)
{
#ifdef TARGET_WINDOWS
  return GlobalSize(hMem);
#else
  not_implement("kernel32.dll fake function GlobalSize called\n"); //warning
  return 0;
#endif
}
Esempio n. 10
0
extern "C" LPVOID WINAPI dllLockResource(HGLOBAL hResData)
{
#ifdef TARGET_WINDOWS
  return LockResource(hResData);
#else
  not_implement("kernel32.dll fake function LockResource called\n"); //warning
  return 0;
#endif
}
Esempio n. 11
0
extern "C" DWORD WINAPI dllExpandEnvironmentStringsA(LPCTSTR lpSrc, LPTSTR lpDst, DWORD nSize)
{
#ifdef TARGET_WINDOWS
  return ExpandEnvironmentStringsA(lpSrc, lpDst, nSize);
#else
  not_implement("kernel32.dll fake function ExpandEnvironmentStringsA called\n"); //warning
  return 0;
#endif
}
Esempio n. 12
0
BOOL WINAPI dllCryptReleaseContext(HCRYPTPROV hProv, DWORD dwFlags)
{
#ifdef _WIN32PC
  return CryptReleaseContext(hProv, dwFlags);
#else
  not_implement("advapi32.dll fake function dllCryptReleaseContext() called\n");
  return 1;
#endif
}
Esempio n. 13
0
BOOL WINAPI dllCryptAcquireContextA(HCRYPTPROV* phProv, LPCTSTR pszContainer, LPCTSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
{
#ifdef _WIN32PC
  return CryptAcquireContext(phProv, pszContainer, pszProvider, dwProvType, dwFlags);
#else
  not_implement("advapi32.dll fake function dllCryptAcquireContext() called\n");
  return 1;
#endif
}
Esempio n. 14
0
extern "C" DWORD WINAPI dllFormatMessageA(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPTSTR lpBuffer, DWORD nSize, va_list* Arguments)
{
#ifdef TARGET_WINDOWS
  return FormatMessageA(dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer, nSize, Arguments);
#else
  not_implement("kernel32.dll fake function FormatMessage called\n"); //warning
  return 0;
#endif
}
Esempio n. 15
0
extern "C" UINT WINAPI dllSetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine, BOOL Add)
{
#ifdef TARGET_WINDOWS
  return SetConsoleCtrlHandler(HandlerRoutine, Add);
#else
  // no consoles exists on the xbox, do nothing
  not_implement("kernel32.dll fake function SetConsoleCtrlHandler called\n");  //warning
  SetLastError(ERROR_INVALID_FUNCTION);
  return 0;
#endif
}
Esempio n. 16
0
extern "C" HMODULE WINAPI dllRtlUnwind(PVOID TargetFrame OPTIONAL, PVOID TargetIp OPTIONAL, PEXCEPTION_RECORD ExceptionRecord OPTIONAL, PVOID ReturnValue)
{
  not_implement("kernel32.dll fake function RtlUnwind called\n"); //warning
  return NULL;
}
Esempio n. 17
0
extern "C" UINT WINAPI dllGetWindowsDirectoryA(LPTSTR lpBuffer, UINT uSize)
{
  not_implement("kernel32.dll fake function dllGetWindowsDirectory called\n"); //warning
  return 0;
}
Esempio n. 18
0
extern "C" HGLOBAL WINAPI dllLoadResource(HMODULE hModule, HRSRC hResInfo)
{
  not_implement("kernel32.dll fake function LoadResource called\n");
  return NULL;
}
Esempio n. 19
0
extern "C" UINT WINAPI dllGetProfileIntA(LPCTSTR lpAppName, LPCTSTR lpKeyName, INT nDefault)
{
  //  CLog::Log(LOGDEBUG,"GetProfileIntA:%s %s %i", lpAppName,lpKeyName,nDefault);
  not_implement("kernel32.dll fake function GetProfileIntA called\n"); //warning
  return nDefault;
}
Esempio n. 20
0
extern "C" HRSRC WINAPI dllFindResourceA(HMODULE hModule, LPCTSTR lpName, LPCTSTR lpType)
{
  not_implement("kernel32.dll fake function FindResource called\n");
  return NULL;
}
Esempio n. 21
0
LONG WINAPI dllRegDeleteKeyA (HKEY hKey, LPCTSTR lpSubKey)
{
  not_implement("advapi32.dll fake function RegDeleteKeyA called\n"); //warning
  return 1;
}
Esempio n. 22
0
extern "C" HMODULE WINAPI dllGetOEMCP()
{
  not_implement("kernel32.dll fake function GetOEMCP called\n"); //warning
  return NULL;
}
Esempio n. 23
0
extern "C" HMODULE WINAPI dllGetCPInfo(UINT CodePage, LPCPINFO lpCPInfo)
{
  not_implement("kernel32.dll fake function GetCPInfo called\n"); //warning
  return NULL;
}
Esempio n. 24
0
extern "C" BOOL WINAPI dllSetPriorityClass(HANDLE hProcess, DWORD dwPriorityClass)
{
  not_implement("kernel32.dll fake function SetPriorityClass called\n"); //warning
  return false;
}
Esempio n. 25
0
extern "C" HMODULE WINAPI dllGetStringTypeW(DWORD dwInfoType, LPCWSTR lpSrcStr, int cchSrc, LPWORD lpCharType)
{
  not_implement("kernel32.dll fake function GetStringTypeW called\n"); //warning
  return NULL;
}
Esempio n. 26
0
extern "C" HMODULE WINAPI dllSetStdHandle(DWORD nStdHandle, HANDLE hHandle)
{
  not_implement("kernel32.dll fake function SetStdHandle called\n"); //warning
  return NULL;
}
Esempio n. 27
0
extern "C" HMODULE WINAPI dllLCMapStringW(LCID Locale, DWORD dwMapFlags, LPCWSTR lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest)
{
  not_implement("kernel32.dll fake function LCMapStringW called\n"); //warning
  return NULL;
}
Esempio n. 28
0
extern "C" HMODULE WINAPI dllTerminateProcess(HANDLE hProcess, UINT uExitCode)
{
  not_implement("kernel32.dll fake function TerminateProcess called\n"); //warning
  return NULL;
}
Esempio n. 29
0
extern "C" HMODULE WINAPI dllExitProcess(UINT uExitCode)
{
  not_implement("kernel32.dll fake function ExitProcess called\n"); //warning
  return NULL;
}