I have an idl file and it compiles successfully when compiled with jidl.exe.When it is compiled with idlcpp.exe it gives an MIDL2025: syntax error: expecting a type specification near "in".

the idl file is

interface auditserv 
{
    void storeLoginInformation(in string infmn1,in string infmn2);

};

It seems that your compiler is unable to determine the proper type for your function argument,

What does "in" mean in your function by the way?

Is it already a defined type?

I think it doesn't know what string is, and I don't think you can pass string objects as parameters to COM functions. Change string to char* and see if that fixes the problem.

>>What does "in" mean in your function by the way?
In COM programming there are in parameters, meaning input and out parameters, meaning output. They are used only in MDL files, not actual header or *.cpp files.

Member Avatar for jencas

string is a well known type for IDL. The in and out specifiers help the C++ conversion tool to decide whether the variable may be const or not.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.