Assuming that Process contains the call to the DLL. If so, the exception is thrown on JIT of process, and so you cannot catch it within Process. Use one more layer of indirection before calling the DLL to be sure of being able to log it.
protected void Enqueue()
{
try
{
Task.Run(() => Process());
}
catch (Exception ex)
{
// Logging code here (no issues)
}
}
protected void Process()
{
try {
Process2();
}
catch (Exception e)
{
// Logging code
}
}
protected void Process2()
{
// Code that calls into offensive DLL
}