Click here to Skip to main content
15,895,667 members
Home / Discussions / COM
   

COM

 
QuestionRe: Why CreateWindowEx() function failed on 64 Bit window XP Pin
Randor 20-Jul-10 6:08
professional Randor 20-Jul-10 6:08 
AnswerRe: Why CreateWindowEx() function failed on 64 Bit window XP Pin
am 200920-Jul-10 21:06
am 200920-Jul-10 21:06 
AnswerRe: Why CreateWindowEx() function failed on 64 Bit window XP Pin
am 200920-Jul-10 21:21
am 200920-Jul-10 21:21 
GeneralRe: Why CreateWindowEx() function failed on 64 Bit window XP Pin
Randor 21-Jul-10 8:55
professional Randor 21-Jul-10 8:55 
Questionfile name in coleinsertdialog Pin
MKC00219-Jul-10 21:31
MKC00219-Jul-10 21:31 
QuestionType mismatch when calling a VB.NET COM class from VB6 Pin
AlexInter19-Jul-10 2:35
AlexInter19-Jul-10 2:35 
QuestionHow to develop 64 bit application using VS2005 Pin
am 200915-Jul-10 0:45
am 200915-Jul-10 0:45 
AnswerRe: How to develop 64 bit application using VS2005 Pin
«_Superman_»17-Jul-10 18:25
professional«_Superman_»17-Jul-10 18:25 
GeneralRe: How to develop 64 bit application using VS2005 Pin
am 200918-Jul-10 18:09
am 200918-Jul-10 18:09 
GeneralRe: How to develop 64 bit application using VS2005 Pin
«_Superman_»18-Jul-10 18:42
professional«_Superman_»18-Jul-10 18:42 
GeneralRe: How to develop 64 bit application using VS2005 Pin
am 200918-Jul-10 19:10
am 200918-Jul-10 19:10 
GeneralRe: How to develop 64 bit application using VS2005 Pin
am 200918-Jul-10 19:24
am 200918-Jul-10 19:24 
QuestionVS2010 vs VS2008 generated IDL differences that generates midl compilation error. Pin
Maximilien14-Jul-10 9:45
Maximilien14-Jul-10 9:45 
AnswerRe: VS2010 vs VS2008 generated IDL differences that generates midl compilation error. Pin
Richard MacCutchan14-Jul-10 22:12
mveRichard MacCutchan14-Jul-10 22:12 
QuestionHow to use COleDataObject Pin
MKC00213-Jul-10 4:14
MKC00213-Jul-10 4:14 
QuestionDll Error Pin
Enobong Adahada13-Jul-10 4:09
Enobong Adahada13-Jul-10 4:09 
AnswerRe: Dll Error Pin
Sauro Viti16-Jul-10 0:43
professionalSauro Viti16-Jul-10 0:43 
QuestionContext Menu Shell Extension (Invoked time) [modified] Pin
A_Fa12-Jul-10 19:32
A_Fa12-Jul-10 19:32 
QuestionCoInittialize Fails with large number of processes [modified] Pin
tony_Udz7-Jul-10 18:47
tony_Udz7-Jul-10 18:47 
QuestionException during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
asr11227-Jul-10 2:20
asr11227-Jul-10 2:20 
Hi.

I have a piece of code at client side which calls a method of a COM server to create and return an object. While trying to assign values to data members of this object, I get the following exception - "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

I don't have much exposure to COM so am quite clueless as to how to solve this. Parts of the source are pasted below.

<IDL>

interface _ICallInfo: IDispatch
{
[
propget,
id(1),
helpstring("Call ID")
]
HRESULT CallId([out, retval] LONG *pVal);

[
propput,
id(1),
helpstring("Call ID")
]
HRESULT CallId([in] LONG nCallId);

[
propget,
id(2),
helpstring("Barge Call")
]
HRESULT CallType([out, retval] LONG *nCallType);

[
propput,
id(2),
helpstring("Call Type")
]
HRESULT CallType([in] LONG nCallType);
};

dispinterface _IApplication
{
[
id(3),
helpstring("method CreateCallInfo")
]
HRESULT CreateCallInfo([out]_ICallInfo** piResult);
};


<Client side - a C# client>

public void foo()
{
CallInfo callInfo = null;
CreateCallInfo(out callInfo);


try
{
callInfo.CallId = this.CallId;
callInfo.CallType = (int)this.CallType;
}
catch (Exception ex)
{
//Exception here
}
}


Any help will be appreciated.
Thanks.
AnswerRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
Richard MacCutchan7-Jul-10 3:06
mveRichard MacCutchan7-Jul-10 3:06 
GeneralRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
asr11227-Jul-10 19:44
asr11227-Jul-10 19:44 
GeneralRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
Richard MacCutchan7-Jul-10 21:19
mveRichard MacCutchan7-Jul-10 21:19 
GeneralRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
asr11227-Jul-10 22:32
asr11227-Jul-10 22:32 
GeneralRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
asr11228-Jul-10 3:05
asr11228-Jul-10 3:05 

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.