|i am stuck with one kind of problem when using COM . below are the details ,
i have written a class which has a com object as a member variable. i have different member function one will create the com object other members will access the functions of the com object. the problem comes when i am trying to access function of the com .
here is sample example of my code
// Every this is fine and i was able to create the com object successuflly ..
// every thing is fine and successfull.
// successfull creates com object using cocreateinstance.. and we can call the memebers function of interface
variable->method(); // successfully calls the members
// application crashes when try to access com object functions
variable->method(); // UNHANDLED EXPECTION
CMYclass *ptr; // This is gobal pointer variable..
// fun1 is a gobal function
// fun2 is a gobal function
ptr->obj.accessfunctionofcomobject(); //calling this funciton makes crash.
ptr = new CMYclass();
fun1(); // This function calls creates successful com object inside a class object.
fun2(); // This function calls makes crash...
i want to know why the unhandled exception is raising
modified on Thursday, November 19, 2009 11:53 PM