GUI Usage

P/Invoke Interop

GUI Usage

The tabs of SigImp Search and SigImp Translate Snippet offer two ways to convert unmanaged signatures to the managed signatures.

SigImp Search allows you to choose the managed language that you want to generate, and select a native type, procedure, or constant to do the generation. The UI consists of the following elements:

  • Name: The keyword used to search the unmanaged signature names.
  • Kind: Select one item in the Kind, and the unmanaged signature list will be filtered.
  • Language: Choose Csharp or VB.NET, and the managed code will be generated in the selected language.
  • The unmanaged signature list: It’s at the left-bottom, which displays a list of supported types, methods, and/or constants collected from common Windows SDK header files. You can select one or more items to generate the managed signature(s).
  • Generated managed code output: It’s on the right of the UI, which shows the generated results.
  • Generate button: Click the button and the code editor on the right will display the generated results.
  • Auto Generate: If it is checked, the generated results will be generated immediately when you select items in the signature list.
  • Limitation: At most 5 items can be auto generated simultaneously each time.

Figure 1: P/Invoke Interop Assistant GUI – SigImp Search

Figure 1: P/Invoke Interop Assistant GUI – SigImp Search

In SigImp Translate Snippet, you can write your native code snippet to generate the managed code. The UI description and usage is as follows:

  • Language: Choose Csharp or VB.NET, and the managed code will be generated in the selected language.
  • Native Code Snippet editor: You can write your native code snippet here.
  • Errors area: It’s at the left-bottom, which will display compile errors and warnings in real time.
  • Generated managed code output: It’s on the right of the UI, which shows the generated results.
  • Generate button: Click the button and the code editor on the right will display the generated results.
  • Auto Generate: If the box is checked, the generated results will be generated immediately when you are typing in the Native Code Snippet editor.

Figure 2: P/Invoke Interop Assistant GUI – SigImp Translate Snippet

Figure 2: P/Invoke Interop Assistant GUI – SigImp Translate Snippet