I’m writing CoNDIS WAN MCM Driver and I don’t understand how I can indicating an incoming call.
I call NdisMCmCreateVc and then NdisMCmActivateVc. After I should call NdisMCmDispatchIncomingCall, but that function requier SapHandle that I don’t have.
I should have gotten SapHandle from ProtocolCmRegSap callback, but it not called.
I register AddressFamily with NdisMCmRegisterAddressFamilyEx with CO_ADDRESS_FAMILY_TAPI_PROXY.

I’m assuming you’re writing an NDIS 6.x driver. The details discussed below are slightly different for 5.x.

When you register the adapter, you should get a MINIPORT_SET_OPTIONS callback. During that, you set a NDIS_CO_CALL_MANAGER_OPTIONAL_HANDLERS. That contains a CmRegisterSapHandler (and CmDeregisterSapHandler) callback that you provide. Your PROTOCOL_CM_REG_SAP handler will receive a handle to the SAP (3rd arg). Use this same handle in NdisMCmDispatchIncomingCall.

The proxy should initiate all this by calling NdisClRegisterSap; if it’s not happening, check if a breakpoint on ndis!NdisClRegisterSap fires.

Also, wow, I didn’t realize anyone was actively developing CoNDIS drivers.

I do as you describe, but NdisClRegisterSap is not called.

We want to write our VPN driver instead NDIS Miniport(TAP-adapter)

It sounds like the TAPI proxy driver is not interfacing with your driver for some reason. Unfortunately TAPI is too far outside my knowledge of NDIS. I can only give you a generic suggestion. The WDK used to have an old sample named “coisdn” that demonstrated this. If you haven’t come across the sample yet, you might try comparing its behavior to that of your driver.

Sorry I can’t be of more help.

I made the driver work with RAS api, but I had a more serious problem.
I need the driver adapter to be displayed as VPN (with its own protocol) and the system would work with it as VPN, but the system has a rigidly set available medium subtype that I can return in response to the OID_WAN_MEDIUM_SUBTYPE.
If I set an existing type (for example, PPTP), then my driver overrides the windows driver and the embedded VPN stops working.
If I return MediumSerial, then the system works with my driver as with a telephone line.