Click here to Skip to main content
15,913,361 members
Home / Discussions / COM
   

COM

 
AnswerRe: Calling Com object From C# to add 2 numbers Pin
Md. Marufuzzaman15-Dec-09 4:04
professionalMd. Marufuzzaman15-Dec-09 4:04 
QuestionIs it possible to attach the manifest info to a dll for SxS? Pin
levinp29-Nov-09 21:41
levinp29-Nov-09 21:41 
QuestionUsing COM component invalid pointer error Pin
Ash_VCPP27-Nov-09 1:19
Ash_VCPP27-Nov-09 1:19 
AnswerRe: Using COM component invalid pointer error Pin
KarstenK27-Nov-09 1:34
mveKarstenK27-Nov-09 1:34 
GeneralRe: Using COM component invalid pointer error Pin
Ash_VCPP27-Nov-09 2:15
Ash_VCPP27-Nov-09 2:15 
AnswerRe: Using COM component invalid pointer error Pin
User 121625727-Nov-09 2:24
User 121625727-Nov-09 2:24 
GeneralRe: Using COM component invalid pointer error Pin
Ash_VCPP27-Nov-09 2:31
Ash_VCPP27-Nov-09 2:31 
GeneralRe: Using COM component invalid pointer error Pin
KarstenK27-Nov-09 2:50
mveKarstenK27-Nov-09 2:50 
GeneralRe: Using COM component invalid pointer error Pin
Richard MacCutchan27-Nov-09 3:46
mveRichard MacCutchan27-Nov-09 3:46 
QuestionCOM Error: error LNK2001: unresolved external symbol "public: virtual long __stdcall Pin
Ash_VCPP25-Nov-09 23:09
Ash_VCPP25-Nov-09 23:09 
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 

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.