Windows Server 2008 and com objects - com

I'm moving a Dll (built in c++) from windows 2000 server to a 2008 server but im have some trouble registering it. In 2000 all you normaly have to do is a "regsrv32 name.dll" but this will not work in 2008 because you get a pointer error, iv also tried to use "gacutil /i name.dll" because someone told me this might work, but it didnt. So, I'm kind of desperate, is there anyone that have some solution to how i can get this c++ dll to work in 2000 server so that i can access it from an old classic asp page.
EDIT:
This is the error when running regsrv:
"
The module "name.dll" was loaded but the entry-point DllRegisterServer was not found.
Make sure that "name.dll" is a valid DLL or OCX file and then try again.
"
Note that I cant edit the dll file in anyway.

If UAC is enabled, are you running an elevated command prompt when you call regsvr32? If not, you'll probably get an access denied error in the registration function (which could manifest itself in all sorts of bad ways for something that old).
You have to be logged in as an admin, then run Command Prompt with right-click, "Run as administrator".

Related

regsvr32 msinet.ocx Error

(Trying to solve my ultimate goal- Connecting to FTP from Excel to automate file sharing (VBA Beginner))
I'm trying to add Microsoft Internet Transfer Control but it doesn't show up in Excel VBA when I go to Tools>Reference so I followed this site.
msinet.ocx was not in my system32 or SysWOW64 folder so I think I'm supposed to install it at command line so I initially tried running regsvr32 msinet.ocx at C:\Windows\System32 and C:\Windows\SysWOW64 and I get the same error for both: "The module msinet.ocx failed to load. Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .dll files. The specified module could not be found."
Then I tried running cmd.exe as an administrator and trying it again in both System32 and SysWOW64 and I still get the same error popup. I don't know what to try now. Do I need to do a System Restore? And is that a safe thing to do on my work laptop?
P.S. I'm on Windows 7 Enterprise 64 bit
You properbly need to run the CMD as administrator to get your regsrv32 to work.
I had the same problem in windows 2012 server and it only works when you run the CMD as administrator and then type the regsrv32 "C:\Windows\sysWoW64\msinet.ocx"
I got it finally through this link - https://social.technet.microsoft.com/Forums/windows/en-US/ee5696aa-c94d-481a-bbbe-4dad30ccae7f/vista-error-message-msinetocx-not-correctly-registeredfile-is-missing-or-invalid?forum=itprovistaact
Using Peter's and BVBravo's posts

CreateServer will not create object in vbscript on Windows 2008 R2

I have read a few solutions for this problem but none of them have worked for me. One of the main problems is that I am fairly sure I have a 32-bit dll that I am trying to use and I am trying to run it on a 64-bit server. Also I do not have the source code for the Interop dll. Most of the solutions I found involved making changes to the DLL and recompiling.
I have registered this dll using RegAsm.exe. The dll resides in the C:\Windows\SysWOW64 folder. It appeared to have registered fine, there were no errors.
I am trying to migrate a classic ASP web site from Windows Server 2003 (IIS 6) to Windows Server 2008 R2 (IIS 7.5).
One solution I found mentioned something about creating a VBS script and running that in the SysWOW64 folder. I'm not sure why running the script in the SysWOW64 folder was important but I did it anyway. I still cannot create the object.
I just copied and pasted code from my classic ASP page into the VBS script and added the Wscript.echo command.
Below is my VBS script.
Dim objCrypt, Key, UID, Pwd
Set objCrypt = CreateObject("MyEncryptionTool.Crypt")
Key = "1234" ' Encryption Key
UID = "äRŸê¬ÈH­"
Pwd = "á#‰ë•ÆW¬"
Wscript.echo "UID: " & objCrypt.Decrypt(UID, Key) & vbCrLf & "Pwd: " & objCrypt.Decrypt(Pwd, Key)
The error message that CScript.exe produces is:
C:\Windows\SysWOW64\CryptTest.vbs(2, 1) Microsoft VBScript runtime error: ActiveX component can't create object: 'MyEncryptionTool.Crypt'
This is essentially the same error I am getting in my classic ASP page.
I am fairly sure it was compiled 32-bit and Windows Server 2008 is 64-bit and that may be the source of my problem right there.
Is it possible to use a 32-bit dll on Windows Server 2008 R2?
I should have posted the answer to this back in December 2014 when I figured it out. It was a stupid operator error. There are two dll files for the company's encryption tool. One has the prefix "interop." and the other doesn't.
I was using the one with the "interop." prefix because at the time that was the only dll I knew about. I found the version without the prefix and registered it with no problem and everything works. This came about when I finally found some documentation on the company's encryption tool and it never mentioned the dll with the prefix.

