Regarding the tool for finding functions and decalaration syntax in windows dll
-
Hi to all I was interested in listing the sql servers available. I found some code " using System.Runtime.InteropServices; " Code is used like that for using windows dll. For that we need to define the method that we want to use as follows : [DllImport("odbc32.dll")] private static extern short SQLAllocHandle( short hType, IntPtr inputHandle, out IntPtr outputHandle); So I want to know that is there any tool to find the declaration of the functions available in the DLL. Please lemme know how can I find the tool to do the same ? If I use IDSAM then it gives the same for .NET libraries only not for windows library. Thanks in Avdvance
-
Hi to all I was interested in listing the sql servers available. I found some code " using System.Runtime.InteropServices; " Code is used like that for using windows dll. For that we need to define the method that we want to use as follows : [DllImport("odbc32.dll")] private static extern short SQLAllocHandle( short hType, IntPtr inputHandle, out IntPtr outputHandle); So I want to know that is there any tool to find the declaration of the functions available in the DLL. Please lemme know how can I find the tool to do the same ? If I use IDSAM then it gives the same for .NET libraries only not for windows library. Thanks in Avdvance
Not 100% sure. 1. You MUST know the programming language in which code was written for the DLL. 2. Dumpbin.exe[^] does that. Never used it though.
जय हिंद Rajdeep.Net[^] is NOT from India. Proof.[^]
-
Hi to all I was interested in listing the sql servers available. I found some code " using System.Runtime.InteropServices; " Code is used like that for using windows dll. For that we need to define the method that we want to use as follows : [DllImport("odbc32.dll")] private static extern short SQLAllocHandle( short hType, IntPtr inputHandle, out IntPtr outputHandle); So I want to know that is there any tool to find the declaration of the functions available in the DLL. Please lemme know how can I find the tool to do the same ? If I use IDSAM then it gives the same for .NET libraries only not for windows library. Thanks in Avdvance
This may Help You http://www.google.co.in/search?source=ig&hl=en&rlz=1G1GGLQ_ENIN304&=&q=dependency+walker&btnG=Google+Search&meta=lr%3D[^]
Rajesh B --> A Poor Workman Blames His Tools <--
-
Hi to all I was interested in listing the sql servers available. I found some code " using System.Runtime.InteropServices; " Code is used like that for using windows dll. For that we need to define the method that we want to use as follows : [DllImport("odbc32.dll")] private static extern short SQLAllocHandle( short hType, IntPtr inputHandle, out IntPtr outputHandle); So I want to know that is there any tool to find the declaration of the functions available in the DLL. Please lemme know how can I find the tool to do the same ? If I use IDSAM then it gives the same for .NET libraries only not for windows library. Thanks in Avdvance
Have you thought about using built-in functionality available in the .NET framework, without having to P/Invoke first? In the System.Data.Sql namespace (in the System.Data dll), there is a SqlDataSourceEnumerator class, that, "Provides a mechanism for enumerating all available instances of SQL Server within the local network." Schmuli.
-
Hi to all I was interested in listing the sql servers available. I found some code " using System.Runtime.InteropServices; " Code is used like that for using windows dll. For that we need to define the method that we want to use as follows : [DllImport("odbc32.dll")] private static extern short SQLAllocHandle( short hType, IntPtr inputHandle, out IntPtr outputHandle); So I want to know that is there any tool to find the declaration of the functions available in the DLL. Please lemme know how can I find the tool to do the same ? If I use IDSAM then it gives the same for .NET libraries only not for windows library. Thanks in Avdvance
To see what functions are available you might be able to use the built in function of Visual studio, but it does depend on how the dll has been built, I would try that first though because its the easiest way. There's also depends, it allows you to see whats going on in the dll http://www.dependencywalker.com/[^]