summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.c')
-rw-r--r--src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.c b/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.c
deleted file mode 100644
index ff0d33879c..0000000000
--- a/src/pal/tests/palsuite/pal_specific/PAL_RegisterLibraryW_UnregisterLibraryW/test1/PAL_RegisterLibraryW_UnregisterLibraryW.c
+++ /dev/null
@@ -1,64 +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.
-
-/*=============================================================
-**
-** Source: pal_registerlibrary_unregisterlibrary
-**
-** Purpose: Positive test the PAL_RegisterLibrary API and
-** PAL_UnRegisterLibrary.
-** Call PAL_RegisterLibrary to map a module into the calling
-** process address space and call PAL_UnRegisterLibrary
-** to unmap this module.
-**
-**
-**============================================================*/
-#define UNICODE
-#include <palsuite.h>
-
-int __cdecl main(int argc, char *argv[])
-{
- HMODULE ModuleHandle;
- char ModuleName[64];
- WCHAR *wpModuleName = NULL;
- int err;
-
- /*Initialize the PAL environment*/
- err = PAL_Initialize(argc, argv);
- if(0 != err)
- {
- return FAIL;
- }
-
- /*zero the buffer*/
- memset(ModuleName,0,64);
- sprintf(ModuleName, "%s", "rotor_pal");
-
- /*convert a normal string to a wide one*/
- wpModuleName = convert(ModuleName);
-
- /*load a module*/
- ModuleHandle = PAL_RegisterLibrary(wpModuleName);
-
- /*free the memory*/
- free(wpModuleName);
-
- if(!ModuleHandle)
- {
- Fail("Failed to call PAL_RegisterLibrary API to map a module "
- "into calling process, error code=%u!\n", GetLastError());
- }
-
- /*decrement the reference count of the loaded DLL*/
- err = PAL_UnregisterLibrary(ModuleHandle);
- if(0 == err)
- {
- Fail("\nFailed to call PAL_UnregisterLibrary API to "
- "decrement the count of the loaded DLL module, "
- "error code=%u!\n", GetLastError());
- }
-
- PAL_Terminate();
- return PASS;
-}