Link to home
Start Free TrialLog in
Avatar of tekel
tekel

asked on

midl.exe does not accept function definition

I was able to compile this code with idltojava (without the uuid info), but it gives me syntax errors when I use midl.exe.  am I missing something in the beginning of the code?

// here is my code
[ uuid (53D5C100-25F6-11D1-B64C-000012df6b3e),
  version(1.0),
  pointer_default(unique)
]
interface Hello
{
    struct A {short field;};
    const float pi = 3.14;
    void f();
    void q(in long s); // it fails in this line
};

//here's the error message
error MIDL2025 : syntax error : expecting a type specification near "in"
Avatar of Andy_Keys
Andy_Keys

try [in] instead of in and see if that works
Try void q([in] long s);
hm.
at least we agree!!
Avatar of tekel

ASKER

okay, using [in] works when i use midl.exe,
but when I use idltojava it gives me a syntax error in the same line.  I thought IDL was suppose to be language-independent?
midl is microsoft specific.
ASKER CERTIFIED SOLUTION
Avatar of Wyn
Wyn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tekel

ASKER

thanks a lot,