Wide characters again. You need the L for wide character string literals, L"\\"
If you are working with wide chars you have to use them everywhere, you cannot mix wide strings with "normal" strings.
Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard
exomo wrote:Of course this is possible. You can get the path of your application by using the GetModuleFileName() function: http://msdn.microsoft.com/en-us/library/windows/desktop/ms683197%28v=vs.85%29.aspx
From that filename you can remove the last part which is the actual filename to get the path, if want to have the parent directory just remove the last portion of the pathname again. Append the name of the file you want to run and give it to ShellExecute.
exomo wrote:Wide characters again. You need the L for wide character string literals, L"\\"
If you are working with wide chars you have to use them everywhere, you cannot mix wide strings with "normal" strings.
exomo wrote:Wide characters again. You need the L for wide character string literals, L"\\"
If you are working with wide chars you have to use them everywhere, you cannot mix wide strings with "normal" strings.
exomo wrote:Wide characters again. You need the L for wide character string literals, L"\\"
If you are working with wide chars you have to use them everywhere, you cannot mix wide strings with "normal" strings.

exomo wrote:Please use the edit function if you have something to add to you previous post. Don't make a new post for every new comment.
I have no idea how SynthEdit works. And I'm not really sure about what filename GetModuleFileName() returns when called from a dll.
Is it possible to have some output (like cout <<) in your dll? If yes just print the string you get as filename and cut from the end or append as needed.
Perhaps it is easier to just pass a relative filename like "..\\Test.exe" to ShellExecute. I really can't help you with this.
BROWSEINFO bi = { 0 };
bi.lpszTitle = (L"Browse for your folder! Should be the same where the VST is installed.");
LPITEMIDLIST pidl = SHBrowseForFolder ( &bi );
if ( pidl != 0 )
{
SHGetPathFromIDList ( pidl, path);
SetCurrentDirectory ( path );
hFind = FindFirstFile ( L"Test.exe", &FindFileData );
int Open = (int)ShellExecuteW(NULL, L"open", FindFileData.cFileName, NULL, NULL, SW_SHOWNORMAL);
IMalloc * imalloc = 0;
if ( SUCCEEDED( SHGetMalloc ( &imalloc )) )
{
imalloc->Free ( pidl );
imalloc->Release ( );
}
Open;
Users browsing this forum: No registered users and 4 guests