1DdCreateDirectDrawObject 2 3When IN HDC is not NULL 41. we need check the IN HDC is NULL or not 52. if it not null we need create a directdraw handler 6 and store it to pDirectDrawGlobal->hDD 73. if the directdraw handle is null return false 8 we did fail to create directdraw HAL 94. if the directdraw handle was not null we return true 10 we did susses to create directdraw HAL 11 12When IN HDC is NULL 13Now we come to if IN HDC is null basic we need create 14 a hdc and cashe some data 151. if internal cache of directdraw handle is not null (pDirectDrawGlobalInternal->hDD) 16 we take it and fill to the public directdraw handler (pDirectDrawGlobal->hDD) 17 and return susses. 18 192. if no internal cache of directdraw handle is found we need create it 20 by using CreateDC for tempary HDC that will be cache in the win32k later 21 223. we need check see if we got a tempary HDC or not, if we fail getting tempary 23 HDC return FALSE 24 254. Now we trying create directdraw handler it being cache to (pDirectDrawGlobalInternal->hDD) 26 and it also set same handler to the public (pDirectDrawGlobal->hDD) 275. if it fails to create directdraw handle return false 28 we did fail to create directdraw HAL 296. if it susses create directdraw handle return true 30 we did susses to create directdraw HAL 31 32To create a directdraw handler you need call the NtGdiDdCreateDirectDrawObject with a hdc 33