News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

using mscorlib.dll with masm

Started by ToutEnMasm, April 07, 2009, 07:43:11 PM

Previous topic - Next topic

ToutEnMasm

Hello,
There is no header's files for this.All defines are in the typelib of the dll.
I took the idl file given by oleview,rebuild it with midl who made a .h,a .c and the .tlb.
Stay to traslate the .H and the .c and here is the result
My system is XP SP3,I am not sure the guids are the same with vista for example.



[attachment deleted by admin]

baltoro

Interesting,...
I compared your GUIDS and COM/OLE Object Viewer IDL output with what exists on my machine, just for the heck of it.
I use Visual C++ NET 2002 Standard Edition, which installs Version 1.0 of the Common Language Runtime Library. I never upgraded.   
...but, the GUIDS are all different (I didn't check the WHOLE Library, but, I assume, since COM interfaces are immutable, that the GUIDS for the entire mscorlib.dll are different). Below, I have listed for comparison, common interfaces from your .NET Framework (which I assume is version 3), and my version 1.0,...
The first two lines of each block contain the TEXTEQU IID from your listing, and the following three lines contain the equivalent from Version 1.0.

*************************************************************************************
Comparision of Various Version 1.0 Library COM Interface IIDs   
*************************************************************************************
Common Language Runtime Library, version 1.0   
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\mscorlib.dll   
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\mscorlib.tlb   
TypeLibID = {BED7F4EA-1A96-11D2-8F08-00A0C9A6186D}   
*************************************************************************************

(ToutEnMasm)    sIID__AppDomain   TEXTEQU   
<{005F696DCh,02B29h,03663h,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System._AppDomain     (interface _AppDomain)
IID = {05F696DC-2B29-3663-AD8B-C4389CF2A713}   

(ToutEnMasm)    sIID__Object   TEXTEQU   
<{065074F7Fh,063C0h,0304Eh,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System._Object    (interface _Object)
IID = {65074F7F-63C0-304E-AF0A-D51741CB4A8D}

(ToutEnMasm)    sIID_IReflect   TEXTEQU   
<{0AFBF15E5h,0C37Ch,011D2h,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System.Reflection.IReflect     (interface IReflect)
IID = {AFBF15E5-C37C-11D2-B88E-00A0C9B471B8}   

(ToutEnMasm)    sIID__Type   TEXTEQU   
<{0BCA8B44Dh,0AAD6h,03A86h,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System.Type    (interface _Type)   
IID = {BCA8B44D-AAD6-3A86-8AB7-03349F4F2DA2}     

(ToutEnMasm)    sIID__Thread   TEXTEQU   
<{0C281C7F1h,04AA9h,03517h,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System.Threading.Thread    (interface _Thread)
IID = {C281C7F1-4AA9-3517-961A-463CFED57E75}   

(ToutEnMasm)    sIID__StackFrame   TEXTEQU   
<{00E9B8E47h,0CA67h,038B6h,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System.Diagnostics.StackFrame    (interface _StackFrame)
IID = {0E9B8E47-CA67-38B6-B9DB-2C42EE757B08}   

(ToutEnMasm)    sIID__Assembly   TEXTEQU   
<{017156360h,02F1Ah,0384Ah,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System.Reflection.Assembly    (interface _Assembly)
IID = {17156360-2F1A-384A-BC52-FDE93C215C5B}   

(ToutEnMasm)    sIID__MethodBase   TEXTEQU   
<{06240837Ah,0707Fh,03181h,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System.Reflection.MethodBase    (interface _MethodBase)
IID = {6240837A-707F-3181-8E98-A36AE086766B}   

(ToutEnMasm)    sIID__Stream   TEXTEQU   
<{02752364Ah,0924Fh,03603h,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System.IO.Stream    (interface _Stream)
IID = {2752364A-924F-3603-8F6F-6586DF98B292}

(ToutEnMasm)    sIID__ComVisibleAttribute   TEXTEQU   
<{01E7FFFE2h,0AAD9h,034EEh,{0C0h,0,0,0,0,0,0,046h}}>
(Version 1.0 Common Language Runtime Library)   
System.Runtime.InteropServices.ComVisibleAttribute    (interface _ComVisibleAttribute)
IID = {1E7FFFE2-AAd9-34EE-8A9F-3C016B880FF0}   


Baltoro

ToutEnMasm


I have searched a little on the subject (using c++ express) and i see know that there isn't only the guid that change but also the code.
The classic example on how launch a fonction in an execute program works with framework 1.5.
With framework 3.5 (actual) all is changed and i ave only the following piece of code to do it.Seems to be not complet,i just put it here in case who someone have a soluce.
Quote
HRESULT hrCorBind = CorBindToRuntimeEx(
    NULL, // Load the latest CLR version available
    NULL, // Workstation GC ("wks" or "svr" overrides) L"wks"
    0, // No flags needed
    CLSID_CLRRuntimeHost,
    IID_ICLRRuntimeHost,
    (PVOID*)&pClrHost);

HRESULT hrExecute = pClrHost->ExecuteInDefaultAppDomain(
    (LPCWSTR) "c:/Documents and Settings/Yves/Mes documents/Visual Studio 2008/Projects/ExeAppele/debug/ExeAppele.exe",
   (LPCWSTR)"ExeAppele, Version=1.0.3395.36543, Culture=neutral, PublicKeyToken=5c43dd1cfd0dffe7",
    (LPCWSTR)"Essais::Fonctions",(LPCWSTR) "SayHello",
     retVal);
;retval stay undeterminate