Pamella Stone

Hello all,

I'm trying to compile a idl interface in VS2005 but that always get this error:


Error 1 error MIDL2025 : syntax error : expecting ] or , near "annotation" C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\unknwn.idl 108
Error 2 error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\unknwn.idl 108

Anybody have idea about what could be wrong

Thanks!

Pamella

Here is the source code:

IMusicStorePlugin.idl

import "oaidl.idl";
import "ocidl.idl";

[
object,
uuid(1510723C-5F70-4926-AB87-DC5BD8563721),
dual,
helpstring("IMusicStorePlugin interface"),
pointer_default(unique)
]
interface IMusicStorePlugin : IDispatch
{
[id(1), helpstring("Revokes all licenses")] HRESULT revokeAll();
};

[
uuid(1510723C-5F70-4926-AB87-DC5BD8563721),
version(1.0),
helpstring("MusicStorePlugin 1.0 Type Library")
]
library MusicStoreLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");

[
uuid(1510723C-5F70-4926-AB87-DC5BD8563721),
helpstring("MusicStorePlugin Class")
]
coclass MusicStorePluginClass
{
[default] interface IMusicStorePlugin;
};
};



Re: Visual C++ General Erro compiling .IDL: MIDL2025

CDevK

Include

import "unknwn.idl"

as the first line in your idl and try





Re: Visual C++ General Erro compiling .IDL: MIDL2025

1st Person Shooter

Nope that did not work for me. It's the MIDL compiler thats the problem: http://blogs.msdn.com/mikewasson/archive/2006/10/02/MIDL-error_3A00_-_2700_annotation_2700_.aspx





Re: Visual C++ General Erro compiling .IDL: MIDL2025

Simple Samples

1st Person Shooter wrote:
Nope that did not work for me. It's the MIDL compiler thats the problem: http://blogs.msdn.com/mikewasson/archive/2006/10/02/MIDL-error_3A00_-_2700_annotation_2700_.aspx

Then you should have created a separate thread to ask your question or to make your comment. You can create a thread that is categorized as a comment if you just want to make a comment.

I don't know the details here, but it is very likely that your problem is different and therefore that is why the solution is different. So for the future, if you need help, it will likely be more beneficial for you to create a separate thread and then describe your situation as thoroughly as you can.






Re: Visual C++ General Erro compiling .IDL: MIDL2025

1st Person Shooter

I did a search for "MIDL2025 annotation" and that's how I got to this thread.

Exactly the same situation, exactly the same error message. As you say, you don't know the details here. I am just trying to help by responding with what fixed this particular problem in my case. Creating another thread would have been no help at all because people searching for a solution to this problem would be led to this thread, not to whatever new thread I create.





Re: Visual C++ General Erro compiling .IDL: MIDL2025

Simple Samples

1st Person Shooter wrote:

Creating another thread would have been no help at all because people searching for a solution to this problem would be led to this thread, not to whatever new thread I create.

Note that I suggested you describe your situation as best as possible, then people with the symptoms you describe would find the thread with symptoms as close as possible to their own. There might be something different about your situation that causes the solution to be different but without the other symptom or symptoms in the description they might not find the solution you are offering.






Re: Visual C++ General Erro compiling .IDL: MIDL2025

FreeVili

Hello Pamella

Your problem is the midl compiler. When U use vista sdk, it's header and idl files, U need to use it's midl compiler. U can setup it under "tools/options/vc++ directories". Select the "executable files" from directories and insert the sdk's bin directory at the first place.

That's all... Smile