在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
CreateDevEnum:ICreateDevEnum; EnumMoniker:IEnumMoniker; Moniker:IMoniker; PropertyBag:IPropertyBag; varName:OleVariant; hr:HRESULT; const IID_IPropertyBag: TGUID = '{55272A00-42CB-11CE-8135-00AA004BB851}'; begin hr:=CoCreateInstance(CLSID_SystemDeviceEnum,nil,CLSCTX_INPROC_SERVER,IID_ICreateDevEnum,CreateDevEnum); Assert(hr=NOERROR); hr:=CreateDevEnum.CreateClassEnumerator(AM_KSCATEGORY_CAPTURE,EnumMoniker,0); Assert(hr=NOERROR); EnumMoniker.Reset; while EnumMoniker.Next(1,Moniker,nil)=S_OK do begin hr:=Moniker.BindToStorage(nil,nil,IID_IPropertyBag,PropertyBag); if Failed(hr) then Continue; VariantInit(varName); hr:=PropertyBag.Read('FriendlyName',varName,nil); if Succeeded(hr) then begin ShowMessage(varName); VariantClear(varName); end; end; end; |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论