AutoCAD2006 previously, including CAD2006, was developed with VC + +, starting with AutoCAD2007, the. NET Framework introduced by Autodesk for CAD. Let. NET code invoke unmanaged C + + functions in the dynamic-link library through platform invoke, also known as P/invoke technology.
To use P/invoke technology, you first need to know the reorganization function corresponding to a C + + function. What is a reorganization function? A reorganization function is a C + + compiler that generates a unique function name for each function based on its function name, parameter type, return value, and so on. For example, in CAD, the C + + function Addpersistentreactor, which is used to add a permanent reactor to an entity, is restructured to: [Email protected]@@[email protected]@@z
You can use the Visual Studio2010 Dumpbin.exe tool to view the reorganization name for a C + + function. Here's how:
1) First, find the "Visual Studio command Prompt" in the Start menu
Figure (1) Click "Visual Studio command Prompt"
2) in the black box of the Visual Studio proposition prompt, switch to your CAD installation directory, for example: C:\Program Files (x86) \autocad 2008, run
Dumpbin.exe/exports XXX
You can view the C + + reorganization function name in file XXX.
Here we take a look at the Acad.exe function as an example, because there are so many functions in Acad.exe, we use redirect > to output the result to the Acad.txt text file. Use the command, in the following sequence:
C:
CD C:\Program Files (x86) \AUTOCAD 2008
Dumpbin.exe/exports Acad.exe > C:\acad.txt
(2) Shown:
Figure (2) after switching to the AutoCAD installation directory, use the dumpbin.exe/exports acad.exe > C:\acad.txt command
3) The effect is as follows:
Figure (3) name of the C + + reorganization function in Acad.exe
To view a reorganization function in CAD using the Visual Studio command prompt