<DllImport("nidaq32.dll", SetLastError:=True)> Public Static Function
AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double) As
Integer
End Function
Mais l'IDE me souligne le nom de ma fonction et m'affiche "Les méthodes ne
peuvent pas être déclarées 'Static'" ... Alors que c'est une fonction.
ceci est suite à une erreur générée lors de mon éxécution qui disait :
"l'élément PInvoke (champ, méthode) doit être de type Static"
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Patrick Philippot
AlexC wrote:
<DllImport("nidaq32.dll", SetLastError:=True)> Public Static Function AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double) As Integer End Function
Bonjour,
En VB .Net static se dit Shared
<DllImport("nidaq32.dll", SetLastError:=True)> Public Shared Function AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double) As Integer End Function
-- Patrick Philippot - Microsoft MVP MainSoft Consulting Services www.mainsoft.fr
AlexC wrote:
<DllImport("nidaq32.dll", SetLastError:=True)> Public Static Function
AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double)
As Integer
End Function
Bonjour,
En VB .Net static se dit Shared
<DllImport("nidaq32.dll", SetLastError:=True)> Public Shared Function
AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double)
As Integer
End Function
--
Patrick Philippot - Microsoft MVP
MainSoft Consulting Services
www.mainsoft.fr
<DllImport("nidaq32.dll", SetLastError:=True)> Public Static Function AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double) As Integer End Function
Bonjour,
En VB .Net static se dit Shared
<DllImport("nidaq32.dll", SetLastError:=True)> Public Shared Function AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double) As Integer End Function
-- Patrick Philippot - Microsoft MVP MainSoft Consulting Services www.mainsoft.fr
AlexC
Ah ben voilà :) merci !
"Patrick Philippot" a écrit dans le message de news: u$6KCUH$
AlexC wrote:
<DllImport("nidaq32.dll", SetLastError:=True)> Public Static Function AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double) As Integer End Function
Bonjour,
En VB .Net static se dit Shared
<DllImport("nidaq32.dll", SetLastError:=True)> Public Shared Function AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double) As Integer End Function
-- Patrick Philippot - Microsoft MVP MainSoft Consulting Services www.mainsoft.fr
Ah ben voilà :) merci !
"Patrick Philippot" <patrick.philippot@mainsoft.xx.fr> a écrit dans le
message de news: u$6KCUH$EHA.1188@tk2msftngp13.phx.gbl...
AlexC wrote:
<DllImport("nidaq32.dll", SetLastError:=True)> Public Static Function
AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double)
As Integer
End Function
Bonjour,
En VB .Net static se dit Shared
<DllImport("nidaq32.dll", SetLastError:=True)> Public Shared Function
AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double)
As Integer
End Function
--
Patrick Philippot - Microsoft MVP
MainSoft Consulting Services
www.mainsoft.fr
"Patrick Philippot" a écrit dans le message de news: u$6KCUH$
AlexC wrote:
<DllImport("nidaq32.dll", SetLastError:=True)> Public Static Function AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double) As Integer End Function
Bonjour,
En VB .Net static se dit Shared
<DllImport("nidaq32.dll", SetLastError:=True)> Public Shared Function AO_VWrite(ByVal a As Integer, ByVal b As Integer, ByVal c As Double) As Integer End Function
-- Patrick Philippot - Microsoft MVP MainSoft Consulting Services www.mainsoft.fr