I don't see anything in there to do with this DllImport code though. Is this what's happening inside this docx component? If so, I suggest that you should raise it on the support forum for that component.
I was brought up to respect my elders. I don't respect many people nowadays.