Вверх ↑
Ответов: 3514
Рейтинг: 184
#1: 2008-11-14 19:56:34 ЛС | профиль | цитата
Прикольная dll

#cpp
[quote]#include <windows.h>
#include "....CGTShare.h"
#include "share.h"


extern "C" __declspec(dllexport) int buildGetParamsProc(TBuildParams &params)
{
params.flags = CGMP_RUN;
return(CG_SUCCESS);
}

extern "C" __declspec(dllexport) int buildMakePrj(TBuildMakePrjRec &params)
{
TFileStream f(string((PChar)params.prjFilename), 0);
f.Write(params.result, strlen((PChar)params.result));
return CG_SUCCESS;
}

extern "C" __declspec(dllexport) int buildCompliteProc(TBuildCompliteRec &params)
{
return CG_SUCCESS;
}

extern "C" __declspec(dllexport) int buildRunProc(TBuildRunRec &params)
{
STARTUPINFO si7;
PROCESS_INFORMATION pi7;
ZeroMemory(&si7, sizeof(STARTUPINFO));
si7.cb = sizeof(STARTUPINFO);
si7.dwFlags = STARTF_USESHOWWINDOW;
si7.wShowWindow = SW_SHOWDEFAULT;
CreateProcess(NULL, (string("explorer.exe ") + string(params.FileName)).c_str(), NULL, NULL, false, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &si7, &pi7);
while(WaitForSingleObject(pi7.hProcess, -1) == WAIT_TIMEOUT) {
}
return CG_SUCCESS;
}


int WINAPI DllMain(HINSTANCE hInstance, DWORD fdReason, PVOID pvReserved)
{
return 0;
}

// made by "HiAsm 4.0 build 172"
[/quote]
карма: 0
0