Cómo liberar ptrSentFromPinvokedDLL?Cómo liberar IntPtr en C#?
IntPtr ptrSentFromPinvokedDLL= IntPtr.Zero;
int resultFromVendor = CallVendorDll(ref ptrSentFromPinvokedDLL);
resultFromVendor = DoMoreWorkFromVendorDLL(
ptrSentFromPinvokedDLL, "workonthis");
// Free ptrSentFromPinvokedDLLhere
Bueno, ¿cómo el proveedor * asignó * el puntero? Use el correspondiente separador. –
Suponiendo que incluso necesite liberarlo. – Michael