So in this video, we'll be seeing how to enumerate the organizations using this enumerate log on sessions
and this session data functions.
So these query the edit sales process and in the task process view how all of the information.
And the design of the solar cells process is also very large because it store various information.
So first we need to gauge how many sessions are there are currently lockdown.
So this will give you the count and also the point load structure.
So we have already seen we.
Wood defines a particular object.
It contains no part in the high part.
And the first to, you know, need to go to any input parameters.
What are the output parameters?
So the first one is pointer to a long integer that presumes a number of elements.
And the second one is a pointer to an array of the new structures.
So first, I have already defined this one, these functions, so we could see sometime.
So here you can see enumerated organizations.
First one is union 64 and I have changed this 1 to 64 with our target to.
So that's why I'm using this 164.
And second one is Pointer.
So we can later marshal this structure to set this pointer to structure.
And we should also call this aggressive free return buffer to free the buffer allocated way.
And it says process.
So first we need count is because the giro that is the country to which possibilities and it's enumerated
organizations.
Faster running the difference can comma second one use the pointer.
So began to rule.
And I would put these.
And the return to visit there is.
You rest easy cost, easy cost of zero.
That means the function has been succeeded.
Now we can go and print the count.
So we had ten sessions.
These sessions are saying go to some computer accounts.
So we'll be seeing that in the output of the next function.
So we have this code now we can go and master this a good pointer to the root structure and we can iterate
over these.
We know how many elements will be here, how many array of fruit pointers that is this content so we
can search for you wrong i use requested zero are you just then count free press press.
So we are iterating over these many number of sessions and we are going to convert this one.
My shoulder stature.
So the point is, we are.
Common type of rule.
So this gives us the rule.
And we should also free this one.
For every member in that area.
We are going to convert this into a structure and we can print.
The low part.
A lot.
Low part and.
High bar.
So high bar.
In most cases it will be giro.
And now this lead pointer points to the first element of the fast food structure.
So in order to advance to the second structure, we need to add the size of this huge structure.
So we can do that using our air that we need to convert this input to into 64 press the size of fluid
pointer that is marginal that size of.
Type of rule.
Now we need to.
Convert this into into prettier and we can sell out musicals to this one.
So we are advancing to the next element.
Now, if we go and print this and here you can see we got the ten sessions, the real part, the hyper.
We can pass this pointer to the Logitech Center to this function and let's say get logon session data
to improve the information so we can easily read.
So I how I define this one everything get organization data and the mem parameter is the pointer to
this need.
And the second barometer is output.
That is a pointer to this executive session data.
So if you go and check this one and here you can see this is the structure and all of its members.
So this did not actually work for me.
So I have to search for this in the work.
And I just copy pasted this.
And so this is this one.
So we can see the members of this are the size of this structure.
Log on to the username domain authentication, baggage log session and server DNS.
No European user happens by name, so you can see all of these members.
So we can just copy paste from the funeral.
And before that, what we need to do is we need to begin to address a unique contracting rate so we
go in search for this one.
And here you can see the.
Rent, the maximum rent and the buffer.
So the pointer to the Unicode string.
So we can also copy this one from.
Being woke.
It's.
So I have already copied this one.
And it a unicorn screen.
And the rent.
My rent and buffer.
So this buffer is, uh, should be pointing to the unique should.
So we write two functions.
That is a breach party.
Spring two and I say unicorn.
So what this function does is it takes normal string as a parameter and convert this into this and let's
say unicorn.
So the return type is Al-Azhar University.
Spring test.
It's a test.
And what we're going to do is we are going to allocate some memory for this test to function so we can
look at using or not spring to.
Uni.
So this is global uni.
So this copies the contents of manage bring.
That is our second string in one manner.
So this will return the pointer to this spring.
So now we have the stringer here pointing to the screen.
Now we need to make a necessary negotiating.
We are going to create a new object for this structure and we are going to assign this.
Not bother with his address to the unicorn, which is not.
So here you can see this is pointing to the screen and we are sending to this buffer and let's you are
then the end should be tested out then in two Unicode character things.
So it is correct to say these two because it is UTF 16, 16 mean 16 bits.
So that is two bytes.
So that's why we are going to multiply with these characters and but ABC you shot.
And the next one we need to set is maximum security, similar to this event, but we need to add one
extra space for this one.
So now we are good to go.
We need to return this.
See, that is the structure.
No.
Right.
Another function that will take this and let's say Unicode structure as in parameter and gets the unique.
So we can say strong.
So let's say unique or.
Boosting.
No.
Really two or actually this is the point today.
So let's say you that buffer is a pointer so we can do that using Marshall Dot copy and we need to use
this one.
We can see the first one is the source and the second one is.
The starting next and the length.
So we need to create a character area.
So test equal to new character area of the length of this edit that is defined.
Whereas a maximum length and the copy of it is a buffer
to.
This test.
And start index is zero and the rent is.
Remember, we have multiplied this by Unicode and coding the characters.
Now we need to divide with this one.
Now we are going to work.
Oh, no, we can.
A new spring off test.
So this will give you the spring.
So we can test that using here.
We can test.
So.
Spring.
There is a unicorn that is being one, two, three.
Now we can do this.
And it is a unique string of and it is not buffered.
So we can just say let's.
Now, if you put into this and here you can see the unicorn.
So you can comment on this one.
Now.
We are good to go.
So I don't want to print out this low part and hope, but I can comment on this one.
And now what I want to do is I want to send this, uh, lead pointer into this address to get realization
better.
The first parameter is read pointer.
And the second one is also a pointer to this structure.
So we can see this data in decision data and pointer, not zero.
And we need to pass this as reference, as data.
I dingo did not define this one.
So first Ronnie's input.
So in order to change these parameter names, it's just the parameter names.
But anyway.
So whenever you come back after some time, you'll still understand.
We got do this.
So I think we are good to go.
Okay.
Now we are getting we got the data for the asteroid pointer and then we need to convert this one shared
our pointer to structure the point of use as data and the structure is type of.
Security light session data.
Sacagawea, this one.
We can say yes.
Now we can print out this one.
Yes.
Dot, uh, username and then gyro.
Then I'm going to print the and it is a unique string of this username.
So this is that username is the.
And it has a unique string structure.
And we are going to pass the strings function to get the unique to.
Now we need to free this pointer.
So this.
Yes, data.
So we got some mail.
Argument bias.
So what we can do is use this one is equal to zero.
Then I'm going to put in.
So we can see we got the two sessions and the username are stargirl.
That is my this username.
Or we can also printer Daria start blogging domain.
So meanwhile, let me turn on this domain controller.
So let's run this and we should see the username and the computer name.
So we got only two sessions out of ten sessions because of the access denied?
No.
If we go and open this government, prompting the nation to.
Now we're going into it.
What are the ten sessions?
So let's.
Where this?
But it's going to run this under the wing.
Under.
And now we can see all of these sessions.
We have the anonymous organ and also the administrator.
Now let's go.
And, uh, Rand seemed to user.
Now.
We can see now has been logged on to the console.
If you ran this again.
And we should see push two somewhere here.
So as to how we can also put into the log on account.
So we can put in the end.
Count.
We have the 14 Rowland Sessions, which includes our test to see what caused this and we got on it.
So that's how you use the these LSC functions filter through the log on sessions and the user information.