Hi Wyatt,
I'm picking up this thread a bit over six years :)
'm doing a bit more development integrating the TA dynamic libraries on Windows since I've switched over from static libs to dynamic libs on macOS.
I would like my installer to copy the TurboActivate.dll file to a particular path on the user's machine and then have my app load the dll from that location.
Here is what I have in a header file:
#pragma comment (lib, "TurboActivate.lib")
#include "TurboActivate.h"
Then, in the main entry point function of my app (for testing its a small win32 console executable), I have this:
HMODULE hinstLib;
hinstLib = LoadLibrary(_T("C:\\ProgramData\\myapp\\TurboActivate.dll"));
if (hinstLib != NULL) {
printf("Loaded TurboActivate.dll");
} else {
printf("Could not load TurboActivate.dll");
}
The app builds fine, but an error dialog immediately displays that it cannot find the DLL. Is there something I need to set in the project configuration for this to work.
I have also tried the following in the main entry point function:
SetDllDirectoryW(_T("C:\\ProgramData\\myapp\\"));
This also builds, but does not work, either.
Any guidance is appreciated!
Thank you for your time and help