can't use FILETIME while writting idl file .
-
I am writting idl file for my project. It is not allowing me to use FILETIME. if I include the windows.h , then it gives me the compiling error like:
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(280) : error MIDL2003 : redefinition : INT
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2003 : redefinition : Int64ShllMod32
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2025 : syntax error : expecting ; near "{"
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(686) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilationIf i am not including windows.h , compiler giving me the error:
1>.\TestRPC.idl(178) : error MIDL2025 : syntax error : expecting a type specification near "FILETIME"
1>.\TestRPC.idl(178) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilationcan anyone tell me how can i resolve this error ? Thanks Vijay_k
-
I am writting idl file for my project. It is not allowing me to use FILETIME. if I include the windows.h , then it gives me the compiling error like:
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(280) : error MIDL2003 : redefinition : INT
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2003 : redefinition : Int64ShllMod32
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2025 : syntax error : expecting ; near "{"
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(686) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilationIf i am not including windows.h , compiler giving me the error:
1>.\TestRPC.idl(178) : error MIDL2025 : syntax error : expecting a type specification near "FILETIME"
1>.\TestRPC.idl(178) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilationcan anyone tell me how can i resolve this error ? Thanks Vijay_k
Hi Vijay_k, it's hard to answer this without looking at your code, but is sounds like you are missing a
#pragma
once or#ifdef
... Marcelo -
I am writting idl file for my project. It is not allowing me to use FILETIME. if I include the windows.h , then it gives me the compiling error like:
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(280) : error MIDL2003 : redefinition : INT
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2003 : redefinition : Int64ShllMod32
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2025 : syntax error : expecting ; near "{"
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(686) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilationIf i am not including windows.h , compiler giving me the error:
1>.\TestRPC.idl(178) : error MIDL2025 : syntax error : expecting a type specification near "FILETIME"
1>.\TestRPC.idl(178) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilationcan anyone tell me how can i resolve this error ? Thanks Vijay_k
I'm not surprised - header files can't always be
#include
'd into IDL files. You could try...- Copy & paste the definition of
FILETIME
into your IDL file. - FILETIME is really just a 64-bit integer (but defined using a struct because Microsoft C didn't used to have 64 bit integers. IIRC). So, just use an IDL 64 bit integer - I think that's called a
hyper
? You could then convert to and fromFILETIME
when calling the functions defined in your IDL.
- Copy & paste the definition of