Forum Discussion
Creating Optional package without Visual Studio
Maybe I'm misunderstanding the purpose of Optional Packages and Related sets. I have a Win32 exe that can use optional dlls, which are distributed separately from the exe. The files need to be in the same folder as the main application (so LoadLibrary can find the files). Is this possible with an Optional Package or Related Set?
Is your Win32 exe also packaged? If it is then yes this is possible with related set, your main app can use LoadPackagedLibrary to load the dlls in an optional package (main apps and optional packages are deployed to separate directories, but LoadPackagedLibrary should be able to find the dlls for you).
If your Win32 exe is not packaged, then optional packages won't work for you. Optional packages are not designed to be used stand-alone with an unpackaged Win32 app.
- Ryan EadieNov 07, 2018Copper Contributor
Yes, the Win32 exe is also packaged. Does this mean I have to change all instances of LoadLibrary to LoadPackagedLibrary? How do I handle statically linked delay loaded dlls that are optionally installed?
- Andy LiuNov 08, 2018Brass Contributor
Yes you should be using LoadPackagedLibrary, and statically linked delay loaded dlls should work the same way that they do for a main package. Let me know if you're having any issues with these.