This IDL won't compile under VS.NET, why? 
Author Message
 This IDL won't compile under VS.NET, why?

Hi,i am trying  to create A type library for a dll exported functions,but i
can't figure out what is the problem which prevents this IDL from compiling:

I am getting the following error:

d:\Projects\UniversalSence\TbWin32\Source1.idl(15): error MIDL2072 :
inapplicable attribute : [dllname] [ Type 'APIBOOL'  ]

[ uuid(79B6284A-6DD7-4691-A311-15B9EA83409F), version(1.0) ]

library TbWin32
{
 importlib("stdole2.tlb");

 [dllname("GDI32.DLL"),helpstring("Windows API declarations in GDI32.DLL.")]

 typedef enum {APIFALSE = 0,APITRUE = 1} APIBOOL;

 module WinGDI
 {
  [entry(1), helpstring("BitBlt")]
  APIBOOL _stdcall BitBlt(
  [in] long hDCDest,
  [in] int xDest,
  [in] int yDest,
  [in] int nWidth,
  [in] int nHeight,
  [in] long hDCSrc,
  [in] int xSrc,
  [in] int ySrc,
  [in] long dwRop);

 }

Quote:
};

Thanks in advance

Tomer



Mon, 24 May 2004 02:30:43 GMT  
 This IDL won't compile under VS.NET, why?
Hi Tomor,


Quote:
> Hi,i am trying  to create A type library for a dll exported functions,but
i
> can't figure out what is the problem which prevents this IDL from
compiling:

> I am getting the following error:

> d:\Projects\UniversalSence\TbWin32\Source1.idl(15): error MIDL2072 :
> inapplicable attribute : [dllname] [ Type 'APIBOOL'  ]

> [ uuid(79B6284A-6DD7-4691-A311-15B9EA83409F), version(1.0) ]

> library TbWin32
> {
>  importlib("stdole2.tlb");

>  [dllname("GDI32.DLL"),helpstring("Windows API declarations in
GDI32.DLL.")]

>  typedef enum {APIFALSE = 0,APITRUE = 1} APIBOOL;
> ...

there is no need for a DLL when you specify an enum. That attribute is
neccessary when you specify a function call because the caller needs to know
where to find the function but an enum is only a mechanism to specify
readable symbols for numeric constants. The numeric values are defined in
your IDL *only* you neither need the dll to get those values nor are they
defined in any dll.

HTH,
Sven



Sun, 23 May 2004 17:38:29 GMT  
 This IDL won't compile under VS.NET, why?
Thanks,it is working now.

Thanks

Tomer Dror


Quote:
> Hi Tomor,



> > Hi,i am trying  to create A type library for a dll exported
functions,but
> i
> > can't figure out what is the problem which prevents this IDL from
> compiling:

> > I am getting the following error:

> > d:\Projects\UniversalSence\TbWin32\Source1.idl(15): error MIDL2072 :
> > inapplicable attribute : [dllname] [ Type 'APIBOOL'  ]

> > [ uuid(79B6284A-6DD7-4691-A311-15B9EA83409F), version(1.0) ]

> > library TbWin32
> > {
> >  importlib("stdole2.tlb");

> >  [dllname("GDI32.DLL"),helpstring("Windows API declarations in
> GDI32.DLL.")]

> >  typedef enum {APIFALSE = 0,APITRUE = 1} APIBOOL;
> > ...

> there is no need for a DLL when you specify an enum. That attribute is
> neccessary when you specify a function call because the caller needs to
know
> where to find the function but an enum is only a mechanism to specify
> readable symbols for numeric constants. The numeric values are defined in
> your IDL *only* you neither need the dll to get those values nor are they
> defined in any dll.

> HTH,
> Sven



Mon, 24 May 2004 16:26:42 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. IDL won't compile under Win2000

2. Why won't this compile?

3. (newbie)why won't the following compile??

4. Why won't this compile????

5. Why won't VC compile this

6. Helpppppp Why won't this compile?

7. why won't CoInitialize compile?

8. Why won't it compile?!

9. Why won't this code compile?

10. Why won't this compile?

11. VC6 Sample Projects won't compile in VC.NET..help please

12. CFileDialog dosen't appear on Win 2k when build with VS .Net

 

 
Powered by phpBB® Forum Software