You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ffibuilder = cffi.FFI()
ffibuilder.embedding_api(
"""
char *auth(char apiKey[], int discover);
"""
)
libraryPath = sysconfig.get_config_vars('LIBDIR')
if libraryPath and libraryPath[0]:
ffibuilder.set_source("helheim_cffi", "", library_dirs=libraryPath)
else:
ffibuilder.set_source("helheim_cffi", "")
with open('template.tpl', 'r') as code:
ffibuilder.embedding_init_code(code.read())
ffibuilder.compile(
target=f"../helheim_cffi.{extensionMap[platform.system()]}",
verbose=True
)
I'm able to use the DLL in .NET by doing the following:
public static class External
{
[DllImport("helheim_cffi.dll")]
private static extern IntPtr auth(string apiKey, bool discover);
.....
However, when I debug the .NET code in Visual Studio 2022, my .NET application forcefully closes without error or exception. When I run the application outside of VS, the program executes as desired.
Is pyarmor's anti-debugger stopping me from debugging my .NET code when a pyarmor protected package is compiled into a C-Shared library?
The text was updated successfully, but these errors were encountered:
I'm trying to use Helheim (a pyarmor protected package) in a CFFI compiled C-Shared library in a .NET application using P/Invoke.
I've compiled a DLL with the following FFI builder code. I've tried Python 3.7, 3.8 and 3.9. I'm compiling everything on x64
Python Code
FFI Builder Code
I'm able to use the DLL in .NET by doing the following:
However, when I debug the .NET code in Visual Studio 2022, my .NET application forcefully closes without error or exception. When I run the application outside of VS, the program executes as desired.
Is pyarmor's anti-debugger stopping me from debugging my .NET code when a pyarmor protected package is compiled into a C-Shared library?
The text was updated successfully, but these errors were encountered: