Discussion:
registering my DLL
(too old to reply)
Lynn McGuire
2011-04-18 19:56:08 UTC
Permalink
Raw Message
I create a Win32 DLL that is callable from Excel (2003, 2010, etc)
VBA code. Right I tell people to put the directory that my DLL
is installed in their path. Or, they can copy my DLL and its
files into c:\windows\system32.

Is there a way to automatically register my DLL so that my
users do not have to do this ?

I have been looking at DllRegisterServer but it seems very
involved:
http://msdn.microsoft.com/en-us/library/ms682162%28v=vs.85%29.aspx

Thanks,
Lynn
David Lowndes
2011-04-18 21:55:35 UTC
Permalink
Raw Message
Post by Lynn McGuire
I create a Win32 DLL that is callable from Excel (2003, 2010, etc)
VBA code. Right I tell people to put the directory that my DLL
is installed in their path. Or, they can copy my DLL and its
files into c:\windows\system32.
Is there a way to automatically register my DLL so that my
users do not have to do this ?
How is your DLL called from Excel?

From what you've mentioned it would appear that your DLL is just a
normal one (no COM/registration necessary). If so there's nothing to
do.

Dave
Lynn McGuire
2011-04-18 22:00:30 UTC
Permalink
Raw Message
Post by David Lowndes
Post by Lynn McGuire
I create a Win32 DLL that is callable from Excel (2003, 2010, etc)
VBA code. Right I tell people to put the directory that my DLL
is installed in their path. Or, they can copy my DLL and its
files into c:\windows\system32.
Is there a way to automatically register my DLL so that my
users do not have to do this ?
How is your DLL called from Excel?
From what you've mentioned it would appear that your DLL is just a
normal one (no COM/registration necessary). If so there's nothing to
do.
Dave
No COM is available at this time in my DLL. I suspected
as much. I just read a url that claims that Excel does not
set the working directory to the spreadsheet directory. If
that is the case then having the DLL in the same directory
as the spreadsheet won't work either.

Thanks,
Lynn
M. Shoaib Surya
2011-04-20 03:22:51 UTC
Permalink
Raw Message
Post by Lynn McGuire
Post by David Lowndes
Post by Lynn McGuire
I create a Win32 DLL that is callable from Excel (2003, 2010, etc)
VBA code. Right I tell people to put the directory that my DLL
is installed in their path. Or, they can copy my DLL and its
files into c:\windows\system32.
Is there a way to automatically register my DLL so that my
users do not have to do this ?
How is your DLL called from Excel?
From what you've mentioned it would appear that your DLL is just a
normal one (no COM/registration necessary). If so there's nothing to
do.
Dave
No COM is available at this time in my DLL. I suspected
as much. I just read a url that claims that Excel does not
set the working directory to the spreadsheet directory. If
that is the case then having the DLL in the same directory
as the spreadsheet won't work either.
Thanks,
Lynn
Lynn,
The point that you are probably missing is that a simple DLL is not
registered but just picked up based on the DLL search order as detailed at
http://msdn.microsoft.com/en-us/library/ms682586.aspx.

Given that, adding the path where your DLL resides in the PATH environment
variable may be one other alternative you may want to try.

Regards,
Shoaib.

Loading...