Click here to Skip to main content
15,922,533 members
Home / Discussions / COM
   

COM

 
AnswerRe: Invalid pointer exception Pin
prasad_som14-Mar-07 21:36
prasad_som14-Mar-07 21:36 
GeneralRe: Invalid pointer exception Pin
shivapriyak14-Mar-07 21:51
shivapriyak14-Mar-07 21:51 
GeneralRe: Invalid pointer exception Pin
prasad_som14-Mar-07 22:36
prasad_som14-Mar-07 22:36 
QuestionWhat does "THIS_" mean? Pin
[d3m0n]14-Mar-07 5:26
[d3m0n]14-Mar-07 5:26 
AnswerRe: What does "THIS_" mean? Pin
Roger Stoltz14-Mar-07 6:55
Roger Stoltz14-Mar-07 6:55 
GeneralRe: What does "THIS_" mean? Pin
[d3m0n]14-Mar-07 13:01
[d3m0n]14-Mar-07 13:01 
QuestionCapicom dll- require clarification urgently Pin
anufabian14-Mar-07 0:30
anufabian14-Mar-07 0:30 
QuestionA COM'S Events Problem Pin
huangdingjun13-Mar-07 20:53
huangdingjun13-Mar-07 20:53 
在一个COM事件中,有这么个事件接口
dispinterface _IATLDiceObjEvents
{
properties:
methods:
[id(1)] void Test([in]double x, [in] double y);
};

然而在我的事件接收代码中,得到的x,y值是不是原来激发时所传递的.
接收事件的是一个ATL的对话框类,代码如下:
// MyDialog.h : Declaration of the CMyDialog

#ifndef __MYDIALOG_H_
#define __MYDIALOG_H_

#include "resource.h" // main symbols
#include <atlhost.h>

#import "E:\AtlOcx\Debug\AtlOcx.dll" raw_interfaces_only, raw_native_types, no_namespace, named_guids

/////////////////////////////////////////////////////////////////////////////
// CMyDialog
class CMyDialog :
public CAxDialogImpl<cmydialog>,
public IDispEventImpl<idc_atldiceobj1, cmydialog="">//,&DIID__IATLDiceObjEvents,&LIBID_ATLOCXLib, 1, 0>
{
public:
CMyDialog()
{
m_pATLDiceObj = NULL;
}

~CMyDialog()
{
}

enum { IDD = IDD_MYDIALOG };

BEGIN_MSG_MAP(CMyDialog)
MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnLButtonDblClk)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
COMMAND_HANDLER(IDC_OPEN_BUTTON, BN_CLICKED, OnClickedOpen_button)
MESSAGE_HANDLER(WM_CLOSE, OnClose)
END_MSG_MAP()
// Handler prototypes:
// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
LRESULT OnLButtonDblClk(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
return 0;
}
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
AtlAdviseSinkMap(this, TRUE);// 增加监听连接
return 1; // Let the system set the focus
}
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
AtlAdviseSinkMap(this, FALSE);
EndDialog(wID);
return 0;
}
public :

BEGIN_SINK_MAP(CMyDialog)
//Make sure the Event Handlers have __stdcall calling convention
SINK_ENTRY(IDC_ATLDICEOBJ1, 0x1, OnTest)
END_SINK_MAP()
HRESULT __stdcall OnTest(DOUBLE x, DOUBLE y)
{
CComVariant varResult;
// TODO : Add Code for event handler.
// here x,y is changed.

return varResult.scode;
}
};

#endif //__MYDIALOG_H_

请问为什么在事件触发中,参数类型为'double'的数据会发生变化?

Thanks in advance!
QuestionHow to Install .dll files in the Registry? Pin
senthil_rajesh_kavin12-Mar-07 19:12
senthil_rajesh_kavin12-Mar-07 19:12 
AnswerRe: How to Install .dll files in the Registry? Pin
prasad_som12-Mar-07 19:17
prasad_som12-Mar-07 19:17 
GeneralRe: How to Install .dll files in the Registry? Pin
senthil_rajesh_kavin12-Mar-07 19:24
senthil_rajesh_kavin12-Mar-07 19:24 
AnswerRe: How to Install .dll files in the Registry? Pin
prasad_som12-Mar-07 19:28
prasad_som12-Mar-07 19:28 
GeneralRe: How to Install .dll files in the Registry? Pin
senthil_rajesh_kavin12-Mar-07 19:37
senthil_rajesh_kavin12-Mar-07 19:37 
AnswerRe: How to Install .dll files in the Registry? Pin
prasad_som12-Mar-07 19:41
prasad_som12-Mar-07 19:41 
GeneralRe: How to Install .dll files in the Registry? Pin
senthil_rajesh_kavin12-Mar-07 20:03
senthil_rajesh_kavin12-Mar-07 20:03 
AnswerRe: How to Install .dll files in the Registry? Pin
prasad_som12-Mar-07 19:09
prasad_som12-Mar-07 19:09 
GeneralRe: How to Install .dll files in the Registry? Pin
senthil_rajesh_kavin12-Mar-07 20:26
senthil_rajesh_kavin12-Mar-07 20:26 
GeneralRe: How to Install .dll files in the Registry? Pin
prasad_som12-Mar-07 20:30
prasad_som12-Mar-07 20:30 
QuestionBooks on COM Pin
vibindia9-Mar-07 3:27
vibindia9-Mar-07 3:27 
AnswerRe: Books on COM Pin
Roger Stoltz9-Mar-07 4:59
Roger Stoltz9-Mar-07 4:59 
GeneralRe: Books on COM Pin
Mike Poz12-Mar-07 15:18
Mike Poz12-Mar-07 15:18 
AnswerRe: Books on COM Pin
lafleon9-Mar-07 8:04
lafleon9-Mar-07 8:04 
Questionglobal variables in COM Pin
S.C.Wong7-Mar-07 18:08
S.C.Wong7-Mar-07 18:08 
AnswerRe: global variables in COM Pin
Stephen Hewitt7-Mar-07 18:31
Stephen Hewitt7-Mar-07 18:31 
AnswerRe: global variables in COM Pin
CPallini7-Mar-07 21:00
mveCPallini7-Mar-07 21:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.