Click here to Skip to main content
11,496,146 members (367 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
See more: VC10.0
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 12-Feb-11 2:34am
Edited 12-Feb-11 2:46am
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:[^]
SAKryukov at 12-Feb-11 22:13pm
More advanced answer, 5
Nishant Sivakumar at 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.
SAKryukov at 12-Feb-11 22:12pm
Clear answer, my 5, but Nishant's answer give further idea.

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600

Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 12 Feb 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100