Discussions au sujet des autres produits NI

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

Importer un .dll dans LabWindows

Bonjour,

J’essaie d'importer une librairie .dll dans LabWindows, pour ce faire, j'ai utilisé ce code :

int returnValue;
int easting = 377000;
int northing = 400000;  

HINSTANCE hinstLib; //Handle to the DLL
MYPROC TheFunction; //Pointer to the function

hinstLib = LoadLibrary("libStkGeodesy.dll");
//The the pointer to the exported function and typecast it so that we can easily call it
//MYPROC is typedef'ed above
//GetProcAddress is part of the Windows SDK and is declared in windows.h
TheFunction = (MYPROC) GetProcAddress(hinstLib, "GeodesyBinGridTransformation::tranform");

//Call the function using the function pointer
returnValue = (TheFunction)(easting, northing);

Je me retrouve avec des erreurs du genre : "error : source file is not valid UTF-8"

Que dois-je faire ? Y-t-il une autre façon d'importer des dll dans LabWindows ?

Merci de votre réponse

0 Compliments
Message 1 sur 2
2 477 Visites

Bonjour,

 

Pour utiliser une dll, il y a plusieurs méthodes. Celle qui est le plus conseillée est d'utiliser une librairie d'importation (import librairy) comme l'explique ce document.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6AcSAK

 

Paolo_P
Certified TestStand Architect
Certified LabVIEW Architect
National Instruments France

0 Compliments
Message 2 sur 2
2 449 Visites