Calling FindResource to detect the TYPELIB resource in a COM serve

  • Thread starter Thread starter _Aditya_
  • Start date Start date
A

_Aditya_

Has anyone tried to call FindResource to determine the "TYPELIB" resource
that is embedded in a COM server?

I am using VB (.NET 2008) to try to accomplish this task.

(Why? I want to distinguish between a COM server and other types).
 
Found the solution:

<DllImport("kernel32.dll", EntryPoint:="FindResource", SetLastError:=True)> _
Private Function FindResource(ByVal hModule As IntPtr, ByVal lpName As
StringBuilder, ByVal lpType As StringBuilder) As IntPtr
'
End Function

..
..
..

ResName = New StringBuilder("#1")
ResType = New StringBuilder("TYPELIB")
hRes = FindResource(hModule, ResName, ResType)
 
Back
Top