i used your hooking lib and found it great, well done, keep up the good work.
yet i have a problem having less to do with your lib, yet it's very lo-level.
so, when i try to capture desktop screen with something like:
Code: Select all
myDIB:=TFastDIB.Create;
hdcScreen := GetDC(GetDesktopWindow); //CreateDC('DISPLAY', nil, nil, nil);
hdcCompatible := CreateCompatibleDC(hdcScreen);
myDIB.SetSize(GetDeviceCaps(hdcScreen, HORZRES),GetDeviceCaps(hdcScreen, VERTRES), GetDeviceCaps(hdcScreen, BITSPIXEL));
SelectObject(hdcCompatible, myDIB.Handle);
BitBlt(hdcCompatible,
0, 0,
myDIB.Width, myDIB.Height,
hdcScreen,
0, 0,
SRCCOPY);
myDIB.SaveToFile(...);
..
[freeing]
it works as a standalone. yet, when i try the same thing from a nt-service, the result is a black image
do you have any idea/solution for this issue?
can it be that gdi is not loaded at service-init time?
lg,
cvarak