I am using VS 2008 to create a DLL which is then called by a VFP Executable.
When I compile the DLL on the Development Machine (Windows 7 64 bit) it automatically registers the dll and everything runs exactly as expected.
When I copy the DLL to the Windows Server machine, I assume I need to register it. I follow this procedure:
Open Powershell (run as administrator)
regsvr32 "path to dll here\mydll.dll"
I get the following error:
The Module "path to dll here\mydll.dll" was loaded but the entry-point DLLRegisterServer was not found.
Make sure that "path to dll here\mydll.dll" is a valid DLL or OCX file and then try again.
On the Dev machine - the dll is actually in the bin\release folder where it is put during the compile. On the WS 2012 machine, I dropped it in the same folder with the installed VFP EXE.
So - what is VS 2008 doing to correctly load this dll on my Development machine that I am not doing manually on the WS 2012 machine.
It is built with Register for Com Interop checked. I have built it with Target CPU is x86 and dot net framework 2.0 is targeted (advanced compile options). I have also tried with Any CPU - they both work on the dev machine, but nothing will register on the WS 2012 machine. I have checked the registry on the WS machine and there are no references to the DLL.
I have run Process Monitor and find the following:
regsvr32.exe 4176 CreateFileMapping C:\Program Files (x86)\Software Plus\PMImport.dll FILE LOCKED WITH ONLY READERS SyncType: SyncTypeCreateSection, PageProtection:
I am lost as to why this won't register. This is a dll I created and it doesn't have the DLLRegisterServer in it, but it is not required on the dev machine which is W7.