[fpc-pascal]Missing Win32 API Function -- Part 2

James_Wilson at i2.com James_Wilson at i2.com
Thu Aug 8 22:34:27 CEST 2002


Thanks for the reply...

> 1. You call Unicode version of the function - you probably want
> to call EnumPrintersA

EnumPrinertsW is the unicode version of the function? I wasn't aware of 
that. I'll make this change.


> 2. You call the function from wrong library - correct is 'winspool.dll'

I don't have winspool.dll anywhere on my hard drive, but I do have 
winspool.drv. I used my editor to look inside that file and found 
winspool.drv has EnumPrintersA as a function. When I use that everything 
seems to work properly. I'm using Win2K.


> 3. You call the function with invalid calling convention - you should
> use 'stdcall' for API functions

I added this, but it didn't seem to make any difference. I also checked 
both the Win32 API Reference and the FPC docs, but there's not a whole lot 
of info on stdcall. What does it do?


> 4. API functions don't return Booleans but Bools

I checked the Win32 API Reference and the FPC docs for bools as well, but 
there's nothing mentioned. What's the difference between the two?


Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20020808/46ee8480/attachment.html>


More information about the fpc-pascal mailing list