Solved

32 vs. 64 bit DLL

Posted on 2013-12-11
11
302 Views
Last Modified: 2013-12-11
I have an Excel spreadsheet which access a 32 bit DLL to access external data. This DLL resides in the same directory as the spreadsheet on a network location.

The users have asked me to make this spreadsheet compatible (be useable) from both their 32 and 64 bit versions of Excel. There is a 64 bit version of the DLL available with exactly the same name as the 32 bit version.

How do I make this work?
0
Comment
Question by:leonstryker
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 29

Assisted Solution

by:gowflow
gowflow earned 250 total points
ID: 39711695
I guess you would rename the 32 bit version to .old and put the 64 there as presume 64 supports 32 and 64  !!! but u need to try that first.
gowflow
0
 
LVL 29

Author Comment

by:leonstryker
ID: 39711703
No, the 64 bit version does not work with 32 bit Excel. I guess that is why they sent me both .
0
 
LVL 29

Expert Comment

by:gowflow
ID: 39711718
ok at this point I do not see what is happening in Excel and why you need a dll. Can you brief me more in details why is it that you need this dll and how you go about accessing it ? I am intrigued at this point as with all my knowledge of Excel this is the first time I see this kind of request.
gowflow
0
 
LVL 41

Expert Comment

by:pcelba
ID: 39711748
Create two subfolders (e.g. DLL32 and DLL64) and place appropriate DLLs into these subfolders. The spreadsheet then has to decide which one to use so check the OS version and then Excel version.

How to retrieve OS version:
http://www.mrexcel.com/forum/excel-questions/665816-excel-visual-basic-applications-get-version-os-computer.html

How to retrieve Excel version (derived by used VBA version):
http://msdn.microsoft.com/en-us/library/office/ff700513(v=office.11).aspx
(so you don't need OS version in fact...)
0
 
LVL 29

Author Comment

by:leonstryker
ID: 39711755
The DLL is created and given to us by 1010Data (http://www.1010data.com/). 1010Data basically maintains a none relational database which can be used, maintained, and queried by the client (us). It can store a truly humongous amount of data. With the DLL we can query our data and benefit from their compression and querying functionality.

To access the DLL there are a bunch of Declarations such as:

Public Declare PtrSafe Sub TentenGetAPIVersion Lib "lib1010vbasdk.dll" (ByRef apiversion As String)
Public Declare PtrSafe Function TentenNewHandle Lib "lib1010vbasdk.dll" () As Long

Open in new window

Public Declare PtrSafe Sub TentenGetAPIVersion Lib "lib1010vbasdk.dll" (ByRef apiversion As String)
Public Declare PtrSafe Function TentenNewHandle Lib "lib1010vbasdk.dll" () As Long
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 29

Author Comment

by:leonstryker
ID: 39711763
I know how to check the Excel version, but how do I point Excel to a different DLL folder?
0
 
LVL 41

Accepted Solution

by:
pcelba earned 250 total points
ID: 39711786
So if the Excel does not support path in dll name:
Public Declare PtrSafe Function TentenNewHandle Lib "YOURSUBFOLDER\lib1010vbasdk.dll" () As Long

then you can rename one DLL:

Public Declare PtrSafe Function TentenNewHandle Lib "lib1010vbasdk_64.dll" () As Long
0
 
LVL 29

Expert Comment

by:gowflow
ID: 39711956
Intersting ... but out of my league. :)
gowflow
0
 
LVL 29

Author Closing Comment

by:leonstryker
ID: 39712288
Renaming the DLLs actually works, so I am able to place both DLLs in the same directory and I have tested both DLLs from different versions of Excel.

The only issue I have at the moment is that Conditional Compilation, that is:

#If VBA7

is not working. Both versions seem to return nothing and the declarations are not branched.
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39712342
0
 
LVL 29

Author Comment

by:leonstryker
ID: 39712371
My follow up question is here http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_28316039.html

Please post there so we can continue the discussion.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Excel 6 18
onOpen 14 42
VBA Code to Generate Excel Graph Data Labels Automatically 4 14
Response to Macro Filter Fix 2 7
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now