0

Is it possible to get the RDS.Dataspace object (VB6 COM) to work on Windows 10?

I have some code in an old vb6 app...

Set ds = CreateObject("RDS.DataSpace")
ds.InternetTimeout = 30000000
Set ComObj = ds.CreateObject("MyComName.MyClassMod", "\\127.0.0.1")

This works perfectly fine on both a Windows 7 machine as well as a Windows Server 2012 R2 machine. But for some reason when trying to run it on my development machine that is a Windows 10 machine I usually get one of the following errors on the last line...

Runtime error '4100': Method 'CreateObject' of object 'IDataspace' failed

or...

Runtime error '4100': Method '~' of object '~' failed

I have tried (but not limited to) things on the following list...

  1. Adding three dlls (msadcf.dll, msadcfr.dll, msadcs.dll) to the directory C:\Program Files (x86)\Common Files\system\msadc\ because they did not exist.
  2. Unregistering then registering the files from #1 using regsvr32.
  3. Adding two registry files found with those files (handler.reg, handsafe.reg) to the registry.
  4. Disabling DEP as much as possible.
  5. Disabling "Enforce access checks for this application" in Component Services. Found in the application properties area.
  6. Set the identify to my normal user account that is a Domain Admin, as well as tried to set the user to a new account I created with local admin rights.
  7. Have tried using "\127.0.0.1" without IIS running and tried "http://127.0.0.1" with IIS running.
  8. Beating my head on my desk.
  9. Adding the key (MyComName.MyClassMod) to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ADCLaunch\ key in the registry to register the COM object.
  10. Using Procmon.exe to track down the issue.
  11. Disabling Windows firewall.
  12. Checked event viewer for anything that would help.

I just can not make this old stuff work! Has anyone had any luck with COM objects on Windows 10? If so please tell me what am I doing wrong!

This question is not like the What does "Method '~' of object '~' failed" mean? question. It is marked answered with an answer that will not solve this issue. I'm using the EXACT same dll, exe, ocx, etc files. This has to do with misconfiguration or something missing. I just don't know which one it is.

Arvo Bowen
  • 4,524
  • 6
  • 51
  • 109
  • Possible duplicate of [What does "Method '~' of object '~' failed" mean?](https://stackoverflow.com/questions/1302026/what-does-method-of-object-failed-mean) – C-Pound Guru Feb 05 '18 at 23:53
  • That question is answered with an answer that is not my issue. I'm using the same versions of everything. All dlls and exes, etc.. – Arvo Bowen Feb 06 '18 at 01:39
  • What happens if you remove the server part of `CreateObject`? – ACatInLove Feb 06 '18 at 02:27
  • If you are talking about the ds.CreateObject() then ... When trying to compile I get a VB error. "Compile Error: Argument not optional". If you are talking about the ds object getting created then I don't have a "server" part. – Arvo Bowen Feb 06 '18 at 02:58
  • 2
    It has nothing to do with VB6. It's only dependent on the RDS.Dataspace object. If it's installed on the machine, then it may work. If it's not then it will never work. RDS is part of Windows DAC/MDAC. You're not supposed to install it by yourself, but use a redistributable. Note RDS is deprecated for many years now: https://en.wikipedia.org/wiki/Microsoft_Data_Access_Components#Remote_Data_Services_(RDS) PS: I do have it on my Windows 10 box – Simon Mourier Feb 06 '18 at 06:43
  • I think you should update the title. – andras.tim Feb 06 '18 at 10:09
  • Arvo I'd go with @Simon Mourier's suggestion; also I think andras.tim is right about the title. It is far too general. – StayOnTarget Feb 06 '18 at 12:24
  • @andras.tim Sure no problem, can you give me a suggestion please? – Arvo Bowen Feb 06 '18 at 16:38
  • @SimonMourier I 100% agree with everything you said. And if I could get away from this dreaded RDS/COM/VB6 junk I would drop it in a heartbeat! I'm working on getting something new developed in c# to replace this but have not been able to get around to it yet... Mostly because I'm suck trying to support this old stuff all the time. At least I know it's possible to get it to work on Windows 10 now, THANKS! I have it working on Server 2012 r2 with no issues at all. I just wish there was some things I could check step by step to make sure it was set up correctly or better error messages! – Arvo Bowen Feb 06 '18 at 16:42
  • @ArvoBowen If @KDᴀᴠɪs was right, I think the final title should be covered a bit narrow scope. E.g. should contains `DataSpace` string ;) Thx! – andras.tim Feb 06 '18 at 16:47
  • @ArvoBowen - here is what I have on my PC. RDS.Dataspace should point to msadco.dll in this directory: https://pastebin.com/ddYpcKeN (or the similar one for 32-bit) I don't know why it's installed, but it's there. If you have them, then your registry may be broken. You can try to call regsvr32 on the dlls – Simon Mourier Feb 06 '18 at 17:11

