Is there a way to call GetObject() and have it return resources from another server?
I am working with the Microsoft Internet Printing Project which is hosted through IIS6. All of our printer resources are located on a shared print server. If I could point my ASP pages to a shared network drive instead of something on the C:/ drive that would be great.
Here is the trouble code:
Code:
'***********************************************************
' FUNCTION rgADSIGetPrinters()
'***********************************************************
Function rgADSIGetPrinters(strComputer, iStart, iEnd)
On Error Resume Next
Err.Clear
Dim objPrinter, objPrinters, objServerPrinters, iPrinters, dwStatus, rgPrinters()
Dim objHelper, i
Dim iTotal, iRevStart, iRevEnd
Dim strStatus
Dim strHTML
If strComputer = "localhost" Or strComputer = "127.0.0.1" Then
Set objHelper = Server.CreateObject(PROGID_HELPER)
strComputer = objHelper.ComputerName
End If
iPrinters = 0
Set objPrinters = GetObject("WinNT://" & strComputer & ",computer")
....
....
....
if iPrinters = 0 Then ReDim rgPrinters(ADSI_PRINTER_SHARE, 0)
rgADSIGetPrinters = rgPrinters
End Function
Any help is greatly appreciated : )