I have code that needs to pinvoke a c dll, it seems to me that this code should implement idisposible since it touches unmanaged code. I could be wrong so please correct me if this is not true.
Reading up on the stuff it seems like I should use safehandles. Great. Except my dll doesn't return any handles, or intptr. So now what?
The signatures are mostly like the following:
HRESULT _XYZFN XYZNewTrip (Trip *pTripID);
Argument Values:
pTripID: pointer to a 4 byte integer in which the new Trip handle will be placed
Can I some how shoehorn a safehandle in there? It seems like maybe the hard case from this article.