Path: news.easynews.com!easynews!priapus.visi.com!news-out.visi.com!hermes.visi.com!nntp.abs.net!newsfeed.cwix.com!maule!helcaraxe!news.cec.uchile.cl!not-for-mail
From: =?ISO-8859-1?Q?=C1lvaro?= Palma Aste <queria_direccion@el.perla.invalid>
Newsgroups: comp.databases.oracle.tools
Subject: Re: returning default printer name (full printer name) to a field in ORACLE  FORMS(6i)
Date: Wed, 7 Aug 2002 23:02:22 +0000 (UTC)
Organization: Centro de Computacion - U. de Chile
Lines: 39
Sender: Alvaro Palma Aste <apalma@cipres.cec.uchile.cl>
Message-ID: <ais8tu$qtd$1@localhost.localdomain>
References: <759d14ad.0208040555.6c16d00e@posting.google.com> <ee1f9e62.0208051239.17e55adf@posting.google.com>
NNTP-Posting-Host: cipres.cec.uchile.cl
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: localhost.localdomain 1028761342 27565 200.9.100.5 (7 Aug 2002 23:02:22 GMT)
X-Complaints-To: news@localhost.localdomain
NNTP-Posting-Date: Wed, 7 Aug 2002 23:02:22 +0000 (UTC)
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: easynews comp.databases.oracle.tools:52894
X-Received-Date: Wed, 07 Aug 2002 16:01:56 MST (news.easynews.com)

John Brown escribió:
>yopcaw9@yahoo.com (Bill) wrote in message news:<759d14ad.0208040555.6c16d00e@posting.google.com>...
>> Hi All
>> 
>> I need to return the full name of the default printer to a field in ORACLE FORMS.
>> 
>> My operating system is windows2000.

Search in metalink using the key
win_api_environment.read_registry. There is a very good example
about obtaining things from the Registry. And in Windows98, you
can get the default printer an port from:

HKEY_LOCAL_MACHINE\Config\0001\System\CurrentControlSet\Control\Print\Printers\Default

and 

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Printers\"name
of the default printer"\Port

If the printer is mapped to LPT1: you can get the real location
of it from 

HKEY_CURRENT_USER\Network\Persistent\LPT1

Hope it helps

-- 
Atte.
Álvaro Palma Aste
Grupo de Ing. Biomédica
Depto. de Ing. Eléctrica - U. de Chile
******************************************************
It's the only form of protest they're allowed 
I've seen their silent faces scream so loud 
If they were to speak these words they'd go missing too 
Another woman on a torture table what else can they do

Sting - They Dance Alone...
