summaryrefslogtreecommitdiff
path: root/src/ilasm
diff options
context:
space:
mode:
Diffstat (limited to 'src/ilasm')
-rw-r--r--src/ilasm/MscorpeSxS.cpp23
-rw-r--r--src/ilasm/MscorpeSxS.h20
-rw-r--r--src/ilasm/assem.cpp22
-rw-r--r--src/ilasm/assembler.h2
4 files changed, 7 insertions, 60 deletions
diff --git a/src/ilasm/MscorpeSxS.cpp b/src/ilasm/MscorpeSxS.cpp
deleted file mode 100644
index b3b94f466b..0000000000
--- a/src/ilasm/MscorpeSxS.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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.
-//
-// File: MscorpeSxS.cpp
-//
-
-//
-// This file defines a wrapper for SxS version of mscorpe.dll (dynamically loaded via shim).
-//
-#include "ilasmpch.h"
-
-#include "MscorpeSxS.h"
-
-#include <LegacyActivationShim.h>
-
-// Loads mscorpe.dll (uses shim)
-HRESULT
-LoadMscorpeDll(HMODULE * phModule)
-{
- // Load SxS version of mscorpe.dll (i.e. mscorpehost.dll) and initialize it
- return LegacyActivationShim::LoadLibraryShim(L"mscorpe.dll", NULL, NULL, phModule);
-}
diff --git a/src/ilasm/MscorpeSxS.h b/src/ilasm/MscorpeSxS.h
deleted file mode 100644
index 8cee9c49cd..0000000000
--- a/src/ilasm/MscorpeSxS.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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.
-//
-// File: MscorpeSxS.h
-//
-
-//
-// This file defines a wrapper for SxS version of mscorpe.dll (dynamically loaded via shim).
-//
-
-#pragma once
-
-#include <MscorpeSxSWrapper.h>
-
-// Loads mscorpe.dll (uses shim)
-HRESULT LoadMscorpeDll(HMODULE * phModule);
-
-// Wrapper for mscorpe.dll calls
-typedef MscorpeSxSWrapper<LoadMscorpeDll> MscorpeSxS;
diff --git a/src/ilasm/assem.cpp b/src/ilasm/assem.cpp
index 8c56bdc047..18247621f9 100644
--- a/src/ilasm/assem.cpp
+++ b/src/ilasm/assem.cpp
@@ -15,15 +15,11 @@
#define DECLARE_DATA
#include "assembler.h"
-#ifdef FEATURE_CORECLR
#ifdef FEATURE_PAL
#include "coreclrloader.h"
CoreCLRLoader *g_loader;
#endif // FEATURE_PAL
MetaDataGetDispenserFunc metaDataGetDispenser;
-#else
-#include "MscorpeSxS.h"
-#endif // FEATURE_CORECLR
void indexKeywords(Indx* indx); // defined in asmparse.y
@@ -197,11 +193,9 @@ Assembler::~Assembler()
if (m_pCeeFileGen != NULL) {
if (m_pCeeFile)
m_pCeeFileGen->DestroyCeeFile(&m_pCeeFile);
-#ifdef FEATURE_CORECLR
+
DestroyICeeFileGen(&m_pCeeFileGen);
-#else
- MscorpeSxS::DestroyICeeFileGen(&m_pCeeFileGen);
-#endif
+
m_pCeeFileGen = NULL;
}
@@ -276,18 +270,14 @@ BOOL Assembler::Init()
if (m_pCeeFileGen != NULL) {
if (m_pCeeFile)
m_pCeeFileGen->DestroyCeeFile(&m_pCeeFile);
-#ifdef FEATURE_CORECLR
+
DestroyICeeFileGen(&m_pCeeFileGen);
-#else
- MscorpeSxS::DestroyICeeFileGen(&m_pCeeFileGen);
-#endif
+
m_pCeeFileGen = NULL;
}
-#ifdef FEATURE_CORECLR
+
if (FAILED(CreateICeeFileGen(&m_pCeeFileGen))) return FALSE;
-#else
- if (FAILED(MscorpeSxS::CreateICeeFileGen(&m_pCeeFileGen))) return FALSE;
-#endif
+
if (FAILED(m_pCeeFileGen->CreateCeeFileEx(&m_pCeeFile,(ULONG)m_dwCeeFileFlags))) return FALSE;
if (FAILED(m_pCeeFileGen->GetSectionCreate(m_pCeeFile, ".il", sdReadOnly, &m_pILSection))) return FALSE;
diff --git a/src/ilasm/assembler.h b/src/ilasm/assembler.h
index cbb591ac1c..1c211bc3c5 100644
--- a/src/ilasm/assembler.h
+++ b/src/ilasm/assembler.h
@@ -56,7 +56,7 @@
extern CoreCLRLoader *g_loader;
extern char *g_pszExeFile;
#endif
-typedef int(*MetaDataGetDispenserFunc) (
+typedef int(STDAPICALLTYPE *MetaDataGetDispenserFunc) (
REFCLSID rclsid, // The class to desired.
REFIID riid, // Interface wanted on class factory.
LPVOID FAR *ppv); // Return interface pointer here.