2021-09-13 01:33:14 +00:00
|
|
|
DdCreateDirectDrawObject
|
2006-05-08 16:48:10 +00:00
|
|
|
|
|
|
|
When IN HDC is not NULL
|
|
|
|
1. we need check the IN HDC is NULL or not
|
2021-09-13 01:33:14 +00:00
|
|
|
2. if it not null we need create a directdraw handler
|
2006-05-08 16:48:10 +00:00
|
|
|
and store it to pDirectDrawGlobal->hDD
|
|
|
|
3. if the directdraw handle is null return false
|
2021-09-13 01:33:14 +00:00
|
|
|
we did fail to create directdraw HAL
|
2006-05-08 16:48:10 +00:00
|
|
|
4. if the directdraw handle was not null we return true
|
2021-09-13 01:33:14 +00:00
|
|
|
we did susses to create directdraw HAL
|
|
|
|
|
|
|
|
When IN HDC is NULL
|
2006-05-08 16:48:10 +00:00
|
|
|
Now we come to if IN HDC is null basic we need create
|
|
|
|
a hdc and cashe some data
|
|
|
|
1. if internal cache of directdraw handle is not null (pDirectDrawGlobalInternal->hDD)
|
|
|
|
we take it and fill to the public directdraw handler (pDirectDrawGlobal->hDD)
|
|
|
|
and return susses.
|
2021-09-13 01:33:14 +00:00
|
|
|
|
2006-05-08 16:48:10 +00:00
|
|
|
2. if no internal cache of directdraw handle is found we need create it
|
|
|
|
by using CreateDC for tempary HDC that will be cache in the win32k later
|
2021-09-13 01:33:14 +00:00
|
|
|
|
|
|
|
3. we need check see if we got a tempary HDC or not, if we fail getting tempary
|
2006-05-08 16:48:10 +00:00
|
|
|
HDC return FALSE
|
2021-09-13 01:33:14 +00:00
|
|
|
|
2006-05-08 16:48:10 +00:00
|
|
|
4. Now we trying create directdraw handler it being cache to (pDirectDrawGlobalInternal->hDD)
|
|
|
|
and it also set same handler to the public (pDirectDrawGlobal->hDD)
|
|
|
|
5. if it fails to create directdraw handle return false
|
2021-09-13 01:33:14 +00:00
|
|
|
we did fail to create directdraw HAL
|
2006-05-08 16:48:10 +00:00
|
|
|
6. if it susses create directdraw handle return true
|
2021-09-13 01:33:14 +00:00
|
|
|
we did susses to create directdraw HAL
|
|
|
|
|
2006-05-08 16:48:10 +00:00
|
|
|
To create a directdraw handler you need call the NtGdiDdCreateDirectDrawObject with a hdc
|