Difference between revisions of "Olevariant/fr"

From Free Pascal wiki
Jump to navigationJump to search
m
m (Remove duplicate platform macro)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{Olevariant}}
 
{{Olevariant}}
{{Platform only|Windows|Windows|Windows}}
+
 
<br/>
+
Occupation en mémoire :
Occupation en mémoire :<br/>
+
 
* dans une compilation en 32 Bit : 16 octets soit 128 Bit<br/>
+
* dans une compilation en 32 Bit : 16 octets soit 128 Bit
* dans une compilation en 64 Bit : 24 octets soit 192 Bit<br/>
+
 
Propriété : Le [[Data type/fr|type de donnée]] '''OleVariant''' est un type variant, utilisé dans l'automatisation OLE (automatisation d'un autre programme).<br/>
+
* dans une compilation en 64 Bit : 24 octets soit 192 Bit
<br>
+
 
 +
Propriété : Le [[Data type/fr|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 :
 
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 20: Line 23:
 
end;
 
end;
 
</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
 
   ...
 
   ...
Line 28: Line 33:
 
end;
 
end;
 
</syntaxhighlight>
 
</syntaxhighlight>
D'autres exemples d'utilisation de l'objet Olevariant se trouvent dans le sujet [[Office_Automation/fr|Automatisation de logiciel]].<br/>
+
 
 +
D'autres exemples d'utilisation de l'objet Olevariant se trouvent dans le sujet [[Office_Automation/fr|Automatisation de logiciel]].

Latest revision as of 12:56, 21 February 2020

Windows logo - 2012.svg

Cet article s'applique uniquement à Windows.

Voir aussi: Multiplatform Programming Guide/fr

Deutsch (de) English (en) français (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.