Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DocumentProperties anyone?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01010251
Message ID:
01011774
Vues:
32
>Well, yes, you can say that a pointer is just a number. But the important thing is that it's a number that represents a specific address in memory. I didn't know how to get the memory address for a specified variable. Your example of using GlobalAlloc has shown me how to do that. But I'm going to see if I can accomplish what I need using Christian's FLL or Christof Wollenhaupt's Struct class.
>
>Thanks for your help!

Barbara,

Okay, I admit it is not as easy as it looks like. My intention was to encourage you (sorry if I sound like teaching or something like that. No, I didn't mean anything like that).

Anyway, here is how to work with pointer
Declare Long RtlMoveMemory in Kernel32 as Copy2Mem ;
   Long lpDest, String @cSource, Long nLength

Declare Long RtlMoveMemory in Kernel32 as CopyMem2Num ;
   Long @nValue, Long lpSource, Long nLength

Store 0 to pDevMode, dmFields

** Get DEVMODE from PRINTER_INFO_2
CopyMem2Num( @pDevMode, pi2 + 28, 4 )

* Get dmFields from DEVMODE
CopyMem2Num( @dmFields, pDevMode+40, 4 )

*** pi2->pDevMode->dmFields = DM_ORIENTATION
Copy2Mem( pDevMode+40, chr( DM_ORIENTATION )+chr(0)+chr(0)+chr(0), 4 )

*** pi2->pDevMode->dmOrientation = dmOrientation
Copy2Mem( pDevMode+44, chr( DMORIENT_LANDSCAPE ) + chr(0), 2 )

*** // Do not attempt to set security descriptor...
*** pi2->pSecurityDescriptor = NULL;
Copy2Mem( pi2+48, replicate( chr(0), 4 ), 4 )
Regards
Herman
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform