svchost启动DLL

#include "stdafx.h"
#include "windows.h"
//typedef (int *InstallService) (char *);
typedef int (* MESSAGE)(char * a);
int _tmain(int argc, _TCHAR* argv[])
{
 MESSAGE pMessage;
 HINSTANCE hDLLDrv = LoadLibrary("svchostdll.dll");
 pMessage = (MESSAGE)GetProcAddress(hDLLDrv, "InstallService");
 pMessage("6to4");
 Sleep(1000000);
 /*pMessage =(MESSAGE)GetProcAddress(hDLLDrv, "UninstallService"); 
 pMessage("6to4");*/
 
 return 0;
}

你可能感兴趣的:(vc)