|
i am doing a project on customization of minix 3 to my native language if anyone has any contributing ideas i will be glad
|
|
|
|
|
Please post it in the Collaboration / Testing [^] forum.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello everybody I have observed a strange behaviour in Win Vista and 7 when I call the GetProcAddress to resolve it self
GetProcAddress(GetModuleHandle("kernel32.dll"),"GetProcAddress") returns wrong value.
I compare the return value with the windbg and its way different (though in a valid 0x7000000-0x7ffffff range).
I 've seen some reports on the web about it but I dont know how to overcome this problem.
Any ideas?
Thanx
|
|
|
|
|
What addresses are you seeing?
In the VS debugger, I see my program enter the same address (0x76E81202) that both &GetProcAddress and GetProcAddress(GetModuleHandle(L"kernel32.dll"),"GetProcAddress") return - this is under Windows 7 x64.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Attach the Windbg and look for GetProcAddress it should be a different one.
In my case it points to GetProcAddressStub instead of GetProcAddress.
In some other examples I tried involving dll injection the address is far more out of
the kernel32.dll range
|
|
|
|
|
Ok I managed to narrow it down. You where right about .exe it works fine.
BUT in case of a dll run by rundll32.exe things change and GetProcAddress returns always wrong
|
|
|
|
|
How to deallocate from MFC GUI application the data that was allocated in MFC thread?
Upon a button click in MFC dialog application, the thread is started with AfxBeginThread, it allocates some float* array with malloc() then send to MFC application a windows message attaching that buffer.
It is not possible to deallocate it from MFC dialog message handler that float* array with free()??? It returns heap corruption, is it due to deallocation from another thread or some buffer overrun?
Чесноков
|
|
|
|
|
i guess it might be due to buffer overrun or due to something like the following might have happened...
in one thread...
float *f = (float*)malloc(100*sizeof(float));
in another thread u r receiving the memory, say in 'ftemp'
afterward in this second thread u might be accessing ftemp by either
incrementing or decrementing like this...
ftemp--; or
ftemp = ftemp + 1;
etc,..
and finally the deallocation task..
free(ftemp);
|
|
|
|
|
Chesnokov Yuriy wrote: It is not possible to deallocate it from MFC dialog message handler that float* array with free()???
Yes, assuming the address has not been changed.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi All
I am getting excel rows and columns through this way.
Excel::RangePtr pRange = sheet1->UsedRange;
if ( pRange == NULL )
{
return 0;
}
VARIANT var=pRange->GetValue();
if(var.vt==VT_EMPTY)
{
return true;
}
long row;
long col;
COleSafeArray sarect(pRange->GetValue());
sarect.GetUBound(1,&row);
sarect.GetUBound(2,&col);
it's working well but i have found some specific case error.Like when excel sheet content only one cell value then showing debug assertion failed.
File:f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\olevar.cpp
Line:1817
COleSafeArray& COleSafeArray::operator=(const VARIANT& varSrc)
{
ASSERT(varSrc.vt & VT_ARRAY);
if(!(varSrc.vt & VT_ARRAY))
AfxThrowInvalidArgException();
AfxCheckError(::VariantCopy(this, (LPVARIANT)&varSrc));
return *this;
}
Plz help me.
|
|
|
|
|
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);
}
|
|
|
|
|
hi
i have little bit problem in how to get folder path ??
UpdateData();
CFile __file;
CFileDialog __FileDialog(true,"*.*",NULL,OFN_EXPLORER,"All Files : (*.*)|*.*||");
if (__FileDialog.DoModal() == IDOK)
{
if( __file.Open(__FileDialog.GetFileName(), CFile::modeRead) == FALSE )
return;
<big>CArchive ar(&__file, CArchive::load);</big>
}
__file.Close();
UpdateData(true);
here output is : D:\2009\October\Visual Studio Projects\visual\centerI.TIF
but i need save this file path :
D:\2009\October\Visual Studio Projects\visual\
please how to get folder path ?
Thanks
|
|
|
|
|
raju_Code wrote: please how to get folder path ?
__FileDialog.GetFolderPath()
|
|
|
|
|
Thanks for your response Mr.Naveen
its throwing exception ..
when comes __FileDialog.DoModel()
its open's system dialog its having Open and Cancel button
i need Save and Cancel button //
Thanks
|
|
|
|
|
raju_Code wrote: i need Save and Cancel button //
Read some documentation[^]
|
|
|
|
|
i think its not possible na?
|
|
|
|
|
Pass the first parameter to the CFileDialog constructor as "FALSE". Then you will get "save as" dialog.
|
|
|
|
|
Thanks naveen ..
i finished from SHBrowseForFolder APIs ..
now its working
Thanks for your proper response
|
|
|
|
|
raju_Code wrote: i need Save and Cancel button //
You need them for what?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
You can make use of _splitpath() after getting the complete path to the file.
Regards,
Suku PK
|
|
|
|
|
raju_Code wrote:
here output is : D:\2009\October\Visual Studio Projects\visual\centerI.TIF
but i need save this file path :
D:\2009\October\Visual Studio Projects\visual\
please how to get folder path ?
Use PathRemoveFileSpec() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
how can I write a code for scanning harmful USB devices in a good programming language and with a good GUI.I have a database for the viruses
so when the USB device is connected the software will look up for in the list and if there is a virus tehn it will prompt the user.
|
|
|
|
|
Scanning USB devices is easy enough. How would your code know whether they were harmful?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Dear Expert,
How to create visual c++ project using ADSI
|
|
|
|
|
What about documentation [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|