예제 #1
0
BOOL PEXPORT KppDDEPostAdvise(ATOMID idObjName, ATOMID idSlot)
{
    OBJECTID idLink = FindLink(LinkName(idObjName, idSlot));
    
    if (idLink)
    {
        ATOMID idTopic = Kpp_Get_SlotValue(OBJECT, idLink, Slot(idTopic));
        HSZ hszTopic = AtomToHsz(idTopic);
        WORD wLen = KppGetAtomName(idObjName, return_buffer, RET_BUFFER_LEN);
        BOOL bRes = FALSE;
        HSZ hszItem;
        
        return_buffer[wLen++] = ':';
        KppGetAtomName(idSlot, return_buffer + wLen, RET_BUFFER_LEN - wLen);
        hszItem = DdeCreateStringHandle(dwDDEInst, return_buffer, CP_WINANSI);
        
        if (hszTopic && hszItem)
            bRes = DdePostAdvise(dwDDEInst, hszTopic, hszItem);
        
        DdeFreeStringHandle(dwDDEInst, hszTopic);
        DdeFreeStringHandle(dwDDEInst, hszItem);

        return bRes;
    }
    
    return FALSE;
}
예제 #2
0
파일: DdeAPI.cpp 프로젝트: sankubha/jdde
JNIEXPORT jboolean JNICALL Java_com_google_code_jdde_ddeml_DdeAPI_PostAdvise
  (JNIEnv *env, jclass cls, jint idInst, jstring jhszTopic, jstring jhszItem)
{
	HSZ hszTopic = UtilCreateStringHandle(env, idInst, jhszTopic);
	HSZ hszItem = UtilCreateStringHandle(env, idInst, jhszItem);

	BOOL result = DdePostAdvise(idInst, hszTopic, hszItem);

	UtilFreeStringHandle(idInst, hszTopic);
	UtilFreeStringHandle(idInst, hszItem);

	return result;
}
예제 #3
0
// Calls that SERVER can make
BOOL CDDEConnection::Advise(const CString& item, char *data, int size, int format)
{
    if (size < 0)
        size = strlen(data);

    size ++;

    HSZ item_atom = DDEGetAtom(item);
    HSZ topic_atom = DDEGetAtom(topic_name);
    sending_data = data;
    data_size = size;
    data_type = format;
    return DdePostAdvise(DDEIdInst, topic_atom, item_atom);
}
예제 #4
0
파일: ddeml.c 프로젝트: johnedmonds/wine
/*****************************************************************
 * DdePostAdvise [DDEML.13]
 */
BOOL16 WINAPI DdePostAdvise16(DWORD idInst, HSZ hszTopic, HSZ hszItem)
{
    return (BOOL16)DdePostAdvise(idInst, hszTopic, hszItem);
}