467,906 Members | 1,617 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,906 developers. It's quick & easy.

listing functions in unmanaged .dll

how do i list all available functions in an unmanaged .dll?
i tried using reflection, but that seems to only work with managed assemblies
May 28 '07 #1
  • viewed: 2293
Share:
6 Replies


".paul." wrote:
how do i list all available functions in an unmanaged .dll?
i tried using reflection, but that seems to only work with managed assemblies
forgot to mention i'm using vb.net 2005.
May 28 '07 #2
..paul. wrote:
how do i list all available functions in an unmanaged .dll?
i tried using reflection, but that seems to only work with managed assemblies
Hi, Paul

If the unmanaged .dll is COM based:

1) Use Tlbimp
[http://msdn2.microsoft.com/en-us/lib...x(vs.80).aspx]
2) Examine file with
Ildasm
[http://msdn2.microsoft.com/en-us/lib...1(VS.80).aspx]
3) And than wrap with
RCW [http://msdn2.microsoft.com/en-us/library/8bwh56xe.aspx]

HTH,
Petar Atanasov
http://a-wake.net
May 28 '07 #3
>how do i list all available functions in an unmanaged .dll?

If it isn't a COM library, use a tool like Dumpbin.exe or Depends.exe
(Dependency Walker, http://www.dependencywalker.com).
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
May 28 '07 #4


"Petar Atanasov" wrote:
..paul. wrote:
how do i list all available functions in an unmanaged .dll?
i tried using reflection, but that seems to only work with managed assemblies

Hi, Paul

If the unmanaged .dll is COM based:

1) Use Tlbimp
[http://msdn2.microsoft.com/en-us/lib...x(vs.80).aspx]
2) Examine file with
Ildasm
[http://msdn2.microsoft.com/en-us/lib...1(VS.80).aspx]
3) And than wrap with
RCW [http://msdn2.microsoft.com/en-us/library/8bwh56xe.aspx]

HTH,
Petar Atanasov
http://a-wake.net

i tried this:

Dim result As DialogResult

result = ofd1.ShowDialog()

If result = Windows.Forms.DialogResult.OK Then
''
'' for this example ofd1.filename =
"c:\windows\system32\wininet.dll"
''
System.Diagnostics.Process.Start("C:\Program Files\Microsoft
Visual _Studio 8\SDK\v2.0\Bin\tlbimp.exe " & ofd1.FileName &
"/out:myTest.dll")
Threading.Thread.Sleep(5000)
System.Diagnostics.Process.Start("C:\Program Files\Microsoft
Visual _Studio 8\SDK\v2.0\Bin\ildasm.exe myTest.dll/out:myTest.il")
End If

but it doesn't work. error is - file not found.
May 28 '07 #5


"Petar Atanasov" wrote:
..paul. wrote:
how do i list all available functions in an unmanaged .dll?
i tried using reflection, but that seems to only work with managed assemblies

Hi, Paul

If the unmanaged .dll is COM based:

1) Use Tlbimp
[http://msdn2.microsoft.com/en-us/lib...x(vs.80).aspx]
2) Examine file with
Ildasm
[http://msdn2.microsoft.com/en-us/lib...1(VS.80).aspx]
3) And than wrap with
RCW [http://msdn2.microsoft.com/en-us/library/8bwh56xe.aspx]

HTH,
Petar Atanasov
http://a-wake.net
interesting photography
May 28 '07 #6
..paul. wrote:
>
"Petar Atanasov" wrote:
>..paul. wrote:
>>how do i list all available functions in an unmanaged .dll?
i tried using reflection, but that seems to only work with managed assemblies
Hi, Paul

If the unmanaged .dll is COM based:

1) Use Tlbimp
[http://msdn2.microsoft.com/en-us/lib...x(vs.80).aspx]
2) Examine file with
Ildasm
[http://msdn2.microsoft.com/en-us/lib...1(VS.80).aspx]
3) And than wrap with
RCW [http://msdn2.microsoft.com/en-us/library/8bwh56xe.aspx]

HTH,
Petar Atanasov
http://a-wake.net


i tried this:

Dim result As DialogResult

result = ofd1.ShowDialog()

If result = Windows.Forms.DialogResult.OK Then
''
'' for this example ofd1.filename =
"c:\windows\system32\wininet.dll"
''
System.Diagnostics.Process.Start("C:\Program Files\Microsoft
Visual _Studio 8\SDK\v2.0\Bin\tlbimp.exe " & ofd1.FileName &
"/out:myTest.dll")
Threading.Thread.Sleep(5000)
System.Diagnostics.Process.Start("C:\Program Files\Microsoft
Visual _Studio 8\SDK\v2.0\Bin\ildasm.exe myTest.dll/out:myTest.il")
End If

but it doesn't work. error is - file not found.
Paul,

Debug more carefully: Drive:\Path\TlbImp.exe
;)

Regards,
Petar Atanasov
http://a-wake.net
May 29 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bill | last post: by
30 posts views Thread by Will Pittenger | last post: by
2 posts views Thread by Steve McLellan | last post: by
3 posts views Thread by Tommy Svensson \(InfoGrafix\) | last post: by
9 posts views Thread by Amit Dedhia | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.