Rem Project: WebCam
Rem Created: 10-08-2004 12:05:07
Rem ***** Main Source File *****
load dll "c:\windows\system32\avicap32.dll",1
load dll "c:\windows\system32\user32.dll",2
Name$="a"
Ver$=""
while Name$<>""
iReturn = call dll(1,"capGetDriverDescriptionA",x,Name$,100,Ver$,100)
if iReturn=1
print "Driver Number ",x," )"
print "Name: ",Name$
print Ver$
print " "
inc x
endif
endwhile
WS_CHILD=1073741824
WS_VISIBLE=268435456
WM_CAP_SET_SCALE = 1024+53
wm_cap_driver_connect=1024+10
wm_cap_set_preview=1024+50
WM_CAP_SET_PREVIEWRATE=1024+52
WM_CAP_EDIT_COPY=1024+30
WM_CAP_SEQUENCE=1024+62
WM_CAP_FILE_SAVEDIB=1024+25
WM_CAP_DLG_VIDEODISPLAY=1024+43
WM_CAP_SET_OVERLAY=1024+51
driver=0
input "Please select which driver you want to use - 0 usualy works the best: ",driver
visible=1
picid = call dll (2,"GetActiveWindow")
hHwnd = call dll (1,"capCreateCaptureWindowA","driver",WS_VISIBLE Or WS_CHILD,0,0,1,1,picid,0)
overlay=1
call dll 2,"SendMessageA",hHwnd,wm_cap_driver_connect,0,0
call dll 2,"SendMessageA",hHwnd,wm_cap_set_preview,overlay,0
call dll 2,"SendMessageA",hHwnd,WM_CAP_SET_PREVIEWRATE,30,0
rem Copy the current image to the Clipboard - as BMP
rem call dll 2,"SendMessageA",hHwnd,WM_CAP_EDIT_COPY,1,0
rem record an AVI to c:\capture.avi
rem call dll 2,"SendMessageA",hHwnd,WM_CAP_SEQUENCE,1,0
make object cube 1,50
sync on
do
if file exist("c:\img.dib") then delete file "c:\img.dib"
call dll 2,"SendMessageA", hHwnd, WM_CAP_FILE_SAVEDIB, 0, "c:\img.dib"
rem load bitmap "c:\navn.dib",0
load image "c:\img.dib",1
texture object 1,1
rotate object 1,x,y,0
inc x,5
inc y,7
sync
loop
I just posted this snippet in reply to another thread, if you look at the last block of rem lines and the code that follows, you can see that the author of this code (not me btw) was copying bitmaps to the clipboard via system DLL`s, you might want to look at that.
if there is one thing I can NOT tolerate, it`s intolerant people.