Click here to Skip to main content
15,886,639 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to use STL types inside .idl file? e.g. If i try to use stringstream as type of input parameter of method, I get error MIDL2025 : syntax error expecting a type specification near 'stringstream'
Posted
Updated 12-Feb-11 1:46am
v2

You don't put that in the IDL file. Take a look at this MSDN example that shows how to use STL types with ATL:

http://msdn.microsoft.com/en-us/library/3stwxh95(v=VS.100).aspx[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 12-Feb-11 22:13pm    
More advanced answer, 5
--SA
Nish Nishant 12-Feb-11 22:25pm    
Thanks SA.
In short, you can't. You can use STL and such to implement COM exposed methods but the methods themselves can only accept certain types as parameters. See here[^] for a list and details. COM is language neutral so it wouldn't make sense to export C++ specific types.
 
Share this answer
 
v3
Comments
Sergey Alexandrovich Kryukov 12-Feb-11 22:12pm    
Clear answer, my 5, but Nishant's answer give further idea.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900