Unable to load DLL 'coredll.dll' : the specified module could not be found

sarsnake picture sarsnake · Aug 29, 2012 · Viewed 7.1k times · Source

I am writing a small application to test OpenNETCF library loading and have stumbled upon this curious message

Unable to load DLL 'coredll.dll' : the specified module could not be found

I am using Compact Framework 3.5 on a Windows Embedded 7 Compact thin client.

The code is

using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using OpenNETCF.Threading;

namespace Windows7EmbeddedTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

            MessageBox.Show("Starting the test");

            bool notRunning;
            NamedMutex mutex = new NamedMutex(false, "myappname", out notRunning);


            MessageBox.Show("test went well!");

        }    
    }
}

Any ideas how this could be fixed? I searched my Windows Embedded Compact 7 thin client for coredll.dll and nothing came up. My understanding is that it is an integral part of Windows CE devices. Then why can't OpenNETCF find it on Windows Embedded Compact 7 machine? Do I need to download/install this dll manually? Register it? If Windows Embedded Compact 7 ships with it, what would be the path to look for it?

Answer

ctacke picture ctacke · Aug 29, 2012

Are you absolutely positive that your thin client device is running Windows Embedded Compact (Windows CE) and not Windows Embedded Standard (WES)?

The reason I ask is because coredll.dll is a fundamental piece of the Windows CE OS. It's the analog to the desktop's kernel32.dll and user32.dll (plus several others) all wrapped up into one. It's impossible to have a Windows CE OS that doesn't contain coredll.dll.

Normally it's a hidden file, so it doesn't show in Explorer unless you "show hidden files" or use something like Remote File Viewer, but the fact that the .NET loader can't find it makes me suspect it's not there, which in turn makes me believe you're running WES and not CE.