question

YRK-33345 avatar image
0 Votes"
YRK-33345 asked DanielZhang-MSFT answered

Unable to load DLL 'freeglut.dll': The specified module could not be found

I have a window form application (.net) .net 4.7.2 and I have a folder called dlls and it includes the files:
freeglut.dll,
ImageSharp.dll,
OpenGL.deps.json,
OpenGL.dll,
OpenGL.pdb,
OpenGL.xml,
Tao.FreeGlut.dll,
Tao.FreeGlut.dll.config,
Tao.OpenGl.dll
And added tao.opengl.dll and tao.freeglut for references and also added ShadowEngin.dll from another folder

And this is my code:



 Using a system;
 Using System.Collections.Generic;
 Using System.ComponentModel;
 Using System.Data;
 Using System.Drawing;
 Using System.Text;
 Using System.Windows.Forms;
 Using Tao.OpenGl;
 Using ShadowEngine;
 Using ShadowEngine.OpenGL;
 Using ShadowEngine.Sound;
 Using Tao.FreeGlut;
 Open namespace
 {
     Public Partial Department Form 1: Form
     {
            
            
         Public Form 1 ()
         {
             Glut.glutInit ();
                
         }
         Disable Form1_Load Details (Submitter Object, EventArgs e)
         {
                
         }
         Empty blank panel 1_Paint (Object sender, PaintEventArgs e)
         {
         }
         1_Click Private Space Button (Object Sender, EventArgs e)
         {
                
         }
         Cancel CreateCollisions ()
         {
                
         }
     }
 }

And I get the error "Unable to load DLL 'freeglut.dll': The specified module could not be found"


dotnet-csharpwindows-forms
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You should be posting all content of the exception and not a partial you posted.

0 Votes 0 ·

this is all the contact, But I also tried to add freeglut.dll to references but I got the following error "A reference to 'C: \ Users \ yairk source repos Ope Ope \ libs \ freeglut.dll could not be added. Please make sure the file is accessible, and that it is a valid assembly or COM component.
"

@DuaneArnold-0443

0 Votes 0 ·

Do you know what kind of DLL it is a .NET DLL or COM DLL?

0 Votes 0 ·

1 Answer

DanielZhang-MSFT avatar image
0 Votes"
DanielZhang-MSFT answered

Hi YRK-33345,
Application will often load .DLL files from the application folder first. If it does not find the .DLL file here, it will automatically check the Windows system folders.
First, please try to place the .DLL file in the same folder where the application .exe file is located.
You can also install .DLL files directly to Windows.
1.Copy the .DLL file to your C:\Windows\System32\ folder. (32 bit)
2.Copy the .DLL file to your C:\Windows\SysWOW64\ folder. (64 bit)
3.DLL installation has been completed.
Here is a similar thread you can refer to.
Best Regards,
Daniel Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.