I've posted this a few times before but never had a reply, its still causing me problems!
I'm trying to access the available printers in an ActiveX dll on a web interface. This is a bit of sample code:
Function AvailPrinters() as String
dim PrintData as Printers
dim sPrinters$
For Each PrintData in Printers
sPrinters$ = Printdata.DeviceName & " " & Printdata.driverName & ","
Next
AvailPrinters = sPrinters$
End Function
When I call this function from a VB app it returns a comma separated string of all the printers available. I then tried to include this dll in an ASP page and it returns an error saying that it can't access the printers.
Not sure if this is important but when I call the API function 'GetUserName' in my VB app it returns my username but when I call it in Internet Explorer through my dll I get 'SYSTEM'.
I'm really stuck, I've also tried launching an exe that used the dll through an ASP page but still no luck.
Any help would be really appreciated,
Rgds,
Carl
I'm trying to access the available printers in an ActiveX dll on a web interface. This is a bit of sample code:
Function AvailPrinters() as String
dim PrintData as Printers
dim sPrinters$
For Each PrintData in Printers
sPrinters$ = Printdata.DeviceName & " " & Printdata.driverName & ","
Next
AvailPrinters = sPrinters$
End Function
When I call this function from a VB app it returns a comma separated string of all the printers available. I then tried to include this dll in an ASP page and it returns an error saying that it can't access the printers.
Not sure if this is important but when I call the API function 'GetUserName' in my VB app it returns my username but when I call it in Internet Explorer through my dll I get 'SYSTEM'.
I'm really stuck, I've also tried launching an exe that used the dll through an ASP page but still no luck.
Any help would be really appreciated,
Rgds,
Carl