Of course it's possible to use TC plugins outside of TC. Since they're just (renamed) DLLs after all it doesn't matter which program hosts them. However, it's necessary to follow the plugin interface description. Unfortunately I haven't written a packer plugin which can create archives; the closest thing is the packer part of my CertificateInfo plugin with simple extraction capabilities.
My guess is that you need to implement/call the functions listed as mandatory in the WCX interface description. Maybe the plugin calls ProcessDataProc during the pack operation. Probably the easiest thing to see where it crashes is to debug it, i.e. step through your code line by line.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
1. Try calling SetProcessDataProcW, this sets a callback function to tell the caller about the pack progress. Some plugins seem to expect that the callback function is valid and don't check whether SetProcessDataProcW has been called or not.
2. Make sure that PackedFile and SrcPath are absolute paths (with drive letter or UNC prefix).
3. Call PackSetDefaultParams (there is no Unicode variant) to tell the plugin where to store its settings
4. Call GetPackerCaps to be sure that the plugin supports PK_CAPS_MODIFY to change existing archives, and PK_CAPS_MULTIPLE to add more than one file to a single archive (e.g. GZIP doesn't).
When I use
HANDLE hArcData = OpenArchiveW(&arcData);
ReadHeaderExW(hArcData, &header)
i'm able to extract from archive without password.
But when it have password 7zip ask for it.
How bypass prompt using pwd from 7z.ini file?