11

We had been using the old msado15.dll in our program . And we used to import it #import "msado15.dll" . Now just a few days back we upgraded to Windows 8. And alas, our software stopped working on Windows 7 which didnt have Service pack 1 installed. Earlier when we were using Windows 7 we had upgraded to Service pack 1 and the same problem was happening so we uninstalled the service pack 1 for windows 7 from all machines and everything worked fine.

But with Windows 8 i suppose they have already changed the msado15.dll. I did some research online and they said that we should replace the imports with the msado60.tlb but this also didnt work with our compilation breaking.

This is how we used to refer in our C++ environment

import "c:\program Files\Common Files\system\ado\msado15.dll" rename_namespace("ADOCG") rename("EOF","EndofFile") 

I have changed it to

import "c:\program Files\Common Files\system\ado\msado28.tlb" rename_namespace("ADOCG") rename("EOF","EndofFile")

& also tried

import "c:\program Files\Common Files\system\ado\msado60.tlb" rename_namespace("ADOCG") rename("EOF","EndofFile")

As suggested by Microsoft Link . But still it dosent work on XP machines & Windows 7 Machines which does not have Service pack 1 installed.

Can any one suggest proper steps that we can follow so as to get our program running on Windows 7 without service pack 1 as well as on windows 8.

Have been stuck with this issue for a few days now . help will be much appreciated.

With Regards, Saurabh

Akaanthan Ccoder
  • 2,159
  • 5
  • 21
  • 37
Saurabh
  • 241
  • 2
  • 12
  • How I handled this @ work was a little weird, but it worked. I took the msado15.dll-generated tli and tlh files generated from a scrap project on an old VS2008/Win7 machine, then just threw out the import statements entirely. The stdafx.h header included the tlh, the stdafx.cpp pulled in the tli. It made no sense to me to import the same .dll s over and over with each full build. As it turns out, it also solved a number of other problems as well. Dunno if it will work for you, but hell, you've likely tried stranger things by this point. – WhozCraig Nov 01 '12 at 03:20
  • Ya thanks a lot, that was really helpful. What we did was similar to the solution suggested by you. We took the msaso15.dll of previous i.e. the Windows 7 without sp1 version and imported that. And the problem vanished. I think this means that we are still using the old msado15.dll. But as long as it works we are happy. Thanks again. – Saurabh Nov 01 '12 at 11:23
  • You're likely not using the DLL (per'se). You're using the interfaces and CLSID's defined in the type library of the DLL. The actual runtime used at CoCreateInstance() time is either installed by you through a redistributable MSI, or already present on the system. I just took on the middle man and generated the TLH/TLI files once, then dropped the whole import mechanism entirely and checked the TLH/TLI files directly into the source base of the project. – WhozCraig Nov 01 '12 at 16:57
  • Ya Got it.. Thanks a lot.. :-) you suggestion was really helpful.. – Saurabh Nov 02 '12 at 09:34
  • 1
    its a shame they stopped you from shipping your dll side by side with the .exe and it 'just work' esp for the vs runtime - doing that utterly negates this class of problems since you always run with the version you tested against and don't rely on it coming from the system. i never had a dll hell until ms tried to fix it for other programmers... worst of all the fixes came after the problem was obsolete due to abundance of hard drive space. – jheriko Nov 27 '13 at 03:48
  • @Saurabh -- can you post what you did as an answer so I can upvote it for you? – LThode Feb 10 '15 at 15:51
  • @LThode I already mentioned what we did. - We took the msaso15.dll of previous i.e. the Windows 7 without sp1 version and imported that. And the problem vanished. I think this means that we are still using the old msado15.dll. But as long as it works we are happy. – Saurabh Feb 25 '15 at 02:48
  • @Saurabh -- I'll post a community wiki then. – LThode Feb 25 '15 at 13:55

1 Answers1

0

This was resolved as per Saurabh's comment:

What we did was similar to the solution suggested by you. We took the msaso15.dll of previous i.e. the Windows 7 without sp1 version and imported that. And the problem vanished. I think this means that we are still using the old msado15.dll. But as long as it works we are happy.

LThode
  • 1,843
  • 1
  • 17
  • 28