-
Notifications
You must be signed in to change notification settings - Fork 10
Preface
Allround Automations PL/SQL Developer IDE (further referenced as PL/SQL Developer) can be extended using plug-ins. PL/SQL Developer is shipped with some sample plug-ins and an API reference. Those plug-ins are written in C++ and Delphi. But what if one wants to create a plug-in using C# programming language?
According to the PL/SQL Developer plug-in documentation:
A Plug-In is a DLL, so if you are using a programming language that can create DLL's, you can create PL/SQL Developer Plug-Ins.
C# can create DLLs (class libraries), but these are different than ones created by C++ or Delphi, and cann't be recognized by PL/SQL Developer without some modifications. The main reason for that is the fact, that C# is managed language and PL/SQL Developer is written in the unmanaged language. Also sample plug-ins, shiped with it, are. Thus in order to create a plug-in, which will be recognized as such by the PL/SQL Developer, using C#, 3 obstacles must be overcome:
- Export DLL functions in C++ style.
- C# must be able to call the PL/SQL Developer callback function by its pointer, which PL/SQL Developer passes to a plug-in when calling
RegisterCallback. - Map datatypes between managed and unmanaged environments.
Introduction
Main concepts
- Anatomy of the plug-in
- Exporting DLL functions
- Using callbacks
Misc
- Using menu items
- Accepting commands in the command window
- Validating DLL exports
- Working with color preferences
- Referencing external C# assemblies