This is an old revision of the document!
Calling Managed Code (.NET C#) from Unmanaged Code (Any language)
- Register library.
- Assembly in GAC:
C:\>CD C:\MyLibProj\ C:\>"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.0A\Bin\gacinstall.exe" /i MyLib
- Assembly in miscellaneous folder (not in GAC):
C:\>CD C:\MyLibProj\ C:\>"%WinDir%\Microsoft.NET\Framework64\v4.0.30319\regasm.exe" /CodeBase MyLib.dll
- Create Type Librayr from Assembly:
C:\>CD C:\MyLibProj\ C:\>"%WinDir%\Microsoft.NET\Framework64\v4.0.30319\regasm.exe" /tlb MyLib.dll
- Create calls (unmanaged code) to library.