If you want to do it manually (with an algorithm that will work with any APIs), I would suggest you use the "winding number algorithm" for the purpose of Point In Polygon calculation. It does not take in consideration bulges in the polygon, but it is very fast is implemented properly allowing me to beat AutoCAD's API by a fold of 2x.
Another possibility, is to draw a temporary line from the point you are testing to infinity, and test how many intersection it has with your polyline. If the number of intersections is odd, then you are inside the polyline; if it is even, then you are outside of the polyline. If the intersection testing is done with the API of the application, it should take in consideration the bluges in the polyline vertices.