Hi,
I made DLL's with Visual C++ express edition. When i'm calling this DLL's in LabVIEW, everything works fine. (This computer runs with VISTA)
Then i wanted to use these DLLs with an other computer. So I copy Vi's and the DLL's on this computer. (This computer runs with WinXP)
Once I open the VI, I have the following error message : "Erreur lors du chargement de "D:\DLL_WRITE.dll". Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre le probleme" in french.
In a bad english this message say :" An error occured while loading the D:\DLL_WRITE.dll". This application hadn't be able to start because the application configuration is wrong. Maybe the reinstallation of this application could solve this problem""
Does someone know the meaning of this error ?
For information, here's my DLL source :
/
/Includes
#include "stdafx.h"
#include <Windows.h>
//fonction principale de la DLL
BOOL APIENTRY DLLMain (HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
extern "C" __declspec(dllexport) void __cdecl Write(HANDLE *WriteH, int *Output);
void __cdecl Write (HANDLE *WriteH, int *Output)
{
DWORD BytesWritten = 0;
DWORD BytesRead = 0;
unsigned char OutputPacketBuffer[65];
OutputPacketBuffer[0] = 0;
OutputPacketBuffer[1] = 0x80;
OutputPacketBuffer[2] = *Output;
WriteFile(*WriteH, &OutputPacketBuffer, 65, &BytesWritten, 0);
} // end of WriteThank you for your help !
(and I apologize about my english !
😉 )
Best regard,
Jérôme.