WFP: Associating a flowContext at ALE_CONNECT layer

I am writing a WFP driver to perform deep inspection at the Stream layer.
A context is associated at ALE_CONNECT (Connect layer) using FwpsFlowAssociateContext.
There is a specific need to associate a context in the Connect layer.

However for FlowEstablishedClassify or StreamClassify callouts, WFP passes the flowContext as 0.
Hence I am not able to dereference my context and perform the deep inspection at the stream layer.
Please let me know if there is anything I am missing here.
When the flow gets closed WFP calls AleConnectFlowDeleteFn() with the correct context which wad allocated during AleConnectClassify()

What parameters are you passing to these functions, what are they returning?

thanks for your response, I saw this response just now… The issue was that I was passing a wrong calloutID and layerID. It started working correctly after passing callout and streamID. I have another issue now - and this is when FwpsFlowRemoveContext returns STATUS_UNSUCCESSFUL (There is no context currently associated with the data flow.) for existing flows and hence the callout can’t be unregistered.

there is a similar issue reported but with no reply from MS. https://social.msdn.microsoft.com/Forums/sqlserver/en-US/3d7e45ee-d3dd-49cf-8599-743cdac76097/fwpsflowremovecontext-returns-statusunsuccessful?forum=wfp

Just an update - the issue reported in the above URL when a context is associated at ALE_CONNECT layer is a definite MS WFP bug. The driver cannot be unloaded in this case, the code works perfectly well when the context is attached at FLOW_ESTABLISHED layer.