Forum Discussion
bill_qu
Feb 14, 2025Copper Contributor
The strange problem of C # program calling C++dll
My C # calls C++DLL and runs it directly in VS2022 without any errors. We use LoadLibrary to load DLLs. Packaged as. msix package, after installation, click on the icon of the application to run, so...
- Feb 17, 2025
The most common cause of loadlibrary failure in an MSIX package is that it doesn't know where to look. For apps that are used to running outside of the package, this is most commonly solved by one of the following:
- Add a LoaderSearchOrder extension to the package listing the relative file path of a folder containing the dlls.
- Put the dlls either at the root folder of the package, or in the appropriate VFS\SystemX86 and VFS\SystemX64 folders of the package.
Crazylarry
Feb 14, 2025Copper Contributor
Hello. So you are saying that running the application via its shortcut fails, but running it by the EXE directly works? Can you share the AppxManifest.xml of your package?
bill_qu
Feb 14, 2025Copper Contributor
Thanks.