How To Fix Missing OpenAL32-dll Problem in Windows 10

Missing OpenAL32.dll problem seem to be common problem with many software.

First how the solution can’t be solved: At least in 64-bit Windows 10 grabbing just OpenAL32.dll and registering it to system with regsvr32 doesn’t work. There are some bad solutions to solve this problem. The best solution is simply grabbing the missing dll from http://www.openal.org/ and install it with the official installer it comes with.

In general, if one is missing some software component, it is best to find the official website of the missing software component and hope for the best.

Image courtesy of digitalart at FreeDigitalPhotos.net

This is how to fix the problem when setting up Monkey X installation, too.

 

Using C and DLLs in BlitzMax

BlitzMax apps can be made faster by using C. Also using DLLs in BlitzMax is possible, but that isn’t documented in BlitzMax’s documentation at all.

First, an example of using C code in BlitzMax. As an example we generate the Mandlebrot set using C code to determine does the point belong to the set (see my article on my personal blog on generating the Mandelbrot set, whole example code is in BlitzMax).

To compile the example below, you need to have MinGW configured to BlitzMax.

We start with the C code (save it as mandelbrot.c):

 

Next the BlitzMax code that uses the C code:

Compile and run the code and you’ll see a blue shaded Mandelbrot set that should look like following:

mandelbrot

In the next part of this post we’ll create a DLL in C and call it from BlitzMax.

I’m still mostly using Visual C++ 2008.

The steps to create a DLL:

  • Start Visual C++ and start a new project
  • Select WIN32 console application, name it (in our example Mandelbrot) and press OK
  • Then click ”Next” and select DLL

You’ll get a pre-generated code for a DLL.

The C code for our DLL is following (Mandelbrot.cpp in Visual C++):

 

The BlitzMax code using the DLL is as follows:

The DLL function is called from a BlitzMax function, because otherwise one would get a EXCEPTION_STACK_OVERFLOW.

As always, this information is free. You may use the codes above in your projects as you wish.