Is it possible to set fixed DLL search path in VisualStudio application?

This question already has an answer here:

  • Altering DLL search path for static linked DLL 2 answers

  • As mvidelgauz suggested, I've implemented a launcher using winapi. It was my first native winapi project, but it took indeed only halh an hour to implement.

  • I created a default Win32 project in VS2008.

  • In BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) , removed the lines:

    //ShowWindow(hWnd, nCmdShow);
    //UpdateWindow(hWnd);
    
  • And then instead of them, I added:

    SetCurrentDirectory( L"MyPath" );
    ShellExecute(hWnd, NULL, L"MyApp.exe", L"-l", NULL, SW_HIDE);
    DestroyWindow(hWnd);
    
  • 链接地址: http://www.djcxy.com/p/44506.html

    上一篇: 在Windows中加载共享库时在特定路径中采用dll

    下一篇: 是否可以在VisualStudio应用程序中设置固定的DLL搜索路径?