本文整理汇总了C++中GetMsg函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMsg函数的具体用法?C++ GetMsg怎么用?C++ GetMsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetMsg函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetAge
unsigned GetAge() const
{
const char* age = strstr(GetMsg().c_str(), "AGE=");
if (age == NULL)
return (unsigned) -1;
return (unsigned) atoi(age + sizeof("AGE=") - 1);
}
开发者ID:swuecho,项目名称:igblast,代码行数:7,代码来源:netcache_api_expt.hpp
示例2: GetVersion
int GetVersion() const
{
const char* ver = strstr(GetMsg().c_str(), "VER=");
if (ver == NULL)
return 0;
return atoi(ver + sizeof("VER=") - 1);
}
开发者ID:swuecho,项目名称:igblast,代码行数:7,代码来源:netcache_api_expt.hpp
示例3: flush_port
// Flush a message port
void flush_port(struct MsgPort *port)
{
struct Message *msg;
while ((msg=GetMsg(port)))
ReplyFreeMsg(msg);
}
开发者ID:timofonic,项目名称:dopus5allamigas,代码行数:8,代码来源:misc.c
示例4: memset
int PluginManager::ShowHelp(const char *Type, const char *FileName, const char *Keyword, unsigned long Flags, int CallType, const char *Encoding, char *Error)
{
HelpOutData outdata;
memset(&outdata,0,sizeof(outdata));
outdata.StructSize=sizeof(outdata);
HelpInData data;
memset(&data,0,sizeof(data));
data.StructSize=sizeof(data);
data.FileName = FileName;
data.Keyword = Keyword;
data.Encoding = Encoding;
data.Flags = Flags;
data.CallType = CallType;
for (int i=0; i<PluginsCount; i++)
{
for (int j=0; j<PluginsData[i].TypesNumber; j++)
{
if (!FSF.LStricmp(Type,PluginsData[i].TypesInfo[j].TypeString))
{
data.TypeNumber = j;
int ret = SendMessage(i,AHMSG_SHOWHELP,(void *)&data,(void *)&outdata);
lstrcpy(Error,*outdata.Error==0?GetMsg(MErrX):outdata.Error);
return ret;
}
}
}
return TRUE;
}
开发者ID:CS-svnmirror,项目名称:evil-programmers,代码行数:28,代码来源:ahp_class.cpp
示例5: _ASSERTE
void CPluginW2800::GetPluginInfoPtr(void *piv)
{
PluginInfo *pi = (PluginInfo*)piv;
//memset(pi, 0, sizeof(PluginInfo));
//pi->StructSize = sizeof(struct PluginInfo);
_ASSERTE(pi->StructSize>0 && ((size_t)pi->StructSize >= sizeof(*pi)/*(size_t)(((LPBYTE)&pi->MacroFunctionNumber) - (LPBYTE)pi))*/));
static wchar_t *szMenu[1], szMenu1[255];
szMenu[0]=szMenu1; //lstrcpyW(szMenu[0], L"[&\x2560] ConEmu"); -> 0x2584
GetMsg(CEPluginName, szMenu1, 240);
//static WCHAR *szMenu[1], szMenu1[255];
//szMenu[0]=szMenu1; //lstrcpyW(szMenu[0], L"[&\x2560] ConEmu"); -> 0x2584
//szMenu[0][1] = L'&';
//szMenu[0][2] = 0x2560;
// Проверить, не изменилась ли горячая клавиша плагина, и если да - пересоздать макросы
//IsKeyChanged(TRUE); -- в FAR2 устарело, используем Synchro
//if (gcPlugKey) szMenu1[0]=0; else lstrcpyW(szMenu1, L"[&\x2584] ");
//lstrcpynW(szMenu1+lstrlenW(szMenu1), GetMsgW(2), 240);
//lstrcpynW(szMenu1, GetMsgW(CEPluginName), 240);
//_ASSERTE(pi->StructSize = sizeof(struct PluginInfo));
pi->Flags = PF_EDITOR | PF_VIEWER | PF_DIALOG | PF_PRELOAD;
//pi->DiskMenuStrings = NULL;
//pi->DiskMenuNumbers = 0;
pi->PluginMenu.Guids = &guid_ConEmuPluginMenu;
pi->PluginMenu.Strings = szMenu;
pi->PluginMenu.Count = 1;
//pi->PluginConfigStrings = NULL;
//pi->PluginConfigStringsNumber = 0;
pi->CommandPrefix = L"ConEmu";
//pi->Reserved = ConEmu_SysID; // 'CEMU'
}
开发者ID:michaellukashov,项目名称:ConEmu,代码行数:32,代码来源:ConEmuPlugin2800.cpp
示例6: FilterMessages
bool iwPostWindow::ValidateMessages()
{
if(lastMsgCt == postBox.GetNumMsgs() && GetMsg(curMsgId) == curMsg)
return true;
// Messages have changed -> Update filter
FilterMessages();
if(!curMsg)
{
// No last message? Display oldest
curMsgId = 0;
DisplayPostMessage();
return false;
} else
{
// Message was either deleted or others were added and message was shifted
// So first search it, if not found we will display the next (newer) message
for(unsigned i = curMsgId; i > 0; i--)
{
if(postBox.GetMsg(i - 1) == curMsg)
{
curMsgId = i - 1;
DisplayPostMessage();
return true;
}
}
// Display next valid one
DisplayPostMessage();
return false;
}
}
开发者ID:Return-To-The-Roots,项目名称:s25client,代码行数:30,代码来源:iwPostWindow.cpp
示例7: UserCB
DZStrW UserCallback::UserArg(int arg, int idx, int *cnt)
{
DZStrW tmp;
bool raw = arg > 0x1f;
if (raw)
arg &= 0x1f;
CBData.Arg1 = arg; // type
CBData.Arg3 = idx;
int r = UserCB(zacArg);
if (r >= CALLBACK_UNHANDLED)
{
if (cnt && (arg == zcbFSpecArgs || arg == zcbFSpecArgsExcl))
*cnt = CBData.Arg3;
if (r == CALLBACK_TRUE)
{
tmp = GetMsg();
if (!raw)
{
tmp.TrimLeft(); // trim trailing unless password
if (arg != zcbPassword && !tmp.Find(ZPasswordFollows))
tmp.TrimRight();
}
}
}
return tmp;
}
开发者ID:geoffsmith82,项目名称:delphizip,代码行数:31,代码来源:DZOper.cpp
示例8: cleanup_timer
__stkargs void cleanup_timer(struct timerequest ** tr)
{
struct MsgPort *tp;
struct timerequest *tmp;
UBYTE pFlags;
if (*tr) {
tmp = *tr;
tp = tmp->tr_node.io_Message.mn_ReplyPort;
if (tp) {
/* abort the current request */
pFlags = tp->mp_Flags; /* still needed for DeletePort */
tp->mp_Flags = PA_IGNORE;
AbortIO((struct IORequest *) tmp);
WaitIO((struct IORequest *) tmp);
while (GetMsg(tp));
Forbid();
tp->mp_Flags = pFlags;
DeletePort(tp);
Permit();
}
CloseDevice((struct IORequest *) tmp);
DeleteExtIO((struct IORequest *) tmp);
}
*tr = NULL;
}
开发者ID:DailyR,项目名称:mudos,代码行数:26,代码来源:signal.c
示例9: GetOpenPanelInfoW
void WINAPI GetOpenPanelInfoW(struct OpenPanelInfo *Info)
{
if(!Info->hPanel || INVALID_HANDLE_VALUE == Info->hPanel)
return;
fardroid * android = (fardroid *)Info->hPanel;
Info->StructSize=sizeof(*Info);
Info->Flags = OPIF_ADDDOTS | OPIF_SHOWPRESERVECASE;
Info->StartSortMode = (OPENPANELINFO_SORTMODES) conf.SortMode;
Info->StartSortOrder = conf.SortOrder;
Info->CurDir = NULL;
Info->Format= GetMsg(MTitle);
android->PreparePanel(Info);
Info->DescrFiles=NULL;
Info->DescrFilesNumber=0;
Info->StartPanelMode = _F('0')+conf.PanelMode;
Info->PanelModesArray=NULL;
Info->PanelModesNumber=0;
Info->KeyBar=&KeyBar;
}
开发者ID:kholodovitch,项目名称:cromfarplugs,代码行数:27,代码来源:fardroidPlugin.cpp
示例10: Message
int WINAPI _export Message(unsigned long Msg,void *InData,void *OutData)
{
switch(Msg)
{
case AHMSG_GETINFO:
{
GetInfoOutData *data=(GetInfoOutData *)OutData;
data->TypesNumber=1;
static struct TypeInfo TypesInfo[1];
memset(TypesInfo,0,sizeof(TypesInfo));
TypesInfo[0].StructSize=sizeof(TypesInfo[0]);
lstrcpy(TypesInfo[0].TypeString,"Custom");
*TypesInfo[0].Mask=0;
TypesInfo[0].HFlags=F_INPUTKEYWORD;
data->TypesInfo=TypesInfo;
GetMsg(MTitle,data->ConfigString);
data->Flags=AHMSG_CONFIG;
return TRUE;
}
case AHMSG_SHOWHELP:
{
HelpInData *data = (HelpInData *)InData;
HelpOutData *odata = (HelpOutData *)OutData;
return ShowCustom(data->FileName,data->Keyword,odata->Error);
}
case AHMSG_CONFIG:
{
Config();
return TRUE;
}
}
return FALSE;
}
开发者ID:CS-svnmirror,项目名称:evil-programmers,代码行数:35,代码来源:ahp_custom.cpp
示例11: lib_exec_f_GetMsg_2
int lib_exec_f_GetMsg_2(emumsg_syscall_t *msg)
{
/* Make real syscall */
msg->arg[0]._aptr = GetMsg((struct MsgPort *)msg->arg[0]._aptr);
return HOOK_DONE;
}
开发者ID:moggen,项目名称:emumiga,代码行数:7,代码来源:f_getmsg.cpp
示例12: config_paths_cleanup
// Clean up
void config_paths_cleanup(config_path_data *data)
{
if (data)
{
// AppWindow
RemoveAppWindow(data->appwindow);
// Close window
CloseConfigWindow(data->window);
// Free list
Att_RemList(data->path_list,0);
// Close cx library
/*#ifdef __amigaos4__
DropInterface((struct Interface *)ICommodities);
#endif
CloseLibrary(data->cxbase);*/
// Free port
if (data->appport)
{
struct Message *msg;
// Flush it
while ((msg=GetMsg(data->appport))) ReplyMsg(msg);
// Delete it
DeleteMsgPort(data->appport);
}
// Free data
FreeVec(data);
}
}
开发者ID:timofonic,项目名称:dopus5allamigas,代码行数:36,代码来源:pathformat.c
示例13: rexx_exit
void rexx_exit (void)
{
if (ARexxPort) {
struct RexxMsg *msg;
gui_rexx_s *gui = &gui_rexx[ON_EXIT];
if (gui->port[0] && gui->cmd_on[0]) {
if (ADDRESS(gui->port, gui->cmd_on) != RC_OK) {
write_log ("%s:%s:%s\n", gui->port,
gui->cmd_on,
RESULT);
}
gui->port[0] = '\0';
}
Forbid ();
while ((msg = (struct RexxMsg*)GetMsg (ARexxPort))) {
msg->rm_Result1 = RC_ERROR;
msg->rm_Result2 = 0;
ReplyMsg ((void*)msg);
}
DeletePort (ARexxPort);
Permit ();
ARexxPort = NULL;
}
#ifdef __amigaos4__
if (IRexxSys) {
DropInterface ((struct Interface *)IRexxSys);
IRexxSys = NULL;
}
#endif
if (RexxSysBase) {
CloseLibrary ((void*)RexxSysBase);
RexxSysBase = NULL;
}
}
开发者ID:diablodiab,项目名称:libretro-uae,代码行数:35,代码来源:ami-rexx.c
示例14: printerror
/*** printerror - print error message on status line
*
* prints a formatted error message on the status line, and then waits for a
* keystroke. Once hit, the message is cleared.
*
* Input:
* printf style parameters
*
* Output:
* Number of characters output in error message
*
*************************************************************************/
int
printerror (
char *pszFmt,
...
) {
buffer bufLocal;
va_list Arguments;
REGISTER int cch;
va_start(Arguments, pszFmt);
ZFormat (bufLocal, pszFmt, Arguments);
fReDraw = TRUE;
bell ();
FlushInput ();
cch = soutb (0, YSIZE, bufLocal, errColor);
if (fErrPrompt) {
asserte (*GetMsg (MSG_PRESS_ANY, bufLocal));
soutb (XSIZE-strlen(bufLocal)-1, YSIZE, bufLocal, errColor);
SetEvent( semIdle );
ReadChar ();
WaitForSingleObject(semIdle, INFINITE);
bufLocal[0] = ' ';
bufLocal[1] = '\0';
soutb(0, YSIZE, bufLocal, errColor);
}
va_end(Arguments);
return cch;
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:45,代码来源:display.c
示例15: L_IPC_Startup
// Send an IPC startup
int ASM L_IPC_Startup(
REG(a0, IPCData *ipc),
REG(a1, APTR data),
REG(a2, struct MsgPort *reply))
{
struct MsgPort *port=0;
IPCMessage startup;
// If no message port supplied, create one
if (!reply) port=reply=CreateMsgPort();
// Fill out startup message
startup.msg.mn_ReplyPort=reply;
startup.command=IPC_STARTUP;
startup.flags=(ULONG)ipc;
startup.data=data;
// Send the startup message
PutMsg(&ipc->proc->pr_MsgPort,(struct Message *)&startup);
// Wait for reply back
WaitPort(reply);
GetMsg(reply);
// Delete port if we created one
if (port) DeleteMsgPort(port);
// If there's no command port, report failure
if (startup.command!=IPC_STARTUP) return 0;
return 1;
}
开发者ID:timofonic,项目名称:dopus5allamigas,代码行数:32,代码来源:ipc.c
示例16: PrintNTCurDirAndEnv
void PrintNTCurDirAndEnv(HANDLE InfoFile, HANDLE hProcess, BOOL bExportEnvironment)
{
CURDIR_STR_TYPE* sCurDir=0;
wchar_t *pEnvStrings = 0;
GetOpenProcessData(hProcess, 0,0,0,0,0,0, bExportEnvironment ? &pEnvStrings : 0, &sCurDir);
fputc(L'\n',InfoFile);
if (sCurDir)
{
fprintf(InfoFile,L"%s %s\n\n",Plist::PrintTitle(MCurDir),OUT_CVT(sCurDir));
delete[] sCurDir;
}
if (bExportEnvironment && pEnvStrings)
{
fprintf(InfoFile, L"%s\n\n", GetMsg(MEnvironment));
for (wchar_t* p = pEnvStrings; *p; p+=lstrlen(p)+1)
{
fprintf(InfoFile, L"%s\n", p);
}
delete[] pEnvStrings;
}
}
开发者ID:CyberShadow,项目名称:FAR,代码行数:25,代码来源:Plist.cpp
示例17: RegisterARexxFunctionHost
void RegisterARexxFunctionHost(int add) {
struct RexxMsg *mess;
struct MsgPort *rexxmastport;
if(!(mess=(struct RexxMsg *)AllocMem(sizeof(struct RexxMsg),
MEMF_CLEAR | MEMF_PUBLIC))) {
cleanup(EXIT_ERROR, "Out of memory.");
}
mess->rm_Node.mn_Node.ln_Type = NT_MESSAGE;
mess->rm_Node.mn_Length = sizeof(struct RexxMsg);
mess->rm_Node.mn_ReplyPort=rexxport;
mess->rm_Action = add ? RXADDFH : RXREMLIB;
mess->rm_Args[0] = "NIKOMREXXHOST";
mess->rm_Args[1] = 0L;
Forbid();
rexxmastport = (struct MsgPort *)FindPort("REXX");
if(rexxmastport) {
PutMsg((struct MsgPort *)rexxmastport,(struct Message *)mess);
}
Permit();
if(rexxmastport == NULL) {
FreeMem(mess, sizeof(struct RexxMsg));
if(add) {
cleanup(EXIT_ERROR, "Can't find port 'REXX' (ARexx master server)");
}
return;
}
WaitPort(rexxport);
GetMsg(rexxport);
FreeMem(mess, sizeof(struct RexxMsg));
}
开发者ID:punktniklas,项目名称:NiKom,代码行数:30,代码来源:Startup.c
示例18: DeleteArgstring
/*
* This function returns a structure that contains the commands sent from
* ARexx... You will need to parse it and return the structure back
* so that the memory can be freed...
*
* This returns NULL if there was no message...
*/
struct RexxMsg *GetARexxMsg(AREXXCONTEXT RexxContext)
{
register struct RexxMsg *tmp=NULL;
register short flag;
if (RexxContext)
if (tmp=(struct RexxMsg *)GetMsg(RexxContext->ARexxPort))
{
if (tmp->rm_Node.mn_Node.ln_Type==NT_REPLYMSG)
{
/*
* If we had sent a command, it would come this way...
*
* Since we don't in this simple example, we just throw
* away anything that looks "strange"
*/
flag=FALSE;
if (tmp->rm_Result1) flag=TRUE;
/*
* Free the arguments and the message...
*/
DeleteArgstring(tmp->rm_Args[0]);
DeleteRexxMsg(tmp);
RexxContext->Outstanding-=1;
/*
* Return the error if there was one...
*/
tmp=flag ? REXX_RETURN_ERROR : NULL;
}
}
return(tmp);
}
开发者ID:jens-maus,项目名称:anfs,代码行数:41,代码来源:simplerexx.c
示例19: bounce
void bounce(Port txport, Port rxport)
{
int i;
MCB m;
int start , end;
unsigned int total;
word e;
byte *buf = (byte *)Malloc(msgsize);
m.Data = buf;
start = clock();
for( i = 1; i <= bounces ; i++ )
{
InitMCB(&m,MsgHdr_Flags_preserve,txport,rxport,i);
m.Timeout = OneSec*5;
*(int *)&m |= msgsize;
e = PutMsg(&m);
m.MsgHdr.Dest = rxport;
e=GetMsg(&m);
}
end = clock();
total=end-start;
printf("%u microseconds for %u bounces of a %u byte message\n",
total*10000,bounces,msgsize);
printf("%u microseconds per message\n",(total*10000)/(bounces*2));
printf("%u bytes per second\n", (msgsize*2*bounces*100)/total);
Free(buf);
}
开发者ID:axelmuhr,项目名称:Helios-NG,代码行数:33,代码来源:bounce.c
示例20: PressKeyHelp
public U0 PressKeyHelp(CTask *task=NULL)
{
I64 p1=0,p2=0;
Bool old_preempt=Preempt(OFF);
CTask *old_hash=Fs->hash_table;
if (!task) task=Fs;
//This feat is a burden in code.
//It would be nice to lst key
//cmds for all applications,
//but it makes the code too ugly.
//
task=Fs;
Fs->hash_table=task->hash_table;
"Press keys to show handler code.\n"
"<SHIFT-ESC> to exit.\n"
"Do not press <CTRL-ALT-keys>.\n";
while (p1!=CH_ESC && p1!=CH_SHIFT_ESC) {
GetMsg(&p1,&p2,1<<MSG_KEY_DOWN);
*key_desc=0;
key_handler=NULL;
if (task==Fs)
PutKey(p1,p2|SCF_KEY_DESC);
else if (TaskValidate(task)) {
PostMsg(task,MSG_KEY_DOWN,p1,p2|SCF_KEY_DESC);
while (!key_handler)
Yield;
}
if (*key_desc)
E(key_handler,512);
}
Fs->hash_table=old_hash;
Preempt(old_preempt);
}
开发者ID:IAmAnubhavSaini,项目名称:templeos,代码行数:35,代码来源:Training.CPP
注:本文中的GetMsg函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论