ERROR_NOACCESS 998 (0x3E6)  LoadLibrary
Posted: 15 May 2014 02:53 AM   [ Ignore ]
New Member
Total Posts:  1
Joined  2011-05-02


We are developing a .dll that uses the CL Eye Platform SDK. When we use this .dll in an application on a Win32 console that: creates a camera, makes a capture loop, shows the captured image and lastly it frees its resources. But if we use this same .dll in a .NET application, we get a .dll load error. To find out what caused the problem, we load the CLEyeMulticam.dll using the Windows function “LoadLibrary” and access its functions using “GetProcAddress”. In the Win32 console application everything works fine. But in the .NET application the result of “LoadLibrary” is NULL and the error code “GetLastError” shows is: ERROR_NOACCESS 998 (0x3E6) Invalid access to memory location ( this error appears when we load the .dll in Unity).

The next code in C# we also the an error loading the .dll:

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
using System.Windows.Forms;

namespace WinFormsAppLoadEyeDll
  public class EyeToyCamera
      [DllImport(“CLEyeMulticam”, EntryPoint = “CLEyeGetCameraCount”)]
      public static extern int GetCameraCount();

  static class Program
      /// <summary>
      /// Punto de entrada principal para la aplicación.
      /// </summary>
      static void Main()
**** error         int nNumCameras = EyeToyCamera.GetCameraCount();

        Application.Run(new Form1());

If anyone can lend me a hand with this, it’ll be greatly appreciated. Thanks a lot in advance!! =)


RSS 2.0     Atom Feed