c++ - How to start a process using a .dll file in VC++ 2010 -


i trying learn how use dll file in c++. according research, should open notepad when use displaynotepad() in code. trying compile getting compiler errors , know fact windows.h defines shellexecute says identifier not found. here code:

#include "stdafx.h" #include <windows.h> #include <iostream> extern "c" { __declspec(dllexport) void displaynotepad()  {      shellexecute(null, "open", "c:\\windows\\notepad.exe", null,null, sw_show);  } } 

my compiler giving me following error: error c3861: 'shellexecute': identifier not found. doing wrong? input.

the declaration of shellexecute found in shellapi.h, not windows.h.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -