Click here to Skip to main content
16,016,229 members
Home / Discussions / COM
   

COM

 
AnswerRe: COM Error: error LNK2001: unresolved external symbol "public: virtual long __stdcall Pin
cariolihome27-Nov-09 10:20
cariolihome27-Nov-09 10:20 
Questionnew to COM Pin
mailgirish99@yahoo.com25-Nov-09 4:26
mailgirish99@yahoo.com25-Nov-09 4:26 
AnswerRe: new to COM Pin
Stuart Dootson25-Nov-09 21:33
professionalStuart Dootson25-Nov-09 21:33 
Questioncom component in asp.net Pin
pravinmishra24-Nov-09 5:42
pravinmishra24-Nov-09 5:42 
QuestionIn Socket server How insert into Oracle? Pin
TheCodeVB21-Nov-09 16:03
TheCodeVB21-Nov-09 16:03 
QuestionOutlook 2007 automation Pin
NiceNaidu19-Nov-09 23:18
NiceNaidu19-Nov-09 23:18 
AnswerRe: Outlook 2007 automation Pin
ScottM129-Nov-09 20:01
ScottM129-Nov-09 20:01 
Questionproblem access com methods - unhandled exception [modified] Pin
Vijjuuu.18-Nov-09 20:40
Vijjuuu.18-Nov-09 20:40 
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

class CMyclass
{
com variable;

public:
void createcomobject();
void accessfunctionofcomobject();
};

CMyclass::void createcomobject()
{

::CoInitialize()
CoCreateInstance(......);
// 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

}

CMYclass::accessfunctionofcomobject()
{
// 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
void fun1()
{
ptr->createcomobject();
}

// fun2 is a gobal function
void fun2()
{
ptr->obj.accessfunctionofcomobject(); //calling this funciton makes crash.
}


void main()
{
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

AnswerRe: problem access com methods Pin
Jonathan Davies19-Nov-09 1:55
Jonathan Davies19-Nov-09 1:55 
AnswerRe: problem access com methods - unhandled exception [modified] Pin
cariolihome27-Nov-09 10:17
cariolihome27-Nov-09 10:17 
QuestionCheck whather the monitor is on or off. Pin
SHRIDHAR TL18-Nov-09 3:25
SHRIDHAR TL18-Nov-09 3:25 
Questionexcel problem Pin
kathassis14-Nov-09 9:01
kathassis14-Nov-09 9:01 
AnswerRe: excel problem Pin
serzh8323-Nov-09 0:01
serzh8323-Nov-09 0:01 
QuestionInterop Excel Pin
mithun narayanan12-Nov-09 17:40
mithun narayanan12-Nov-09 17:40 
AnswerRe: Interop Excel Pin
cariolihome13-Nov-09 11:44
cariolihome13-Nov-09 11:44 
QuestionPlease recommend me a com book. Pin
crazy6612-Nov-09 10:54
crazy6612-Nov-09 10:54 
AnswerRe: Please recommend me a com book. Pin
«_Superman_»12-Nov-09 16:40
professional«_Superman_»12-Nov-09 16:40 
AnswerRe: Please recommend me a com book. Pin
cariolihome13-Nov-09 11:40
cariolihome13-Nov-09 11:40 
GeneralRe: Please recommend me a com book. Pin
apraev22-Nov-09 19:43
apraev22-Nov-09 19:43 
GeneralRe: Please recommend me a com book. Pin
serzh8323-Nov-09 0:14
serzh8323-Nov-09 0:14 
GeneralRe: Please recommend me a com book. Pin
KarstenK27-Nov-09 2:53
mveKarstenK27-Nov-09 2:53 
AnswerRe: Please recommend me a com book. Pin
Baltoro14-Nov-09 10:15
Baltoro14-Nov-09 10:15 
QuestionSet the properties of a DirectShow filter (not DMO filter) in code (no GUI) C# Interop. [modified] Pin
RobstaHendricks12-Nov-09 2:42
RobstaHendricks12-Nov-09 2:42 
QuestionInterop Excel Pin
mithun narayanan11-Nov-09 23:53
mithun narayanan11-Nov-09 23:53 
AnswerRe: Interop Excel Pin
Stuart Dootson12-Nov-09 0:46
professionalStuart Dootson12-Nov-09 0:46 

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.