#cpp
[quote]#include <windows.h>
#include "....CGTShare.h"
#include "share.h"
extern "C" __declspec(dllexport) int buildGetParamsProc(TBuildParams ¶ms)
{
params.flags = CGMP_RUN;
return(CG_SUCCESS);
}
extern "C" __declspec(dllexport) int buildMakePrj(TBuildMakePrjRec ¶ms)
{
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 ¶ms)
{
return CG_SUCCESS;
}
extern "C" __declspec(dllexport) int buildRunProc(TBuildRunRec ¶ms)
{
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]
Ответов: 3514
Рейтинг: 184
|
|||
Прикольная dll
|
|||
карма: 0 |
|