Excel-DNA / Excel-DNA/ExcelDna
Calling C++ dll from VBA using 32 bit Excel
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 292
- Avg merge
- 20d 12h
- Merged PRs (30d)
- 1
Description
Hello, im new to using vb and exceldna and im trying to write excel addin as shell for C++ dll, which exports some function (like `extern "C" double __declspec(dllexport) __stdcall myfunc(const int id, const double X, const double Y)`).
In vb .net class library i wrote code like this:
`
Public Declare Function myfuncLib "fullpath\mydll.dll" ( ByVal id As Long,
ByVal X As Double,
ByVal Y As Double) As Double`
And its working for 64bit Excel. But when i compile my dll for x32 and using it in 32 bit excel i have strange issue: using function `=myfunc(id, X, Y)` form list in Excel, i get value like if i enter `=myfunc(id, id, id)`. I.e. only first value id is passed to myfunc as argument. Can anybody help me?
Contributor guide
Assessment
This issue has not been assessed yet.