le 07-17-2018 06:49 AM
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
le 07-18-2018 04:45 AM
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