From: dblock on
EnumPrinters is supposed to live in spoolss.dll according to MSDN.
When I call it, my process crashes.

I found this conversation (http://groups.google.com/group/
microsoft.public.dotnet.framework.interop/browse_thread/thread/
e785d06619a33d47/782b67a8b7d11959?hl=en&ie=UTF-8&q=EnumPrinters+crash)
which provides a working example that uses winspool.drv instead of
spoolss.dll. That code works.

Now, my real problem is that I am writing this in Java (JNA), not C#
and it won't load the .drv.

I am confused, where does EnumPrinters really live? Is the MSDN
documentation wrong? Is its signature in spoolss.dll different?

From: Jackie on
dblock wrote:
> ...

I made a simple example application and opened it with something called
PE Tools to view the import directory. EnumPrintersW is imported from
winspool.drv in my application.

--
Regards,
Jackie
From: Dee Earley on
On 18/07/2010 00:53, dblock wrote:
> EnumPrinters is supposed to live in spoolss.dll according to MSDN.
> When I call it, my process crashes.
>
> I found this conversation (http://groups.google.com/group/
> microsoft.public.dotnet.framework.interop/browse_thread/thread/
> e785d06619a33d47/782b67a8b7d11959?hl=en&ie=UTF-8&q=EnumPrinters+crash)
> which provides a working example that uses winspool.drv instead of
> spoolss.dll. That code works.
>
> Now, my real problem is that I am writing this in Java (JNA), not C#
> and it won't load the .drv.
>
> I am confused, where does EnumPrinters really live? Is the MSDN
> documentation wrong? Is its signature in spoolss.dll different?

Depends shows Winspool having EnumPrintersA and W (which is the
declaration I have) but spoolss.dll only has EnumPrintersW.
I can't tell what the signature is though.

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)