Creating instance of a class registered in SysWOW64

I have migrated my website from Windows Server 32 bit to Windows Server 2008R2 64 bit. The website has a VB6 dll that is being used for all the funcitons.
I have registered the 32bit dll by placing it in SysWOW64 folder. Also, I am able to see the classed registerd using regedit.exe in SysWOW64 folder.
But, when I tried creating instance in VB "Server.CreateObject('myclass')", I am getting error
"Error:429 ActiveX Component Cant create object"
The same works in the existing 32bit server.
Am I missing anything here. Or should I use a different line on creating instance for the class I registerd. Please let me know.
finally did it.. needed to install vb 6 runtime, copy ishims.dll from Program files-> Internet Explorer to syswow 64 ( weird my dll had dependency on that) and lastbut not the least change Data Execution Prevention settings...
You need to run your website in 32 bit mode in IIS 7.5 manager.

Trying to install a Dll from legacy win 2003 server to 2008r2 server and failing

I'm moving a legacy application from a windows 2003 32 bit IIS 6 server to a windows 2008 r2 IIS 7.5 server.
Ultimately, I'm getting a Server.CreateObject(customobject) failed on the app.
Researching this, it seems that the object's DLL needs to be registered with the server.
I went back to the old server, found the dll by running regedit, it was located in C:\windows\system32 folder.
So I moved it over and am trying to register it using regsvr32.exe from the SysWOW64 directory. However, I'm getting two errors depending on what I do:
The command:
regsvr32.exe "I:\mypath\mymodule.dll"
generates
The module "I:\mypath\mymodule.dll" was loaded but the entry-point DllRegisterServer was not found.
Ok, so lets try the options:
regsvr32.exe /n /i "I:\mypath\mymodule.dll"
throws
The module "I:\mypath\mymodule.dll" was loaded but the entry-point DllInstall was not found.
I have no idea what else I can try, I don't think I have the source to the dll, any suggestions please?
I've figured it out,
I had to get .net fw 2.0 sp2 on there and use regasm.exe to register the dll.

Problems with 32-bit ActiveX DLL on 64-bit OS

I'm trying to move a classing ASP site to a 64-bit Windows 2008 server. The problem I have right now (there may be others if/when I get past this one) is that the site depends on an old VB6 DLL (32-bit), and I get the notorious "ActiveX component can't create object" error.
I tried taking IIS7 out of the equation by trying to get it to work with a simple VBS script file, and that's giving me the same thing.
The only dependency this DLL has is ADO 2.6, and from what I've read, this isn't supported and isn't needed for Windows 2008, as WDAC is included and has replaced MDAC.
I use the following to register my component:
C:\Windows\SysWOW64\regsvr32.exe "C:\MyVb6Com.dll"
I checked the registry, and everything appears correct there. My VBS file is also simple:
CreateObject("MyVb6Com.Session")
And it throws the error immediately:
ActiveX component can't create object: 'MyVb6Com.Session'
On the IIS end, I've already tried changing the application pool's settings to enable 32-bit applications, and that didn't help either (of course, if I can't get it to work w/ VBS file, this wouldn't make a difference either way).
Any help would be very much appreciated.
Make sure you use the 32-bit WScript to test your VB Script as well. Double-clicking it will use 64-bit - that will help go to diagnosing your issue.
In the app pool driving your IIS7 website, choose Advanced Settings and near the top, set Enable 32-Bit Applications to True.
IIS7 on a 64-bit machine will not use 32-bit DLLs unless this is set.