- Fix compile with msvc/psdk.
authorAlex Ionescu <aionescu@gmail.com>
Wed, 19 Oct 2005 23:08:12 +0000 (23:08 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Wed, 19 Oct 2005 23:08:12 +0000 (23:08 +0000)
svn path=/trunk/; revision=18615

reactos/lib/ntdll/dbg/dbgui.c
reactos/lib/ntdll/inc/ntdll.h
reactos/lib/ntdll/inc/ntdllp.h
reactos/lib/ntdll/ldr/res.c
reactos/lib/ntdll/ldr/startup.c
reactos/lib/ntdll/ldr/utils.c
reactos/lib/ntdll/main/dispatch.c
reactos/lib/ntdll/rtl/libsupp.c
reactos/lib/ntdll/rtl/version.c

index 478030e..33c37b2 100644 (file)
@@ -40,7 +40,7 @@ DebugPrint(IN PANSI_STRING DebugString,
  * @implemented\r
  */\r
 NTSTATUS\r
-STDCALL\r
+NTAPI\r
 DbgUiConnectToDbg(VOID)\r
 {\r
     OBJECT_ATTRIBUTES ObjectAttributes;\r
@@ -66,7 +66,7 @@ DbgUiConnectToDbg(VOID)
  * @implemented\r
  */\r
 NTSTATUS\r
-STDCALL\r
+NTAPI\r
 DbgUiContinue(PCLIENT_ID ClientId,\r
               ULONG ContinueStatus)\r
 {\r
@@ -95,7 +95,7 @@ DbgUiWaitStateChange(PDBGUI_WAIT_STATE_CHANGE DbgUiWaitStateCange,
  * @implemented\r
  */\r
 VOID\r
-STDCALL\r
+NTAPI\r
 DbgUiRemoteBreakin(VOID)\r
 {\r
     /* Make sure a debugger is enabled; if so, breakpoint */\r
@@ -109,7 +109,7 @@ DbgUiRemoteBreakin(VOID)
  * @implemented\r
  */\r
 NTSTATUS\r
-STDCALL\r
+NTAPI\r
 DbgUiIssueRemoteBreakin(HANDLE Process)\r
 {\r
     HANDLE hThread;\r
index 7676b2b..d4fd4a3 100644 (file)
@@ -14,6 +14,7 @@
 
 /* C Headers */
 #define _CTYPE_DISABLE_MACROS
+#define _CRT_SECURE_NO_DEPRECATE
 #define _INC_SWPRINTF_INL_
 #include <limits.h>
 #include <stdio.h>
index 7b8dad8..53a9815 100644 (file)
@@ -9,7 +9,7 @@
 /* INCLUDES ******************************************************************/
 
 /* FIXME: Cleanup this mess */
-typedef NTSTATUS (STDCALL *PEPFUNC)(PPEB);
+typedef NTSTATUS (NTAPI *PEPFUNC)(PPEB);
 NTSTATUS LdrMapSections(HANDLE ProcessHandle,
                        PVOID ImageBase,
                        HANDLE SectionHandle,
@@ -24,7 +24,7 @@ PEPFUNC LdrPEStartup (PVOID  ImageBase,
                      PLDR_DATA_TABLE_ENTRY* Module,
                      PWSTR FullDosName);
 typedef BOOL 
-(STDCALL *PDLLMAIN_FUNC)(HANDLE hInst,
+(NTAPI *PDLLMAIN_FUNC)(HANDLE hInst,
                          ULONG ul_reason_for_call,
                          LPVOID lpReserved);
 
index 1ca2079..d3478b3 100644 (file)
@@ -85,7 +85,7 @@ PushLanguage(WORD *list, int pos, WORD lang)
                                    RESOURCE_DATA_LEVEL,
                                    &ResourceDataEntry);
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrFindResource_U(PVOID BaseAddress,
                   PLDR_RESOURCE_INFO ResourceInfo,
                   ULONG Level,
@@ -260,7 +260,7 @@ found:;
 /*
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrAccessResource(IN  PVOID BaseAddress,
                   IN  PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry,
                   OUT PVOID* Resource OPTIONAL,
@@ -311,7 +311,7 @@ LdrAccessResource(IN  PVOID BaseAddress,
 /*
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrFindResourceDirectory_U(IN PVOID BaseAddress,
                            IN PLDR_RESOURCE_INFO info,
                            IN ULONG level,
index c96e3ba..2baddd2 100644 (file)
@@ -17,7 +17,7 @@
 
 VOID RtlInitializeHeapManager (VOID);
 VOID LdrpInitLoader(VOID);
-VOID STDCALL RtlpInitDeferedCriticalSection(VOID);
+VOID NTAPI RtlpInitDeferedCriticalSection(VOID);
 
 /* GLOBALS *******************************************************************/
 
@@ -240,7 +240,7 @@ finish:
 /* FUNCTIONS *****************************************************************/
 
 VOID
-STDCALL
+NTAPI
 LdrpInit(PCONTEXT Context,
          PVOID SystemArgument1,
          PVOID SystemArgument2)
index 80461b4..1fbb165 100644 (file)
@@ -271,7 +271,7 @@ LdrpInitializeTlsForProccess(VOID)
                TlsData->TlsDataSize = TlsDirectory->EndAddressOfRawData - TlsDirectory->StartAddressOfRawData;
                TlsData->TlsZeroSize = TlsDirectory->SizeOfZeroFill;
                if (TlsDirectory->AddressOfCallBacks)
-                 TlsData->TlsAddressOfCallBacks = *TlsDirectory->AddressOfCallBacks;
+                 TlsData->TlsAddressOfCallBacks = *(PIMAGE_TLS_CALLBACK*)TlsDirectory->AddressOfCallBacks;
                else
                  TlsData->TlsAddressOfCallBacks = NULL;
                TlsData->Module = Module;
@@ -722,7 +722,7 @@ LdrpMapDllImageFile(IN PWSTR SearchPath OPTIONAL,
  *
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrLoadDll (IN PWSTR SearchPath OPTIONAL,
             IN ULONG LoadFlags,
             IN PUNICODE_STRING Name,
@@ -775,7 +775,7 @@ LdrLoadDll (IN PWSTR SearchPath OPTIONAL,
  *
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrFindEntryForAddress(PVOID Address,
                        PLDR_DATA_TABLE_ENTRY *Module)
 {
@@ -2217,7 +2217,7 @@ LdrpUnloadModule(PLDR_DATA_TABLE_ENTRY Module,
 /*
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrUnloadDll (IN PVOID BaseAddress)
 {
    PLDR_DATA_TABLE_ENTRY Module;
@@ -2246,7 +2246,7 @@ LdrUnloadDll (IN PVOID BaseAddress)
 /*
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrDisableThreadCalloutsForDll(IN PVOID BaseAddress)
 {
     PLIST_ENTRY ModuleListHead;
@@ -2284,7 +2284,7 @@ LdrDisableThreadCalloutsForDll(IN PVOID BaseAddress)
 /*
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrGetDllHandle(IN PWSTR DllPath OPTIONAL,
                 IN PULONG DllCharacteristics,
                 IN PUNICODE_STRING DllName,
@@ -2320,7 +2320,7 @@ LdrGetDllHandle(IN PWSTR DllPath OPTIONAL,
 /*
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrGetProcedureAddress (IN PVOID BaseAddress,
                         IN PANSI_STRING Name,
                         IN ULONG Ordinal,
@@ -2523,7 +2523,7 @@ LdrpAttachProcess(VOID)
 /*
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrShutdownProcess (VOID)
 {
   LdrpDetachProcess(TRUE);
@@ -2584,7 +2584,7 @@ LdrpAttachThread (VOID)
 /*
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrShutdownThread (VOID)
 {
    PLIST_ENTRY ModuleListHead;
@@ -2642,7 +2642,7 @@ LdrShutdownThread (VOID)
  *
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrQueryProcessModuleInformation(IN PMODULE_INFORMATION ModuleInformation OPTIONAL,
                                  IN ULONG Size OPTIONAL,
                                  OUT PULONG ReturnedSize)
@@ -2839,7 +2839,7 @@ LdrpGetResidentSize(PIMAGE_NT_HEADERS NTHeaders)
  *
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrVerifyImageMatchesChecksum (IN HANDLE FileHandle,
                                ULONG Unknown1,
                                ULONG Unknown2,
@@ -2933,7 +2933,7 @@ LdrVerifyImageMatchesChecksum (IN HANDLE FileHandle,
  *
  * @implemented
  */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 LdrQueryImageFileExecutionOptions (IN PUNICODE_STRING SubKey,
                                    IN PCWSTR ValueName,
                                    IN ULONG Type,
@@ -3064,7 +3064,7 @@ LdrQueryImageFileExecutionOptions (IN PUNICODE_STRING SubKey,
 }
 
 
-PIMAGE_BASE_RELOCATION STDCALL
+PIMAGE_BASE_RELOCATION NTAPI
 LdrProcessRelocationBlock(IN PVOID Address,
                          IN USHORT Count,
                          IN PUSHORT TypeOffset,
index 1be0021..9738e6e 100644 (file)
@@ -12,7 +12,7 @@
 #define NDEBUG\r
 #include <debug.h>\r
 \r
-typedef NTSTATUS (STDCALL *USER_CALL)(PVOID Argument, ULONG ArgumentLength);\r
+typedef NTSTATUS (NTAPI *USER_CALL)(PVOID Argument, ULONG ArgumentLength);\r
 \r
 /* FUNCTIONS ****************************************************************/\r
 \r
@@ -20,7 +20,7 @@ typedef NTSTATUS (STDCALL *USER_CALL)(PVOID Argument, ULONG ArgumentLength);
  * @implemented\r
  */\r
 VOID\r
-STDCALL\r
+NTAPI\r
 KiUserExceptionDispatcher(PEXCEPTION_RECORD ExceptionRecord,\r
                           PCONTEXT Context)\r
 {\r
@@ -53,7 +53,7 @@ KiUserExceptionDispatcher(PEXCEPTION_RECORD ExceptionRecord,
  * @implemented\r
  */\r
 VOID\r
-STDCALL\r
+NTAPI\r
 KiRaiseUserExceptionDispatcher(VOID)\r
 {\r
     EXCEPTION_RECORD ExceptionRecord;\r
@@ -72,7 +72,7 @@ KiRaiseUserExceptionDispatcher(VOID)
  * @implemented\r
  */\r
 VOID\r
-STDCALL\r
+NTAPI\r
 KiUserCallbackDispatcher(ULONG Index,\r
                          PVOID Argument,\r
                          ULONG ArgumentLength)\r
index 8508c8d..954bcb5 100644 (file)
@@ -42,14 +42,14 @@ RtlpSetInDbgPrint(IN BOOLEAN NewValue)
 }
 
 KPROCESSOR_MODE
-STDCALL
+NTAPI
 RtlpGetMode()
 {
    return UserMode;
 }
 
 PPEB
-STDCALL
+NTAPI
 RtlpCurrentPeb(VOID)
 {
     return NtCurrentPeb();
@@ -58,7 +58,7 @@ RtlpCurrentPeb(VOID)
 /*
  * @implemented
  */
-VOID STDCALL
+VOID NTAPI
 RtlAcquirePebLock(VOID)
 {
    PPEB Peb = NtCurrentPeb ();
@@ -68,7 +68,7 @@ RtlAcquirePebLock(VOID)
 /*
  * @implemented
  */
-VOID STDCALL
+VOID NTAPI
 RtlReleasePebLock(VOID)
 {
    PPEB Peb = NtCurrentPeb ();
@@ -79,7 +79,7 @@ RtlReleasePebLock(VOID)
 * @implemented
 */
 ULONG
-STDCALL
+NTAPI
 RtlGetNtGlobalFlags(VOID)
 {
     PPEB pPeb = NtCurrentPeb();
@@ -87,7 +87,7 @@ RtlGetNtGlobalFlags(VOID)
 }
 
 NTSTATUS
-STDCALL
+NTAPI
 RtlDeleteHeapLock(
     PRTL_CRITICAL_SECTION CriticalSection)
 {
@@ -95,7 +95,7 @@ RtlDeleteHeapLock(
 }
 
 NTSTATUS
-STDCALL
+NTAPI
 RtlEnterHeapLock(
     PRTL_CRITICAL_SECTION CriticalSection)
 {
@@ -103,7 +103,7 @@ RtlEnterHeapLock(
 }
 
 NTSTATUS
-STDCALL
+NTAPI
 RtlInitializeHeapLock(
     PRTL_CRITICAL_SECTION CriticalSection)
 {
@@ -111,7 +111,7 @@ RtlInitializeHeapLock(
 }
 
 NTSTATUS
-STDCALL
+NTAPI
 RtlLeaveHeapLock(
     PRTL_CRITICAL_SECTION CriticalSection)
 {
@@ -119,7 +119,7 @@ RtlLeaveHeapLock(
 }
 
 PVOID
-STDCALL
+NTAPI
 RtlpAllocateMemory(UINT Bytes,
                    ULONG Tag)
 {
@@ -132,7 +132,7 @@ RtlpAllocateMemory(UINT Bytes,
 
 
 VOID
-STDCALL
+NTAPI
 RtlpFreeMemory(PVOID Mem,
                ULONG Tag)
 {
index 70c11c4..6150c89 100644 (file)
@@ -42,7 +42,7 @@
  * @implemented
  */
 
-BOOLEAN STDCALL
+BOOLEAN NTAPI
 RtlGetNtProductType(PNT_PRODUCT_TYPE ProductType)
 {
   *ProductType = SharedUserData->NtProductType;
@@ -70,7 +70,7 @@ RtlGetNtProductType(PNT_PRODUCT_TYPE ProductType)
  * @implemented
  */
 
-void STDCALL
+void NTAPI
 RtlGetNtVersionNumbers(LPDWORD major, LPDWORD minor, LPDWORD build)
 {
        PPEB pPeb = NtCurrentPeb();
@@ -102,7 +102,7 @@ RtlGetNtVersionNumbers(LPDWORD major, LPDWORD minor, LPDWORD build)
 /*
 * @implemented
 */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 RtlGetVersion(RTL_OSVERSIONINFOW *Info)
 {
    if (Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOW) ||