Re: printui.dll,PrintUIEntry internals...



Please do not get me wrong Vipin, I definately appreciate all the help you
are giving, I am not as experienced as you are in this area. It is just that
the answer you provided does not solve my problem. So i had asked another
question in response. This is how newsgroups work.

Now coming back to the issue in hand. I definately know that the files need
to be copied to the w32x86 folder before i call the AddPrinter API. The
issue i have is that the HP driver files contain and INF file, a Catalog
File and a series of files whose name end with a _ (underscore) character,
e.g hpz2ku04.dl_, hpzcfg04.ex_, hpzcoi04.dl_ etc. So i simply cannot issue
the CopyFile API function because these are not the actual files that need
to be copied. I have to find a way to use the INF file to copy them to the
printers folder. This is precisely what PrintUI.dll,PrintUIEntry does. I
only want to know HOW it reads the INF file and copies the files to the
printer folder.

I have come across an API InstallHinfSection which i believe i can use to
execute the section in the INF file. One the files are copied then i can use
the AddPrinter API.

Thanks,
Rajneesh...


"vipin" <vipin@xxxxxxxxxx> wrote in message
news:OSlnwFYPFHA.3704@xxxxxxxxxxxxxxxxxxxxxxx
> First of all you don't want to listen. So I leave it to you to find the
> solution
> I have worked for over 3 years on HP drivers and if you are going to
> fight back without any courtesy, I am afraid who would want to help you.
>
>
> "Rajneesh Sehgal" <rajneesh_sehgal@xxxxxxxxxxx> wrote in message
> news:%23HGM9tGPFHA.3076@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi,
>> I cannot simpy copy the files because the vendor has provided the INF
>> file and the corresponding DL_ files which i believe the INF file knows
>> how to install them. The PrintUI.dll,PrintUIEntry somehow knows how to
>> run the INF file programmatically. The execution of INF file results in
>> the DL_ files getting copied as DLL files in the appropriate printer
>> folders. I wanted to know which API it uses to launch the INF file.
>>
>> Thanks,
>> Rajneesh...
>>
>>
>> "vipin" <vipin@xxxxxxxxxx> wrote in message
>> news:e1wk8s8OFHA.2736@xxxxxxxxxxxxxxxxxxxxxxx
>>> you have to copy yourselves using CopyFile(....) to w32x86 directory.
>>> before calling the addPrinterDriver and AddPrinter apis.
>>> Please read the documentation for these APIs
>>>
>>> Thanks
>>> Vipin
>>>
>>> "Rajneesh Sehgal" <rajneesh_sehgal@xxxxxxxxxxx> wrote in message
>>> news:OPhh0V8OFHA.2700@xxxxxxxxxxxxxxxxxxxxxxx
>>>> Hi,
>>>> I am currently creating a setup for installing printer drivers in
>>>> Windows 2000 and XP. I have tried using the printui.dll,PrintUIEntry
>>>> function and it works like a charm and i have no issues.
>>>>
>>>> Sample:
>>>> rundll32 printui.dll,PrintUIEntry /q /ia /m "hp deskjet 640c series" /h
>>>> "Intel" /v "Windows 2000" /f c:\dj640\hpf640k.inf
>>>> rundll32 printui.dll,PrintUIEntry /q /if /b "HP648C" /f
>>>> c:\dj640\hpf640k.inf /r "lpt1:" /m "hp deskjet 640c series"
>>>>
>>>> The problem i have with this approach is that i am not able to get the
>>>> error code to abort the setup if something fails.
>>>>
>>>> What i am looking for is to know what exactly is the
>>>> printui.dll,PrintUIEntry function doing internally. I want to write my
>>>> own code to do whatever printui.dll,PrintUIEntry does so that i can add
>>>> some error handling.
>>>>
>>>> My guess is that it must be calling AddPrinterDriver and AddPrinter to
>>>> install and register the printer. I am wondering how does it actually
>>>> copies the files mentioned in the printer INF file to the appropriate
>>>> printer directory returned by GetPrinterDirectory function. I am
>>>> specifically looking for that piece of code.
>>>>
>>>> Can any of the MSFT guys throw some light on this?
>>>>
>>>> Thanks,
>>>> Rajneesh...
>>>>
>>>
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: printui.dll,PrintUIEntry internals...
    ... to be copied to the w32x86 folder before i call the AddPrinter API. ... issue i have is that the HP driver files contain and INF file, ... install and register the printer. ...
    (microsoft.public.development.device.drivers)
  • RE: INF file processing API functions
    ... The Windows Setup .INF API functions make it much easier to retrieve usable ... specific lines within specific sections of the .INF file. ... For example to locate the install information for NET class devices you ...
    (microsoft.public.development.device.drivers)