First you should check if your DLL (still) exports all required methods.
Then make sure it does not depend on other libraries which are not loaded at the time regsvr runs. Having static (global?) vars is dangerous, you might try to replace your
by a pointer (
CStdiofile* m_myFile = NULL;
) so the instance does not get constructed while loading the DLL. Construct it later on the heap (
m_myFile = new CStdiofile();
Generally you should try to create your DLL in a way that NO code is executed while loading the DLL, so don't use global objects and also be careful what you do in your
. Read MSDN regarding
and regarding the calls regsvr does.
Also you might check out this: http://blogs.msdn.com/b/jigarme/archive/2007/03/17/regsvr32-exe-gives-error-quot-the-specified-procedure-could-not-be-found-quot.aspx
] which shows a sample of what might go wrong.
: Just found something else: http://www.tech-archive.net/Archive/VC/microsoft.public.vc.atl/2007-12/msg00118.html
Ah, 32bit and 64bit - have to remember this :)