Penulis Topik: bikin launcher sederhana di Windows  (Dibaca 1165 kali)

Offline descrates

  • Pro500
  • ******
  • Tulisan: 600
  • Reputation: 5073
    • Lihat Profil
bikin launcher sederhana di Windows
« pada: April 27, 2017, 10:21:03 PM »
//launcher.c
//kadang kita butuh launcher yang kilat, buat buka sesuatu
//intinya mencoba minimalist
//secara compiling dan secara linking rada aneh dikit (bloatware) di pellesc
//untuk mengatasinya kita gunakan trik
// 1. kita build dulu via poide biar gampang
// 2. setelah jadi launcher.obj kita link pake polink
// 3. polink.exe /nodefaultlib /entry:main /subsystem:windows launcher.obj shell32.lib user32.lib crt.lib kernel32.lib

#include <windows.h>
#include <ShellApi.h>
#include <cstdlib>

void buka(const char* pszFileName)
{
    ShellExecuteA(GetDesktopWindow(),"open",pszFileName,NULL,NULL,SW_SHOW);
}

int main(int argc, char *argv[])
{
    buka("notepad.exe");
   exit (0);
}
TASKKILL /F /IM SMĪ”RTP.exe /T

Win7 32bit [kernel patch] --- 2x2,8GHz Intel --- 8GB RAM DDR3 --- 512MB 9600M GT NVidia --- Iron 15 beta --- Opera Mini Proxies

other OS: Lucid Puppy, XP SP2 [custom], XP SP3, Win7 64bit, Tails