Skip to content

V1.0.0 implementation#1

Merged
JamesShaver merged 98 commits into
mainfrom
v1.0.0-implementation
May 20, 2026
Merged

V1.0.0 implementation#1
JamesShaver merged 98 commits into
mainfrom
v1.0.0-implementation

Conversation

@JamesShaver
Copy link
Copy Markdown
Owner

No description provided.

Captures the locked decisions from brainstorming: Newtonsoft.Json,
explicit "type" discriminator, debounced+atomic+shutdown-flush save
policy, backup-on-corrupt recovery, and UI state persisted in
state.json. Defines public surface, schema, save/load mechanics,
threading model, testing strategy, and explicit scope cut-offs.
…sproj

Adds DllExport 1.7.4 and UnmanagedExports 1.2.7 to packages.config.
Wires net.r_eg.DllExport.targets into the csproj with three config properties:
  DllExportMetaLibFullPath -> RGiesecke.DllExport.Metadata.dll (attribute type source)
  DllExportNamespace/DllExportMetaLibAttr -> resolves to RGiesecke.DllExport.DllExportAttribute
  DllExportOurILAsm=true -> uses bundled CoreCLR ilasm/ildasm (no VS C++ workload needed)
Import is conditioned on MSBuildRuntimeType==Full so dotnet test (SDK MSBuild) is unaffected.
…ualTabGroups

Replaces the comment "called by the C++/CLI bridge" with direct unmanaged exports via
3F.DllExport IL post-processing. All six entry points get [DllExport("name", Cdecl)]:
  isUnicode, setInfo, getName, getFuncsArray, beNotified, messageProc

Key ABI correctness measures:
  isUnicode: [return: MarshalAs(UnmanagedType.Bool)] for 4-byte Windows BOOL
  getName: returns a stable HGlobal wchar_t* pointer (not a transient marshaled string)
  getFuncsArray: accepts IntPtr (int*) and writes count via Marshal.WriteInt32

AssemblyName is reverted from VirtualTabGroups.Managed to VirtualTabGroups so the
output DLL is VirtualTabGroups.dll, which Notepad++ expects as the entry-point file.
…nter

The Notepad++ SDK defines FuncItem._pShKey as a ShortcutKey* pointer (8 bytes on
x64), not an embedded ShortcutKey value (4 bytes). Using an embedded struct caused
the struct layout to be 4 bytes short, corrupting every field that Notepad++ reads
after _init2Check.

Changes:
  FuncItem._pShKey: ShortcutKey -> IntPtr
  PluginMain.AllocShortcutKey(): new helper that heap-allocates a ShortcutKey via
    Marshal.AllocHGlobal and returns its pointer, or IntPtr.Zero for no-shortcut keys
  BuildFuncItems: replaced 'new ShortcutKey(...)' with AllocShortcutKey(...)
The C++/CLI bridge project has been deleted (files git rm'd in the prior commit).
Remove the Project(...) block and all ProjectConfigurationPlatforms entries for
GUID {1E250491-29E1-43A9-83F6-FA4B3367298B} from VirtualTabGroups.sln.
The solution now contains only VirtualTabGroups (C#) and VirtualTabGroups.Tests.
… packaging

The C++/CLI bridge and its DLL are gone. Each architecture zip now ships
two DLLs only: VirtualTabGroups.dll (plugin entry-point with unmanaged exports)
and Newtonsoft.Json.dll. The validate.yml needed no changes.
@JamesShaver JamesShaver merged commit 1ec180e into main May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant