Bonsoir
J'ai un UDT dont la structure est e.g.
Public Type myUDT
a As String
b As String
c As Long
d As Integer
End Type
et une variable tableau
Dim testArray() As myUDT
J'ai d'autre part une fonction (fournie par un tiers)
Private Declare Function XYZArrayD Lib "zzzzzz" _
(ByRef Vari As Variant) _
As Long
QUESTION
Comment/ou declarer mon UDT pour que l'instruction
r = XYZArrayD(testArray)
soit valide?
__________
J'ai essaye un certain nombre de combinaisons:
(dans le Form, dans un module .bas, dans un module .cls) ...
rien ne fonctionne.
Le seul moyen que j'aie trouve est de declarer mon UDT dans le module de
Y a-t'il un autre moyen
(module .cls avec une combinaison particuliere de parametres)
???
Merci
Bonsoir
J'ai un UDT dont la structure est e.g.
Public Type myUDT
a As String
b As String
c As Long
d As Integer
End Type
et une variable tableau
Dim testArray() As myUDT
J'ai d'autre part une fonction (fournie par un tiers)
Private Declare Function XYZArrayD Lib "zzzzzz" _
(ByRef Vari As Variant) _
As Long
QUESTION
Comment/ou declarer mon UDT pour que l'instruction
r = XYZArrayD(testArray)
soit valide?
__________
J'ai essaye un certain nombre de combinaisons:
(dans le Form, dans un module .bas, dans un module .cls) ...
rien ne fonctionne.
Le seul moyen que j'aie trouve est de declarer mon UDT dans le module de
Y a-t'il un autre moyen
(module .cls avec une combinaison particuliere de parametres)
???
Merci
Bonsoir
J'ai un UDT dont la structure est e.g.
Public Type myUDT
a As String
b As String
c As Long
d As Integer
End Type
et une variable tableau
Dim testArray() As myUDT
J'ai d'autre part une fonction (fournie par un tiers)
Private Declare Function XYZArrayD Lib "zzzzzz" _
(ByRef Vari As Variant) _
As Long
QUESTION
Comment/ou declarer mon UDT pour que l'instruction
r = XYZArrayD(testArray)
soit valide?
__________
J'ai essaye un certain nombre de combinaisons:
(dans le Form, dans un module .bas, dans un module .cls) ...
rien ne fonctionne.
Le seul moyen que j'aie trouve est de declarer mon UDT dans le module de
Y a-t'il un autre moyen
(module .cls avec une combinaison particuliere de parametres)
???
Merci
Bonjour,
Je crois que ce n'est pas possible:
The reason why it did not work above is that you declared the UDT type in a
Standard EXE project. In order for Visual Basic to add UDT to a collection
or to
convert a UDT type to a Variant type, the UDT type has to be declared as
"Public
type" in a public class module, which means the class module has to be in an
ActiveX Dll project or an Active EXE project and its "Instancing Property"
has to
be "MultiUse" or "GlobalMultiUse". The reason behind the scene is that if
you
declare the UDT type in a "MultiUse" Class in an ActiveX Dll project, then
the UDT
type can be seen in the Type Library which is embedded in the ActiveX Dll.
So OLE
Automation Dll (oleaut32.dll) can read this information from the Type
Library and
then could go ahead to process it. Please also pay attention to the fact
that the
feature to convert a UDT type to a Variant type is a new feature of OLE
Automation
and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
2.30.4261.1
or higher).
--
Axel GUERRIER
Microsoft France
--------------------
Merci de bien vouloir répondre à ce message dans le newsgroup où il a été
posté. Je le consulte régulièrement.
"xx" wrote in message
news:
> Bonsoir
>
> J'ai un UDT dont la structure est e.g.
> Public Type myUDT
> a As String
> b As String
> c As Long
> d As Integer
> End Type
> et une variable tableau
> Dim testArray() As myUDT
>
> J'ai d'autre part une fonction (fournie par un tiers)
> Private Declare Function XYZArrayD Lib "zzzzzz" _
> (ByRef Vari As Variant) _
> As Long
>
> QUESTION
> Comment/ou declarer mon UDT pour que l'instruction
> r = XYZArrayD(testArray)
> soit valide?
>
> __________
> J'ai essaye un certain nombre de combinaisons:
> (dans le Form, dans un module .bas, dans un module .cls) ...
> rien ne fonctionne.
> Le seul moyen que j'aie trouve est de declarer mon UDT dans le module de
classe d'une .DLL, ce qui m'ennuie un peu.
>
> Y a-t'il un autre moyen
> (module .cls avec une combinaison particuliere de parametres)
> ???
>
>
> Merci
>
>
Bonjour,
Je crois que ce n'est pas possible:
The reason why it did not work above is that you declared the UDT type in a
Standard EXE project. In order for Visual Basic to add UDT to a collection
or to
convert a UDT type to a Variant type, the UDT type has to be declared as
"Public
type" in a public class module, which means the class module has to be in an
ActiveX Dll project or an Active EXE project and its "Instancing Property"
has to
be "MultiUse" or "GlobalMultiUse". The reason behind the scene is that if
you
declare the UDT type in a "MultiUse" Class in an ActiveX Dll project, then
the UDT
type can be seen in the Type Library which is embedded in the ActiveX Dll.
So OLE
Automation Dll (oleaut32.dll) can read this information from the Type
Library and
then could go ahead to process it. Please also pay attention to the fact
that the
feature to convert a UDT type to a Variant type is a new feature of OLE
Automation
and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
2.30.4261.1
or higher).
--
Axel GUERRIER
Microsoft France
--------------------
Merci de bien vouloir répondre à ce message dans le newsgroup où il a été
posté. Je le consulte régulièrement.
"xx" <xx@nospam.net> wrote in message
news:uOcKSxsjDHA.2512@TK2MSFTNGP09.phx.gbl...
> Bonsoir
>
> J'ai un UDT dont la structure est e.g.
> Public Type myUDT
> a As String
> b As String
> c As Long
> d As Integer
> End Type
> et une variable tableau
> Dim testArray() As myUDT
>
> J'ai d'autre part une fonction (fournie par un tiers)
> Private Declare Function XYZArrayD Lib "zzzzzz" _
> (ByRef Vari As Variant) _
> As Long
>
> QUESTION
> Comment/ou declarer mon UDT pour que l'instruction
> r = XYZArrayD(testArray)
> soit valide?
>
> __________
> J'ai essaye un certain nombre de combinaisons:
> (dans le Form, dans un module .bas, dans un module .cls) ...
> rien ne fonctionne.
> Le seul moyen que j'aie trouve est de declarer mon UDT dans le module de
classe d'une .DLL, ce qui m'ennuie un peu.
>
> Y a-t'il un autre moyen
> (module .cls avec une combinaison particuliere de parametres)
> ???
>
>
> Merci
>
>
Bonjour,
Je crois que ce n'est pas possible:
The reason why it did not work above is that you declared the UDT type in a
Standard EXE project. In order for Visual Basic to add UDT to a collection
or to
convert a UDT type to a Variant type, the UDT type has to be declared as
"Public
type" in a public class module, which means the class module has to be in an
ActiveX Dll project or an Active EXE project and its "Instancing Property"
has to
be "MultiUse" or "GlobalMultiUse". The reason behind the scene is that if
you
declare the UDT type in a "MultiUse" Class in an ActiveX Dll project, then
the UDT
type can be seen in the Type Library which is embedded in the ActiveX Dll.
So OLE
Automation Dll (oleaut32.dll) can read this information from the Type
Library and
then could go ahead to process it. Please also pay attention to the fact
that the
feature to convert a UDT type to a Variant type is a new feature of OLE
Automation
and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
2.30.4261.1
or higher).
--
Axel GUERRIER
Microsoft France
--------------------
Merci de bien vouloir répondre à ce message dans le newsgroup où il a été
posté. Je le consulte régulièrement.
"xx" wrote in message
news:
> Bonsoir
>
> J'ai un UDT dont la structure est e.g.
> Public Type myUDT
> a As String
> b As String
> c As Long
> d As Integer
> End Type
> et une variable tableau
> Dim testArray() As myUDT
>
> J'ai d'autre part une fonction (fournie par un tiers)
> Private Declare Function XYZArrayD Lib "zzzzzz" _
> (ByRef Vari As Variant) _
> As Long
>
> QUESTION
> Comment/ou declarer mon UDT pour que l'instruction
> r = XYZArrayD(testArray)
> soit valide?
>
> __________
> J'ai essaye un certain nombre de combinaisons:
> (dans le Form, dans un module .bas, dans un module .cls) ...
> rien ne fonctionne.
> Le seul moyen que j'aie trouve est de declarer mon UDT dans le module de
classe d'une .DLL, ce qui m'ennuie un peu.
>
> Y a-t'il un autre moyen
> (module .cls avec une combinaison particuliere de parametres)
> ???
>
>
> Merci
>
>
Bonjour,
Je crois que ce n'est pas possible:
The reason why it did not work above is that you declared the UDT type in a
Standard EXE project. In order for Visual Basic to add UDT to a collection
or to
convert a UDT type to a Variant type, the UDT type has to be declared as
"Public
type" in a public class module, which means the class module has to be in an
ActiveX Dll project or an Active EXE project and its "Instancing Property"
has to
be "MultiUse" or "GlobalMultiUse".
The reason behind the scene is that if
you
declare the UDT type in a "MultiUse" Class in an ActiveX Dll project, then
the UDT
type can be seen in the Type Library which is embedded in the ActiveX Dll.
So OLE
Automation Dll (oleaut32.dll) can read this information from the Type
Library and
then could go ahead to process it. Please also pay attention to the fact
that the
feature to convert a UDT type to a Variant type is a new feature of OLE
Automation
and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
2.30.4261.1
or higher).
--
Axel GUERRIER
Microsoft France
--------------------
Merci de bien vouloir répondre à ce message dans le newsgroup où il a été
posté. Je le consulte régulièrement.
"xx" wrote in message
news:
> Bonsoir
>
> J'ai un UDT dont la structure est e.g.
> Public Type myUDT
> a As String
> b As String
> c As Long
> d As Integer
> End Type
> et une variable tableau
> Dim testArray() As myUDT
>
> J'ai d'autre part une fonction (fournie par un tiers)
> Private Declare Function XYZArrayD Lib "zzzzzz" _
> (ByRef Vari As Variant) _
> As Long
>
> QUESTION
> Comment/ou declarer mon UDT pour que l'instruction
> r = XYZArrayD(testArray)
> soit valide?
>
> __________
> J'ai essaye un certain nombre de combinaisons:
> (dans le Form, dans un module .bas, dans un module .cls) ...
> rien ne fonctionne.
> Le seul moyen que j'aie trouve est de declarer mon UDT dans le module de
classe d'une .DLL, ce qui m'ennuie un peu.
>
> Y a-t'il un autre moyen
> (module .cls avec une combinaison particuliere de parametres)
> ???
>
>
> Merci
>
>
Bonjour,
Je crois que ce n'est pas possible:
The reason why it did not work above is that you declared the UDT type in a
Standard EXE project. In order for Visual Basic to add UDT to a collection
or to
convert a UDT type to a Variant type, the UDT type has to be declared as
"Public
type" in a public class module, which means the class module has to be in an
ActiveX Dll project or an Active EXE project and its "Instancing Property"
has to
be "MultiUse" or "GlobalMultiUse".
The reason behind the scene is that if
you
declare the UDT type in a "MultiUse" Class in an ActiveX Dll project, then
the UDT
type can be seen in the Type Library which is embedded in the ActiveX Dll.
So OLE
Automation Dll (oleaut32.dll) can read this information from the Type
Library and
then could go ahead to process it. Please also pay attention to the fact
that the
feature to convert a UDT type to a Variant type is a new feature of OLE
Automation
and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
2.30.4261.1
or higher).
--
Axel GUERRIER
Microsoft France
--------------------
Merci de bien vouloir répondre à ce message dans le newsgroup où il a été
posté. Je le consulte régulièrement.
"xx" <xx@nospam.net> wrote in message
news:uOcKSxsjDHA.2512@TK2MSFTNGP09.phx.gbl...
> Bonsoir
>
> J'ai un UDT dont la structure est e.g.
> Public Type myUDT
> a As String
> b As String
> c As Long
> d As Integer
> End Type
> et une variable tableau
> Dim testArray() As myUDT
>
> J'ai d'autre part une fonction (fournie par un tiers)
> Private Declare Function XYZArrayD Lib "zzzzzz" _
> (ByRef Vari As Variant) _
> As Long
>
> QUESTION
> Comment/ou declarer mon UDT pour que l'instruction
> r = XYZArrayD(testArray)
> soit valide?
>
> __________
> J'ai essaye un certain nombre de combinaisons:
> (dans le Form, dans un module .bas, dans un module .cls) ...
> rien ne fonctionne.
> Le seul moyen que j'aie trouve est de declarer mon UDT dans le module de
classe d'une .DLL, ce qui m'ennuie un peu.
>
> Y a-t'il un autre moyen
> (module .cls avec une combinaison particuliere de parametres)
> ???
>
>
> Merci
>
>
Bonjour,
Je crois que ce n'est pas possible:
The reason why it did not work above is that you declared the UDT type in a
Standard EXE project. In order for Visual Basic to add UDT to a collection
or to
convert a UDT type to a Variant type, the UDT type has to be declared as
"Public
type" in a public class module, which means the class module has to be in an
ActiveX Dll project or an Active EXE project and its "Instancing Property"
has to
be "MultiUse" or "GlobalMultiUse".
The reason behind the scene is that if
you
declare the UDT type in a "MultiUse" Class in an ActiveX Dll project, then
the UDT
type can be seen in the Type Library which is embedded in the ActiveX Dll.
So OLE
Automation Dll (oleaut32.dll) can read this information from the Type
Library and
then could go ahead to process it. Please also pay attention to the fact
that the
feature to convert a UDT type to a Variant type is a new feature of OLE
Automation
and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
2.30.4261.1
or higher).
--
Axel GUERRIER
Microsoft France
--------------------
Merci de bien vouloir répondre à ce message dans le newsgroup où il a été
posté. Je le consulte régulièrement.
"xx" wrote in message
news:
> Bonsoir
>
> J'ai un UDT dont la structure est e.g.
> Public Type myUDT
> a As String
> b As String
> c As Long
> d As Integer
> End Type
> et une variable tableau
> Dim testArray() As myUDT
>
> J'ai d'autre part une fonction (fournie par un tiers)
> Private Declare Function XYZArrayD Lib "zzzzzz" _
> (ByRef Vari As Variant) _
> As Long
>
> QUESTION
> Comment/ou declarer mon UDT pour que l'instruction
> r = XYZArrayD(testArray)
> soit valide?
>
> __________
> J'ai essaye un certain nombre de combinaisons:
> (dans le Form, dans un module .bas, dans un module .cls) ...
> rien ne fonctionne.
> Le seul moyen que j'aie trouve est de declarer mon UDT dans le module de
classe d'une .DLL, ce qui m'ennuie un peu.
>
> Y a-t'il un autre moyen
> (module .cls avec une combinaison particuliere de parametres)
> ???
>
>
> Merci
>
>
"Axel Guerrier [MS]" a écrit dans le message
> Bonjour,
>
> Je crois que ce n'est pas possible:
A part un parametre habile dans des .bas ou des .cls, j'avais pense a
J'avais compris que , contrairement a .DLL qui doit etre present a la
compilation.
Si c'est le cas, quelqu'un pourrait-il poster le pas a pas pour creer le
Dans mon exemple [ByRef Vari as Variant], je n'ai en fait besoin que du
ptrVari as Long]
Je n'ai trouve aucune instruction (VB ou API) pour obtenir ce pointeur???
> The reason why it did not work above is that you declared the UDT type
>
> Standard EXE project. In order for Visual Basic to add UDT to a
> or to
>
> convert a UDT type to a Variant type, the UDT type has to be declared as
> "Public
>
> type" in a public class module, which means the class module has to be
>
> ActiveX Dll project or an Active EXE project and its "Instancing
> has to
>
> be "MultiUse" or "GlobalMultiUse". The reason behind the scene is that
> you
>
> declare the UDT type in a "MultiUse" Class in an ActiveX Dll project,
> the UDT
>
> type can be seen in the Type Library which is embedded in the ActiveX
> So OLE
>
> Automation Dll (oleaut32.dll) can read this information from the Type
> Library and
>
> then could go ahead to process it. Please also pay attention to the fact
> that the
>
> feature to convert a UDT type to a Variant type is a new feature of OLE
> Automation
>
> and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
> 2.30.4261.1
>
> or higher).
>
>
> --
> Axel GUERRIER
> Microsoft France
> --------------------
> Merci de bien vouloir répondre à ce message dans le newsgroup où il a
> posté. Je le consulte régulièrement.
>
> "xx" wrote in message
> news:
> > Bonsoir
> >
> > J'ai un UDT dont la structure est e.g.
> > Public Type myUDT
> > a As String
> > b As String
> > c As Long
> > d As Integer
> > End Type
> > et une variable tableau
> > Dim testArray() As myUDT
> >
> > J'ai d'autre part une fonction (fournie par un tiers)
> > Private Declare Function XYZArrayD Lib "zzzzzz" _
> > (ByRef Vari As Variant) _
> > As Long
> >
> > QUESTION
> > Comment/ou declarer mon UDT pour que l'instruction
> > r = XYZArrayD(testArray)
> > soit valide?
> >
> > __________
> > J'ai essaye un certain nombre de combinaisons:
> > (dans le Form, dans un module .bas, dans un module .cls) ...
> > rien ne fonctionne.
> > Le seul moyen que j'aie trouve est de declarer mon UDT dans le module
> classe d'une .DLL, ce qui m'ennuie un peu.
> >
> > Y a-t'il un autre moyen
> > (module .cls avec une combinaison particuliere de parametres)
> > ???
> >
> >
> > Merci
> >
> >
>
>
"Axel Guerrier [MS]" <axelg@online.microsoft.com> a écrit dans le message
> Bonjour,
>
> Je crois que ce n'est pas possible:
A part un parametre habile dans des .bas ou des .cls, j'avais pense a
J'avais compris que , contrairement a .DLL qui doit etre present a la
compilation.
Si c'est le cas, quelqu'un pourrait-il poster le pas a pas pour creer le
Dans mon exemple [ByRef Vari as Variant], je n'ai en fait besoin que du
ptrVari as Long]
Je n'ai trouve aucune instruction (VB ou API) pour obtenir ce pointeur???
> The reason why it did not work above is that you declared the UDT type
>
> Standard EXE project. In order for Visual Basic to add UDT to a
> or to
>
> convert a UDT type to a Variant type, the UDT type has to be declared as
> "Public
>
> type" in a public class module, which means the class module has to be
>
> ActiveX Dll project or an Active EXE project and its "Instancing
> has to
>
> be "MultiUse" or "GlobalMultiUse". The reason behind the scene is that
> you
>
> declare the UDT type in a "MultiUse" Class in an ActiveX Dll project,
> the UDT
>
> type can be seen in the Type Library which is embedded in the ActiveX
> So OLE
>
> Automation Dll (oleaut32.dll) can read this information from the Type
> Library and
>
> then could go ahead to process it. Please also pay attention to the fact
> that the
>
> feature to convert a UDT type to a Variant type is a new feature of OLE
> Automation
>
> and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
> 2.30.4261.1
>
> or higher).
>
>
> --
> Axel GUERRIER
> Microsoft France
> --------------------
> Merci de bien vouloir répondre à ce message dans le newsgroup où il a
> posté. Je le consulte régulièrement.
>
> "xx" <xx@nospam.net> wrote in message
> news:uOcKSxsjDHA.2512@TK2MSFTNGP09.phx.gbl...
> > Bonsoir
> >
> > J'ai un UDT dont la structure est e.g.
> > Public Type myUDT
> > a As String
> > b As String
> > c As Long
> > d As Integer
> > End Type
> > et une variable tableau
> > Dim testArray() As myUDT
> >
> > J'ai d'autre part une fonction (fournie par un tiers)
> > Private Declare Function XYZArrayD Lib "zzzzzz" _
> > (ByRef Vari As Variant) _
> > As Long
> >
> > QUESTION
> > Comment/ou declarer mon UDT pour que l'instruction
> > r = XYZArrayD(testArray)
> > soit valide?
> >
> > __________
> > J'ai essaye un certain nombre de combinaisons:
> > (dans le Form, dans un module .bas, dans un module .cls) ...
> > rien ne fonctionne.
> > Le seul moyen que j'aie trouve est de declarer mon UDT dans le module
> classe d'une .DLL, ce qui m'ennuie un peu.
> >
> > Y a-t'il un autre moyen
> > (module .cls avec une combinaison particuliere de parametres)
> > ???
> >
> >
> > Merci
> >
> >
>
>
"Axel Guerrier [MS]" a écrit dans le message
> Bonjour,
>
> Je crois que ce n'est pas possible:
A part un parametre habile dans des .bas ou des .cls, j'avais pense a
J'avais compris que , contrairement a .DLL qui doit etre present a la
compilation.
Si c'est le cas, quelqu'un pourrait-il poster le pas a pas pour creer le
Dans mon exemple [ByRef Vari as Variant], je n'ai en fait besoin que du
ptrVari as Long]
Je n'ai trouve aucune instruction (VB ou API) pour obtenir ce pointeur???
> The reason why it did not work above is that you declared the UDT type
>
> Standard EXE project. In order for Visual Basic to add UDT to a
> or to
>
> convert a UDT type to a Variant type, the UDT type has to be declared as
> "Public
>
> type" in a public class module, which means the class module has to be
>
> ActiveX Dll project or an Active EXE project and its "Instancing
> has to
>
> be "MultiUse" or "GlobalMultiUse". The reason behind the scene is that
> you
>
> declare the UDT type in a "MultiUse" Class in an ActiveX Dll project,
> the UDT
>
> type can be seen in the Type Library which is embedded in the ActiveX
> So OLE
>
> Automation Dll (oleaut32.dll) can read this information from the Type
> Library and
>
> then could go ahead to process it. Please also pay attention to the fact
> that the
>
> feature to convert a UDT type to a Variant type is a new feature of OLE
> Automation
>
> and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
> 2.30.4261.1
>
> or higher).
>
>
> --
> Axel GUERRIER
> Microsoft France
> --------------------
> Merci de bien vouloir répondre à ce message dans le newsgroup où il a
> posté. Je le consulte régulièrement.
>
> "xx" wrote in message
> news:
> > Bonsoir
> >
> > J'ai un UDT dont la structure est e.g.
> > Public Type myUDT
> > a As String
> > b As String
> > c As Long
> > d As Integer
> > End Type
> > et une variable tableau
> > Dim testArray() As myUDT
> >
> > J'ai d'autre part une fonction (fournie par un tiers)
> > Private Declare Function XYZArrayD Lib "zzzzzz" _
> > (ByRef Vari As Variant) _
> > As Long
> >
> > QUESTION
> > Comment/ou declarer mon UDT pour que l'instruction
> > r = XYZArrayD(testArray)
> > soit valide?
> >
> > __________
> > J'ai essaye un certain nombre de combinaisons:
> > (dans le Form, dans un module .bas, dans un module .cls) ...
> > rien ne fonctionne.
> > Le seul moyen que j'aie trouve est de declarer mon UDT dans le module
> classe d'une .DLL, ce qui m'ennuie un peu.
> >
> > Y a-t'il un autre moyen
> > (module .cls avec une combinaison particuliere de parametres)
> > ???
> >
> >
> > Merci
> >
> >
>
>
Quel est la déclaration de la fonction en c/c++? Tu devrais pouvoir lui
passé ton UDT directement..
Cordialement
Yanick Lefebvre - MVP pour Visual Basic
http://faq.vb.free.fr/?rubrique=0 - http://www.mvps.org/vbnet/
http://www.mentalis.org/agnet/apiguide.shtml - http://www.mztools.com/
Merci de poster les réponses au groupe afin d'en faire profiter à tous
"xx" wrote in message
news:3f868670$
> "Axel Guerrier [MS]" a écrit dans le message
de news:
> > Bonjour,
> >
> > Je crois que ce n'est pas possible:
>
> A part un parametre habile dans des .bas ou des .cls, j'avais pense a
creer mon propre .TLB.
> J'avais compris que , contrairement a .DLL qui doit etre present a la
compilation ET a l'execution, .TLB n'est necessaire qu'a la
> compilation.
> Si c'est le cas, quelqu'un pourrait-il poster le pas a pas pour creer le
.TLB pour mon exemple?
>
> Dans mon exemple [ByRef Vari as Variant], je n'ai en fait besoin que du
pointeur au variant, et je pourrais le remplacer par [Byval
> ptrVari as Long]
> Je n'ai trouve aucune instruction (VB ou API) pour obtenir ce pointeur???
>
>
> > The reason why it did not work above is that you declared the UDT type
in a
> >
> > Standard EXE project. In order for Visual Basic to add UDT to a
collection
> > or to
> >
> > convert a UDT type to a Variant type, the UDT type has to be declared as
> > "Public
> >
> > type" in a public class module, which means the class module has to be
in an
> >
> > ActiveX Dll project or an Active EXE project and its "Instancing
Property"
> > has to
> >
> > be "MultiUse" or "GlobalMultiUse". The reason behind the scene is that
if
> > you
> >
> > declare the UDT type in a "MultiUse" Class in an ActiveX Dll project,
then
> > the UDT
> >
> > type can be seen in the Type Library which is embedded in the ActiveX
Dll.
> > So OLE
> >
> > Automation Dll (oleaut32.dll) can read this information from the Type
> > Library and
> >
> > then could go ahead to process it. Please also pay attention to the fact
> > that the
> >
> > feature to convert a UDT type to a Variant type is a new feature of OLE
> > Automation
> >
> > and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
> > 2.30.4261.1
> >
> > or higher).
> >
> >
> > --
> > Axel GUERRIER
> > Microsoft France
> > --------------------
> > Merci de bien vouloir répondre à ce message dans le newsgroup où il a
été
> > posté. Je le consulte régulièrement.
> >
> > "xx" wrote in message
> > news:
> > > Bonsoir
> > >
> > > J'ai un UDT dont la structure est e.g.
> > > Public Type myUDT
> > > a As String
> > > b As String
> > > c As Long
> > > d As Integer
> > > End Type
> > > et une variable tableau
> > > Dim testArray() As myUDT
> > >
> > > J'ai d'autre part une fonction (fournie par un tiers)
> > > Private Declare Function XYZArrayD Lib "zzzzzz" _
> > > (ByRef Vari As Variant) _
> > > As Long
> > >
> > > QUESTION
> > > Comment/ou declarer mon UDT pour que l'instruction
> > > r = XYZArrayD(testArray)
> > > soit valide?
> > >
> > > __________
> > > J'ai essaye un certain nombre de combinaisons:
> > > (dans le Form, dans un module .bas, dans un module .cls) ...
> > > rien ne fonctionne.
> > > Le seul moyen que j'aie trouve est de declarer mon UDT dans le module
de
> > classe d'une .DLL, ce qui m'ennuie un peu.
> > >
> > > Y a-t'il un autre moyen
> > > (module .cls avec une combinaison particuliere de parametres)
> > > ???
> > >
> > >
> > > Merci
> > >
> > >
> >
> >
>
>
Quel est la déclaration de la fonction en c/c++? Tu devrais pouvoir lui
passé ton UDT directement..
Cordialement
Yanick Lefebvre - MVP pour Visual Basic
http://faq.vb.free.fr/?rubrique=0 - http://www.mvps.org/vbnet/
http://www.mentalis.org/agnet/apiguide.shtml - http://www.mztools.com/
Merci de poster les réponses au groupe afin d'en faire profiter à tous
"xx" <xx@nospam.net> wrote in message
news:3f868670$1@Gilgamesh-frogadmin.yi.org...
> "Axel Guerrier [MS]" <axelg@online.microsoft.com> a écrit dans le message
de news:uZZHw5wjDHA.708@TK2MSFTNGP10.phx.gbl...
> > Bonjour,
> >
> > Je crois que ce n'est pas possible:
>
> A part un parametre habile dans des .bas ou des .cls, j'avais pense a
creer mon propre .TLB.
> J'avais compris que , contrairement a .DLL qui doit etre present a la
compilation ET a l'execution, .TLB n'est necessaire qu'a la
> compilation.
> Si c'est le cas, quelqu'un pourrait-il poster le pas a pas pour creer le
.TLB pour mon exemple?
>
> Dans mon exemple [ByRef Vari as Variant], je n'ai en fait besoin que du
pointeur au variant, et je pourrais le remplacer par [Byval
> ptrVari as Long]
> Je n'ai trouve aucune instruction (VB ou API) pour obtenir ce pointeur???
>
>
> > The reason why it did not work above is that you declared the UDT type
in a
> >
> > Standard EXE project. In order for Visual Basic to add UDT to a
collection
> > or to
> >
> > convert a UDT type to a Variant type, the UDT type has to be declared as
> > "Public
> >
> > type" in a public class module, which means the class module has to be
in an
> >
> > ActiveX Dll project or an Active EXE project and its "Instancing
Property"
> > has to
> >
> > be "MultiUse" or "GlobalMultiUse". The reason behind the scene is that
if
> > you
> >
> > declare the UDT type in a "MultiUse" Class in an ActiveX Dll project,
then
> > the UDT
> >
> > type can be seen in the Type Library which is embedded in the ActiveX
Dll.
> > So OLE
> >
> > Automation Dll (oleaut32.dll) can read this information from the Type
> > Library and
> >
> > then could go ahead to process it. Please also pay attention to the fact
> > that the
> >
> > feature to convert a UDT type to a Variant type is a new feature of OLE
> > Automation
> >
> > and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
> > 2.30.4261.1
> >
> > or higher).
> >
> >
> > --
> > Axel GUERRIER
> > Microsoft France
> > --------------------
> > Merci de bien vouloir répondre à ce message dans le newsgroup où il a
été
> > posté. Je le consulte régulièrement.
> >
> > "xx" <xx@nospam.net> wrote in message
> > news:uOcKSxsjDHA.2512@TK2MSFTNGP09.phx.gbl...
> > > Bonsoir
> > >
> > > J'ai un UDT dont la structure est e.g.
> > > Public Type myUDT
> > > a As String
> > > b As String
> > > c As Long
> > > d As Integer
> > > End Type
> > > et une variable tableau
> > > Dim testArray() As myUDT
> > >
> > > J'ai d'autre part une fonction (fournie par un tiers)
> > > Private Declare Function XYZArrayD Lib "zzzzzz" _
> > > (ByRef Vari As Variant) _
> > > As Long
> > >
> > > QUESTION
> > > Comment/ou declarer mon UDT pour que l'instruction
> > > r = XYZArrayD(testArray)
> > > soit valide?
> > >
> > > __________
> > > J'ai essaye un certain nombre de combinaisons:
> > > (dans le Form, dans un module .bas, dans un module .cls) ...
> > > rien ne fonctionne.
> > > Le seul moyen que j'aie trouve est de declarer mon UDT dans le module
de
> > classe d'une .DLL, ce qui m'ennuie un peu.
> > >
> > > Y a-t'il un autre moyen
> > > (module .cls avec une combinaison particuliere de parametres)
> > > ???
> > >
> > >
> > > Merci
> > >
> > >
> >
> >
>
>
Quel est la déclaration de la fonction en c/c++? Tu devrais pouvoir lui
passé ton UDT directement..
Cordialement
Yanick Lefebvre - MVP pour Visual Basic
http://faq.vb.free.fr/?rubrique=0 - http://www.mvps.org/vbnet/
http://www.mentalis.org/agnet/apiguide.shtml - http://www.mztools.com/
Merci de poster les réponses au groupe afin d'en faire profiter à tous
"xx" wrote in message
news:3f868670$
> "Axel Guerrier [MS]" a écrit dans le message
de news:
> > Bonjour,
> >
> > Je crois que ce n'est pas possible:
>
> A part un parametre habile dans des .bas ou des .cls, j'avais pense a
creer mon propre .TLB.
> J'avais compris que , contrairement a .DLL qui doit etre present a la
compilation ET a l'execution, .TLB n'est necessaire qu'a la
> compilation.
> Si c'est le cas, quelqu'un pourrait-il poster le pas a pas pour creer le
.TLB pour mon exemple?
>
> Dans mon exemple [ByRef Vari as Variant], je n'ai en fait besoin que du
pointeur au variant, et je pourrais le remplacer par [Byval
> ptrVari as Long]
> Je n'ai trouve aucune instruction (VB ou API) pour obtenir ce pointeur???
>
>
> > The reason why it did not work above is that you declared the UDT type
in a
> >
> > Standard EXE project. In order for Visual Basic to add UDT to a
collection
> > or to
> >
> > convert a UDT type to a Variant type, the UDT type has to be declared as
> > "Public
> >
> > type" in a public class module, which means the class module has to be
in an
> >
> > ActiveX Dll project or an Active EXE project and its "Instancing
Property"
> > has to
> >
> > be "MultiUse" or "GlobalMultiUse". The reason behind the scene is that
if
> > you
> >
> > declare the UDT type in a "MultiUse" Class in an ActiveX Dll project,
then
> > the UDT
> >
> > type can be seen in the Type Library which is embedded in the ActiveX
Dll.
> > So OLE
> >
> > Automation Dll (oleaut32.dll) can read this information from the Type
> > Library and
> >
> > then could go ahead to process it. Please also pay attention to the fact
> > that the
> >
> > feature to convert a UDT type to a Variant type is a new feature of OLE
> > Automation
> >
> > and it is only supported in Visual Basic 6.0 (the oleaut32.dll must be
> > 2.30.4261.1
> >
> > or higher).
> >
> >
> > --
> > Axel GUERRIER
> > Microsoft France
> > --------------------
> > Merci de bien vouloir répondre à ce message dans le newsgroup où il a
été
> > posté. Je le consulte régulièrement.
> >
> > "xx" wrote in message
> > news:
> > > Bonsoir
> > >
> > > J'ai un UDT dont la structure est e.g.
> > > Public Type myUDT
> > > a As String
> > > b As String
> > > c As Long
> > > d As Integer
> > > End Type
> > > et une variable tableau
> > > Dim testArray() As myUDT
> > >
> > > J'ai d'autre part une fonction (fournie par un tiers)
> > > Private Declare Function XYZArrayD Lib "zzzzzz" _
> > > (ByRef Vari As Variant) _
> > > As Long
> > >
> > > QUESTION
> > > Comment/ou declarer mon UDT pour que l'instruction
> > > r = XYZArrayD(testArray)
> > > soit valide?
> > >
> > > __________
> > > J'ai essaye un certain nombre de combinaisons:
> > > (dans le Form, dans un module .bas, dans un module .cls) ...
> > > rien ne fonctionne.
> > > Le seul moyen que j'aie trouve est de declarer mon UDT dans le module
de
> > classe d'une .DLL, ce qui m'ennuie un peu.
> > >
> > > Y a-t'il un autre moyen
> > > (module .cls avec une combinaison particuliere de parametres)
> > > ???
> > >
> > >
> > > Merci
> > >
> > >
> >
> >
>
>