Click here to Skip to main content
15,886,518 members
Home / Discussions / COM
   

COM

 
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 
(kind of a newbie with idl files, so excuse the lingo that could be not so kosher, or if it's more appropriate for the C++ forum)

In our application we generate some COM objects from with "attributed programming" (*)

with VS2008, our main production tool, the generated IDL file contains the following import directives :
import "docobj.idl";


with VS2010, the generated IDL file contains the following import directives :

import "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\wincrypt.idl";
import "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\exdisp.idl";
import "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\shldisp.idl";
import "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.idl";
import "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\mshtmhst.idl";
import "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\mshtml.idl";
import "c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dimm.idl";
import "c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.idl";


it gives the error :

20>  Microsoft (R) 32b/64b MIDL Compiler Version 7.00.0555 
20>  Copyright (c) Microsoft Corporation. All rights reserved.
20>  Processing .\_my_idl.idl
20>  _my_idl.idl
20>  Processing C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\wincrypt.idl
20>  wincrypt.idl
20>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\wincrypt.idl(47): error MIDL2025: syntax error : expecting a type specification or a storage specifer or a type qualifier near "WCHAR"
20>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\wincrypt.idl(47): error MIDL2026: cannot recover from earlier syntax errors; aborting compilation
20>LINK : fatal error LNK1240: failed to compile IDL content



So I have 2 questions :
1 - Who/what decides what imports are to be added in the IDL file ? why should it have wincrypt.idl ?
I manually removed the wincrypt import from the the IDL file and compiled it without problem, but that's not a solution since the IDL is auto-generated.
2 - If it gives error on the WCHAR, I assume it's thinking the IDL is in wide-char mode, even is our application is not ?


(*) for example, see : http://www.microsoft.com/mspress/books/sampchap/6426.aspx[^]

Thanks.

Max.
Watched code never compiles.

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 
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 
GeneralRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
Richard MacCutchan9-Jul-10 21:19
mveRichard MacCutchan9-Jul-10 21:19 
GeneralRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
Vi212-Jul-10 0:05
Vi212-Jul-10 0:05 
GeneralRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
asr112214-Jul-10 2:39
asr112214-Jul-10 2:39 
QuestionDifference between COM Component and Class Pin
krishna_CP5-Jul-10 0:38
krishna_CP5-Jul-10 0:38 
AnswerRe: Difference between COM Component and Class Pin
Richard MacCutchan5-Jul-10 2:25
mveRichard MacCutchan5-Jul-10 2:25 

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.