Writing a C++ dll for Excel with Visual Studio .Net

S

S

Dear All,

Last year, with Visual Studio professional version 6, I successfully
compiled a C++ dll that I then used within Excel.
Now, I need to expand this program and unfortunately I am struggling
with the new compiler: Visual Studio .NET 2003 professional edition.
Last year, I followed the detailed instructions presented here:

http://romahi.com/yazann/software/dll.htm

and now I am a bit lost.

What I am doing is to open a new "Win32" project from the "Visual C++
Projects".
I then write my code within it and eventually, when I try to call the
dll code within Excel VBA I get this error:

Run-time error '453':

Can't find DLL entry point YYYY in
C:\filepath\XXXX.dll

Have you got any ideas?

Thanks very much for your help.

Warmest regards,

Avi
 
R

Rob Bovey

Hi Avi,

It sounds like you have not included a Module Definition File (.def) in
your project. This is what allows you to export the names of functions in an
unmangled format that you can use in Excel. Choose File/Add New Item from
the VS.NET menu.In the Add New Item Dialog, select Visual C++ from the
categories list and then select Module Definition File from the templates
list.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
S

S

Hi Rob,

I just wanted to thank you for your help. You solved my problem and now I can work.

Thanks again,

Avi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top