moved definition to Platform.h and removed useless function calls
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5196 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5648dd2ace
commit
b5cfb1ce4a
2 changed files with 8 additions and 7 deletions
|
@ -867,4 +867,11 @@ typedef struct tagVS_FIXEDFILEINFO {
|
|||
# pragma pack()
|
||||
#endif
|
||||
|
||||
// ShGetFolderPath
|
||||
typedef HRESULT (__stdcall * PFNSHGETFOLDERPATHA)(HWND, int, HANDLE, DWORD, LPSTR);
|
||||
|
||||
#ifndef SHGFP_TYPE_CURRENT
|
||||
#define SHGFP_TYPE_CURRENT 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "../Platform.h"
|
||||
#include <shellapi.h>
|
||||
#include <shfolder.h>
|
||||
#include "util.h"
|
||||
#include "state.h"
|
||||
#include "config.h"
|
||||
|
@ -628,9 +627,7 @@ char * NSISCALL GetNSISString(char *outbuf, int strtab)
|
|||
int x = 2;
|
||||
|
||||
// Use SHGetFolderPath when shfolder.dll is available
|
||||
PFNSHGETFOLDERPATHA pSHGetFolderPath = 0;
|
||||
HMODULE hDLL = LoadLibrary("shfolder");
|
||||
if (hDLL) pSHGetFolderPath = (PFNSHGETFOLDERPATHA) myGetProcAddress(MGA_SHGetFolderPathA);
|
||||
PFNSHGETFOLDERPATHA pSHGetFolderPath = (PFNSHGETFOLDERPATHA) myGetProcAddress(MGA_SHGetFolderPathA);
|
||||
|
||||
if (g_exec_flags.all_user_var)
|
||||
{
|
||||
|
@ -680,9 +677,6 @@ char * NSISCALL GetNSISString(char *outbuf, int strtab)
|
|||
mystrcat(out, QUICKLAUNCH);
|
||||
}
|
||||
}
|
||||
|
||||
if (hDLL) FreeLibrary(hDLL);
|
||||
|
||||
validate_filename(out);
|
||||
}
|
||||
else if (nVarIdx == NS_VAR_CODE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue