What does it mean to append “\” to file paths under HKCR\TypeLib\

后端 未结 2 1451
[愿得一人]
[愿得一人] 2021-01-22 12:27

I\'ve seen several (not all) registry values like the followings, when trying to parse out the file path under the TypeLib registry key:

HKEY_CLASS_ROOT\\TypeLib         


        
相关标签:
2条回答
  • 2021-01-22 12:50

    usually we use LoadRegTypeLib for load typelib based on registry information. the The function LoadRegTypeLib defers to LoadTypeLib to load the file. and read Remarks section for LoadTypeLib

    By default, the type library is extracted from the first resource of type ITypeLib. To load a different type of library resource, append an integer index to szFile. For example:

    ITypeLib *ptlib;
    LoadTypeLib("C:\\MONTANA\\EXE\\MFA.EXE\\3", &ptlib)
    

    This statement loads the type library resource 3 from the file Mfa.exe file.

    0 讨论(0)
  • 2021-01-22 13:12

    In Visual Studio use File > Open > File and select C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\mswebprj.dll. You'll see the resources embedded in the DLL. Open the TYPELIB node and you'll instantly see what 5 means.

    It is the resource id.

    More typically there is only one type library embedded in the file and has resource id #1. Sometimes the type library is not embedded but stored in a separate file, commonly with the .tlb or .olb filename extension. Like a .NET [ComVisible] assembly, Office is a common example.

    0 讨论(0)
提交回复
热议问题