dll files WPF/Csharp Unity3d

geomeo123

Member
Joined
Apr 22, 2025
Messages
8
Programming Experience
1-3
Typically I add a reference to dll files via the solution explorer, and I usually can view/access their classes and variables through the objectbrowser.

I'm trying to use Unity3d in WPF/Csharp. And I have some code that looks like this:
C#:
Expand Collapse Copy
[DllImport("user32.dll")]
Or updated dllimport
[LibraryImport("unityplayer.dll")]

Is it possible to view what I am able to access in these dll files? How would I do that?
 
When you use DllImport or LibraryImport, there is no class or class properties to look at. You are just accessing a single C style function.
 
It depends...
Case 1:
If the DLL you are importing is released with a .PDB file, and the .PDB is not completely stripped of symbols, and the owner of the DLL has theyr code in a source server that is public, and the owner of the code has not optimized the code using Microsoft's BBT (aka Lego), and you tell Visual Studio to not just debug "Just my code", and you tell Visual Studio to load the source code, then you can trace into the function using Visual Studio's "Step into" action.

Case 2:
If the none of the above is true, but the code is open source, then you can download and build the code yourself with symbols and trace into the code.

Case 3:
If the code is open source, but you can't be bothered to take time to build the code, then all you can do is just inspect the code manually, and then either mentally simulate or simulate with pen and paper or on a whiteboard what is happening within the function.

Case 4:
If the code is not open source, and the license for the code doesn't prevent you from reverse engineering it, then use a disassemler. If the code has not be obfuscated, then they you can disassemble the code to get some semblance of source code, and then you are now in Case 2 or 3 above.

Case 5:
If the code is not open source, and the license for the code prevents your from reverse engineering it, then enable the option in the Visual Studio debugger to view assembly code, and then step into the function. You'll need to learn how to read and understand assembly code.
 
Back
Top Bottom