Programatically adding your application for items in "Scanners and Cameras"

Programatically adding your application for items in "Scanners and Cameras"

Post by axis » Fri, 20 Jun 2003 04:13:23



Is there a programatical way to add your own app as a default applicaiton
for items in 'Scanners and Cameras' (in Control Panel of 98/Me/2000/XP)?
Otherwise, what other methods are there to do this?

Thanks

 
 
 

Programatically adding your application for items in "Scanners and Cameras"

Post by axis » Tue, 24 Jun 2003 01:45:04



Quote:> Is there a programatical way to add your own app as a default applicaiton
> for items in 'Scanners and Cameras' (in Control Panel of 98/Me/2000/XP)?
> Otherwise, what other methods are there to do this?

> Thanks

To review, I'm trying to add links to my application for the Cameras and
Scanners listed under Control Panel > Scanners and Cameras .

I've looked into IShellFolder, and have browsed the shell namespace down to
Control Panel, and have found the ITEMIDLIST item for
"Scanners and Cameras". I was hoping that then I could take that ITEMIDLIST
item and bind it to a IShellFolder, and continue browsing
down (hopefully at this level I would get the list of imaging devices
installed in this part of the Control Panel). But the BindToObject command
fails,
giving me a 0x80004001 result (which seems to be NOT_IMPLEMENTED).
GetAttributesOf() of the item tells me that it is not BROWSABLE, not a
FOLDER, and doesn't have PROPSHEET.

I'm stuck! Anyone have any suggestions?

Thanks.

 
 
 

Programatically adding your application for items in "Scanners and Cameras"

Post by axis » Tue, 24 Jun 2003 18:59:23





> > Is there a programatical way to add your own app as a default
applicaiton
> > for items in 'Scanners and Cameras' (in Control Panel of 98/Me/2000/XP)?
> > Otherwise, what other methods are there to do this?

> > Thanks

> To review, I'm trying to add links to my application for the Cameras and
> Scanners listed under Control Panel > Scanners and Cameras .

> I've looked into IShellFolder, and have browsed the shell namespace down
to
> Control Panel, and have found the ITEMIDLIST item for
> "Scanners and Cameras". I was hoping that then I could take that
ITEMIDLIST
> item and bind it to a IShellFolder, and continue browsing
> down (hopefully at this level I would get the list of imaging devices
> installed in this part of the Control Panel). But the BindToObject command
> fails,
> giving me a 0x80004001 result (which seems to be NOT_IMPLEMENTED).
> GetAttributesOf() of the item tells me that it is not BROWSABLE, not a
> FOLDER, and doesn't have PROPSHEET.

> I'm stuck! Anyone have any suggestions?

> Thanks.

Well, I finally found what I needed. In case anyone else needs to add
programs to items in "Scanners and Cameras", simply register the program
under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\StillImage

%1 gives you the id of the device
%2 gives you the if of the event

so you can use these as params to your applicaiton.