|
Dear All,
I stared using WinDbg for Debugging. I used !analyze extension command for analyzing crashed application dump file . it provides me FAILURE_BUCKET_ID. Please let me know how i will use this bucket id to find out the crash code???
With Regards
Manoj
|
|
|
|
|
The best resource I can offer is to go to All Programs, Debugging Tools for Windows, Debugging Help, look up !analyze in the index, then click the link to 'Using the !analyze extension' at the bottom of the page.
|
|
|
|
|
i have a variable whose type is long*.
i wanna assign it to a CComVariant variable.
//put value into variant
CComPtr< IMyInterface > spInter;
long *p = (long*)spInter.p;
CComVariant vt;
vt.plVal = spInter.p;
//how to get value from variant
CComPtr< IMyInterface > spNew;
spNew = (IMyInterface*)vt.plVal; (i can do this because i know the value type in variant, but how could i do if i don't know the type? should i call changetype() first?but what should i pass into ChangeType(???) as parameter?
-- modified at 1:18 Wednesday 16th August, 2006
|
|
|
|
|
An alternate way would be to Detach enclosed VARIANT.
A VARIANT has a member called "VARTYPE vt". You can use this to determine type of Variant.
S o h a i l K a d i w a l a
modified 21-Apr-21 21:01pm.
|
|
|
|
|
|
thanks guys,
here is my situation.
i have a class which hold a tree control(activex control), sure tree control offer setItemData(item, data), getITemData(item, &data);
here data's type is converted to long*.
i wanna store the interface pointer address in the item data, and get it back when i need.
VARIANT DelegateGetData(item)
{
long *data;
getItemData(item, data);
CComVariant vt;
vt.plVal = data;
return vt;
}
CComVariant vt = DeletgateGetData(item);
CComPtr<imyinterface> spData((IMyInterface*)vt.plVal);//it there any better way here???
|
|
|
|
|
Hi,
Does anybody know of a way that I can host an ActiveX control in such a way that it draws to a memory context instead of directly to the screen? I'd like to modify what the ActiveX control displays before it hits the screen, rather than try and draw on top of it once it has already been drawn, which is asking for trouble. Im currently using CAxWindow to host the control.
Thanks,
Andy
|
|
|
|
|
One possible approach that I have found after search the net for an answer is from a MS MVP who suggests: "...get the view image via IViewObject and use the view change notification. It seems you are supposed to derive a class from
CAxWindow and implement IAdviseSink's methods (it already derives from IAdviseSink)."
This seems a relatively straight forward approach in theory, but I wasn't aware that CAxWindow is derived from IAdviceSink, or at least it doesn't seem so from looking at CAxWindow's implementation in AtlWin.h. Does this sound at all feasible? If so, I would appreciate a little guidance with regards to going about implementing it.
Many thanks,
Andy
|
|
|
|
|
hi guys ,,,,,,,,,
please any one of u can provide me a vc++ TAPI sample which makes a call to the phoneee.........
its urgent man plz help........
thnx in advance........
best regards
Rocky
|
|
|
|
|
Click1^
Click2^
But asking the same here^ would be appreciated.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
I dont know why the hell the script for voting 5 is disabled only for me??
|
|
|
|
|
I have an ATL Dll , it works fine with windows application. But I must be using it in an ASP page.
I use the <OBJECT> tag to refer it.
<OBJECT id=OBJ classid="clsid:5CDD5E2B-254D-412B-8B4C-88AF06EC3B0A" VIEWASTEXT>
<SCRIPT LANGUAGE=javascript FOR=OBJ EVENT=NewEvent>jsNewEvent();</SCRIPT>
</OBJECT>
<script>
function jsNewEvent()
{
alert(OBJ.testProperty);
OBJ.testMethod();
}
NewEvent - The event in the DLL. jsNewEvent which is mapped to that event.
I'm able to use all the methods, properties of the DLL but not the events.
the call this->Fire_NewEvent in my ATL code is never executed. It's not even entering the connection-points implementation.
Any help?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
I dont know why the hell the script for voting 5 is disabled only for me??
|
|
|
|
|
Move the <script> outside the <object>
The contents of <object> are only used if the control can't be loaded, or the user has IE set to not load AX controls.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Yes. <Object> tag is sensitive. That's a mistake. Thanks Mike!
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
I dont know why the hell the script for voting 5 is disabled only for me??
|
|
|
|
|
hi guys this is rocky,,,,,,
i cant understand one thing please help me to understand that........
check the code .............
// Initialize TAPI
hr = pTapi.CreateInstance((CLSID_TAPI));
hr = pTapi->Initialize();
// Look for the requested line
pEnumAddress = pTapi->EnumerateAddresses();
while ( pEnumAddress->Next(1, &pAddress, &ul) == S_OK )
{
name = pAddress->AddressName;
//if ( name == bstrLine )
//break;
pAddress.Release();
pAddress = 0;
}
// If the line was found, then make a call
if ( pAddress )
{
pCall = pAddress->CreateCall(bstrNumber,
LINEADDRESSTYPE_PHONENUMBER,
TAPIMEDIATYPE_AUDIO);
// Make the call
hr = pCall->Connect(true);
i think what this is doin there are so many numbers are here...........
i want to call only one no example 123456789 lests its hard coded how can i call this no with the above code what change i have to make for this
thnx in advance guys
Best Regards
Rocky
|
|
|
|
|
<br />
_bstr_t _bsPhoneNumber= "123456789"<br />
<br />
if ( pAddress )<br />
{<br />
pCall = pAddress->CreateCall(bstrNumber_bsPhoneNumber.copy(),<br />
LINEADDRESSTYPE_PHONENUMBER,<br />
TAPIMEDIATYPE_AUDIO);<br />
hr = pCall->Connect(true);<br />
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
I dont know why the hell the script for voting 5 is disabled only for me??
|
|
|
|
|
Hello,
I'm developing a casual game using DirectX. In the game there is class called "CEnergyBall" which contains several animations(in fact, it is 407 altogather) according to its state. I've used the map to managed the animation here.
below is the code snippet :
...
map<AnimationKey,CAnimation> CEnergyBall::s_aBallAnimation;
...
bool operator<(const AnimationKey& a,const AnimationKey& b)
{
if(a.type<b.type)
return true;
if(a.type>b.type)
return false;
if(a.oldState<b.oldState)
return true;
if(a.oldState>b.oldState)
return false;
if(a.newState<b.newState)
return true;
return false;
}
struct AnimationKey
{
ENERGYBALL_TYPE type;
DWORD oldState;
DWORD newState;
friend bool operator<(const AnimationKey& a,const AnimationKey&);
AnimationKey(ENERGYBALL_TYPE type, DWORD newState, DWORD oldState)
{
this->type = type;
this->newState = newState;
this->oldState = oldState;
}
};
This work fine, everything is run smoothly. But when the application is closed (and the object is destroying) the exception is rised :
Unhandled exception at 0x7c901230 in Pick'n Pile.exe: User breakpoint.
Below is stack trace :
ntdll.dll!7c901230()
d3d9d.dll!0103e3ff()
d3d9d.dll!0103e579()
d3d9d.dll!0103e581()
d3d9d.dll!0103db0d()
ntdll.dll!7c91056d()
oleaut32.dll!77121b3d()
oleaut32.dll!77121b26()
ntdll.dll!7c926abe()
ntdll.dll!7c9268ad()
ntdll.dll!7c91056d()
ntdll.dll!7c914652()
ntdll.dll!7c910970()
ntdll.dll!7c90fb71()
ntdll.dll!7c91056d()
ntdll.dll!7c911962()
ntdll.dll!7c911993()
ntdll.dll!7c911970()
kernel32.dll!7c814b84()
ntdll.dll!7c911970()
ntdll.dll!7c911902()
ntdll.dll!7c91056d()
msvcrt.dll!77c2c2de()
msvcrt.dll!77c2c2e3()
ntdll.dll!7c911902()
crypt32.dll!77aa4469()
d3d9d.dll!010fdbc0()
ntdll.dll!7c9011a7()
ntdll.dll!7c923f31()
ntdll.dll!7c910945()
ntdll.dll!7c91094e()
ntdll.dll!7c915b4f()
kernel32.dll!7c81c9ae()
ntdll.dll!7c915b4f()
Pick'n Pile.exe!std::map<AnimationKey,CAnimation,std::less<AnimationKey>,std::allocator<std::pair<AnimationKey const ,CAnimation> > >::~map<AnimationKey,CAnimation,std::less<AnimationKey>,std::allocator<std::pair<AnimationKey const ,CAnimation> > >() + 0x3b C++
> Pick'n Pile.exe!doexit(int code=0, int quick=0, int retcaller=0) Line 414 + 0x9 C
Pick'n Pile.exe!exit(int code=0) Line 303 + 0xd C
Pick'n Pile.exe!WinMainCRTStartup() Line 267 C
kernel32.dll!7c816f97()
ntdll.dll!7c915b4f()
Since there is only s_aBallAnimation declared as map<AnimationKey,CAnimation>, I supect that it caused the exception, but I don't know why it is rised.
I'm using Visual Studio .Net 2003 (which is VC7.1) along with DirectX SDK (June 2006).
Thank you,
Wutipong
|
|
|
|
|
mr_tawan wrote: This work fine, everything is run smoothly. But when the application is closed (and the object is destroying) the exception is rised :
Unhandled exception at 0x7c901230 in Pick'n Pile.exe: User breakpoint.
Your error is an "Unhandled exception" and probably unrelated to the map.
|
|
|
|
|
Are you passing either the map or the map elements between multiple threads by chance? Or passing anything else between multiple threads (say, a std::string)?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Dear All,
I can use synonyms, Translate dictionary features in MS Word's Context Menu. Can I use the same features in browser's Context Menu. If Yes then how?
With Regards
Manoj
|
|
|
|
|
Hi
I see that all stl components have destructors.
string s;
s.~string();
But i know that we don't need to delete stl componenets.I read all stl components automatically delete themself.Is this wrong?
If true what is the function of destructors in STL?
Thanks...
|
|
|
|
|
How do you expect STL components to magically delete themselves ? Cleaning up after themselves is what C++ classes have destructors for.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: How do you expect STL components to magically delete themselves ?
He probably read somwhere that he need not learn the basics but jump right into STL programming.
|
|
|
|
|
say u have vector<string*> in such case the vector will delete the pointers but the memory referred by the pointers.So it leads to memory leak
never say die
|
|
|
|
|
If you have a vector of pointers to dynamically created objects, you must explicitly delete those objects before the vector goes out of scope:
using std::wcout;
using std::endl;
using std::vector;
class Foo
{
public:
Foo(int index) : m_index(index)
{
wcout << L"Creating Foo #" << m_index << endl;
}
~Foo()
{
wcout << L"Destroying Foo #" << m_index << endl;
}
private:
int m_index;
};
int _tmain(int argc, _TCHAR* argv[])
{
vector<Foo*> pFooList;
for (int i = 0; i < 10; ++i)
{
pFooList.push_back(new Foo(i));
}
for (int i = 0; i < 10; ++i)
{
delete pFooList[i];
}
return 0;
}
-- modified at 0:01 Saturday 12th August, 2006
|
|
|
|
|
<br />
Use auto_ptr<> will delete them for you<br />
#include <memory><br />
<br />
using std::wcout;<br />
using std::endl;<br />
using std::vector;<br />
<br />
class Foo<br />
{<br />
public:<br />
Foo(int index) : m_index(index)<br />
{<br />
wcout << L"Creating Foo #" << m_index << endl;<br />
}<br />
<br />
~Foo()<br />
{<br />
wcout << L"Destroying Foo #" << m_index << endl;<br />
}<br />
private:<br />
int m_index;<br />
};<br />
<br />
int _tmain(int argc, _TCHAR* argv[])<br />
{<br />
vector< std::auto_ptr< Foo* > > pFooList;<br />
<br />
for (int i = 0; i < 10; ++i)<br />
{<br />
pFooList.push_back( std::auto_ptr< Foo* >(new Foo(i))); <br />
}<br />
<br />
<br />
<br />
return 0;<br />
}<br />
|
|
|
|