03-12-2014 07:28 AM
Bonjour,
Je souhaite utiliser une fonction C sous LabVIEW 2013 afin que cette fonction devienne un VI.
Cette fonction est contenue dans une DLL créée avec Visual Studio 2005.
Lorsque j'utilise l'outil "Import Shared Library" de LabVIEW pour créer le VI à partir de la DLL, j'obtiens l'erreur suivante:
"Runtime Error !
R6034: An application has made an attempt to load the C runtime library without using a manifest."
Cette erreur est connue sur le net mais je n'ai trouvé aucune personne qui l'a rencontré dans les mêmes circonstances que moi.
Est-ce un problème de compatibilité entre la DLL (qui a été créé avec un logiciel de 2005) et LabVIEW qui est très récent (2013).
En espérant que quelqu'un ait une solution.
03-13-2014 03:12 AM
Bonjour Jérémy,
Merci d'avoir posé votre question sur le forum de National Instruments.
Avez-vous consulté les documentations ci-dessous :
http://digital.ni.com/public.nsf/allkb/2916D3735309FD92862573C2005AB1FC?OpenDocument
http://msdn.microsoft.com/en-us/library/ms235560%28VS.80%29.aspx
Merci,
Brice S.
National Instruments France
03-13-2014 04:12 AM
Bonjour Brice,
Je vous remercie pour votre réponse.
J'avais déjà consulté le deuxième document mais pas le premier.
Je vais recréer la bibliothèque de fonctions (DLL) et vérifier si je peux l'ouvrir dans LabVIEW.
Je vous recontacte en cas de besoin.
Cordialement,
Jérémy
03-13-2014 04:21 AM - edited 03-13-2014 04:29 AM
Have you checked in your DLL project settings that under Configuration Properties->Linker->Manifest File the option to generate a manifest file is checked and that under Configuration Properties->Manifest Tool->Input and Output the Embed Manifest is checked too?
VC2005 C runtime library is a so called SxS (side by side) component and actively checks on load that it was invoked as such and not just as a simple DLL. MS relaxed that on later VS versions a little, as the strict SxS mechanisme can be a real nightmare for component developers and in many cases is really overkill.
Of course once you have added the manifest file to your DLL, loading of your DLL will fail if you haven't installed the according version of the C runtime library on your target machine, but at least in VS2005 (and 2008) there is really no alternative to this unless you plan to replace the entire C runtime library with something else.