2 Answers2

2

So like K.Davis said in his answer, MSADC in no longer supported on Windows. So the goal to getting my old software working on Windows 10 is simple, I just need to add back MSADC like it was in previous versions of Windows.

This might not be something everyone wants to do but I have done this many times now and it has worked without any issues.

There are some files I had to pull from an older OS (I think it was Windows 7) that were missing from Windows 10. I have included them as well as an install script (install.bat) to install MSADC on Windows 10.

The installer I made with all the relevant files can be downloaded from My Google Drive.

The batch script (install.bat) located in the download above has the following contents...

@ECHO OFF
CLS
SET "MSADCPATH=%COMMONPROGRAMFILES(X86)%\system\msadc"

ECHO Copying files to "%MSADCPATH%"...
copy /Y handler.reg "%MSADCPATH%"
copy /Y handsafe.reg "%MSADCPATH%"
copy /Y msadcf.dll "%MSADCPATH%"
copy /Y msadcfr.dll "%MSADCPATH%"
copy /Y msadcs.dll "%MSADCPATH%"
ECHO.

ECHO Importing registry entries...
REG import handler.reg
REG import handsafe.reg
ECHO.

ECHO Registering files...
ECHO   registering msadcf.dll...
regsvr32 /s /u "%MSADCPATH%\msadcf.dll"
regsvr32 /s "%MSADCPATH%\msadcf.dll"
ECHO   [done]
ECHO   registering msadcfr.dll...
regsvr32 /s /u "%MSADCPATH%\msadcfr.dll"
regsvr32 /s "%MSADCPATH%\msadcfr.dll"
ECHO   [done]
ECHO   registering msadcs.dll...
regsvr32 /s /u "%MSADCPATH%\msadcs.dll"
regsvr32 /s "%MSADCPATH%\msadcs.dll"
ECHO   [done]
ECHO   registering msdfmap.dll...
regsvr32 /s /u "%MSADCPATH%\msdfmap.dll"
regsvr32 /s "%MSADCPATH%\msdfmap.dll"
ECHO   [done]
ECHO.
Arvo Bowen
  • 4,524
  • 6
  • 51
  • 109
0

It appears that upon doing some internet searching that after Windows 8, the DataSpace object is no longer included in the Windows OS.

From https://learn.microsoft.com/...

Beginning with Windows 8 and Windows Server 2012, RDS server components are no longer included in the Windows operating system (see Windows 8 and Windows Server 2012 Compatibility Cookbook for more detail). RDS client components will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Applications that use RDS should migrate to WCF Data Service.

So essentially, you're not able to create your object because your object literally doesn't exist anymore.

Community
  • 1
  • 1
K.Dᴀᴠɪs
  • 9,945
  • 11
  • 33
  • 43
  • I'm not sure if you missed it or not but I'm my question I say that it works perfectly fine for me on server 2012r2. – Arvo Bowen Feb 06 '18 at 01:37
  • IDK what to tell you about your server, but that error you are receiving is for an object you are trying to create that doesn't exist. You would have to contact MS and ask why they were nice enough to include in on your server even though they said they wouldn't. – K.Dᴀᴠɪs Feb 06 '18 at 01:50
  • Check your registry. It's not there in Windows 10. – K.Dᴀᴠɪs Feb 06 '18 at 01:51
  • Where can I check that at in the registry? Your snipt said starting with Windows 8 and `Windows Server 2012`. It works on Server 2012r2 which was released later. So I'm just saying that's not 100% accurate. – Arvo Bowen Feb 06 '18 at 01:56
  • Davis, I searched my Windows 10 registry for `BD96C556-65A3-11D0-983A-00C04FC29E36` and found it. The (Default) string is "RDS.DataSpace". – Arvo Bowen Feb 06 '18 at 02:00
  • @ArvoBowen It's the *server* part that is removed. The client part `RDS.DataSpace` is there. If instead of `\\127.0.0.1` you point to remote server that does have RDS server component registered in COM+ apps for remoting your snippet might work. – wqw Feb 15 '18 at 14:56