hi guys I'm Lancaster in this video we will improve our travel to communicate
with our applications to communicate with our application instead of using
i/o control method we can use another method by creating a port under we
transfer the informations through that port this is the project we write into
our last video since in this video we'll only implement this communication
mechanism so here we comment out to create and the right IRP operations so
we didn't use this operation callbacks
what we are going to do first is to create a security descriptor to create a
security descriptor we can call function
build default security descriptor the first parameter is the security descriptor and the last parameter we simply studied two eyes how to port our access and the way should also check the written status let's define this security descriptor if we successfully build our security scripture next we can initialize our object attributes the last premier the last parameter of this macro is a security scripture we just created let's define some object attributes and the name is actually the name of the part we are created to communicate with our application so here we simply assign it to mini future and the next thing we are going to do is create a communication part the first parameter is a filter handle it hasn't received in this register filter function the second one is our port the third one is our object attribute for the part of cookie we simply set to not so next is our core back actually the next three our parameter is photo corvax the first connect core back to next is a disconnect car back the last car back is the message car back where we can receive a message sending from our application and the last one is our max connections for simplicity here we only set it to 1 and don't forget to freeze our security scripture and also we'll check the return status if this create communication port successfully we can start our filtering here we change this to successful if it's successful start filtering will return to successful status if it a failed we should also close the communication port and also we need to time register on filtering ok let's define is part variable and also we should define this 3 core back the first parameter is a client the second one is apart cooking to serve lines a context first one needs a size of context and the last one is a contact connection cookie the most important thing we need to do in this connection our connection callback is to save the client port and we can also print some message that's the finest client port for the disconnect car back it only takes one parameter it's a connection cookie and we should close our client the first parameter is a filter handle and the second parameter is our client port the client part is not the part of a crater here but the client part we received from the connect car back all right let's read the most important car back the first parameter is our property the second one is our input part next one is our input our lens - next one is our output part next line is output buffer lens and the last one we saw returned output buffer lens if we send message to our grabber here the message is included in this input buffer and the lancers buffer is indicated by this input reference variable and also you can written some message to the output buffer which will be transferred to the applications so here we first defined a spring and we transfer this message to our application and next we can print message the message is sending from our application and the next we can copy our message to the output buffer you should check out the output performance to make sure that the output buffer is large enough to hold up to the message you want to send it to the application and finally returns on status success okay this is very simple connect/disconnect and stand and receive callbacks implementation here we for the check is this is if this failed which will return so unsuccessful status don't forget to close our communication portal a load function okay let's build our project all we have some errors here we should capture or dress like this client portal make sure the return the status okay build successfully