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.