Difference between revisions of "Olevariant/fr"
From Lazarus wiki
Jump to navigationJump to searchm |
m (Fixed syntax highlighting) |
||
Line 8: | Line 8: | ||
<br> | <br> | ||
Déclaration d'un champ de donnée de type OleVariant : | Déclaration d'un champ de donnée de type OleVariant : | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang=pascal> |
var | var | ||
varOle: OleVariant; | varOle: OleVariant; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Création d'un objet : | Création d'un objet : | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang=pascal> |
begin | begin | ||
... | ... | ||
Line 21: | Line 21: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Libération d'un champ de donnée de type OleVariant (du fait du comptage de références):<br/> | Libération d'un champ de donnée de type OleVariant (du fait du comptage de références):<br/> | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang=pascal> |
begin | begin | ||
... | ... |
Revision as of 13:53, 21 February 2020
Cet article s'applique uniquement à Windows.
Voir aussi: Multiplatform Programming Guide/fr
│
Deutsch (de) │
English (en) │
français (fr) │
Cet article s'applique uniquement à Windows.
Voir aussi: Multiplatform Programming Guide/fr
Occupation en mémoire :
- dans une compilation en 32 Bit : 16 octets soit 128 Bit
- dans une compilation en 64 Bit : 24 octets soit 192 Bit
Propriété : Le type de donnée OleVariant est un type variant, utilisé dans l'automatisation OLE (automatisation d'un autre programme).
Déclaration d'un champ de donnée de type OleVariant :
var
varOle: OleVariant;
Création d'un objet :
begin
...
varOle := CreateOleObject('Excel.Application');
...
end;
Libération d'un champ de donnée de type OleVariant (du fait du comptage de références):
begin
...
varOle := Unassigned;
...
end;
D'autres exemples d'utilisation de l'objet Olevariant se trouvent dans le sujet Automatisation de logiciel.