Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Description of API in win32API
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00272307
Message ID:
00273860
Vues:
35
>Thank you for your previous answer.
>
>I am sarching an API to change the default printer setting programmaticaly.
>
>Do you know if such an API exists.
>
>
>Thank you for your answer.

Hi Francis,

You'd have to use the following API calls: OpenPrinter(), GetPrinter(), SetPrinter() and ClosePrinter() if doing this strictly in VFP. It really depends on what properties you're trying to set. If they're in a PRINTER_INFO_2 structure's DEVMODE structure, it's complicated since one of the members of the PRINTER_INFO_2 structure is a pointer to the DEVMODE structure. If sticking with VFP, you'd need Vlad Tatavu's Pointers, Ed Rauh's CLSHEAP, or Christof Lange's Structure (from the UT download section) to be able to create the pointer to the DEVMODE.

It'd probably be easier to write a VC++ DLL to wrap this.

Anyway, there's an MS KB article (Q140285) that tell's how to do this from C++.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform