Click here to Skip to main content
15,915,840 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: GetProcAddress returns wrong address for itself Pin
Stuart Dootson5-Oct-09 23:09
professionalStuart Dootson5-Oct-09 23:09 
GeneralRe: GetProcAddress returns wrong address for itself Pin
FotisSs6-Oct-09 0:08
FotisSs6-Oct-09 0:08 
GeneralRe: GetProcAddress returns wrong address for itself Pin
FotisSs6-Oct-09 0:59
FotisSs6-Oct-09 0:59 
QuestionDeallocating data allocated in MFC thread Pin
Chesnokov Yuriy5-Oct-09 21:24
professionalChesnokov Yuriy5-Oct-09 21:24 
AnswerRe: Deallocating data allocated in MFC thread Pin
Sameerkumar Namdeo5-Oct-09 22:08
Sameerkumar Namdeo5-Oct-09 22:08 
AnswerRe: Deallocating data allocated in MFC thread Pin
David Crow6-Oct-09 3:09
David Crow6-Oct-09 3:09 
QuestionRange->GetValue() Pin
MsmVc5-Oct-09 20:57
MsmVc5-Oct-09 20:57 
QuestionGetting function result from Sheetcalculate event of Excel::WorkbookEvents Pin
NarVish5-Oct-09 19:27
NarVish5-Oct-09 19:27 
Hi,
SheetCalculate function is getting fired whenever there is change in function(like =sum(A1,A2)) related Excel workbook cells. My aim is to get the function result in excel. To get that I'm trying by calling different functions of iDispatch. But couldn't able to get the expected result. Please guide me to read the function result. Thanks in advance.


_ATL_FUNC_INFO SheetCalculateInfo = { CC_CDECL, VT_EMPTY, 1, { VT_DISPATCH } };
BEGIN_SINK_MAP(ExcelBookEventHandler)
SINK_ENTRY_INFO(1, __uuidof(Excel::WorkbookEvents), 0x0000061b, &ExcelBookEventHandler::SheetCalculate, &SheetCalculateInfo)
END_SINK_MAP()
void _stdcall SheetCalculate(IDispatch *iDispatch)
{
////////////*******GetIDsOfNames*******////////////
static DISPID dispid = 0;
wchar_t *ucName = L"Evaluate"; //I tried by giving "Run" and "Calculate" values in place of "Evaluate"
HRESULT result = iDispatch->GetIDsOfNames(IID_NULL, &ucName, 1,LOCALE_SYSTEM_DEFAULT, &dispid);

////////////*******Invoke*******////////////
VARIANT varResult;
DISPID dispid;
DISPID dispidNamed = DISPATCH_METHOD;
EXCEPINFO excep;
UINT uArgErr;
DISPPARAMS dispparams;
dispparams.cNamedArgs = 0;
dispparams.cArgs = 2;
dispparams.rgdispidNamedArgs = &dispidNamed;
HRESULT result = iDispatch->Invoke( odispid, IID_NULL, LOCALE_SYSTEM_DEFAULT,
DISPATCH_METHOD, &dispparams, &varResult, &excep, &uArgErr);

////////////*******GetTypeInfo*******////////////
ITypeInfo* pTypeInfo;
HRESULT result= iDispatch->GetTypeInfo(0,LOCALE_SYSTEM_DEFAULT,&pTypeInfo);

////////////*******GetTypeInfoCount*******////////////
UINT pct1;
HRESULT result= iDispatch->GetTypeInfoCount(&pct1);

////////////*******QueryInterface*******////////////
HRESULT result = iDispatch->QueryInterface(IID_IDispatch,(void**)&iDispatch);
}
QuestionSave Folder path Pin
Game-point5-Oct-09 18:36
Game-point5-Oct-09 18:36 
AnswerRe: Save Folder path Pin
Naveen5-Oct-09 19:03
Naveen5-Oct-09 19:03 
GeneralRe: Save Folder path Pin
Game-point5-Oct-09 19:11
Game-point5-Oct-09 19:11 
GeneralRe: Save Folder path Pin
Naveen5-Oct-09 19:14
Naveen5-Oct-09 19:14 
GeneralRe: Save Folder path Pin
Game-point5-Oct-09 19:25
Game-point5-Oct-09 19:25 
GeneralRe: Save Folder path Pin
Naveen5-Oct-09 20:06
Naveen5-Oct-09 20:06 
GeneralRe: Save Folder path Pin
Game-point5-Oct-09 20:24
Game-point5-Oct-09 20:24 
QuestionRe: Save Folder path Pin
David Crow6-Oct-09 3:14
David Crow6-Oct-09 3:14 
AnswerRe: Save Folder path Pin
S p k 5215-Oct-09 22:49
S p k 5215-Oct-09 22:49 
AnswerRe: Save Folder path Pin
David Crow6-Oct-09 3:13
David Crow6-Oct-09 3:13 
QuestionHarmful USB Devices Pin
NetDefender 20095-Oct-09 8:21
NetDefender 20095-Oct-09 8:21 
QuestionRe: Harmful USB Devices Pin
David Crow5-Oct-09 8:24
David Crow5-Oct-09 8:24 
QuestionHow to create a program for querying active directory using visual C++ Pin
raja 45-Oct-09 4:55
raja 45-Oct-09 4:55 
QuestionRe: How to create a program for querying active directory using visual C++ Pin
CPallini5-Oct-09 6:57
mveCPallini5-Oct-09 6:57 
Questionconvert CString to double Pin
soongez5-Oct-09 4:46
soongez5-Oct-09 4:46 
AnswerRe: convert CString to double Pin
Code-o-mat5-Oct-09 5:11
Code-o-mat5-Oct-09 5:11 
AnswerRe: convert CString to double Pin
Cedric Moonen5-Oct-09 7:50
Cedric Moonen5-Oct-09 7:50 

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.