FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Impresoras de red y compartidas
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
Impresoras de red y compartidas
Posted: Tue Mar 03, 2009 05:31 AM

Hola Amigos,,,
Con aGetPrinters() tenemos un arreglo con las impresoras instaladas en la pc.. que funcion nos daria solo las impresoras de red o las impresoras que estan compartidas??

Salu2

Posts: 479
Joined: Fri Feb 16, 2007 10:29 AM
Re: Impresoras de red y compartidas
Posted: Sun Nov 08, 2009 07:52 PM

Pues eso... Tengo el mismo problema... ¿ alguien lo sabe ?

Mil gracias.
LORENZO.

Posts: 1076
Joined: Fri Oct 07, 2005 10:41 PM
Re: Impresoras de red y compartidas
Posted: Sun Nov 08, 2009 09:44 PM
Willi Quintana wrote:Hola Amigos,,,
Con aGetPrinters() tenemos un arreglo con las impresoras instaladas en la pc.. que funcion nos daria solo las impresoras de red o las impresoras que estan compartidas??

Salu2


Willi,

Aquí tu posible solución.

GetPrinters( [<lPortInfo>], [<lLocalPrinters>] )

Arguments
<lPortInfo>
The default value for <lPortInfo> is .F. (false). If set to .T. (true), the function includes port information in the returned array.

<lLocalPrinters>
The default value for <lLocalPrinters> is .F. (false). If set to .T. (true), the function returns only information for local printers. Return
The function returns a one- or two-dimensional array. If <lPortInfo> is .F. (false), a one-dimensional array is returned. Each element contains a character string with the name of an available printer. If <lPortInfo> is .T., each element of the returned array is an array of four elements, holding character strings with additional printer information:

Array elements for additional printer information Element Description
1 Printer name
2 Port name
3 Printer type (e.g. Local/Network)
4 Printer driver

Espero sea de tu ayuda
William, Morales

Saludos



méxico.sureste
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Impresoras de red y compartidas
Posted: Mon Nov 09, 2009 04:57 AM
Friends,

All my printers are shown as LOCAL printers when the following code is used. Actually I have only network printers on my PC and no local printers. Is there anything wrong ? I am using FWH 9.08, Vista SP1

Todos mis impresoras se muestran como impresoras LOCAL cuando se utiliza el siguiente código. En realidad sólo he impresoras de red en mi PC y no las impresoras LOCAL. ¿Hay algo mal? Estoy usando FWH 9.08, Vista SP1

Code (fw): Select all Collapse
//-------------------------------------//
Function Main()
//-------------------------------------//
Local aPrinters1,aPrinters2, i

aPrinters1:=GetPrinters(.T.,.T.)
aPrinters2:=GetPrinters(.T.,.F.)

For i:=1 to len(aPrinters1)
    MsgInfo(aPrinters1[i][1]+CRLF+;
            aPrinters1[i][2]+CRLF+;
            aPrinters1[i][3]+CRLF+;
            aPrinters1[i][4] )
Next
    
For i:=1 to len(aPrinters2)
    MsgInfo(aPrinters2[i][1]+CRLF+;
            aPrinters2[i][2]+CRLF+;
            aPrinters2[i][3]+CRLF+;
            aPrinters2[i][4] )
Next

Return


Saludos
Anser
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
Re: Impresoras de red y compartidas
Posted: Tue Nov 10, 2009 02:47 AM

Probando sr WM ... se agradece....
Salu2

Continue the discussion