Could you hire me? Contact me if you like what I’ve done in this article and think I can create value for your company with my skills.

January 23, 2007 / by Zsolt Soczó

Hogyan kell a type library-t beágyazni a DLL-be (C++)?

Furcsa módon az IE nem képes scriptből meghívni egy ojjektum metódusát, ha nincs hozzá type lib. Azt gondoltam az IDispatch-hez nem kell tlb, de csak így működött jól.

Így kell berakni a type library-t erőforrásként a kimeneti dll-be. Sajnos az ATL type library regisztráló izéje csak a HKCR-ba hajlandó telepíteni a TLB-t, nekem viszont mindent a HKCU-ban kell megoldanom, hogy nonadmin is telepíthesse a komponenst.

Ezért kézzel kell regisztrálni az rgs-sel, pl. így:

[source:C++]
HKCU
{
NoRemove Software
{
NoRemove Classes
{
NoRemove TypeLib
{
ForceRemove {8A786A39-7654-4FE0-880F-4E2AA5166D3A}
{
1.0
{
0
{
win32 = s ‘%MODULE%’
{
}
FLAGS = s ‘0’
{
}
HELPDIR
{
}
}
}
}

}
}
}
}

[/source]

Could you hire me? Contact me if you like what I’ve done in this article and think I can create value for your company with my skills.

LEAVE A COMMENT

1 COMMENTS

  • gaba January 23, 2007

    offtopic, de így szebb lehetne a forráskód-részlet: http://erik.range-it.de/wordpress/plugins/syntaxhighlighter/