okFrontPanel.dll portable

Hello,

Is there a way to embed the okFrontPanel.dll in the exe file?? I am having problems with my portable application (MFC VS2010) on some machines because the okFrontPanelDLL_LoadLib(NULL) call fails and return FALSE.

Thanks
Ed

Ed, the recommended practice is to put the DLL in the same file as the EXE. As long as your executable is started with it’s current directory where it is, then the DLL should always be found.

— Begin quote from Opal Kelly Support;2984

Ed, the recommended practice is to put the DLL in the same file as the EXE. As long as your executable is started with it’s current directory where it is, then the DLL should always be found.

— End quote

The DLL is already on the same folder than the exe file. It works on most of the machines, but there are some customers with installations where the DLL is not loaded.
I have got GetLastError() code of 14001 which means that a new installation of the application could fix the problem, but there is no installation of the application because it is a portable one.
Ed

On the machines where it does not work, is there a trend? What OS? What architecture (32-bit or 64-bit) ?

The DLL and application must be the same architecture.

[QUOTE=Opal Kelly Support;2986]On the machines where it does not work, is there a trend? What OS? What architecture (32-bit or 64-bit) ?

The DLL and application must be the same architecture.[/QUOTE]

The system I am trying now where the load fails is XP SP3 (32 bits) . I have done a brand new installation on it formatting disk and so on. Probaly there is something missing on the installation , but I can not find a way to found it.My development machine is exactly the same XP SP3 and it works.
Again my APP links statically all the MFC stuffto be portable.
Thanks
Ed

If you’re on WinXP, you need to have the winusb.dll installed, as well.

This part of the installation occurs AFTER you attach the XEM device. Windows completes the driver installation and installs WINUSB. With the FrontPanel Application, you get a message box that says WinUSB could not be found. I do not know what happens with a console application.

Would you please detail the Winusb.dll part?
Ed

Ed–

There isn’t more detail to it. WinXP does not have WINUSB.DLL by default (unless it is part of SP3). You then install our USB drivers. Then you attach the XEM device. This step completes installation, including the WINUSB installation.

Fine and thank you for your help. I have found a solution for my problem and it seems it works well now.

Happy new year !!!
Ed

Ed–

Great! What was the solution to your problem?