Beranda > Delphi > Printer.GetPrinter vs. WinSpool.GetPrinter

Printer.GetPrinter vs. WinSpool.GetPrinter

what a different of Printer.GetPrinter and WinSpool.GetPrinter?

Printer.GetPrinter is part of the Delphi VCL, it gets you the *current* 
DEVMODE of the selected printer inside your application. The function 
happens to return a global memory handle for the devmode record instead of 
a pointer to it, so it has to be locked to get access to the memory of the 
record. When you modify the current Devmode settings and then call 
Printer.beginDoc the settings will be used to create the printer device 
context. It is not necessary to call Printer.SetPrinter to make the changes 
active. But any changes you make here are local to your program, they do 
not influence other programs printing to the same printer. 

WinSpool.GetPrinter is part of the Windows Spooler API, it gets you 
information about the *default* settings for the printer. As it happens the 
TPrinterInfo2 record contains a pointer to the DEVMODE holding the default 
settings, not a memory handle, so locking is not required. Changes you make 
to the default DEVMODE have no effect at all until you call 
Winspool.SetPrinter, passing it the TPrinterInfo2 record you obtained from 
Winspool.GetPrinter. The SetPrinter call changes the defaults, so this 
influences other programs that use the printer as well as yours.
Iklan
Kategori:Delphi
  1. Mei 1, 2008 pukul 5:23 am

    This blog is pretty interesting, will add a bookmark, thanks.

  2. google-google
    November 17, 2012 pukul 11:56 pm

    Do you have a spam issue on this site; I also am a blogger, and I
    was curious about your situation; we have
    created some nice methods and we are looking to swap strategies with other folks, be sure to shoot
    me an email if interested.

  3. Desember 13, 2012 pukul 5:27 am

    I have attempted to your previous 35 a long time to shed and Retain OFF my belly extra fat.
    I’ve attempted anything from consuming plan tablets, personalized trainers, every eating plan program ever proposed, I currently pay on two fitness center memberships, at any given time, and also have not had the time for you to utilize the benefits of the two amongst them in much more than a yr. I have to say that only element that assisted me weight loss fast diet plan hoping the ambiance, ease together with the availability during the services getting opened from five:00a.m appropriate up until 10:00pm would encourage me to remain on program, attend a whole lot in the cardio lessons, aquatics courses, phase programs etc…

  4. April 22, 2013 pukul 10:22 am

    Very energetic blog, I loved that a lot. Will there be a part 2?

  5. Mei 9, 2013 pukul 3:25 pm

    Great goods from you, man. I have understand your stuff previous to
    and you’re just extremely fantastic. I really like what you’ve acquired here, certainly like what you’re saying and the way in which you say it. You make it entertaining and you still care for to keep it smart. I can’t
    wait to read far more from you. This is actually a great web site.

  6. Juli 5, 2013 pukul 10:06 am

    Write more, thats all I have to say. Literally, it seems as though you relied on the
    video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your weblog when you could be giving us something informative to read?

  7. Juli 8, 2013 pukul 7:20 am

    You need to be a part of a contest for one of the highest quality websites on the web.
    I am going to recommend this site!

  8. Desember 9, 2013 pukul 7:18 pm

    Hello all, here every person is sharing these know-how, so it’s
    pleasant to read this web site, and I used to go to see
    this blog everyday.

  9. Januari 18, 2014 pukul 7:39 pm

    This is my first time visit at here and i am really
    pleassant to read everthing at one place.

  10. Februari 6, 2014 pukul 9:20 pm

    Can you tell us more about this? I’d love to find out some additional
    information.

  11. Februari 7, 2014 pukul 6:20 am

    Hey! Do you use Twitter? I’d like to follow you if that would be ok.

    I’m absolutely enjoying your blog and look forward to new updates.

  12. Februari 7, 2014 pukul 6:53 am

    Wow, awesome blog layout! How long have you been blogging for?
    you make blogging look easy. The overall look of your website
    is fantastic, let alone the content!

  13. Februari 7, 2014 pukul 7:27 am

    Hi there i am kavin, its my first occasion
    to commenting anyplace, when i read this post i thought i could also create comment due to this brilliant piece of writing.

  14. Februari 7, 2014 pukul 7:54 am

    This is a topic which is close to my heart…

    Take care! Exactly where are your contact details though?

  15. Februari 7, 2014 pukul 8:26 am

    May I just say what a comfort to discover somebody who genuinely
    understands what they’re discussing on the net. You definitely realize how to bring a problem to light
    and make it important. More and more people should look
    at this and understand this side of the story. I can’t believe you’re not more popular given
    that you most certainly possess the gift.

  16. Februari 7, 2014 pukul 8:57 am

    A motivating discussion is worth comment. I believe that you ought to publish
    more on this issue, it might not be a taboo subject but typically people don’t talk about such
    topics. To the next! Best wishes!!

  17. Februari 9, 2014 pukul 11:25 am

    Yo Guys, My name is vicky. I am a certified fitness consultant.

    I guide people in losing weight. Today I want to give some information
    regarding fat loss for females. Losing weight for women is a bit difficult
    compared to male. The nature had created ladies in this manner that females can nurture
    kids and is the cause for the fat storage in the belly area.The Venus
    Factor program is a great program which is specially made for ladies.
    This is a natural type of program that helps women to lose
    weight by natural remedies, no pills in it. I had seen lot of people telling about this
    lately and the general view is that it is really helpful.

    So try Venus Factor out when you desire to lose weight.
    It is the only program in the market that I think I could recommend to any body.

  18. Februari 17, 2014 pukul 10:58 pm

    So you have to split your meals, drink a lot of
    water and the most important thing about eating
    during the process of losing weight is that you have to give up from any kind of fast food.
    is an enemy who wants to get their oil and is the supporter of Israel, their arch-enemy.
    Did you ever wonder how Simon had the nerve to set himself
    up as judge and jury over the creative lives of people on two continents.

  19. Juni 28, 2014 pukul 3:16 am

    My brother recommended I may like this website. He was entirely right.
    This put up truly made my day. You cann’t believe simply how much time I had spent for
    this information! Thank you!

  20. Agustus 13, 2014 pukul 10:02 am

    Do you have any video of that? I’d like to find out more details.

  21. September 25, 2014 pukul 5:15 am

    Great post but I was wondering if you could write a litte more on this topic?
    I’d be very thankful if you could elaborate a little bit more.
    Thank you!

  22. Oktober 11, 2014 pukul 10:03 pm

    This site was… how do I say it? Relevant!! Finally I’ve found something which helped me.
    Thanks a lot!

  23. November 8, 2014 pukul 2:40 am

    Awesome things here. I’m very glad to see your article.
    Thanks so much and I am looking ahead to contact you.
    Will you kindly drop me a mail?

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: