Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / July 2004

Tip: Looking for answers? Try searching our database.

IMetaDateDispenserEx->OpenScope failing with 0x80131107

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben Schwehn - 19 Jul 2004 22:55 GMT
Hello

I have simple native c++ console app that uses the IMetaDataDispenserEx
interface. I first developed it using VC++ Express 2005 Beta1, Windows
XP, Framework 2.0 beta where it works just fine.

I'm now trying to get it to work using VS 6, Windows NT 4, Framework 1.1

here's a very cut down version of the code:

cor.h is the version that comes with VS.net 2003

why do I get this error and what does it mean (errlookup doesn't know
0x80131107)

thanks
Ben

===
#include "stdafx.h"
#include "cor.h"

int main(int argc, char* argv[])
{
    CoInitialize(0);
    IMetaDataDispenserEx* _pMetaDataDispenser = NULL;
    IMetaDataImport* _pMetaDataImport = NULL;
    HRESULT hr = NULL;

//this works
    hr = CoCreateInstance(    CLSID_CorMetaDataDispenser,
        0,
    CLSCTX_INPROC_SERVER,
    IID_IMetaDataDispenserEx,
    reinterpret_cast< void** >(&_pMetaDataDispenser )    );

//this returns 0x80131107
    hr = _pMetaDataDispenser->OpenScope(    L"c:\\folder\\file.exe"            
,0,IID_IMetaDataImport,
            reinterpret_cast<IUnknown**> (&_pMetaDataImport)
                                                );
CoUninitialize();
}
Ben Schwehn - 20 Jul 2004 08:18 GMT
looks like it was caused by trying to open a 2.0 assembly with the 1.1
framework

ben
Mattias Sj?gren - 20 Jul 2004 09:48 GMT
Ben,

>why do I get this error and what does it mean (errlookup doesn't know
>0x80131107)

I see you already found the problem. But FYI, you can find the 0x8013*
HRESULTS in CorError.h in the SDK include directory. 0x80131107 is
CLDB_E_FILE_OLDVER.

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.