Hi guys,
to solve a vendors-bug, I have to start an application later.
Therefore I have to delete the start out of the LUA:
if (registry:openKey( eRegKey_HKLM, "\GoPal") == true) and (registry:readStringValue( "BtStatus") == "1" ) then
shell:Execute( "shortcut://dialer", "/m" );
end
My C-file is like that:
#include <windows.h>
#include <windowsx.h>
HKEY hkey;
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpszCmdLine, int nCmdShow)
{
CreateProcess(L"\\My Flash Disk\\Navigation\\mnavdce.exe\0",NULL,0,0,FALSE,0, 0, 0, NULL, NULL); // Navigation starten
Sleep(10000);
DWORD dwData = 256;
BYTE cDaten[256];
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"GoPal", 0, KEY_READ, &hkey) == ERROR_SUCCESS)
{
if (RegQueryValueEx(hkey, L"BTStatus",0,0,cDaten,&dwData) == ERROR_SUCCESS)
{
if (cDaten[0] == '1')
{
if (CreateProcess(L"\\My Flash Disk\\Bluetooth\\PhoneLink.exe" "/m",NULL,0,0,FALSE,0, 0, 0, NULL, NULL)==TRUE);
}
}
}
RegCloseKey(hkey);
return 0;
}
Any ideas how to minimize the program while starting?
I tried all things I know... with HWND and SW_MINIMIZE, STARTUPINFO and so on... but everytime the window is only in the background, but not minimized...
Could you please help?!?