Unable to open DLL for Excel on Mac using Parallels

My main stationary machine is a Windows box with a 64-bit version of Win 8.1 and a 32-bit version of Office 2013. I developed a 32-bit DLL with functions in VS2013 that I include in Excel VBA. Functions work fine on Windows.

Then I have a Macbook Pro with 64-bit version of Windows 8.1 and 32-bit version of Office 2010 under Parallels 8. I seem to be unable to work with functions from my DLL under this Mac.

As I tried:

  • I copied my DLL file to the new C:\MyTools folder in Parallels.
  • Link to this folder when loading a DLL in VBA. My VBA code to load a function from a DLL is as follows:

    Declare Function MyDLLfunction Lib "C:\MyTools\MyDLL.dll" (ByVal s As Double) As Double

  • I also tried double slashes \\ to no avail

The undesirable result when using this function from my worksheet in Parallels is that an error code (#VALUE) is displayed in the cell.

Rather, Excel 2010 is incompatible with DLLs at all (don't believe it), or is it a matter of correctly specifying the path from the DLL on Mac? I thought that C:\MyTools\MyDLL.dll would work, since I can see the file in the Windows Explorer tree in Parallels. Or is my Parallels 8 too outdated?

+5
source share
1 answer

This is a shot in the dark, but it may be that your DLL does not compile as a static library, and therefore there are certain dependencies that are present on your development computer (due to the installation of Visual Studio) that are not on the test computer / in the parallel environment.

Try running your DLL in Excel on an identical Windows system without installing a visual studio. If this does not work, the problem is likely to be as above.

0
source

Source: https://habr.com/ru/post/1207873/


All Articles