Calling FindResource to detect the TYPELIB resource in a COM serve

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).
 
A

_Aditya_

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top